asm_dip/toolchain/fasmg.kl0e/examples/x86/multiseg.asm

30 lines
323 B
NASM
Raw Normal View History

2024-11-24 20:13:28 -08:00
include '8086.inc'
include 'format/mz.inc'
entry code:start ; program entry point
stack 100h ; stack size
segment code
start:
mov ax,data
mov ds,ax
mov dx,hello
call extra:write_text
mov ax,4C00h
int 21h
segment data
hello db 'Hello world!',24h
segment extra
write_text:
mov ah,9
int 21h
retf