diff --git a/src/ca65/instr.c b/src/ca65/instr.c index bc6c42667..b5839c10a 100644 --- a/src/ca65/instr.c +++ b/src/ca65/instr.c @@ -59,7 +59,7 @@ #include "studyexpr.h" #include "symtab.h" - + /*****************************************************************************/ /* Forwards */ @@ -489,9 +489,7 @@ static const struct { { "BCC", 0x0020000, 0x90, 0, PutPCRel8 }, { "BCS", 0x0020000, 0xb0, 0, PutPCRel8 }, { "BEQ", 0x0020000, 0xf0, 0, PutPCRel8 }, - { "BGE", 0x0020000, 0xb0, 0, PutPCRel8 }, /* == BCS */ { "BIT", 0x0a0006c, 0x00, 2, PutAll }, - { "BLT", 0x0020000, 0x90, 0, PutPCRel8 }, /* == BCC */ { "BMI", 0x0020000, 0x30, 0, PutPCRel8 }, { "BNE", 0x0020000, 0xd0, 0, PutPCRel8 }, { "BPL", 0x0020000, 0x10, 0, PutPCRel8 }, diff --git a/src/ca65/macpack/generic.mac b/src/ca65/macpack/generic.mac index 6f88c8159..02eccef5d 100644 --- a/src/ca65/macpack/generic.mac +++ b/src/ca65/macpack/generic.mac @@ -19,3 +19,27 @@ .endif .endmacro +; bge - jump if unsigned greater or equal +.macro bge Arg + bcs Arg +.endmacro + +; blt - Jump if unsigned less +.macro blt Arg + bcc Arg +.endmacro + +; bgt - jump if unsigned greater +.macro bgt Arg + .local L + beq L + bcs Arg +L: +.endmacro + +; ble - jump if unsigned less or equal +.macro ble Arg + beq Arg + bcc Arg +.endmacro +