updated left-shift1

This commit is contained in:
~d6 2021-12-28 15:39:20 -05:00
parent e1db98fec6
commit ea18846cc9
1 changed files with 5 additions and 12 deletions

View File

@ -180,19 +180,12 @@
( shift left by 8-15 bits )
@left-shift1 ( x** n^ -> x<<n )
#0000 ;sh/z0 STA2 #00 ;sh/z2 STA
#08 SUB #40 SFT STH ( n<<4 -> r )
SWP SWP2 SWP POP ( x3 x2 x1 )
#08 SUB #40 SFT STH ( stash [n-8]<<4 )
STHkr SFT ;sh/z0 STA ( x3 x2 )
#00 SWP STHkr SFT2 ( x3 00x2<<r )
;sh/z0 LDA2 ORA2 ;sh/z0 STA2 ( x3 )
#00 SWP STHr SFT2 ( 00x3<<r )
;sh/z1 LDA2 ORA2 ;sh/z1 STA2 ( )
;sh/z0 LDA2 ;sh/z2 LDA #00
#00 SWP STHkr SFT2 ;sh/z1 STA2 ( store z1,z2 )
#00 SWP STHkr SFT2 #00 ;sh/z1 LDA ORA2 ;sh/z0 STA2 ( store z0,z1 )
STHr SFT ;sh/z0 LDA ORA ( calculate z0 )
;sh/z1 LDA2 #00
RTN
( shift left by 16-23 bits )