Implemented register calls
This commit is contained in:
@ -21,11 +21,11 @@ func (a *Assembler) CanSkip(mnemonic Mnemonic, left cpu.Register, right cpu.Regi
|
||||
return false
|
||||
}
|
||||
|
||||
if lastData.Destination == left && lastData.Source == right {
|
||||
if lastData.Destination == right && lastData.Source == left {
|
||||
return true
|
||||
}
|
||||
|
||||
if lastData.Destination == right && lastData.Source == left {
|
||||
if lastData.Destination == left && lastData.Source == right {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
@ -10,16 +10,6 @@ func (a *Assembler) Comment(text string) {
|
||||
})
|
||||
}
|
||||
|
||||
// Call calls a function whose position is identified by a label.
|
||||
func (a *Assembler) Call(name string) {
|
||||
a.Instructions = append(a.Instructions, Instruction{
|
||||
Mnemonic: CALL,
|
||||
Data: &Label{
|
||||
Name: name,
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
// DLLCall calls a function in a DLL file.
|
||||
func (a *Assembler) DLLCall(name string) {
|
||||
a.Instructions = append(a.Instructions, Instruction{
|
||||
|
Reference in New Issue
Block a user