From e5f115da28f72ed1c659599316c423daefcf8071 Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Sun, 7 May 2023 19:10:08 -0700 Subject: [PATCH] Use mswap stdlib --- gui/sand/sand.tal | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/gui/sand/sand.tal b/gui/sand/sand.tal index 99dbe8e..f9346a2 100644 --- a/gui/sand/sand.tal +++ b/gui/sand/sand.tal @@ -135,10 +135,8 @@ JMP2r @swap-cells ( a* b* -- ) - #02 SFT2 ;world ADD2 LDAk STH ,&a STR2 - #02 SFT2 ;world ADD2 LDAk STH ,&b STR2 - STHr [ LIT2 &a $2 ] STA - STHr [ LIT2 &b $2 ] STA + #02 SFT2 ;world ADD2 SWP2 + #02 SFT2 ;world ADD2 mswap JMP2r @@ -176,6 +174,12 @@ JMP2r ( @|stdlib ) +@mswap ( a* b* -- ) + + SWP2k LDA STH STH2 LDA STH STH2 STAr STAr + +JMP2r + @prng-init ( -- ) ( seed )