Code: Select all
[BITS 16]
[ORG 0x7C00]
MOV AL, 72
CALL PrintChar
MOV SI, HelloWorldString
CALL PrintString
JMP $
PrintChar:
MOV AH, 0x0E
MOV BH, 0x00
MOV BL, 0x07
INT 0x10
RET
PrintString:
PrintStringNext:
MOV AL, [SI]
INC SI
OR AL, AL
JZ PrintStringExit
CALL PrintChar
JMP PrintStringNext
PrintStringExit:
RET
HelloWorldString db 101, 108, 108, 111, 0
TIMES 510 - ($ - $$) db 0
DW 0xAA55