duskos

dusk os fork
git clone git://git.alexwennerberg.com/duskos
Log | Files | Refs | README | LICENSE

commit c4b1594b6527671ab54606e1da6452cdecd30092
parent ec489b90575cca5376029b23c298edb4ca1abde7
Author: Virgil Dupras <hsoft@hardcoded.net>
Date:   Tue, 29 Nov 2022 14:55:33 -0500

posix/vm: make RSADD and RSADDR 4b instead of 1b

This is needed for DuskCC to be able to have stack frames bigger than $ff bytes.

Diffstat:
Mposix/dis.c | 4++--
Mposix/vm.c | 10+++++-----
2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/posix/dis.c b/posix/dis.c @@ -55,9 +55,9 @@ static struct op ops[OPCNT] = { {"NIP", ARGNONE}, {"TUCK", ARGNONE}, - {"RSADD", ARGBYTE}, + {"RSADD", ARGINT}, {"RSADDWR", ARGNONE}, - {"RSADDR", ARGBYTE}, + {"RSADDR", ARGINT}, {"RSADDRWR", ARGNONE}, {"SCNT", ARGNONE}, {"RCNT", ARGNONE}, diff --git a/posix/vm.c b/posix/vm.c @@ -322,25 +322,25 @@ static void TUCK() { // op: 1f } static void RSADD() { // op: 20 - byte n = gpcb(); - vm.RSP += (char)n; + dword n = gpc(); + vm.RSP += n; } static void RSADDWR() { // op: 21 dword n = ppop(); cwrite(0x20); // RSADD - cwrite(n); + dwrite(n); sd(_RCNT_, gd(_RCNT_)+n); } static void RSADDR() { // op: 22 - ppush(vm.RSP+gpcb()); + ppush(vm.RSP+gpc()); } static void RSADDRWR() { // op: 23 dword n = ppop(); cwrite(0x22); // RSADDR - cwrite(n); + dwrite(n); } static void SCNT() { // op: 24