mirror of
https://github.com/cc65/cc65.git
synced 2025-01-03 01:31:55 +00:00
Added a new .MACPACK CBM
git-svn-id: svn://svn.cc65.org/cc65/trunk@2142 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
5084e4ada5
commit
9330f3dc6a
@ -50,7 +50,9 @@
|
||||
|
||||
|
||||
/* Predefined packages */
|
||||
static char MacGeneric [] = /* Generic macros */
|
||||
|
||||
/* Generic macros */
|
||||
static char MacGeneric[] =
|
||||
".macro add Arg1, Arg2\n"
|
||||
" clc\n"
|
||||
" .if .paramcount = 2\n"
|
||||
@ -68,9 +70,8 @@ static char MacGeneric [] = /* Generic macros */
|
||||
" .endif\n"
|
||||
".endmacro\n";
|
||||
|
||||
|
||||
|
||||
static char MacLongBranch [] = /* Long branch macros */
|
||||
/* Long branch macros */
|
||||
static char MacLongBranch[] =
|
||||
".macro jeq Target\n"
|
||||
" .if .match(Target, 0)\n"
|
||||
" bne *+5\n"
|
||||
@ -160,12 +161,36 @@ static char MacLongBranch [] = /* Long branch macros */
|
||||
" .endif\n"
|
||||
".endmacro\n";
|
||||
|
||||
/* Commodore specific macros */
|
||||
static char MacCBM[] =
|
||||
".macro scrcode str\n"
|
||||
" .repeat .strlen(str), i\n"
|
||||
" .if (.strat(str, i) >= '@' .and .strat(str, i) <= 'z')\n"
|
||||
" .byte .strat(str, i) - '@'\n"
|
||||
" .elseif (.strat(str, i) >= 'A' .and .strat(str, i) <= 'Z')\n"
|
||||
" .byte .strat(str, i) - 'A' + 65\n"
|
||||
" .elseif (.strat(str, i) = '[')\n"
|
||||
" .byte 27\n"
|
||||
" .elseif (.strat(str, i) = ']')\n"
|
||||
" .byte 29\n"
|
||||
" .elseif (.strat(str, i) = '^')\n"
|
||||
" .byte 30\n"
|
||||
" .elseif (.strat(str, i) = '_')\n"
|
||||
" .byte 31\n"
|
||||
" .else\n"
|
||||
" .byte .strat(str, i)\n"
|
||||
" .endif\n"
|
||||
" .endrepeat\n"
|
||||
".endmacro\n";
|
||||
|
||||
|
||||
|
||||
|
||||
/* Table with pointers to the different packages */
|
||||
static char* MacPackages [] = {
|
||||
MacGeneric,
|
||||
MacLongBranch,
|
||||
MacCBM
|
||||
};
|
||||
|
||||
|
||||
|
@ -47,6 +47,7 @@
|
||||
/* Constants for the predefined packages */
|
||||
#define MAC_GENERIC 0
|
||||
#define MAC_LONGBRANCH 1
|
||||
#define MAC_CBM 2
|
||||
|
||||
|
||||
|
||||
|
@ -1054,6 +1054,7 @@ static void DoMacPack (void)
|
||||
static const char* Keys [] = {
|
||||
"GENERIC",
|
||||
"LONGBRANCH",
|
||||
"CBM"
|
||||
};
|
||||
|
||||
int Package;
|
||||
|
Loading…
Reference in New Issue
Block a user