~vdupras/duskos

1172c52f4b40a606ce582601008d156a56e5f5d8 — Virgil Dupras 3 months ago 10c981c
rpi: add and or xor
1 files changed, 14 insertions(+), 0 deletions(-)

M fs/xcomp/arm/rpi/kernel.fs
M fs/xcomp/arm/rpi/kernel.fs => fs/xcomp/arm/rpi/kernel.fs +14 -0
@@ 600,6 600,20 @@ xcode litn
  pushret, wcall, dup, popret,
  wjmp, LIT>W,

\ Arithmetics
xcode and ( n n -- n )
  r0 ppop, and) rTOP rdn) r0 rm) ,)
  exit,

xcode or ( n n -- n )
  r0 ppop, orr) rTOP rdn) r0 rm) ,)
  exit,

xcode xor ( n n -- n )
  r0 ppop, eor) rTOP rdn) r0 rm) ,)
  exit,

\ Interpret loop
xcode ; ximm pushret,
  wcall, popret,
  wcall, exit,