I am currently developing a simple kernel for a university course, in which I am asked to implement a function that outputs all the register values. So far, I have managed to write the following:
push rbp
mov rbp, rsp
pushState
push rsi
push rdi
push rdx
mov rcx, 5
mov rdx, raxMsg
mov rsi, 1
mov rdi, 1
call sysCallDispatcher
mov rcx, 16
mov rdx, [rax]
mov rsi, 1
mov rdi, 1
call sysCallDispatcher
pop rdx
pop rdi
pop rsi
popState
leave
ret
This is just an example for the RAX register (raxMsg is defined as "RAX: " and sysCallDispatcher manages the syscall to output a write syscall). My question is: when I load what is in RAX, what type of variable is being stored in rdx? Is it an int I have to convert to string? Thank you.