这些是基于dp51仿真仪的程序
源代码在线查看: input.lst
A51 MACRO ASSEMBLER INPUT 03/03/2004 08:32:41 PAGE 1
MACRO ASSEMBLER A51 V6.12
OBJECT MODULE PLACED IN .\INPUT.OBJ
ASSEMBLER INVOKED BY: C:\KEIL\C51\BIN\A51.EXE .\INPUT.asm SET(LARGE) DEBUG EP
LOC OBJ LINE SOURCE
0090 1 SDA BIT P1.0
0091 2 CLK BIT P1.1
00B5 3 INPUT BIT P3.5
0097 4 LED_CS BIT P1.7
5
4000 6 ORG 4000H
4000 2100 7 AJMP MAIN
8
4100 9 ORG 4100H
4100 10 MAIN:
4100 758160 11 MOV SP,#60H
4103 D2B5 12 SETB INPUT
4105 C297 13 clr P1.7
14
4107 30B504 15 UP: JNB INPUT,NEXTP
410A 7A00 16 MOV R2,#00
410C 2110 17 AJMP NEXTPP
410E 7AFF 18 NEXTP: MOV R2,#0FFH
4110 3114 19 NEXTPP: ACALL TXDBYTE
4112 2107 20 AJMP UP
21
22 ;若发送的示荽娣旁赗2中
4114 23 TXDBYTE:
4114 C0D0 24 PUSH PSW
4116 C0E0 25 PUSH ACC
4118 EA 26 MOV A,R2
4119 7B08 27 MOV R3,#08H
411B 33 28 TXDUP: RLC A
411C 9290 29 MOV SDA,C
411E C291 30 CLR CLK
4120 D291 31 SETB CLK
4122 DBF7 32 DJNZ R3,TXDUP
4124 D0E0 33 POP ACC
4126 D0D0 34 POP PSW
4128 22 35 RET
36
37 END
A51 MACRO ASSEMBLER INPUT 03/03/2004 08:32:41 PAGE 2
SYMBOL TABLE LISTING
------ ----- -------
N A M E T Y P E V A L U E ATTRIBUTES
ACC. . . . . . . . D ADDR 00E0H A
CLK. . . . . . . . B ADDR 0090H.1 A
INPUT. . . . . . . B ADDR 00B0H.5 A
LED_CS . . . . . . B ADDR 0090H.7 A
MAIN . . . . . . . C ADDR 4100H A
NEXTP. . . . . . . C ADDR 410EH A
NEXTPP . . . . . . C ADDR 4110H A
P1 . . . . . . . . D ADDR 0090H A
P3 . . . . . . . . D ADDR 00B0H A
PSW. . . . . . . . D ADDR 00D0H A
SDA. . . . . . . . B ADDR 0090H.0 A
SP . . . . . . . . D ADDR 0081H A
TXDBYTE. . . . . . C ADDR 4114H A
TXDUP. . . . . . . C ADDR 411BH A
UP . . . . . . . . C ADDR 4107H A
REGISTER BANK(S) USED: 0
ASSEMBLY COMPLETE. 0 WARNING(S), 0 ERROR(S)