首页 > 代码库 > 8259DMA interrupt
8259DMA interrupt
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
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。