(大杂烩)proteus仿真MCS51一百例
源代码在线查看: 8255(1).lst
A51 MACRO ASSEMBLER 8255_1_ 07/25/2006 13:11:42 PAGE 1
MACRO ASSEMBLER A51 V8.00
OBJECT MODULE PLACED IN 8255(1).OBJ
ASSEMBLER INVOKED BY: e:\Program Files\Keil\C51\BIN\A51.EXE 8255(1).asm SET(SMALL) DEBUG EP
LOC OBJ LINE SOURCE
0000 1 ORG 00H
7CFF 2 PORTA EQU 7CFFH ;8255A口地址
7DFF 3 PORTB EQU 7DFFH ;8255B口地址
7EFF 4 PORTC EQU 7EFFH ;8255C口地址
7FFF 5 CADDR EQU 7FFFH ;8255控制字地址
0000 7480 6 MOV A,#80H ;方式0
0002 907FFF 7 MOV DPTR,#CADDR
0005 F0 8 MOVX @DPTR,A ;设置8255工作方式
0006 74FE 9 LOOP: MOV A,#0FEH ;设置显示码
0008 7A08 10 MOV R2,#8 ;设置计数值
000A 907CFF 11 OUTPUT: MOV DPTR,#PORTA
000D F0 12 MOVX @DPTR,A ;显示码送PA口显示
000E 1116 13 CALL DELAY
0010 23 14 RL A ;显示码数据移位
0011 DAF7 15 DJNZ R2,OUTPUT
0013 020006 16 LJMP LOOP
0016 7E00 17 DELAY: MOV R6,#0 ;延时子程序
0018 7F00 18 MOV R7,#0
001A 19 DELAYLOOP:
001A DEFE 20 DJNZ R6,DELAYLOOP
001C DFFC 21 DJNZ R7,DELAYLOOP
001E 22 22 RET
23 END
A51 MACRO ASSEMBLER 8255_1_ 07/25/2006 13:11:42 PAGE 2
SYMBOL TABLE LISTING
------ ----- -------
N A M E T Y P E V A L U E ATTRIBUTES
CADDR. . . . . . . N NUMB 7FFFH A
DELAY. . . . . . . C ADDR 0016H A
DELAYLOOP. . . . . C ADDR 001AH A
LOOP . . . . . . . C ADDR 0006H A
OUTPUT . . . . . . C ADDR 000AH A
PORTA. . . . . . . N NUMB 7CFFH A
PORTB. . . . . . . N NUMB 7DFFH A
PORTC. . . . . . . N NUMB 7EFFH A
REGISTER BANK(S) USED: 0
ASSEMBLY COMPLETE. 0 WARNING(S), 0 ERROR(S)