I am working on an OS using EFI using the ms_abi and was wondering how does it pass arguments because I am moving some systemtable info into a register but when I try to call a function using the correct offset it freezes. I think this is because of a incorrect use of the ABI.
I tried using what is on Wikipedia but I don't think it was working. It could be that I am not using the ABI correctly. I tried using RCX and RDX but those are not working. I also looked at the GCC documentation but that was no help either.
This is what i am trying
.intel_syntax noprefix
.global efimain
efimain:
mov [systable],rcx
mov rax,[systable + 40h]
mov rax, [rax+18h]
mov rdx,Msg
call rax
mov rax, 0
ret
systable:
.byte 122
Msg:
.word 'H'