《微机原理实验程序.doc》由会员分享,可在线阅读,更多相关《微机原理实验程序.doc(3页珍藏版)》请在金锄头文库上搜索。
1、DATA SEGMENT TABLE1 DB 3FH,06H,5BH,4FH,66H,6DH,7DH,07H,7FH,6FH GW DB 0 SW DB 0DATA ENDSCODE SEGMENT ASSUME CS:CODE,DS:DATASTART: MOV AX,DATA MOV DS,AX PUSH DS MOV AX,0000H MOV DS,AX MOV AX,OFFSET MIR7 MOV SI,003CH MOV SI,AX MOV AX,SEG MIR7 MOV SI,003EH MOV SI,AX CLI POP DS MOV AL,11H OUT 20H,AL MOV
2、AL,08H OUT 21H,AL MOV AL,04H OUT 21H,AL MOV AL,01H OUT 21H,AL MOV AL,7FH OUT 21H,AL MOV DX,06C6H MOV AL,10H OUT DX,AL MOV DX,06C0H MOV AL,01H OUT DX,AL MOV DX,0646H MOV AL,80H OUT DX,AL STI AA1:NOP JMP AA1 MIR7:STI MOV DX,06C0H MOV AL,01H OUT DX,AL LEA BX,TABLE1 MOV AL,GW XLAT MOV DX,0640H OUT DX,AL
3、 MOV AL,0FEH MOV DX,0642H OUT DX,AL INC GW CMP GW,10 JNE A1 MOV GW,0 INC SW LEA BX,TABLE1 MOV AL,SW XLAT MOV DX,0640H OUT DX,AL MOV AL,0FDH MOV DX,0642H OUT DX,AL A1:CMP SW,1 JNZ NEXT MOV AX,0146H INT 10H MOV AX,0155H INT 10H MOV AX,014CH INT 10H MOV AX,014CH INT 10H MOV AX,0121H INT 10H NEXT:MOV AL,20H OUT 20H,AL STI IRET CODE ENDS END START