diff --git a/README.md b/README.md index ebe3449..40aa5be 100755 --- a/README.md +++ b/README.md @@ -1254,8 +1254,8 @@ The compact code representation comes through the use of opcodes closely matched | $2E | CS | constant string | $30 | DROP | drop top stack value | $32 | DUP | duplicate top stack value -| $34 | PUSH | push top to call stack -| $36 | PULL | pull from call stack +| $34 | PUSHEP | push eval stack pointer call stack +| $36 | PULLEP | pull eval stack pointer from call stack | $38 | BRGT | branch next from top greater than top | $3A | BRLT | branch next from top less than top | $3C | BREQ | branch next from top equal to top @@ -1283,8 +1283,8 @@ The compact code representation comes through the use of opcodes closely matched | $6A | LAW | load word from absolute address | $6C | DLB | duplicate top of stack into local byte at frame offset | $6E | DLW | duplicate top of stack into local word at frame offset -| $70 | SB | store top of stack byte into next from top address -| $72 | SW | store top of stack word into next from top address +| $70 | SB | store next from top of stack byte into top address +| $72 | SW | store next from top of stack word into top address | $74 | SLB | store top of stack into local byte at frame offset | $76 | SLW | store top of stack into local word at frame offset | $78 | SAB | store top of stack into byte at absolute address diff --git a/src/libsrc/dgr.pla b/src/libsrc/dgr.pla index 94aeb88..198b58e 100755 --- a/src/libsrc/dgr.pla +++ b/src/libsrc/dgr.pla @@ -538,9 +538,9 @@ end export def txtMode ^showtext ^showpage1 - ^ena80 = 0 - ^show40 = 0 - ^^mapmain = 0 + ^ena80 = 0 + ^show40 = 0 + ^mapmain = 0 ^an3on return call($FC58, 0, 0, 0, 0) // home() end diff --git a/src/toolsrc/parse.c b/src/toolsrc/parse.c index 645242f..277c434 100755 --- a/src/toolsrc/parse.c +++ b/src/toolsrc/parse.c @@ -390,7 +390,10 @@ t_opseq *parse_value(t_opseq *codeseq, int rvalue, int *stackdepth) else if (scantoken == BPTR_TOKEN || scantoken == WPTR_TOKEN) { deref++; - type |= scantoken == BPTR_TOKEN ? BPTR_TYPE : WPTR_TYPE; + if (!type) + type |= scantoken == BPTR_TOKEN ? BPTR_TYPE : WPTR_TYPE; + else if (scantoken == BPTR_TOKEN) + parse_error("Byte value used as pointer"); } else if (scantoken == NEG_TOKEN || scantoken == COMP_TOKEN || scantoken == LOGIC_NOT_TOKEN) { @@ -533,12 +536,12 @@ t_opseq *parse_value(t_opseq *codeseq, int rvalue, int *stackdepth) if (type & (WPTR_TYPE | WORD_TYPE)) { valseq = gen_idxw(valseq); - type = WPTR_TYPE; + type = (type & PTR_TYPE) | WORD_TYPE; } else { valseq = gen_idxb(valseq); - type = BPTR_TYPE; + type = (type & PTR_TYPE) | BYTE_TYPE; } } else if (scantoken == PTRB_TOKEN || scantoken == PTRW_TOKEN)