Sha256: 9eefd7e88fac5279c009c039355ab88536af7d0706898ab2e2ce5c9836002861

Contents?: true

Size: 930 Bytes

Versions: 10

Compression:

Stored size: 930 Bytes

Contents

===UASM===

option casemap:none
if @Platform eq 1
   option dllimport:<kernel32>
      ExitProcess   proto :dword
   option dllimport:none
      exit          equ ExitProcess
endif
printf              proto :qword, :vararg
exit                proto :dword

.code
main proc
invoke printf, CSTR("Goodbye, World!",10)
invoke exit, 0
ret
main endp
end

===AT&amp;T syntax (Gas)===
// No "main" used
// compile with `gcc -nostdlib`
#define SYS_WRITE   $1
#define STDOUT      $1
#define SYS_EXIT    $60
#define MSGLEN      $14

.global _start
.text

_start:
    movq    $message, %rsi          // char *
    movq    SYS_WRITE, %rax
    movq    STDOUT, %rdi
    movq    MSGLEN, %rdx
    syscall                         // sys_write(message, stdout, 0x14);
    
    movq    SYS_EXIT, %rax
    xorq    %rdi, %rdi              // The exit code.
    syscall                         // exit(0)
    
.data
message:    .ascii "Hello, world!\n"

Version data entries

10 entries across 7 versions & 1 rubygems

Version Path
zettacode-0.1.7 files.zettacode/hello_world.text/x86-64_assembly.txt
zettacode-0.1.6 files.zettacode/hello_world.text/x86-64_assembly.txt
zettacode-0.1.6 files.zettacode2/hello_world.text/x86-64_assembly.txt
zettacode-0.1.5 files.zettacode/hello_world.text/x86-64_assembly.txt
zettacode-0.1.5 files.zettacode2/hello_world.text/x86-64_assembly.txt
zettacode-0.1.4 files.zettacode/hello_world.text/x86-64_assembly.txt
zettacode-0.1.4 files.zettacode2/hello_world.text/x86-64_assembly.txt
zettacode-0.1.3 files.zettacode/hello_world.text/x86-64_assembly.txt
zettacode-0.1.2 files.zettacode/hello_world.text/x86-64_assembly.txt
zettacode-0.1.1 zettacode.files/hello_world.text/x86-64_assembly.txt