Implemented calls using memory addresses
This commit is contained in:
parent
225d78e2d8
commit
acfa6de1d4
8 changed files with 114 additions and 10 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue