Implemented subtraction
This commit is contained in:
@ -30,10 +30,13 @@ func (a *Assembler) Finalize() ([]byte, []byte) {
|
||||
case ADD:
|
||||
switch operands := x.Data.(type) {
|
||||
case *RegisterNumber:
|
||||
code = x64.AddRegNum8(code, operands.Register, uint8(operands.Number))
|
||||
code = x64.AddRegNum(code, operands.Register, operands.Number)
|
||||
}
|
||||
|
||||
case *RegisterRegister:
|
||||
// code = x64.AddRegReg64(code, operands.Destination, operands.Source)
|
||||
case SUB:
|
||||
switch operands := x.Data.(type) {
|
||||
case *RegisterNumber:
|
||||
code = x64.SubRegNum(code, operands.Register, operands.Number)
|
||||
}
|
||||
|
||||
case CALL:
|
||||
|
Reference in New Issue
Block a user