(opctest) Check for return stack items order

This commit is contained in:
Devine Lu Linvega 2023-04-14 18:41:28 -07:00
parent a7fb6d0673
commit b0b3573d7d
1 changed files with 11 additions and 1 deletions

View File

@ -155,7 +155,7 @@ JMP2r
=op-jmi [ =op-jmi [
=op-jmi/a ] =op-jmi/a ]
=op-jsi [ =op-jsi [
=op-jsi/a ] =op-jsi/a =op-jsi/b ]
&end &end
@op-equ ;Dict/equ !set @op-equ ;Dict/equ !set
@ -342,10 +342,20 @@ JMP2r
&a !&skip-a #00 JMP2r &skip-a #01 JMP2r &a !&skip-a #00 JMP2r &skip-a #01 JMP2r
@op-jsi ;Dict/jsi !set @op-jsi ;Dict/jsi !set
&a #02 #04 routine #06 EQU JMP2r &a #02 #04 routine #06 EQU JMP2r
&b ;&return special &return JMP2r
@special ( routine* -- f )
( test the stack order )
DUP2 STH2kr EQU2
ROT ROT DUP2r STHr STHr SWP EQU2 AND
JMP2r
@routine ( a b -- c ) ADD JMP2r @routine ( a b -- c ) ADD JMP2r
@subroutine ( -- ) LIT2 "kO #18 DEO #18 DEO #0a18 DEO JMP2r @subroutine ( -- ) LIT2 "kO #18 DEO #18 DEO #0a18 DEO JMP2r
@Absolute &byte $1 &short $2 @Absolute &byte $1 &short $2
@phex ( short* -- ) SWP phex/b &b ( byte -- ) DUP #04 SFT phex/c &c ( char -- ) #0f AND DUP #09 GTH #27 MUL ADD #30 ADD #18 DEO JMP2r
@Dict [ @Dict [
&ok "Ok $1 &ok "Ok $1