汇编小程序
源代码在线查看: project.lst
A51 MACRO ASSEMBLER PROJECT 07/08/2012 21:01:59 PAGE 1
MACRO ASSEMBLER A51 V8.02a
OBJECT MODULE PLACED IN project.OBJ
ASSEMBLER INVOKED BY: C:\Keil\C51\BIN\A51.EXE project.asm SET(SMALL) DEBUG EP
LOC OBJ LINE SOURCE
0000 1 ORG 0000H
0000 0130 2 AJMP MAIN
0030 3 ORG 0030H
0030 74E4 4 MAIN: MOV A,#0E4H ;累加器A存入初始值0E4H
0032 78FF 5 MOV R0,#0FFH ;寄存器R0放入初始值0FFH
0034 F4 6 CPL A ;累加器A求反
0035 F580 7 MOV P0,A ;累加器A的内容放入P0口
0037 74E4 8 MOV A,#0E4H ;累加器A放入初始值
0039 68 9 XRL A,R0 ;寄存器R0与累加器A相‘异或
’并把结果放入累加器A中
003A 113C 10 ACALL DEL ;延时
003C 7D01 11 DEL: MOV R5,#01H ;延时子程序
003E 7EFF 12 DEL1: MOV R6,#0FFH
0040 7FFF 13 DEL2: MOV R7,#0FFH
0042 DFFE 14 DEL3: DJNZ R7,DEL3
0044 DEFA 15 DJNZ R6,DEL2
0046 DDF6 16 DJNZ R5,DEL1
0048 22 17 RET
18 END
A51 MACRO ASSEMBLER PROJECT 07/08/2012 21:01:59 PAGE 2
SYMBOL TABLE LISTING
------ ----- -------
N A M E T Y P E V A L U E ATTRIBUTES
DEL. . . . . . . . C ADDR 003CH A
DEL1 . . . . . . . C ADDR 003EH A
DEL2 . . . . . . . C ADDR 0040H A
DEL3 . . . . . . . C ADDR 0042H A
MAIN . . . . . . . C ADDR 0030H A
P0 . . . . . . . . D ADDR 0080H A
REGISTER BANK(S) USED: 0
ASSEMBLY COMPLETE. 0 WARNING(S), 0 ERROR(S)