#Does anyone know Assembly?
14 messages · Page 1 of 1 (latest)
When your question is answered use !solved or the button below to mark the question as resolved.
Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question use !howto ask.
@twilit mesa
Your message appears to contain screenshots but no code. Please send code and error messages in text instead of screenshots if applicable!
Thank you and let us know if you have any more questions!
This thread is now set to auto-hide after an hour of inactivity
look at the x64 ABI
what output are you getting
can you first please just copy & paste the code here @twilit mesa
I am only getting 10
Okii
default rel
section .data
fmt_1 db "%lld", 10, 0
array dq 10, 20, 30
section .text
global main
extern printf
main:
sub rsp, 40
mov rbx, 0
mov r8, 0
loooooop:
cmp r8, 3
jge exit
lea rcx, [fmt_1]
lea rax, [array]
mov rdx, [rax + rbx]
xor rax, rax
call printf
add rbx, 8
add r8, 1
jmp loooooop
exit:
add rsp, 40
xor eax, eax
ret
FYI, we do have a dedicated #asm-arch-osdev channel
I did not know, sorry