mirror of
https://github.com/dschmenk/PLASMA.git
synced 2025-02-12 08:32:28 +00:00
Fix IDXW bug in portable VM
This commit is contained in:
parent
84bc7f577f
commit
6205c12145
@ -1,5 +1,5 @@
|
||||
import testlib
|
||||
predef puti, putln
|
||||
predef puti
|
||||
word print
|
||||
const dec = 0
|
||||
const hex = 2
|
||||
|
@ -62,13 +62,18 @@ def nums(range)
|
||||
puti(i)
|
||||
putln
|
||||
next
|
||||
puti(array[0]);putln
|
||||
puti(array[1]);putln
|
||||
i++
|
||||
j = 2
|
||||
j++
|
||||
array[0]++
|
||||
array[1]++
|
||||
array[0] = array[0] + 1
|
||||
array++
|
||||
a1[0]++
|
||||
a1++
|
||||
puti(array[0]);putln
|
||||
puti(array[1]);putln
|
||||
end
|
||||
export def main(range)
|
||||
nums(*range)
|
||||
@ -100,6 +105,16 @@ export def main(range)
|
||||
wend
|
||||
putln
|
||||
end
|
||||
puti(array[0]);putc(' ')
|
||||
puti(array[1]);putc(' ')
|
||||
puti(array[2]);putc(' ')
|
||||
puti(array[3]);putc(' ')
|
||||
puti(array[4]);putln
|
||||
puti((@array)=>0);putc(' ')
|
||||
puti((@array)=>2);putc(' ')
|
||||
puti((@array)=>4);putc(' ')
|
||||
puti((@array)=>6);putc(' ')
|
||||
puti((@array)=>8);putln
|
||||
ptr = @main
|
||||
ptr(@array:6)
|
||||
ptr = @array
|
||||
|
@ -5,7 +5,7 @@ include "inc/cmdsys.plh"
|
||||
//
|
||||
// Module data.
|
||||
//
|
||||
predef puti, puth, putln
|
||||
predef puti, puth
|
||||
export word print[] = @puti, @puth, @putln, @puts, @putc
|
||||
byte valstr[] = '0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'
|
||||
byte loadstr[] = "testlib loaded!"
|
||||
|
@ -604,8 +604,10 @@ void interp(code *ip)
|
||||
ea = POP;
|
||||
PUSH(ea >> val);
|
||||
break;
|
||||
case 0x1E: // IDXW : TOS = TOS * 2
|
||||
TOS *= 2;
|
||||
case 0x1E: // IDXW : TOS = TOS * 2 + TOS-1
|
||||
val = POP;
|
||||
ea = POP;
|
||||
PUSH(ea + val * 2);
|
||||
break;
|
||||
/*
|
||||
* 0x20-0x2F
|
||||
|
Loading…
x
Reference in New Issue
Block a user