Improved file structure
This commit is contained in:
parent
b6400cd77e
commit
c0f399df7f
18 changed files with 106 additions and 378 deletions
14
src/arch/x64/Call.go
Normal file
14
src/arch/x64/Call.go
Normal file
|
@ -0,0 +1,14 @@
|
|||
package x64
|
||||
|
||||
// Call places the return address on the top of the stack and continues
|
||||
// program flow at the new address. The address is relative to the next instruction.
|
||||
func Call(code []byte, address uint32) []byte {
|
||||
return append(
|
||||
code,
|
||||
0xe8,
|
||||
byte(address),
|
||||
byte(address>>8),
|
||||
byte(address>>16),
|
||||
byte(address>>24),
|
||||
)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue