test: nasm-t -- Reverse the comparision order
[nasm.git] / test / objexe.asm
blob9959f40fa2d3570e31cbfa4da8adcc399ccb55e1
1 ; Demonstration of how to write an entire .EXE format program as a .OBJ
2 ; file to be linked. Tested with the VAL free linker.
3 ; To build:
4 ; nasm -fobj objexe.asm
5 ; val objexe.obj,objexe.exe;
6 ; To test:
7 ; objexe
8 ; (should print `hello, world')
10 segment code
12 ..start: mov ax,data
13 mov ds,ax
14 mov ax,stack
15 mov ss,ax
16 mov sp,stacktop
18 mov dx,hello
19 mov ah,9
20 int 0x21
22 mov ax,0x4c00
23 int 0x21
25 segment data
26 hello: db 'hello, world', 13, 10, '$'
28 segment stack stack
29 resb 64
30 stacktop: