diff --git a/SANDBOX.PO b/SANDBOX.PO index cefda53..3f38d3f 100644 Binary files a/SANDBOX.PO and b/SANDBOX.PO differ diff --git a/src/samplesrc/test.pla b/src/samplesrc/test.pla index 8809c0f..0e2b6a6 100755 --- a/src/samplesrc/test.pla +++ b/src/samplesrc/test.pla @@ -25,7 +25,7 @@ byte[] a2e = "//e" byte[] a2c = "//c" byte[] a3 = "///" byte[] offsets = "Structure offsets:" -word struct[] = 1, 10, 100, 1000, 10000 +word array[] = 1, 10, 100, 1000, 10000 word ptr byte spaces = " " // @@ -87,8 +87,8 @@ export def main(range) wend putln end -ptr = @struct -main(@struct:6) +ptr = @array +main(@array:6) puti((ptr):6) putln puti(ptr=>6) diff --git a/src/toolsrc/sb.pla b/src/toolsrc/sb.pla index 7947453..6c78c6d 100644 --- a/src/toolsrc/sb.pla +++ b/src/toolsrc/sb.pla @@ -217,7 +217,7 @@ const WPTR_TYPE = $40 const PTR_TYPE = $60 // (BPTR_TYPE | WPTR_TYPE) const XBYTE_TYPE = $22 // (BPTR_TYPE | BYTE_TYPE) const XWORD_TYPE = $44 // (WPTR_TYPE | WORD_TYPE) -const XADDR_TYPE = $6E +const CONSTADDR_TYPE = $61 // (CONST_TYPE | PTR_TYPE) const STR_TYPE = $80 // // Keywords @@ -2110,7 +2110,7 @@ def emit_data(vartype, consttype, constval, constsize) emit_byte(constval) else size = 2 - if consttype & XADDR_TYPE + if consttype == CONSTADDR_TYPE emit_addr(constval) else emit_word(constval) @@ -2684,7 +2684,7 @@ def scan elsif ^scanptr >= 'a' and ^scanptr <= 'f' constval = (constval << 4) + ^scanptr - 'W'// 'a'-10 else - break// + break fin until !^scanptr elsif ^scanptr == $27 // ' @@ -2913,8 +2913,9 @@ def parse_constval(valptr, sizeptr) idptr = id_lookup(tknptr, tknlen) if !idptr; return parse_err(@bad_cnst); fin type = idptr->idtype - if type & XADDR_TYPE + if type & ADDR_TYPE if mod <> 8; return parse_err(@bad_cnst); fin + type = CONSTADDR_TYPE fin *valptr = idptr=>idval break