commit a3a37c89e71d24cb761a78b8cb74bdf9ba9ee4cb
parent 270ad58af114c021471cfcbc73a1ee964cc5a8ba
Author: Virgil Dupras <hsoft@hardcoded.net>
Date: Wed, 21 Jun 2023 13:00:05 -0400
rpi kernel: add missing "HEREMAX" and "stack?"
Diffstat:
1 file changed, 16 insertions(+), 3 deletions(-)
diff --git a/fs/xcomp/arm/rpi/kernel.fs b/fs/xcomp/arm/rpi/kernel.fs
@@ -45,9 +45,10 @@ RSTOP $1000 - const PSTOP
$20000 const HERESTART
$e4009000 const HALBASE \ Always, 32-bit, Rd=rTOP
-0 align4 here to org
+here# to org
forward b) ,) \ coldboot
HERESTART xconst herestart
+pc $10000000 le, xaddr HEREMAX
PSTOP xconst PSTOP
RSTOP xconst RSTOP
12 xconst DOESSZ
@@ -837,6 +838,15 @@ xcode ; ximm pushret,
wcall, exit,
popret, wjmp, [
+\ TODO: fix PS stack at boot, it has spurious elements
+pc ," stack underflow" 0 align4
+xcode stack?
+ cmp) rPSP rn) PSTOP i) ,)
+ return) ls) ,)
+ ( pc ) r0 pc>reg,
+ mov) r1 rd) 15 i) ,)
+ lblerrmsg abs>rel b) ,)
+
pc to L1 pushret, ( str -- w ) \ find in sys dict
wcall, curword
wcall, sysdict
@@ -846,8 +856,11 @@ pc to L1 pushret, ( str -- w ) \ find in sys dict
popret, exit,
pc to L2 ( w -- ) \ findmod+execute
- pushret, wcall, findmod popret,
- wjmp, execute
+ pushret,
+ wcall, findmod
+ wcall, execute
+ popret,
+ wjmp, stack?
xcode compword ( str -- )
pushret, wcall, parse popret,