From 3d2af841e601d960d2ed9c7b081cd957fa58e494 Mon Sep 17 00:00:00 2001 From: Astatin Date: Tue, 5 Nov 2024 19:41:14 +0900 Subject: Allow labels defined inside macros to be used as absolute 16b values --- instructions.go | 22 ---------------------- 1 file changed, 22 deletions(-) (limited to 'instructions.go') diff --git a/instructions.go b/instructions.go index 94b48bd..46a0923 100644 --- a/instructions.go +++ b/instructions.go @@ -284,26 +284,6 @@ func InstructionSetNew() InstructionSet { return []byte{0b00100000 | (uint8(args[0]) << 3), uint8(args[1])}, nil }, }, - { - 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) { @@ -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{ -- cgit v1.2.3-70-g09d2