Use mswap stdlib

This commit is contained in:
Devine Lu Linvega 2023-05-07 19:10:08 -07:00
parent bc70adb7e9
commit e5f115da28
1 changed files with 8 additions and 4 deletions

View File

@ -135,10 +135,8 @@ JMP2r
@swap-cells ( a* b* -- ) @swap-cells ( a* b* -- )
#02 SFT2 ;world ADD2 LDAk STH ,&a STR2 #02 SFT2 ;world ADD2 SWP2
#02 SFT2 ;world ADD2 LDAk STH ,&b STR2 #02 SFT2 ;world ADD2 mswap
STHr [ LIT2 &a $2 ] STA
STHr [ LIT2 &b $2 ] STA
JMP2r JMP2r
@ -176,6 +174,12 @@ JMP2r
( (
@|stdlib ) @|stdlib )
@mswap ( a* b* -- )
SWP2k LDA STH STH2 LDA STH STH2 STAr STAr
JMP2r
@prng-init ( -- ) @prng-init ( -- )
( seed ) ( seed )