DOS Services Using INT 21H Interrupt: Dos Functions and Interrupts: The Intel CPU Recognizes Two Types of Interrupts
DOS Services Using INT 21H Interrupt: Dos Functions and Interrupts: The Intel CPU Recognizes Two Types of Interrupts
LAB: 07
DOS Services using INT 21H interrupt
l Hardware interrupt
√ By calling INT 21h with a subfunction number in the AH processor register and
other parameters in other registers, one invokes various DOS services.
√ DOS services include handling keyboard input, video output, disk file access,
program execution, memory allocation, and various other activities.
LAB: 07
DOS Services using INT 21H interrupt
TITLE to display a string Note down the final result and conclusion:
.MODEL SMALL
.STACK 64
.DATA
STR DB ‘programming is fun’, ‘$’
.CODE
MAIN PROC FAR
MOV AX, @DATA
MOV DS, AX
MOV AH, 09H ;display string
LEA DX, STR
INT 21H
MOV AX, 4C00H
INT 21H
MAIN ENDP
END MAIN
TITLE to display a character. Note down the final result and conclusion:
Data Segment
Check DB 65
Code Segment
MOV DL, CHECK
MOV AH, 02H
INT 21H
LAB: 07
DOS Services using INT 21H interrupt
√ Program to read a character form keyboard.
TITLE to read a character. Note down the final result and conclusion:
Code Segment
MOV AH, 01H
INT 21H
TITLE to read string from Format of string stored in memory after read:
keyboard. MAXLEN ACTLEN INPUT[0] INPUT[1] ......... INPUT[N]
LAB: 07
DOS Services using INT 21H interrupt