ORG 100h ; instruct compiler to make simple single segment .com file.
; The sub-function that we are using
; does not modify the AH register on
; return, so we may set it only once.
MOV AH, 0Eh ; select sub-function.
; INT 10h / 0Eh sub-function
; receives an ASCII code of the
; character that will be printed
; in AL register.
MOV AL, 'H' ; ASCII code: 72
INT 10h ; print it!
MOV AL, 'e' ; ASCII code: 101
INT 10h ; print it!
MOV AL, 'l' ; ASCII code: 108
INT 10h ; print it!
MOV AL, 'l' ; ASCII code: 108
INT 10h ; print it!
MOV AL, 'o' ; ASCII code: 111
INT 10h ; print it!
MOV AL, '!' ; ASCII code: 33
INT 10h ; print it!
RET ; returns to operating system.
|