From e1db98fec6f1508271cb07c0058deecdceeb2807 Mon Sep 17 00:00:00 2001 From: d6 Date: Tue, 28 Dec 2021 15:33:42 -0500 Subject: [PATCH] updated left-shift0 --- math32.tal | 39 ++++++++++++++------------------------- 1 file changed, 14 insertions(+), 25 deletions(-) diff --git a/math32.tal b/math32.tal index 13feea8..e05d65b 100644 --- a/math32.tal +++ b/math32.tal @@ -112,8 +112,7 @@ ( temporary registers ) ( used by most operations, except mul32 and div32 ) -@sh [ &r $1 - &x0 $1 &x1 $1 &x2 $1 &x3 $1 +@sh [ &x0 $1 &x1 $1 &x2 $1 &x3 $1 &y0 $1 &y1 $1 &y2 $1 &y3 $1 &z0 $1 &z1 $1 &z2 $1 &z3 $1 &a0 $1 &a1 $1 &a2 $2 ] @@ -171,36 +170,26 @@ ( shift left by 0-7 bits ) @left-shift0 ( x** n^ -> x< r ) - SWP SWP2 SWP ( x3 x2 x1 x0 ) - - STHkr SFT ;sh/z0 STA ( x3 x2 x1 ) - - #00 SWP STHkr SFT2 ( x3 x2 00x1< x< r ) + #08 SUB #40 SFT STH ( n<<4 -> r ) SWP SWP2 SWP POP ( x3 x2 x1 ) - ;sh/r LDA SFT ;sh/z0 STA ( x3 x2 ) + STHkr SFT ;sh/z0 STA ( x3 x2 ) - #00 SWP ;sh/r LDA SFT2 ( x3 00x2< x< r ) + #10 SUB #40 SFT STH ( n<<4 -> r ) SWP2 POP2 SWP ( x3 x2 ) - ;sh/r LDA SFT ;sh/z0 STA ( x3 ) + STHkr SFT ;sh/z0 STA ( x3 ) - #00 SWP ;sh/r LDA SFT2 ( x3<