started implementing decimal output
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
|00 @Control [ &framevec $2 &io $2 &random $1 &status $1 &sound $1 &syscall $1 ]
|
|00 @Control [ &framevec $2 &io $2 &random $1 &status $1 &sound $1 &syscall $1 ]
|
||||||
|
|
||||||
|
( zero-page pseudo-vector to only be used with DATETIME-COMPAT macro )
|
||||||
|c0 @DateTime [ &year $2 &month $1 &day $1 &hour $1 &minute $1 &second $1 &dotw $1 &doty $2 &dst $1 ]
|
|c0 @DateTime [ &year $2 &month $1 &day $1 &hour $1 &minute $1 &second $1 &dotw $1 &doty $2 &dst $1 ]
|
||||||
|
|
||||||
( control block macros )
|
( control block macros )
|
||||||
|
|||||||
+20
-14
@@ -75,27 +75,33 @@
|
|||||||
INC2 ,&loop JMP
|
INC2 ,&loop JMP
|
||||||
&eof POP2 JMP2r
|
&eof POP2 JMP2r
|
||||||
|
|
||||||
( convert true hex short value to BCD - up to 9999 represented by #270f coded into #9999 )
|
( draw decimal short )
|
||||||
|
|
||||||
( convert BCD to hex value )
|
|
||||||
|
|
||||||
( output decimal short )
|
|
||||||
@print-dec ( x y value* -- x y )
|
@print-dec ( x y value* -- x y )
|
||||||
STH2 ( value* -- )
|
SWP2 ,&coords STR2 ( value* -- )
|
||||||
#00 ,&zero STR
|
|
||||||
#2710 ,&parse JSR
|
#2710 ,&parse JSR
|
||||||
#03e8 ,&parse JSR
|
#03e8 ,&parse JSR
|
||||||
#0064 ,&parse JSR
|
#0064 ,&parse JSR
|
||||||
#000a ,&parse JSR
|
#000a ,&parse JSR
|
||||||
,&emit JSR POP
|
NIP ,&emit JSR
|
||||||
STH2r
|
,&coords LDR2
|
||||||
JMP2r
|
JMP2r
|
||||||
&parse DIV2k DUP ,&emit JSR MUL2 SUB2 JMP2r
|
&parse
|
||||||
|
DIV2k ( value* divisor* -- value* divisor* div* )
|
||||||
|
DUP ( value* divisor* div* divlonib -- )
|
||||||
|
,&emit JSR ( value* divisor* div* -- )
|
||||||
|
MUL2 ( value* divisor* div* -- value* wholevalue* )
|
||||||
|
SUB2 ( value* wholevalue* -- rem* )
|
||||||
|
JMP2r
|
||||||
&emit
|
&emit
|
||||||
DUP [ LIT &zero $1 ] #0000 EQU2 ,&skip JCN
|
#30 ADD
|
||||||
#01 ,&zero STR DUP #30 ADD STH2r ROT ;putc STH2 JSR2 &skip POP JMP2r
|
,&coords LDR2
|
||||||
|
ROT
|
||||||
|
;putc JSR2
|
||||||
|
,&coords STR2
|
||||||
|
JMP2r
|
||||||
|
LIT &coords $2
|
||||||
|
|
||||||
( nanofont glyphs for ESOP, courtesy of Michaelangel007 )
|
( the basic 96 nanofont glyphs for ESOP, courtesy of Michaelangel007 )
|
||||||
|
|
||||||
@nanofont
|
@nanofont
|
||||||
0000 4400 aa00 aee0 64c4 ce60 4c60 4000 4840 4240 6600 4e40 0088 0e00 0080 2480
|
0000 4400 aa00 aee0 64c4 ce60 4c60 4000 4840 4240 6600 4e40 0088 0e00 0080 2480
|
||||||
|
|||||||
@@ -14,6 +14,8 @@ BRK
|
|||||||
;print-dec JSR2 ( mv-x mv-y year-x year-y -- )
|
;print-dec JSR2 ( mv-x mv-y year-x year-y -- )
|
||||||
POP2 ( mv-x mv-y -- )
|
POP2 ( mv-x mv-y -- )
|
||||||
;moveme ;draw-str JSR2
|
;moveme ;draw-str JSR2
|
||||||
|
( drawing static strings should always end with POP2 )
|
||||||
|
#02 #2b ;addr ;draw-str JSR2 POP2
|
||||||
SWP #20 SUB SWP ( restore x coord between frames )
|
SWP #20 SUB SWP ( restore x coord between frames )
|
||||||
;&adv KP-A JMPKEY
|
;&adv KP-A JMPKEY
|
||||||
;&back KP-B JMPKEY
|
;&back KP-B JMPKEY
|
||||||
@@ -27,6 +29,8 @@ BRK
|
|||||||
|
|
||||||
@moveme "MOVE 20 "ME! 00
|
@moveme "MOVE 20 "ME! 00
|
||||||
|
|
||||||
|
@addr "SR.HT/~LUXFERRE/ESOP 00
|
||||||
|
|
||||||
( include ESOP stdlib routines )
|
( include ESOP stdlib routines )
|
||||||
|
|
||||||
~esop-lib-subs.tal
|
~esop-lib-subs.tal
|
||||||
|
|||||||
Reference in New Issue
Block a user