GitHub_collection_hello-world/a/assembler_fasm_dos.asm

16 lines
296 B
NASM

format MZ
entry .code: start
segment .code
start:
mov ax, .data ; put data segment into ax
mov ds, ax ; there, I setup the DS for you
mov dx, msg ; now I give you the offset in DX. DS:DX now completed.
mov ah, 9h
int 21h
mov ah, 4ch
int 21h
segment .data
msg db 'Hello World', '$'