Interrupts Part 1
Interrupts Part 1
Interrupts Part 1
INTERRUPT TYPES
INT 0A H
.
.
.
ASSUME CS : CODE ,DS:DATA
DATA SEGMENT
FILENAME DB “RESULT” ,”$”
FURTHER : INT 0AH
MSG DB “FILE WASNN’T CREATED “,”$” STOP : MOV AH,4CH If the file is created successfully
DATA ENDS INT 21H Write into it and return to DOS
CODE SEGMENT prompt .
START : MOV AX,CODE ISROA PROC NEAR
MOV BX,AX
MOV DS,AX // SET DS AT CODE FOR SETTING IVT
MOV CX,500H
MOV DX,OFFSET ISR0A //SET DX AT THE OFFSET OF ISR0A MOV DX,1000H
MOV AX,250AH // SET IVT USING FUNCTION VALUE 250AH IN AX MOV AX,1000H
INT 21H MOV DS,AX
MOV DX,OFFSET FILENAME MOV AH ,40H
INT 21H Write in the file
MOV AX,DATA
IRET
MOV DS,AX ISROA ENDP
MOV CX,00H
MOV AH,3CH CODE ENDS
INT 21H END START
JNC FURTHER
MOV DX,OFFSET MSG
MOV AH,09H
INT 21 H
JMP STOP WW