Implemented calls using memory addresses

This commit is contained in:
Eduard Urbach 2025-03-03 00:53:41 +01:00
parent 225d78e2d8
commit acfa6de1d4
Signed by: eduard
GPG key ID: 49226B848C78F6C8
8 changed files with 114 additions and 10 deletions

View file

@ -9,7 +9,7 @@ import (
func TestX86(t *testing.T) {
assert.DeepEqual(t, x86.Call(nil, 1), []byte{0xE8, 0x01, 0x00, 0x00, 0x00})
assert.DeepEqual(t, x86.CallAtAddress(nil, 1), []byte{0xFF, 0x15, 0x01, 0x00, 0x00, 0x00})
assert.DeepEqual(t, x86.CallAt(nil, 1), []byte{0xFF, 0x15, 0x01, 0x00, 0x00, 0x00})
assert.DeepEqual(t, x86.ExtendRAXToRDX(nil), []byte{0x48, 0x99})
assert.DeepEqual(t, x86.MoveRegisterNumber(nil, 0, 1), []byte{0xB8, 0x01, 0x00, 0x00, 0x00})
assert.DeepEqual(t, x86.MoveRegisterNumber(nil, 1, 1), []byte{0xB9, 0x01, 0x00, 0x00, 0x00})