Added more tests
This commit is contained in:
parent
a466281307
commit
8eabcf258d
16 changed files with 399 additions and 26 deletions
|
@ -5,11 +5,11 @@ import (
|
|||
)
|
||||
|
||||
// SubRegisterNumber subtracts a number from the given register.
|
||||
func SubRegisterNumber(code []byte, destination cpu.Register, number int) []byte {
|
||||
return encodeNum(code, AddressDirect, 0b101, destination, number, 0x83, 0x81)
|
||||
func SubRegisterNumber(code []byte, register cpu.Register, number int) []byte {
|
||||
return encodeNum(code, AddressDirect, 0b101, register, number, 0x83, 0x81)
|
||||
}
|
||||
|
||||
// SubRegisterRegister subtracts a register value from another register.
|
||||
func SubRegisterRegister(code []byte, destination cpu.Register, operand cpu.Register) []byte {
|
||||
return encode(code, AddressDirect, operand, destination, 8, 0x29)
|
||||
func SubRegisterRegister(code []byte, register cpu.Register, operand cpu.Register) []byte {
|
||||
return encode(code, AddressDirect, operand, register, 8, 0x29)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue