From: nasm-bot f. C. G. <gor...@gm...> - 2018-11-12 07:01:36
|
Commit-ID: fa747e71a878bfa0e1bbb8d31e5f381fa297bf7f Gitweb: http://repo.or.cz/w/nasm.git?a=commitdiff;h=fa747e71a878bfa0e1bbb8d31e5f381fa297bf7f Author: Cyrill Gorcunov <gor...@gm...> AuthorDate: Sun, 11 Nov 2018 15:37:54 +0300 Committer: Cyrill Gorcunov <gor...@gm...> CommitDate: Sun, 11 Nov 2018 21:43:46 +0300 test: nasm-t -- Add lnxhello Signed-off-by: Cyrill Gorcunov <gor...@gm...> --- {test => travis/test}/lnxhello.asm | 13 ++++--------- travis/test/lnxhello.json | 11 +++++++++++ travis/test/lnxhello.o.t | Bin 0 -> 784 bytes 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/test/lnxhello.asm b/travis/test/lnxhello.asm similarity index 63% copy from test/lnxhello.asm copy to travis/test/lnxhello.asm index 1aa5a5f..5fd7405 100644 --- a/test/lnxhello.asm +++ b/travis/test/lnxhello.asm @@ -1,8 +1,3 @@ -;Testname=aout; Arguments=-faout -olnxhello.o -Ox; Files=stdout stderr lnxhello.o -;Testname=aoutb; Arguments=-faoutb -olnxhello.o -Ox; Files=stdout stderr lnxhello.o -;Testname=as86; Arguments=-fas86 -olnxhello.o -Ox; Files=stdout stderr lnxhello.o -;Testname=elf32; Arguments=-felf32 -olnxhello.o -Ox; Files=stdout stderr lnxhello.o - ; ; Assembly "Hello, World!" for Linux ; @@ -18,13 +13,13 @@ _start: ; gdb doesn't like to stop at the entry point address, so ; we put a nop here for pure convenience - nop + nop write_hello: mov edx, hello_len mov ecx, hello - + .loop: mov eax, SYS_write mov ebx, 1 ; stdout @@ -37,7 +32,7 @@ write_hello: sub edx, eax jnz .loop -ok: +ok: mov eax, SYS_exit xor ebx, ebx int 80h @@ -48,7 +43,7 @@ error: mov ebx, 1 ; Error int 80h hlt - + section .rodata hello: db "Hello, World!", 10 hello_len equ $-hello diff --git a/travis/test/lnxhello.json b/travis/test/lnxhello.json new file mode 100644 index 0000000..b62b890 --- /dev/null +++ b/travis/test/lnxhello.json @@ -0,0 +1,11 @@ +[ + { + "description": "Assembly 'Hello, World! for Linux", + "id": "lnxhello", + "format": "elf32", + "source": "lnxhello.asm", + "target": [ + { "output": "lnxhello.o" } + ] + } +] diff --git a/travis/test/lnxhello.o.t b/travis/test/lnxhello.o.t new file mode 100644 index 0000000..d0532cd Binary files /dev/null and b/travis/test/lnxhello.o.t differ |