1
0
mirror of https://github.com/dschmenk/PLASMA.git synced 2025-02-13 15:31:09 +00:00

Merge pull request #2 from dschmenk/master

Merge latest upstream master
This commit is contained in:
ZornsLemma 2017-07-11 18:59:41 +01:00 committed by GitHub
commit 1b2a1b5b7a
3 changed files with 13 additions and 10 deletions

View File

@ -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

View File

@ -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

View File

@ -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)