/* Predefined packages */
static const char MacGeneric [] = /* Generic macros */
- ".macro add Arg\n"
+ ".macro add Arg1, Arg2\n"
" clc\n"
- " adc Arg\n"
- ".endmacro\n\n"
- ".macro sub Arg\n"
+ " .if .paramcount = 2\n"
+ " adc Arg1, Arg2\n"
+ " .else\n"
+ " adc Arg1\n"
+ " .endif\n"
+ ".endmacro\n"
+ ".macro sub Arg1, Arg2\n"
" sec\n"
- " sbc Arg\n"
- ".endmacro\n\n";
+ " .if .paramcount = 2\n"
+ " sbc Arg1, Arg2\n"
+ " .else\n"
+ " sbc Arg1\n"
+ " .endif\n"
+ ".endmacro\n";
" bne *+5\n"
" jmp Target\n"
" .endif\n"
- ".endmacro\n\n"
+ ".endmacro\n"
".macro jne Target\n"
" .if .def(Target) .and ((*+2)-(Target) <= 127)\n"
" bne Target\n"
" beq *+5\n"
" jmp Target\n"
" .endif\n"
- ".endmacro\n\n"
+ ".endmacro\n"
".macro jmi Target\n"
" .if .def(Target) .and ((*+2)-(Target) <= 127)\n"
" bmi Target\n"
" bpl *+5\n"
" jmp Target\n"
" .endif\n"
- ".endmacro\n\n"
+ ".endmacro\n"
".macro jpl Target\n"
" .if .def(Target) .and ((*+2)-(Target) <= 127)\n"
" bpl Target\n"
" bmi *+5\n"
" jmp Target\n"
" .endif\n"
- ".endmacro\n\n"
+ ".endmacro\n"
".macro jcs Target\n"
" .if .def(Target) .and ((*+2)-(Target) <= 127)\n"
" bcs Target\n"
" bcc *+5\n"
" jmp Target\n"
" .endif\n"
- ".endmacro\n\n"
+ ".endmacro\n"
".macro jcc Target\n"
" .if .def(Target) .and ((*+2)-(Target) <= 127)\n"
" bcc Target\n"
" bcs *+5\n"
" jmp Target\n"
" .endif\n"
- ".endmacro\n\n"
+ ".endmacro\n"
".macro jvs Target\n"
" .if .def(Target) .and ((*+2)-(Target) <= 127)\n"
" bvs Target\n"
" bvc *+5\n"
" jmp Target\n"
" .endif\n"
- ".endmacro\n\n"
+ ".endmacro\n"
".macro jvc Target\n"
" .if .def(Target) .and ((*+2)-(Target) <= 127)\n"
" bvc Target\n"
" bvs *+5\n"
" jmp Target\n"
" .endif\n"
- ".endmacro\n\n";
+ ".endmacro\n";