updated left-shift1
This commit is contained in:
parent
e1db98fec6
commit
ea18846cc9
17
math32.tal
17
math32.tal
|
@ -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 )
|
||||
|
|
Loading…
Reference in New Issue