⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bin32cpl.asm

📁 Cordic algorithm description and C/Asm51 sourcecode examples
💻 ASM
字号:
;-----------------------------------------------------------------;; This routine returns the 2's complement of the                  ;; 32-bit value pointed to by R0.                                  ;;                                                                 ;; INPUT:       R0       Points to 32-bit in RAM (above 80h).      ;;                       R0->MSB,,,(R0+3)->LSB.                    ;; OUTPUT:      R0       Points to 2's complement of 32-bit value. ;; MODIFIES:    R0       Value pointed to by R0                    ;; USES:        NONE.                                              ;; NOTES:       This routine has been fully tested.                ;;-----------------------------------------------------------------;bin32cpl:   push  psw   push  acc      push  b                    inc   r0   inc   r0                ; Point R0 to LSB   inc   r0   mov   b,#4   setb  cbin32cpl1:   mov   a,@r0             ; Fetch byte   cpl   a                 ; Get complement   addc  a,#0              ; Inc. if needed   mov   @r0,a             ; Save back   dec   r0                ; Point to next byte   djnz  b,bin32cpl1       ; Loop.   inc   r0                ; Restore R0   pop   b                  pop   acc   pop   psw   ret

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -