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 )
|
( shift left by 8-15 bits )
|
||||||
@left-shift1 ( x** n^ -> x<<n )
|
@left-shift1 ( x** n^ -> x<<n )
|
||||||
#0000 ;sh/z0 STA2 #00 ;sh/z2 STA
|
#08 SUB #40 SFT STH ( stash [n-8]<<4 )
|
||||||
#08 SUB #40 SFT STH ( n<<4 -> r )
|
|
||||||
SWP SWP2 SWP POP ( x3 x2 x1 )
|
|
||||||
|
|
||||||
STHkr SFT ;sh/z0 STA ( x3 x2 )
|
#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 )
|
||||||
#00 SWP STHkr SFT2 ( x3 00x2<<r )
|
STHr SFT ;sh/z0 LDA ORA ( calculate z0 )
|
||||||
;sh/z0 LDA2 ORA2 ;sh/z0 STA2 ( x3 )
|
;sh/z1 LDA2 #00
|
||||||
|
|
||||||
#00 SWP STHr SFT2 ( 00x3<<r )
|
|
||||||
;sh/z1 LDA2 ORA2 ;sh/z1 STA2 ( )
|
|
||||||
|
|
||||||
;sh/z0 LDA2 ;sh/z2 LDA #00
|
|
||||||
RTN
|
RTN
|
||||||
|
|
||||||
( shift left by 16-23 bits )
|
( shift left by 16-23 bits )
|
||||||
|
|
Loading…
Reference in New Issue