SSTACK SEGMENT STACK DW 32 DUP(?) SSTACK ENDS CODE SEGMENT ASSUME CS:CODE START: PUSH DS MOV AX, 0000H MOV DS, AX MOV AX, OFFSET MIR7 MOV SI, 003CH ;0FH MOV [SI], AX MOV AX, CS MOV SI, 003EH MOV [SI], AX MOV AX, OFFSET MIR6 MOV SI, 00001110B*4 ;0EH MOV [SI], AX MOV AX, CS MOV SI, 00001110B*4+2 MOV [SI], AX CLI POP DS ;INIT THE MAIN MOV AL, 11H OUT 20H, AL MOV AL, 08H OUT 21H, AL MOV AL, 04H OUT 21H, AL MOV AL, 01H OUT 21H, AL MOV AL, 2FH ;00101111B OUT 21H, AL STI AA1: NOP JMP AA1 MIR7: PUSH AX STI MOV AH, 01H MOV AL, '7' INT 10H MOV AH, 01H MOV AL, ' ' INT 10H MOV AL, 20H ;ABLE TO INTERUPTE OUT 20H, AL POP AX IRET MIR6: PUSH AX STI MOV AH, 01H MOV AL, '6' INT 10H MOV AH, 01H MOV AL, ' ' INT 10H MOV AL, 20H ;ABLE TO INTERUPTE OUT 20H, AL POP AX IRET CODE ENDS END START
SSTACK SEGMENT STACK DW 32 DUP(?) SSTACK ENDS CODE SEGMENT ASSUME CS:CODE START: PUSH DS MOV AX, 0000H MOV DS, AX MOV AX, OFFSET MIR7 MOV SI, 003CH MOV [SI], AX MOV AX, CS MOV SI, 003EH MOV [SI], AX MOV AX, OFFSET SIR1 MOV SI, 00C4H MOV [SI], AX MOV AX, CS MOV SI, 00C6H MOV [SI], AX CLI POP DS ;INIT THE MAIN 8259 MOV AL, 11H OUT 20H, AL MOV AL, 08H OUT 21H, AL MOV AL, 04H OUT 21H, AL MOV AL, 01H OUT 21H, AL ;INIT THE EXTRA 8259 MOV AL, 11H OUT 0A0H, AL MOV AL, 30H OUT 0A1H, AL MOV AL, 02H OUT 0A1H, AL MOV AL, 01H OUT 0A1H, AL MOV AL, 0FDH OUT 0A1H, AL MOV AL, 6BH OUT 21H, AL STI AA1: NOP JMP AA1 MIR7: PUSH AX MOV AX, 014DH INT 10H MOV AX, 0137H INT 10H MOV AX, 0120H INT 10H MOV AL, 20H OUT 20H, AL POP AX IRET SIR1: PUSH AX MOV AX, 0153H INT 10H ;S MOV AX, 0131H INT 10H ;SHOW THE 1 MOV AX, 0120H INT 10H MOV AL, 20H OUT 0A0H, AL OUT 20H, AL POP AX IRET CODE ENDS END START
8259DMA interrupt
时间: 2024-10-14 03:51:47