Lecture #01, Microprocessor Lab
Lecture #01, Microprocessor Lab
Program Segments:
80x86 organizes main memory as segments of 64Kb size.
It provides 4 segments- CS, DS, SS and ES to access these segments.
_CODE SEGMENT
ASSUME CS:_CODE
START:
…
_CODE ENDS
END START
Assembly Language Programming
Program Segments:
Program termination must be done explicitly using program termination system call of OS.
Example-
_CODE SEGMENT
ASSUME CS:_CODE
START:
; Program code
…
; Program termination
MOV AH, 4CH ; program termination function
MOV AL, 00H ; return code
INT 21H ; call DOS service
_CODE ENDS
END START