BR3392253: Fix potential buffer overflow in number conversion
[nasm.git] / test / binexe.asm
blob2a9eb6e83fa9d339483557bb30a93ee3443f944c
1 ;Testname=unoptimized; Arguments=-O0 -fbin -obinexe.exe -i../misc/; Files=stdout stderr binexe.exe
2 ;Testname=optimized; Arguments=-Ox -fbin -obinexe.exe -i../misc/; Files=stdout stderr binexe.exe
4 ; Demonstration of how to write an entire .EXE format program by using
5 ; the `exebin.mac' macro package.
6 ; To build:
7 ; nasm -fbin binexe.asm -o binexe.exe -ipath
8 ; (where `path' is such as to allow the %include directive to find
9 ; exebin.mac)
10 ; To test:
11 ; binexe
12 ; (should print `hello, world')
14 %include "exebin.mac"
16 EXE_begin
17 EXE_stack 64 ; demonstrates overriding the 0x800 default
19 section .text
21 mov ax,cs
22 mov ds,ax
24 mov dx,hello
25 mov ah,9
26 int 0x21
28 mov ax,0x4c00
29 int 0x21
31 section .data
33 hello: db 'hello, world', 13, 10, '$'
35 EXE_end