Lecture #02, Microprocessor Lab
Lecture #02, Microprocessor Lab
Lecture #02, Microprocessor Lab
Instruction RET is used to transfer control from procedure back to calling procedure/
main program instruction following CALL. Example-
Example-
PrintString MACRO msg
mov ah, 09h ; AH = display string function
mov dx, offset msg ; DX = offset of data item msg
int 21h ; call DOS service
ENDM
Assembly Language Programming
Input-Output Structure:
System calls are invoked using instruction INT.
Each interrupt has associated 4 bytes vector in 8086.
DOS services are accessed through interrupt 21H (INT 21H).
Example-
_DATA segment
msg1 db ‘Welcome to System Call through Software Interrupts$’
_DATA ends
…
; Display String through DOS call
mov ah, 09h ; display string function
mov dx, offset msg1 ; DX = offset address of msg in DS
int 21h ; call DOS service
…
8) EXE to COM Converter converts executable file (EXE) to command file (COM).
Microsoft’s EXE2BIN, Borland’s Turbo linker (TLINK/T) etc.