commit aec9e29a39d7285a89446a4000414b6e7912fad3
parent c3db936714a0f3d7df5bbff7a5a5715e81049f14
Author: Virgil Dupras <hsoft@hardcoded.net>
Date: Sat, 3 Jun 2023 07:48:15 -0400
rpi: add [@],
This brings us to @@+ in bootlo, which can be verified with stuff like:
$12345678 HERE @ ! HERE @@+
and again with w@@+ and c@@+ variants.
Diffstat:
2 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/fs/xcomp/arm/rpi/kernel.fs b/fs/xcomp/arm/rpi/kernel.fs
@@ -544,6 +544,13 @@ xcode [+n], ( n operand -- )
lblimmwr abs>rel bl) ,)
popret, wjmp, !,
+xcode [@], ( operand -- )
+ pushret, xdup, ( operand operand )
+ bic) rTOP rdn) $f000 i) ,) \ Rd=r0
+ wcall, 32b) wcall, @, ( operand )
+ bic) rTOP rdn) $f0000 i) ,) \ Rn=r0
+ popret, wjmp, @,
+
pc pushret,
xcode pushret,
( pc ) r0 pc@>reg, lbldwrite abs>rel b) ,)
diff --git a/fs/xcomp/rpiboot.fs b/fs/xcomp/rpiboot.fs
@@ -45,5 +45,11 @@ code16b W>A, drop, A) 16b) !, W<>A, 2 W+n, exit,
code8b HERE @ W>A, drop, A) 8b) !, W<>A, 1 W+n, exit,
code c!+ branch, drop
+code @@+ W>A, A) [@], 4 A) [+n], exit,
+code16b HERE @ W>A, A) 16b) [@], 2 A) [+n], exit,
+code8b HERE @ W>A, A) 8b) [@], 1 A) [+n], exit,
+code c@@+ branch, drop
+code w@@+ branch, drop
+
uartinit prompt interactive!