Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
|
|
@ -0,0 +1,17 @@
|
|||
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
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
// 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"
|
||||
Loading…
Add table
Add a link
Reference in a new issue