Added a scope argument to the SymIsDef and SymIsDef functions, so it is

possible to request information for a specific scope.
Add an optional scope argument to the .DEFINED builtin function.
Change the long branch macros to look for symbols in local scope.


git-svn-id: svn://svn.cc65.org/cc65/trunk@1574 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz
2002-11-22 01:45:00 +00:00
parent d7a5fbeb1a
commit 4dd4e76a88
9 changed files with 138 additions and 62 deletions

View File

@@ -75,7 +75,7 @@ static const char MacLongBranch [] = /* Long branch macros */
" .if .match(Target, 0)\n"
" bne *+5\n"
" jmp Target\n"
" .elseif .def(Target) .and ((*+2)-(Target) <= 127)\n"
" .elseif .def(Target,local) .and ((*+2)-(Target) <= 127)\n"
" beq Target\n"
" .else\n"
" bne *+5\n"
@@ -86,7 +86,7 @@ static const char MacLongBranch [] = /* Long branch macros */
" .if .match(Target, 0)\n"
" beq *+5\n"
" jmp Target\n"
" .elseif .def(Target) .and ((*+2)-(Target) <= 127)\n"
" .elseif .def(Target,local) .and ((*+2)-(Target) <= 127)\n"
" bne Target\n"
" .else\n"
" beq *+5\n"
@@ -97,7 +97,7 @@ static const char MacLongBranch [] = /* Long branch macros */
" .if .match(Target, 0)\n"
" bpl *+5\n"
" jmp Target\n"
" .elseif .def(Target) .and ((*+2)-(Target) <= 127)\n"
" .elseif .def(Target,local) .and ((*+2)-(Target) <= 127)\n"
" bmi Target\n"
" .else\n"
" bpl *+5\n"
@@ -108,7 +108,7 @@ static const char MacLongBranch [] = /* Long branch macros */
" .if .match(Target, 0)\n"
" bmi *+5\n"
" jmp Target\n"
" .elseif .def(Target) .and ((*+2)-(Target) <= 127)\n"
" .elseif .def(Target,local) .and ((*+2)-(Target) <= 127)\n"
" bpl Target\n"
" .else\n"
" bmi *+5\n"
@@ -119,7 +119,7 @@ static const char MacLongBranch [] = /* Long branch macros */
" .if .match(Target, 0)\n"
" bcc *+5\n"
" jmp Target\n"
" .elseif .def(Target) .and ((*+2)-(Target) <= 127)\n"
" .elseif .def(Target,local) .and ((*+2)-(Target) <= 127)\n"
" bcs Target\n"
" .else\n"
" bcc *+5\n"
@@ -130,7 +130,7 @@ static const char MacLongBranch [] = /* Long branch macros */
" .if .match(Target, 0)\n"
" bcs *+5\n"
" jmp Target\n"
" .elseif .def(Target) .and ((*+2)-(Target) <= 127)\n"
" .elseif .def(Target,local) .and ((*+2)-(Target) <= 127)\n"
" bcc Target\n"
" .else\n"
" bcs *+5\n"
@@ -141,7 +141,7 @@ static const char MacLongBranch [] = /* Long branch macros */
" .if .match(Target, 0)\n"
" bvc *+5\n"
" jmp Target\n"
" .elseif .def(Target) .and ((*+2)-(Target) <= 127)\n"
" .elseif .def(Target,local) .and ((*+2)-(Target) <= 127)\n"
" bvs Target\n"
" .else\n"
" bvc *+5\n"
@@ -152,7 +152,7 @@ static const char MacLongBranch [] = /* Long branch macros */
" .if .match(Target, 0)\n"
" bvs *+5\n"
" jmp Target\n"
" .elseif .def(Target) .and ((*+2)-(Target) <= 127)\n"
" .elseif .def(Target,local) .and ((*+2)-(Target) <= 127)\n"
" bvc Target\n"
" .else\n"
" bvs *+5\n"