;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; File : LinuxT ;; Description: ;; a linux program that returns with an exit code of 0 ;; similar to the 'true' program available on unix. ;; ;; Purpose : written to test the GoAsm assembler. ;; ;; Author : V.Krishnakumar ;; ;; Build notes: ;; GoAsm is a Win32 assembler and the output it ;; generates is PE/COFF. In order to build and ;; execute this program I did this: ;; ;; 1. goasm LinuxT ;; 2. objcopy -O elf32-i386 LinuxT.obj LinuxT.o ;; 3. ld -o LinuxT LinuxT.o ;; ;; the first produces a PE/COFF file ;; the second converts a PE/COFF file to ELF32 object file ;; and the third command uses the system linker to link the ;; object file to produce a standard linux executable. ;; ;; More info : ;; http://www.linuxassembly.org is the information clearinghouse ;; for all things related to linux (and unix) assembly language. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; the program simply calls exit to with the return code of 0. CODE SECTION ; the linux linker expects to find the symbol _start ; as the standard entry point. _start: ; the internal ordinal for exit function is 1 xor eax,eax inc eax ; the first argument (ie, the return code) should be in ebx xor ebx,ebx ; call the kernel. int 0x80