diff options
author | Astatin <[email protected]> | 2024-11-05 19:41:14 +0900 |
---|---|---|
committer | Astatin <[email protected]> | 2024-11-05 19:41:14 +0900 |
commit | 3d2af841e601d960d2ed9c7b081cd957fa58e494 (patch) | |
tree | e9da63ff9b0bea7cb3d058f5f01fc59eb63ec427 /instructions.go | |
parent | dc89fa71b45eedbe1b69602b7bcfb8c7b309498f (diff) |
Allow labels defined inside macros to be used as absolute 16b values
Diffstat (limited to 'instructions.go')
-rw-r--r-- | instructions.go | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/instructions.go b/instructions.go index 94b48bd..46a0923 100644 --- a/instructions.go +++ b/instructions.go @@ -285,26 +285,6 @@ func InstructionSetNew() InstructionSet { }, }, { - Types: []ParamType{MacroLabel}, - Assembler: func(currentAddress uint16, args []uint16) ([]byte, error) { - relativeAddress, err := absoluteJPValueToRelative(currentAddress, args[0]) - if err != nil { - return nil, err - } - return []byte{0b00011000, relativeAddress}, nil - }, - }, - { - Types: []ParamType{Condition, MacroLabel}, - Assembler: func(currentAddress uint16, args []uint16) ([]byte, error) { - relativeAddress, err := absoluteJPValueToRelative(currentAddress, args[1]) - if err != nil { - return nil, err - } - return []byte{0b00100000 | (uint8(args[0]) << 3), relativeAddress}, nil - }, - }, - { Types: []ParamType{Raw16}, Assembler: func(currentAddress uint16, args []uint16) ([]byte, error) { relativeAddress, err := absoluteJPValueToRelative(currentAddress, args[0]) @@ -313,7 +293,6 @@ func InstructionSetNew() InstructionSet { } return []byte{0b00011000, relativeAddress}, nil }, - MacroForbidden: true, }, { Types: []ParamType{Condition, Raw16}, @@ -324,7 +303,6 @@ func InstructionSetNew() InstructionSet { } return []byte{0b00100000 | (uint8(args[0]) << 3), relativeAddress}, nil }, - MacroForbidden: true, }, } result["CALL"] = []InstructionParams{ |