#Does anyone know Assembly?

14 messages · Page 1 of 1 (latest)

twilit mesa
#

Does anyone know Assembly? I am not getting the desired output, can anyone help…?

coral mulchBOT
#

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

Screenshots!

Your message appears to contain screenshots but no code. Please send code and error messages in text instead of screenshots if applicable!

coral mulchBOT
# coral mulch

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

twilit mesa
#

Umm… what 🤡🤡🤡

#

I am new so I don’t know much… 🙁

prisma rover
#

what output are you getting

mild imp
#

can you first please just copy & paste the code here @twilit mesa

twilit mesa
#

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

strange thorn
#

FYI, we do have a dedicated #asm-arch-osdev channel

twilit mesa
#

I did not know, sorry