发表于:2005/6/16 23:28:00
#0楼
各位大虾,我是刚学汇编语言的一个学生,现在有个语言,希望大家能帮我把它注释下,谢谢。
ORG 3130H
JMP A81
TAB DW LED0,LED1,LED2,LED3,LED4,LED5,LED6,LED7
DW LED8,LED9,LEDA,LEDB,LEDC,LEDD,LEDE,LEDF
A81: MOV BX,OFFSET TAB
MOV SI,4000H
MOV AL,[SI]
AND AL,0FH
SHL AL,1
MOV AH,00H
ADD BX,AX
JMP [BX]
LED0: MOV AL,0C0H
JMP LEDX
LED1: MOV AL,0F9H
JMP LEDX
LED2: MOV AL,0A4H
JMP LEDX
LED3: MOV AL,0B0H
JMP LEDX
LED4: MOV AL,99H
JMP LEDX
LED5: MOV AL,92H
JMP LEDX
LED6: MOV AL,82H
JMP LEDX
LED7: MOV AL,0F8H
JMP LEDX
LED8: MOV AL,80H
JMP LEDX
LED9: MOV AL,90H
JMP LEDX
LEDA: MOV AL,88H
JMP LEDX
LEDB: MOV AL,83H
JMP LEDX
LEDC: MOV AL,0C6H
JMP LEDX
LEDD: MOV AL,0A1H
JMP LEDX
LEDE: MOV AL,86H
JMP LEDX
LEDF: MOV AL,8EH
JMP LEDX
LEDX: MOV DX,0FFDCH
OUT DX,AL
MOV CL,20H
MOV DX,0FFDDH
LEDX1: MOV AL,CL
OUT DX,AL
PUSH CX
CALL DLL
POP CX
ROR CL,1
JMP LEDX1
DLL: MOV BX,0020H
DL1: DEC BX
CMP BX,0000
JZ DL3
MOV CX,04FFH
LOOP $
JMP DL1
DL3: RET
ORG 3130H
JMP A81
TAB DW LED0,LED1,LED2,LED3,LED4,LED5,LED6,LED7
DW LED8,LED9,LEDA,LEDB,LEDC,LEDD,LEDE,LEDF
A81: MOV BX,OFFSET TAB
MOV SI,4000H
MOV AL,[SI]
AND AL,0FH
SHL AL,1
MOV AH,00H
ADD BX,AX
JMP [BX]
LED0: MOV AL,0C0H
JMP LEDX
LED1: MOV AL,0F9H
JMP LEDX
LED2: MOV AL,0A4H
JMP LEDX
LED3: MOV AL,0B0H
JMP LEDX
LED4: MOV AL,99H
JMP LEDX
LED5: MOV AL,92H
JMP LEDX
LED6: MOV AL,82H
JMP LEDX
LED7: MOV AL,0F8H
JMP LEDX
LED8: MOV AL,80H
JMP LEDX
LED9: MOV AL,90H
JMP LEDX
LEDA: MOV AL,88H
JMP LEDX
LEDB: MOV AL,83H
JMP LEDX
LEDC: MOV AL,0C6H
JMP LEDX
LEDD: MOV AL,0A1H
JMP LEDX
LEDE: MOV AL,86H
JMP LEDX
LEDF: MOV AL,8EH
JMP LEDX
LEDX: MOV DX,0FFDCH
OUT DX,AL
MOV CL,20H
MOV DX,0FFDDH
LEDX1: MOV AL,CL
OUT DX,AL
PUSH CX
CALL DLL
POP CX
ROR CL,1
JMP LEDX1
DLL: MOV BX,0020H
DL1: DEC BX
CMP BX,0000
JZ DL3
MOV CX,04FFH
LOOP $
JMP DL1
DL3: RET