/* common */
#include "check.h"
-
+
/* ca65 */
#include "error.h"
#include "scanner.h"
static const char MacLongBranch [] = /* Long branch macros */
".macro jeq Target\n"
- " .if .def(Target) .and ((*+2)-(Target) <= 127)\n"
+ " .if .match(Target, 0)\n"
+ " bne *+5\n"
+ " jmp Target\n"
+ " .elseif .def(Target) .and ((*+2)-(Target) <= 127)\n"
" beq Target\n"
" .else\n"
" bne *+5\n"
" .endif\n"
".endmacro\n"
".macro jne Target\n"
- " .if .def(Target) .and ((*+2)-(Target) <= 127)\n"
+ " .if .match(Target, 0)\n"
+ " beq *+5\n"
+ " jmp Target\n"
+ " .elseif .def(Target) .and ((*+2)-(Target) <= 127)\n"
" bne Target\n"
" .else\n"
" beq *+5\n"
" .endif\n"
".endmacro\n"
".macro jmi Target\n"
- " .if .def(Target) .and ((*+2)-(Target) <= 127)\n"
+ " .if .match(Target, 0)\n"
+ " bpl *+5\n"
+ " jmp Target\n"
+ " .elseif .def(Target) .and ((*+2)-(Target) <= 127)\n"
" bmi Target\n"
" .else\n"
" bpl *+5\n"
" .endif\n"
".endmacro\n"
".macro jpl Target\n"
- " .if .def(Target) .and ((*+2)-(Target) <= 127)\n"
+ " .if .match(Target, 0)\n"
+ " bmi *+5\n"
+ " jmp Target\n"
+ " .elseif .def(Target) .and ((*+2)-(Target) <= 127)\n"
" bpl Target\n"
" .else\n"
" bmi *+5\n"
" .endif\n"
".endmacro\n"
".macro jcs Target\n"
- " .if .def(Target) .and ((*+2)-(Target) <= 127)\n"
+ " .if .match(Target, 0)\n"
+ " bcc *+5\n"
+ " jmp Target\n"
+ " .elseif .def(Target) .and ((*+2)-(Target) <= 127)\n"
" bcs Target\n"
" .else\n"
" bcc *+5\n"
" .endif\n"
".endmacro\n"
".macro jcc Target\n"
- " .if .def(Target) .and ((*+2)-(Target) <= 127)\n"
+ " .if .match(Target, 0)\n"
+ " bcs *+5\n"
+ " jmp Target\n"
+ " .elseif .def(Target) .and ((*+2)-(Target) <= 127)\n"
" bcc Target\n"
" .else\n"
" bcs *+5\n"
" .endif\n"
".endmacro\n"
".macro jvs Target\n"
- " .if .def(Target) .and ((*+2)-(Target) <= 127)\n"
+ " .if .match(Target, 0)\n"
+ " bvc *+5\n"
+ " jmp Target\n"
+ " .elseif .def(Target) .and ((*+2)-(Target) <= 127)\n"
" bvs Target\n"
" .else\n"
" bvc *+5\n"
" .endif\n"
".endmacro\n"
".macro jvc Target\n"
- " .if .def(Target) .and ((*+2)-(Target) <= 127)\n"
+ " .if .match(Target, 0)\n"
+ " bvs *+5\n"
+ " jmp Target\n"
+ " .elseif .def(Target) .and ((*+2)-(Target) <= 127)\n"
" bvc Target\n"
" .else\n"
" bvs *+5\n"