test.asm
来自「汇编语言与C51的相互调用简介,能给以一定的提示!」· 汇编 代码 · 共 44 行
ASM
44 行
;add the "_" is because of this function get some pamerate in
;add the "_?" is because of this function is reentrantalbe
;add nothing before the function assert there is no pamerate
EXTRN CODE(?C_STARTUP)
;some one said this function is necessary,but i think this function assert is not necessary
; EXTRN CODE(_?CTOA) ;the code is realize in the *.c file
EXTRN CODE(_CTOA)
PUBLIC _ATOC ;some othe *.c file will call this function
;byte R7 R5 R3 R1
;DoubleByte R7R6 R5R4 R3R2 R1R0
;R7R6 R7 is the low byte
; R6 is the high byte
; EXTRN DATA(DDDD)
ORG 0020H
_ATOC: MOV A,R7
MOV B,R6
MOV B,R5
MOV A,R4
; LCALL _?CTOA
LCALL _CTOA
MOV A,#40H
MOV R7,#30H
MOV R6,A
RET
END
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?