Initial commit
This commit is contained in:
25
Colleen/ASM/Colleen.s
Normal file
25
Colleen/ASM/Colleen.s
Normal file
@@ -0,0 +1,25 @@
|
||||
;Colleen
|
||||
section .text
|
||||
extern printf
|
||||
global main
|
||||
main:
|
||||
push rbp
|
||||
mov rbp, rsp
|
||||
sub rsp, 32
|
||||
and rsp, 0xFFFFFFFFFFFFFFF0
|
||||
|
||||
mov rdi, fmt
|
||||
mov rax, 0
|
||||
mov rsi, 10
|
||||
mov rdx, fmt
|
||||
mov rcx, 34
|
||||
call printf wrt ..plt
|
||||
|
||||
add rsp, 32
|
||||
pop rbp
|
||||
|
||||
mov rax,0
|
||||
ret
|
||||
section .data
|
||||
fmt:
|
||||
db ";Colleen%1$csection .text%1$c extern printf%1$c global main%1$cmain:%1$c push rbp%1$c mov rbp, rsp%1$c sub rsp, 32%1$c and rsp, 0xFFFFFFFFFFFFFFF0%1$c%1$c mov rdi, fmt%1$c mov rax, 0%1$c mov rsi, 10%1$c mov rdx, fmt%1$c mov rcx, 34%1$c call printf wrt ..plt%1$c%1$c add rsp, 32%1$c pop rbp%1$c%1$c mov rax,0%1$c ret%1$csection .data%1$c fmt:%1$c db %3$c%2$s%3$c, 0%1$c", 0
|
||||
Reference in New Issue
Block a user