From 218ba6bc9e16bff9ed9d84884c4f390c8ff731c9 Mon Sep 17 00:00:00 2001 From: Cyrill Gorcunov Date: Sun, 4 Nov 2018 15:22:14 +0300 Subject: [PATCH] test: nasm-t -- Add binexe test Signed-off-by: Cyrill Gorcunov --- travis/test/binexe.asm | 32 ++++++++++++++++++++++++++++++++ travis/test/binexe.exe.t | Bin 0 -> 63 bytes travis/test/binexe.json | 17 +++++++++++++++++ 3 files changed, 49 insertions(+) create mode 100644 travis/test/binexe.asm create mode 100644 travis/test/binexe.exe.t create mode 100644 travis/test/binexe.json diff --git a/travis/test/binexe.asm b/travis/test/binexe.asm new file mode 100644 index 00000000..ab852fb9 --- /dev/null +++ b/travis/test/binexe.asm @@ -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 diff --git a/travis/test/binexe.exe.t b/travis/test/binexe.exe.t new file mode 100644 index 0000000000000000000000000000000000000000..f693142453308ebe5ab0a8761dc0fdaab79d22ea GIT binary patch literal 63 zcmeZ`l4oFKU|?WkU;)Ap{}VtQ#t;92BpCFZ=)18?fN=}wS;ZX;K4%p(Qgd?hbrj0; Ki*izUxl{nk&=B_k literal 0 HcmV?d00001 diff --git a/travis/test/binexe.json b/travis/test/binexe.json new file mode 100644 index 00000000..763b7a0e --- /dev/null +++ b/travis/test/binexe.json @@ -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/" + } +]