Add get_rip/get_rsp helpers
This commit is contained in:
@@ -1,10 +1,12 @@
|
|||||||
|
global get_rsp
|
||||||
|
get_rsp:
|
||||||
|
mov rax, rsp
|
||||||
|
ret
|
||||||
|
|
||||||
section .text
|
global get_rip
|
||||||
global do_the_set_registers
|
get_rip:
|
||||||
do_the_set_registers:
|
pop rax ; do the same thing as 'ret', except with 'jmp'
|
||||||
mov rax, 0xdeadbeef0badc0de
|
jmp rax ; with the return address still in rax
|
||||||
mov r8, rcx
|
|
||||||
mov r9, rdi
|
|
||||||
|
|
||||||
global _halt
|
global _halt
|
||||||
_halt:
|
_halt:
|
||||||
|
|||||||
Reference in New Issue
Block a user