Implemented calls using memory addresses
This commit is contained in:
@ -32,5 +32,8 @@ func (c *compiler) call(x asm.Instruction) {
|
||||
|
||||
case *asm.Register:
|
||||
c.code = x86.CallRegister(c.code, data.Register)
|
||||
|
||||
case *asm.Memory:
|
||||
c.code = x86.CallAtMemory(c.code, data.Base, data.Offset)
|
||||
}
|
||||
}
|
||||
|
@ -9,7 +9,7 @@ import (
|
||||
|
||||
func (c *compiler) dllCall(x asm.Instruction) {
|
||||
size := 4
|
||||
c.code = x86.CallAtAddress(c.code, 0x00_00_00_00)
|
||||
c.code = x86.CallAt(c.code, 0x00_00_00_00)
|
||||
position := len(c.code) - size
|
||||
label := x.Data.(*asm.Label)
|
||||
|
||||
|
Reference in New Issue
Block a user