|
|
@ -60,14 +60,14 @@ void CoreWords::run(unsigned int index, State& state)
|
|
|
|
DoubleCell dcell;
|
|
|
|
DoubleCell dcell;
|
|
|
|
|
|
|
|
|
|
|
|
execute:
|
|
|
|
execute:
|
|
|
|
if (/*(index & 1) == 0 &&*/ index >= WordCount) {
|
|
|
|
if (index >= Dictionary::Begin) {
|
|
|
|
// must be calling a defined subroutine
|
|
|
|
// must be calling a defined subroutine
|
|
|
|
state.pushr(state.ip);
|
|
|
|
state.pushr(state.ip);
|
|
|
|
state.ip = index;
|
|
|
|
state.ip = index;
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
} else switch (index & 0x1F) {
|
|
|
|
} else switch (index) {
|
|
|
|
case 0: // _lit
|
|
|
|
case 0: // _lit
|
|
|
|
state.push(/*(index & 0xFF00) ? ((Addr)index >> 8u) - 1 :*/ state.beyondip());
|
|
|
|
state.push(state.beyondip());
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case 1: // drop
|
|
|
|
case 1: // drop
|
|
|
|
state.pop();
|
|
|
|
state.pop();
|
|
|
@ -206,6 +206,9 @@ execute:
|
|
|
|
case 31: // _in
|
|
|
|
case 31: // _in
|
|
|
|
state.input(state);
|
|
|
|
state.input(state);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
|
|
|
|
state.push(index - WordCount);
|
|
|
|
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
state.ip += sizeof(Cell);
|
|
|
|
state.ip += sizeof(Cell);
|
|
|
|