mirror of
https://github.com/netwide-assembler/nasm.git
synced 2025-07-24 10:25:42 -04:00
test: nasm-t -- Add binexe test
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
This commit is contained in:
parent
071e53603f
commit
218ba6bc9e
32
travis/test/binexe.asm
Normal file
32
travis/test/binexe.asm
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
; Demonstration of how to write an entire .EXE format program by using
|
||||||
|
; the `exebin.mac' macro package.
|
||||||
|
; To build:
|
||||||
|
; nasm -fbin binexe.asm -o binexe.exe -ipath
|
||||||
|
; (where `path' is such as to allow the %include directive to find
|
||||||
|
; exebin.mac)
|
||||||
|
; To test:
|
||||||
|
; binexe
|
||||||
|
; (should print `hello, world')
|
||||||
|
|
||||||
|
%include "exebin.mac"
|
||||||
|
|
||||||
|
EXE_begin
|
||||||
|
EXE_stack 64 ; demonstrates overriding the 0x800 default
|
||||||
|
|
||||||
|
section .text
|
||||||
|
|
||||||
|
mov ax,cs
|
||||||
|
mov ds,ax
|
||||||
|
|
||||||
|
mov dx,hello
|
||||||
|
mov ah,9
|
||||||
|
int 0x21
|
||||||
|
|
||||||
|
mov ax,0x4c00
|
||||||
|
int 0x21
|
||||||
|
|
||||||
|
section .data
|
||||||
|
|
||||||
|
hello: db 'hello, world', 13, 10, '$'
|
||||||
|
|
||||||
|
EXE_end
|
BIN
travis/test/binexe.exe.t
Normal file
BIN
travis/test/binexe.exe.t
Normal file
Binary file not shown.
17
travis/test/binexe.json
Normal file
17
travis/test/binexe.json
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"description": "Test for exebin.mac macros (-Ox)",
|
||||||
|
"id": "binexe",
|
||||||
|
"format": "bin",
|
||||||
|
"source": "binexe.asm",
|
||||||
|
"option": "-Ox -i./misc/",
|
||||||
|
"target": [
|
||||||
|
{ "output": "binexe.exe" }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "Test for exebin.mac macros (-O0)",
|
||||||
|
"ref": "binexe",
|
||||||
|
"option": "-O0 -i./misc/"
|
||||||
|
}
|
||||||
|
]
|
Loading…
x
Reference in New Issue
Block a user