Improved assembler

This commit is contained in:
Eduard Urbach 2023-10-23 12:37:20 +02:00
parent d5f752bdd4
commit 8e193c69b6
Signed by: eduard
GPG key ID: 49226B848C78F6C8
22 changed files with 329 additions and 139 deletions

10
src/asm/x64/Call.go Normal file
View file

@ -0,0 +1,10 @@
package x64
import "io"
// 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(w io.ByteWriter, address uint32) {
w.WriteByte(0xe8)
appendUint32(w, address)
}