mirror of
https://github.com/irmen/prog8.git
synced 2025-08-14 22:27:48 +00:00
fix syntax errors
This commit is contained in:
@@ -503,12 +503,9 @@ class Parser:
|
|||||||
if not line.startswith(("%import ", "%import\t")):
|
if not line.startswith(("%import ", "%import\t")):
|
||||||
raise self.PError("expected import")
|
raise self.PError("expected import")
|
||||||
try:
|
try:
|
||||||
_, arg = line.split(maxsplit=1)
|
_, filename = line.split(maxsplit=1)
|
||||||
except ValueError:
|
except ValueError:
|
||||||
raise self.PError("invalid import statement")
|
raise self.PError("invalid import statement")
|
||||||
if not arg.startswith('"') or not arg.endswith('"'):
|
|
||||||
raise self.PError("filename must be between quotes")
|
|
||||||
filename = arg[1:-1]
|
|
||||||
if not filename:
|
if not filename:
|
||||||
raise self.PError("invalid filename")
|
raise self.PError("invalid filename")
|
||||||
self._parse_import_file(filename)
|
self._parse_import_file(filename)
|
||||||
@@ -678,25 +675,28 @@ class Parser:
|
|||||||
raise self.PError("ZP block cannot contain code statements")
|
raise self.PError("ZP block cannot contain code statements")
|
||||||
self.cur_block.statements.append(self.parse_statement(line))
|
self.cur_block.statements.append(self.parse_statement(line))
|
||||||
elif line:
|
elif line:
|
||||||
if is_zp_block:
|
match = re.fullmatch(r"(?P<label>\S+)\s*:(?P<rest>.*)", line)
|
||||||
raise self.PError("ZP block cannot contain code labels")
|
if match:
|
||||||
self.parse_label(line)
|
if is_zp_block:
|
||||||
|
raise self.PError("ZP block cannot contain code labels")
|
||||||
|
label = match.group("label")
|
||||||
|
rest = match.group("rest")
|
||||||
|
self.parse_label(label, rest)
|
||||||
|
else:
|
||||||
|
raise self.PError("invalid statement in block")
|
||||||
else:
|
else:
|
||||||
raise self.PError("invalid statement in block")
|
raise self.PError("invalid statement in block")
|
||||||
return True, None # continue with more statements
|
return True, None # continue with more statements
|
||||||
|
|
||||||
def parse_label(self, line: str) -> None:
|
def parse_label(self, labelname: str, rest: str) -> None:
|
||||||
label_line = line.split(maxsplit=1)
|
if str.isidentifier(labelname):
|
||||||
if str.isidentifier(label_line[0]):
|
|
||||||
labelname = label_line[0]
|
|
||||||
if labelname in self.cur_block.label_names:
|
if labelname in self.cur_block.label_names:
|
||||||
raise self.PError("label already defined")
|
raise self.PError("label already defined")
|
||||||
if labelname in self.cur_block.symbols:
|
if labelname in self.cur_block.symbols:
|
||||||
raise self.PError("symbol already defined")
|
raise self.PError("symbol already defined")
|
||||||
self.cur_block.symbols.define_label(labelname, self.sourceref)
|
self.cur_block.symbols.define_label(labelname, self.sourceref)
|
||||||
self.cur_block.statements.append(Label(labelname, self.sourceref))
|
self.cur_block.statements.append(Label(labelname, self.sourceref))
|
||||||
if len(label_line) > 1:
|
if rest:
|
||||||
rest = label_line[1]
|
|
||||||
self.cur_block.statements.append(self.parse_statement(rest))
|
self.cur_block.statements.append(self.parse_statement(rest))
|
||||||
else:
|
else:
|
||||||
raise self.PError("invalid label name")
|
raise self.PError("invalid label name")
|
||||||
@@ -775,7 +775,13 @@ class Parser:
|
|||||||
raise self.PError("invalid statement")
|
raise self.PError("invalid statement")
|
||||||
subroutine_block.statements.append(self.parse_statement(line))
|
subroutine_block.statements.append(self.parse_statement(line))
|
||||||
elif line:
|
elif line:
|
||||||
self.parse_label(line)
|
match = re.fullmatch(r"(?P<label>\S+)\s*:(?P<rest>.*)", line)
|
||||||
|
if match:
|
||||||
|
label = match.group("label")
|
||||||
|
rest = match.group("rest")
|
||||||
|
self.parse_label(label, rest)
|
||||||
|
else:
|
||||||
|
raise self.PError("invalid statement in subroutine")
|
||||||
else:
|
else:
|
||||||
raise self.PError("invalid statement in subroutine")
|
raise self.PError("invalid statement in subroutine")
|
||||||
self.cur_block = current_block
|
self.cur_block = current_block
|
||||||
@@ -1087,11 +1093,10 @@ class Parser:
|
|||||||
if len(aline) < 2:
|
if len(aline) < 2:
|
||||||
raise self.PError("invalid asminclude or asmbinary directive")
|
raise self.PError("invalid asminclude or asmbinary directive")
|
||||||
filename = aline[1]
|
filename = aline[1]
|
||||||
if not filename.startswith('"') or not filename.endswith('"'):
|
|
||||||
raise self.PError("filename must be between quotes")
|
|
||||||
filename = filename[1:-1]
|
|
||||||
if not filename:
|
if not filename:
|
||||||
raise self.PError("invalid filename")
|
raise self.PError("invalid filename")
|
||||||
|
if filename[0] in "'\"" or filename[-1] in "'\"":
|
||||||
|
raise self.PError("invalid filename, should not use quotes")
|
||||||
filename_in_sourcedir = os.path.join(os.path.split(self.sourceref.file)[0], filename)
|
filename_in_sourcedir = os.path.join(os.path.split(self.sourceref.file)[0], filename)
|
||||||
filename_in_output_location = os.path.join(self.outputdir, filename)
|
filename_in_output_location = os.path.join(self.outputdir, filename)
|
||||||
if not os.path.isfile(filename_in_sourcedir):
|
if not os.path.isfile(filename_in_sourcedir):
|
||||||
|
@@ -171,6 +171,7 @@ def p_directive_args(p):
|
|||||||
def p_directive_arg(p):
|
def p_directive_arg(p):
|
||||||
"""directive_arg : NAME
|
"""directive_arg : NAME
|
||||||
| INTEGER
|
| INTEGER
|
||||||
|
| STRING
|
||||||
"""
|
"""
|
||||||
p[0] = p[1]
|
p[0] = p[1]
|
||||||
|
|
||||||
|
@@ -56,8 +56,8 @@ class PreprocessingParser(Parser):
|
|||||||
def parse_memory_def(self, line: str, is_zeropage: bool=False) -> None:
|
def parse_memory_def(self, line: str, is_zeropage: bool=False) -> None:
|
||||||
super().parse_memory_def(line, is_zeropage)
|
super().parse_memory_def(line, is_zeropage)
|
||||||
|
|
||||||
def parse_label(self, line: str) -> None:
|
def parse_label(self, labelname: str, rest: str) -> None:
|
||||||
super().parse_label(line)
|
super().parse_label(labelname, rest)
|
||||||
|
|
||||||
def parse_subroutine_def(self, line: str) -> None:
|
def parse_subroutine_def(self, line: str) -> None:
|
||||||
super().parse_subroutine_def(line)
|
super().parse_subroutine_def(line)
|
||||||
|
@@ -719,18 +719,16 @@ class AstNode:
|
|||||||
for name, value in nvars.items():
|
for name, value in nvars.items():
|
||||||
if name == "sourceref":
|
if name == "sourceref":
|
||||||
continue
|
continue
|
||||||
if type(value) in (str, int, float, bool, type(None)):
|
elif type(value) in (str, int, float, bool, type(None)):
|
||||||
attrs.append((name, tostr(value, level+1)))
|
attrs.append((name, tostr(value, level+1)))
|
||||||
for name, value in nvars.items():
|
elif type(value) is list:
|
||||||
if type(value) is list:
|
|
||||||
strvalue = "["
|
strvalue = "["
|
||||||
strvalue += (",\n" + indent*(level+1)).join(tostr(v, level+1) for v in value) + "\n" + (1+level)*indent + "]"
|
strvalue += (",\n" + indent*(level+1)).join(tostr(v, level+1) for v in value) + "\n" + (1+level)*indent + "]"
|
||||||
attrs.append((name, strvalue))
|
attrs.append((name, strvalue))
|
||||||
for name, value in nvars.items():
|
elif type(value) is not list and type(value) not in (str, int, float, bool, type(None)):
|
||||||
if name == "sourceref":
|
|
||||||
continue
|
|
||||||
if type(value) is not list and type(value) not in (str, int, float, bool, type(None)):
|
|
||||||
attrs.append((name, tostr(value, level+2)))
|
attrs.append((name, tostr(value, level+2)))
|
||||||
|
else:
|
||||||
|
raise TypeError("WEIRD TYPE", type(value))
|
||||||
attrstr = ("\n" + indent*(1+level)).join("{} = {}".format(name, sv) for name, sv in attrs)
|
attrstr = ("\n" + indent*(1+level)).join("{} = {}".format(name, sv) for name, sv in attrs)
|
||||||
result = "\n" + indent * level + "<{0:s} l={1:d} c={2:d}".format(clsname, node.sourceref.line, node.sourceref.column)
|
result = "\n" + indent * level + "<{0:s} l={1:d} c={2:d}".format(clsname, node.sourceref.line, node.sourceref.column)
|
||||||
return result + "{} |end {} l={:d}|>".format(attrstr, clsname, node.sourceref.line)
|
return result + "{} |end {} l={:d}|>".format(attrstr, clsname, node.sourceref.line)
|
||||||
|
@@ -133,14 +133,14 @@
|
|||||||
var .byte expr_fault2 = 1 + (8/3)+sin(33) + max(1,2,3)
|
var .byte expr_fault2 = 1 + (8/3)+sin(33) + max(1,2,3)
|
||||||
|
|
||||||
|
|
||||||
sin
|
sin:
|
||||||
return
|
return
|
||||||
|
|
||||||
max
|
max:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
start
|
start:
|
||||||
|
|
||||||
; --- immediate primitive value assignments ----
|
; --- immediate primitive value assignments ----
|
||||||
|
|
||||||
|
@@ -3,10 +3,10 @@
|
|||||||
%output prg, basic
|
%output prg, basic
|
||||||
%zp clobber
|
%zp clobber
|
||||||
|
|
||||||
%import "c64lib"
|
%import c64lib
|
||||||
|
|
||||||
~ main {
|
~ main {
|
||||||
start
|
start:
|
||||||
[$d020]=0
|
[$d020]=0
|
||||||
return
|
return
|
||||||
blockdtypes1.max()
|
blockdtypes1.max()
|
||||||
@@ -138,7 +138,7 @@ start
|
|||||||
; because zp-vars get assigned a specific address (from a pool). Also, it's a byte.
|
; because zp-vars get assigned a specific address (from a pool). Also, it's a byte.
|
||||||
|
|
||||||
|
|
||||||
max
|
max:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
@@ -317,7 +317,7 @@ max
|
|||||||
sub sub4 (string: XY, other : A) -> (Y?) = $dd22
|
sub sub4 (string: XY, other : A) -> (Y?) = $dd22
|
||||||
|
|
||||||
|
|
||||||
bar
|
bar:
|
||||||
goto sub1
|
goto sub1
|
||||||
goto sub2 (1 )
|
goto sub2 (1 )
|
||||||
goto sub3 (3)
|
goto sub3 (3)
|
||||||
@@ -491,7 +491,7 @@ bar
|
|||||||
; because zp-vars get assigned a specific address (from a pool). Also, it's a byte.
|
; because zp-vars get assigned a specific address (from a pool). Also, it's a byte.
|
||||||
|
|
||||||
|
|
||||||
max
|
max:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
@@ -670,7 +670,7 @@ max
|
|||||||
sub sub4 (string: XY, other : A) -> (Y?) = $dd22
|
sub sub4 (string: XY, other : A) -> (Y?) = $dd22
|
||||||
|
|
||||||
|
|
||||||
bar
|
bar:
|
||||||
goto sub1
|
goto sub1
|
||||||
goto sub2 (1 )
|
goto sub2 (1 )
|
||||||
goto sub3 (3)
|
goto sub3 (3)
|
||||||
@@ -844,7 +844,7 @@ bar
|
|||||||
; because zp-vars get assigned a specific address (from a pool). Also, it's a byte.
|
; because zp-vars get assigned a specific address (from a pool). Also, it's a byte.
|
||||||
|
|
||||||
|
|
||||||
max
|
max:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
@@ -1023,7 +1023,7 @@ max
|
|||||||
sub sub4 (string: XY, other : A) -> (Y?) = $dd22
|
sub sub4 (string: XY, other : A) -> (Y?) = $dd22
|
||||||
|
|
||||||
|
|
||||||
bar
|
bar:
|
||||||
goto sub1
|
goto sub1
|
||||||
goto sub2 (1 )
|
goto sub2 (1 )
|
||||||
goto sub3 (3)
|
goto sub3 (3)
|
||||||
@@ -1197,7 +1197,7 @@ bar
|
|||||||
; because zp-vars get assigned a specific address (from a pool). Also, it's a byte.
|
; because zp-vars get assigned a specific address (from a pool). Also, it's a byte.
|
||||||
|
|
||||||
|
|
||||||
max
|
max:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
@@ -1376,7 +1376,7 @@ max
|
|||||||
sub sub4 (string: XY, other : A) -> (Y?) = $dd22
|
sub sub4 (string: XY, other : A) -> (Y?) = $dd22
|
||||||
|
|
||||||
|
|
||||||
bar
|
bar:
|
||||||
goto sub1
|
goto sub1
|
||||||
goto sub2 (1 )
|
goto sub2 (1 )
|
||||||
goto sub3 (3)
|
goto sub3 (3)
|
||||||
@@ -1550,7 +1550,7 @@ bar
|
|||||||
; because zp-vars get assigned a specific address (from a pool). Also, it's a byte.
|
; because zp-vars get assigned a specific address (from a pool). Also, it's a byte.
|
||||||
|
|
||||||
|
|
||||||
max
|
max:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
@@ -1729,7 +1729,7 @@ max
|
|||||||
sub sub4 (string: XY, other : A) -> (Y?) = $dd22
|
sub sub4 (string: XY, other : A) -> (Y?) = $dd22
|
||||||
|
|
||||||
|
|
||||||
bar
|
bar:
|
||||||
goto sub1
|
goto sub1
|
||||||
goto sub2 (1 )
|
goto sub2 (1 )
|
||||||
goto sub3 (3)
|
goto sub3 (3)
|
||||||
@@ -1903,7 +1903,7 @@ bar
|
|||||||
; because zp-vars get assigned a specific address (from a pool). Also, it's a byte.
|
; because zp-vars get assigned a specific address (from a pool). Also, it's a byte.
|
||||||
|
|
||||||
|
|
||||||
max
|
max:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
@@ -2082,7 +2082,7 @@ max
|
|||||||
sub sub4 (string: XY, other : A) -> (Y?) = $dd22
|
sub sub4 (string: XY, other : A) -> (Y?) = $dd22
|
||||||
|
|
||||||
|
|
||||||
bar
|
bar:
|
||||||
goto sub1
|
goto sub1
|
||||||
goto sub2 (1 )
|
goto sub2 (1 )
|
||||||
goto sub3 (3)
|
goto sub3 (3)
|
||||||
@@ -2256,7 +2256,7 @@ bar
|
|||||||
; because zp-vars get assigned a specific address (from a pool). Also, it's a byte.
|
; because zp-vars get assigned a specific address (from a pool). Also, it's a byte.
|
||||||
|
|
||||||
|
|
||||||
max
|
max:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
@@ -2435,7 +2435,7 @@ max
|
|||||||
sub sub4 (string: XY, other : A) -> (Y?) = $dd22
|
sub sub4 (string: XY, other : A) -> (Y?) = $dd22
|
||||||
|
|
||||||
|
|
||||||
bar
|
bar:
|
||||||
goto sub1
|
goto sub1
|
||||||
goto sub2 (1 )
|
goto sub2 (1 )
|
||||||
goto sub3 (3)
|
goto sub3 (3)
|
||||||
@@ -2609,7 +2609,7 @@ bar
|
|||||||
; because zp-vars get assigned a specific address (from a pool). Also, it's a byte.
|
; because zp-vars get assigned a specific address (from a pool). Also, it's a byte.
|
||||||
|
|
||||||
|
|
||||||
max
|
max:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
@@ -2788,7 +2788,7 @@ max
|
|||||||
sub sub4 (string: XY, other : A) -> (Y?) = $dd22
|
sub sub4 (string: XY, other : A) -> (Y?) = $dd22
|
||||||
|
|
||||||
|
|
||||||
bar
|
bar:
|
||||||
goto sub1
|
goto sub1
|
||||||
goto sub2 (1 )
|
goto sub2 (1 )
|
||||||
goto sub3 (3)
|
goto sub3 (3)
|
||||||
@@ -2962,7 +2962,7 @@ bar
|
|||||||
; because zp-vars get assigned a specific address (from a pool). Also, it's a byte.
|
; because zp-vars get assigned a specific address (from a pool). Also, it's a byte.
|
||||||
|
|
||||||
|
|
||||||
max
|
max:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
@@ -3141,7 +3141,7 @@ max
|
|||||||
sub sub4 (string: XY, other : A) -> (Y?) = $dd22
|
sub sub4 (string: XY, other : A) -> (Y?) = $dd22
|
||||||
|
|
||||||
|
|
||||||
bar
|
bar:
|
||||||
goto sub1
|
goto sub1
|
||||||
goto sub2 (1 )
|
goto sub2 (1 )
|
||||||
goto sub3 (3)
|
goto sub3 (3)
|
||||||
@@ -3315,7 +3315,7 @@ bar
|
|||||||
; because zp-vars get assigned a specific address (from a pool). Also, it's a byte.
|
; because zp-vars get assigned a specific address (from a pool). Also, it's a byte.
|
||||||
|
|
||||||
|
|
||||||
max
|
max:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
@@ -3494,7 +3494,7 @@ max
|
|||||||
sub sub4 (string: XY, other : A) -> (Y?) = $dd22
|
sub sub4 (string: XY, other : A) -> (Y?) = $dd22
|
||||||
|
|
||||||
|
|
||||||
bar
|
bar:
|
||||||
goto sub1
|
goto sub1
|
||||||
goto sub2 (1 )
|
goto sub2 (1 )
|
||||||
goto sub3 (3)
|
goto sub3 (3)
|
||||||
@@ -3668,7 +3668,7 @@ bar
|
|||||||
; because zp-vars get assigned a specific address (from a pool). Also, it's a byte.
|
; because zp-vars get assigned a specific address (from a pool). Also, it's a byte.
|
||||||
|
|
||||||
|
|
||||||
max
|
max:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
@@ -3847,7 +3847,7 @@ max
|
|||||||
sub sub4 (string: XY, other : A) -> (Y?) = $dd22
|
sub sub4 (string: XY, other : A) -> (Y?) = $dd22
|
||||||
|
|
||||||
|
|
||||||
bar
|
bar:
|
||||||
goto sub1
|
goto sub1
|
||||||
goto sub2 (1 )
|
goto sub2 (1 )
|
||||||
goto sub3 (3)
|
goto sub3 (3)
|
||||||
@@ -4021,7 +4021,7 @@ bar
|
|||||||
; because zp-vars get assigned a specific address (from a pool). Also, it's a byte.
|
; because zp-vars get assigned a specific address (from a pool). Also, it's a byte.
|
||||||
|
|
||||||
|
|
||||||
max
|
max:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
@@ -4200,7 +4200,7 @@ max
|
|||||||
sub sub4 (string: XY, other : A) -> (Y?) = $dd22
|
sub sub4 (string: XY, other : A) -> (Y?) = $dd22
|
||||||
|
|
||||||
|
|
||||||
bar
|
bar:
|
||||||
goto sub1
|
goto sub1
|
||||||
goto sub2 (1 )
|
goto sub2 (1 )
|
||||||
goto sub3 (3)
|
goto sub3 (3)
|
||||||
@@ -4374,7 +4374,7 @@ bar
|
|||||||
; because zp-vars get assigned a specific address (from a pool). Also, it's a byte.
|
; because zp-vars get assigned a specific address (from a pool). Also, it's a byte.
|
||||||
|
|
||||||
|
|
||||||
max
|
max:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
@@ -4553,7 +4553,7 @@ max
|
|||||||
sub sub4 (string: XY, other : A) -> (Y?) = $dd22
|
sub sub4 (string: XY, other : A) -> (Y?) = $dd22
|
||||||
|
|
||||||
|
|
||||||
bar
|
bar:
|
||||||
goto sub1
|
goto sub1
|
||||||
goto sub2 (1 )
|
goto sub2 (1 )
|
||||||
goto sub3 (3)
|
goto sub3 (3)
|
||||||
@@ -4727,7 +4727,7 @@ bar
|
|||||||
; because zp-vars get assigned a specific address (from a pool). Also, it's a byte.
|
; because zp-vars get assigned a specific address (from a pool). Also, it's a byte.
|
||||||
|
|
||||||
|
|
||||||
max
|
max:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
@@ -4906,7 +4906,7 @@ max
|
|||||||
sub sub4 (string: XY, other : A) -> (Y?) = $dd22
|
sub sub4 (string: XY, other : A) -> (Y?) = $dd22
|
||||||
|
|
||||||
|
|
||||||
bar
|
bar:
|
||||||
goto sub1
|
goto sub1
|
||||||
goto sub2 (1 )
|
goto sub2 (1 )
|
||||||
goto sub3 (3)
|
goto sub3 (3)
|
||||||
@@ -5080,7 +5080,7 @@ bar
|
|||||||
; because zp-vars get assigned a specific address (from a pool). Also, it's a byte.
|
; because zp-vars get assigned a specific address (from a pool). Also, it's a byte.
|
||||||
|
|
||||||
|
|
||||||
max
|
max:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
@@ -5259,7 +5259,7 @@ max
|
|||||||
sub sub4 (string: XY, other : A) -> (Y?) = $dd22
|
sub sub4 (string: XY, other : A) -> (Y?) = $dd22
|
||||||
|
|
||||||
|
|
||||||
bar
|
bar:
|
||||||
goto sub1
|
goto sub1
|
||||||
goto sub2 (1 )
|
goto sub2 (1 )
|
||||||
goto sub3 (3)
|
goto sub3 (3)
|
||||||
@@ -5433,7 +5433,7 @@ bar
|
|||||||
; because zp-vars get assigned a specific address (from a pool). Also, it's a byte.
|
; because zp-vars get assigned a specific address (from a pool). Also, it's a byte.
|
||||||
|
|
||||||
|
|
||||||
max
|
max:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
@@ -5612,7 +5612,7 @@ max
|
|||||||
sub sub4 (string: XY, other : A) -> (Y?) = $dd22
|
sub sub4 (string: XY, other : A) -> (Y?) = $dd22
|
||||||
|
|
||||||
|
|
||||||
bar
|
bar:
|
||||||
goto sub1
|
goto sub1
|
||||||
goto sub2 (1 )
|
goto sub2 (1 )
|
||||||
goto sub3 (3)
|
goto sub3 (3)
|
||||||
@@ -5786,7 +5786,7 @@ bar
|
|||||||
; because zp-vars get assigned a specific address (from a pool). Also, it's a byte.
|
; because zp-vars get assigned a specific address (from a pool). Also, it's a byte.
|
||||||
|
|
||||||
|
|
||||||
max
|
max:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
@@ -5965,7 +5965,7 @@ max
|
|||||||
sub sub4 (string: XY, other : A) -> (Y?) = $dd22
|
sub sub4 (string: XY, other : A) -> (Y?) = $dd22
|
||||||
|
|
||||||
|
|
||||||
bar
|
bar:
|
||||||
goto sub1
|
goto sub1
|
||||||
goto sub2 (1 )
|
goto sub2 (1 )
|
||||||
goto sub3 (3)
|
goto sub3 (3)
|
||||||
@@ -6139,7 +6139,7 @@ bar
|
|||||||
; because zp-vars get assigned a specific address (from a pool). Also, it's a byte.
|
; because zp-vars get assigned a specific address (from a pool). Also, it's a byte.
|
||||||
|
|
||||||
|
|
||||||
max
|
max:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
@@ -6318,7 +6318,7 @@ max
|
|||||||
sub sub4 (string: XY, other : A) -> (Y?) = $dd22
|
sub sub4 (string: XY, other : A) -> (Y?) = $dd22
|
||||||
|
|
||||||
|
|
||||||
bar
|
bar:
|
||||||
goto sub1
|
goto sub1
|
||||||
goto sub2 (1 )
|
goto sub2 (1 )
|
||||||
goto sub3 (3)
|
goto sub3 (3)
|
||||||
@@ -6492,7 +6492,7 @@ bar
|
|||||||
; because zp-vars get assigned a specific address (from a pool). Also, it's a byte.
|
; because zp-vars get assigned a specific address (from a pool). Also, it's a byte.
|
||||||
|
|
||||||
|
|
||||||
max
|
max:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
@@ -6671,7 +6671,7 @@ max
|
|||||||
sub sub4 (string: XY, other : A) -> (Y?) = $dd22
|
sub sub4 (string: XY, other : A) -> (Y?) = $dd22
|
||||||
|
|
||||||
|
|
||||||
bar
|
bar:
|
||||||
goto sub1
|
goto sub1
|
||||||
goto sub2 (1 )
|
goto sub2 (1 )
|
||||||
goto sub3 (3)
|
goto sub3 (3)
|
||||||
@@ -6845,7 +6845,7 @@ bar
|
|||||||
; because zp-vars get assigned a specific address (from a pool). Also, it's a byte.
|
; because zp-vars get assigned a specific address (from a pool). Also, it's a byte.
|
||||||
|
|
||||||
|
|
||||||
max
|
max:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
@@ -7024,7 +7024,7 @@ max
|
|||||||
sub sub4 (string: XY, other : A) -> (Y?) = $dd22
|
sub sub4 (string: XY, other : A) -> (Y?) = $dd22
|
||||||
|
|
||||||
|
|
||||||
bar
|
bar:
|
||||||
goto sub1
|
goto sub1
|
||||||
goto sub2 (1 )
|
goto sub2 (1 )
|
||||||
goto sub3 (3)
|
goto sub3 (3)
|
||||||
|
@@ -8,17 +8,18 @@
|
|||||||
|
|
||||||
~ main {
|
~ main {
|
||||||
start:
|
start:
|
||||||
A=0
|
;A=0
|
||||||
[$d020]=A
|
;[$d020]=A
|
||||||
X=false
|
;X=false
|
||||||
Y=true
|
;Y=true
|
||||||
return
|
;return
|
||||||
|
|
||||||
;included_assembly
|
;included_assembly
|
||||||
%asminclude "included.source" test_include
|
%asminclude " included.sourcelynx walla derp ", test_include
|
||||||
|
%asminclude " included.sourcelynx walla derp ", "test_include"
|
||||||
|
|
||||||
;included_binary
|
;included_binary
|
||||||
%asmbinary "included.binary"
|
%asmbinary " included.binary 234 "
|
||||||
%asmbinary "included.binary" $40
|
%asmbinary " included.binary", $40
|
||||||
%asmbinary "included.binary" $40 $200
|
%asmbinary "included.binary", $40, $200
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user