(neralie) Merged lits
This commit is contained in:
parent
a299cca6dc
commit
c625fa615e
|
@ -64,60 +64,50 @@ BRK
|
|||
JMP2r
|
||||
|
||||
@update-time ( -- )
|
||||
|
||||
( | add up fractions of a pulse, store tenths in n6 )
|
||||
( ) #0120 #00 .DateTime/hour DEI MUL2
|
||||
( ) #00c0 #00 .DateTime/minute DEI MUL2 ADD2
|
||||
( ) #00f8 #00 .DateTime/second DEI MUL2 ADD2
|
||||
( ) #0271 #00 .fps/next LDZ MUL2 #00 .fps/current LDZ DIV2 #30 SFT2 ADD2
|
||||
( ) #0120 [ LIT2 00 -DateTime/hour ] DEI MUL2
|
||||
( ) #00c0 [ LIT2 00 -DateTime/minute ] DEI MUL2 ADD2
|
||||
( ) #00f8 [ LIT2 00 -DateTime/second ] DEI MUL2 ADD2
|
||||
( ) #0271 [ LIT2 00 -fps/next ] LDZ MUL2 [ LIT2 00 -fps/current ] LDZ DIV2 #30 SFT2 ADD2
|
||||
( ) #01b0 modf SWP2 #0017 MUL2 #03e8 DIV2 .neralie/n6 STZ POP
|
||||
|
||||
( | add up units and tens of pulses, store in n5 and n4 )
|
||||
( ) #0042 #00 .DateTime/hour DEI MUL2 ADD2
|
||||
( ) #005e #00 .DateTime/minute DEI MUL2 ADD2
|
||||
( ) #000b #00 .DateTime/second DEI MUL2 ADD2
|
||||
( ) #0042 [ LIT2 00 -DateTime/hour ] DEI MUL2 ADD2
|
||||
( ) #005e [ LIT2 00 -DateTime/minute ] DEI MUL2 ADD2
|
||||
( ) #000b [ LIT2 00 -DateTime/second ] DEI MUL2 ADD2
|
||||
( ) #000a modf SWP2 .neralie/n5 STZ POP
|
||||
( ) #000a modf SWP2 .neralie/n4 STZ POP
|
||||
|
||||
( | add up hundreds of pulses + 10 x beats, store in n0123 )
|
||||
( ) #01a0 #00 .DateTime/hour DEI MUL2 ADD2
|
||||
( ) #0006 #00 .DateTime/minute DEI MUL2 ADD2 .neralie/n0123 STZ2
|
||||
|
||||
( ) #01a0 [ LIT2 00 -DateTime/hour ] DEI MUL2 ADD2
|
||||
( ) #0006 [ LIT2 00 -DateTime/minute ] DEI MUL2 ADD2 .neralie/n0123 STZ2
|
||||
JMP2r
|
||||
|
||||
@<draw-date> ( -- )
|
||||
|
||||
( auto x ) #01 .Screen/auto DEO
|
||||
|
||||
( auto x ) [ LIT2 01 -Screen/auto ] DEO
|
||||
.Screen/width DEI2 #01 SFT2 #0034 SUB2 .Screen/x DEO2
|
||||
.Screen/height DEI2 #0010 SUB2 .Screen/y DEO2
|
||||
|
||||
( | arvelie )
|
||||
.DateTime/year DEI2 #07d6 SUB2 NIP
|
||||
DUP #0a DIV #00 SWP #30 SFT2 ;font-numbers ADD2 .Screen/addr DEO2
|
||||
#01 .Screen/sprite DEO
|
||||
[ LIT2 01 -Screen/sprite ] DEO
|
||||
#0a DIVk MUL SUB #00 SWP #30 SFT2 ;font-numbers ADD2 .Screen/addr DEO2
|
||||
#01 .Screen/sprite DEO
|
||||
[ LIT2 01 -Screen/sprite ] DEO
|
||||
.DateTime/doty DEI2
|
||||
DUP2 #000e DIV2 #30 SFT2 ;font-letters ADD2 .Screen/addr DEO2
|
||||
#01 .Screen/sprite DEO
|
||||
[ LIT2 01 -Screen/sprite ] DEO
|
||||
#000e DIV2k MUL2 SUB2
|
||||
DUP2 #000a DIV2 <draw-digit>
|
||||
#000a DIV2k MUL2 SUB2 <draw-digit>
|
||||
|
||||
.Screen/x DEI2 #0008 ADD2 .Screen/x DEO2
|
||||
|
||||
( | neralie )
|
||||
.neralie/n0123 LDZ2
|
||||
#03e8 modf <draw-digit>
|
||||
#0064 modf <draw-digit>
|
||||
#000a modf <draw-digit>
|
||||
#000b <draw-digit> ( the colon )
|
||||
#000b <draw-digit>
|
||||
<draw-digit>
|
||||
#00 .neralie/n4 LDZ <draw-digit>
|
||||
#00 .neralie/n5 LDZ <draw-digit>
|
||||
|
||||
( auto none ) #00 .Screen/auto DEO
|
||||
[ LIT2 00 -neralie/n4 ] LDZ <draw-digit>
|
||||
[ LIT2 00 -neralie/n5 ] LDZ <draw-digit>
|
||||
( auto none ) [ LIT2 00 -Screen/auto ] DEO
|
||||
|
||||
JMP2r
|
||||
|
||||
|
@ -186,12 +176,12 @@ JMP2r
|
|||
|
||||
@h ( x1* x2* y* -- )
|
||||
.Screen/y DEO2
|
||||
.Screen/x .lines/addr STZ
|
||||
[ LIT2 -Screen/x -lines/addr ] STZ
|
||||
!v/draw-line
|
||||
|
||||
@v ( y1* y2* x* -- )
|
||||
.Screen/x DEO2
|
||||
.Screen/y .lines/addr STZ
|
||||
[ LIT2 -Screen/y -lines/addr ] STZ
|
||||
|
||||
&draw-line ( v1* v2* -- )
|
||||
LTH2k ?{ SWP2 }
|
||||
|
@ -214,16 +204,14 @@ JMP2r
|
|||
DIV2k STH2k MUL2 SUB2 STH2r JMP2r
|
||||
|
||||
@mul2hi ( a* b* -- product-top-16-bits* )
|
||||
|
||||
;mul/bhi STA2 ;mul/ahi STA2
|
||||
#00
|
||||
#00
|
||||
#00 .mul/alo LDZ #00 .mul/blo LDZ MUL2
|
||||
#0000
|
||||
[ LIT2 00 -mul/alo ] LDZ [ LIT2 00 -mul/blo ] LDZ MUL2
|
||||
POP
|
||||
#00 .mul/ahi LDZ #00 .mul/blo LDZ MUL2 /adc
|
||||
#00 .mul/alo LDZ #00 .mul/bhi LDZ MUL2 /adc
|
||||
[ LIT2 00 -mul/ahi ] LDZ [ LIT2 00 -mul/blo ] LDZ MUL2 /adc
|
||||
[ LIT2 00 -mul/alo ] LDZ [ LIT2 00 -mul/bhi ] LDZ MUL2 /adc
|
||||
POP
|
||||
#00 .mul/ahi LDZ #00 .mul/bhi LDZ MUL2 ADD2
|
||||
[ LIT2 00 -mul/ahi ] LDZ [ LIT2 00 -mul/bhi ] LDZ MUL2 ADD2
|
||||
JMP2r
|
||||
|
||||
&adc ( 31..24 a* b* -- 31..24 sum* )
|
||||
|
|
Loading…
Reference in New Issue