revamped pixel output draft
This commit is contained in:
+5
-18
@@ -1,6 +1,6 @@
|
||||
( ESOP stdlib )
|
||||
|
||||
|00 @Control [ &framevec $2 &input $2 &random $1 &status $1 &sound $1 &syscall $1 ]
|
||||
|00 @Control [ &framevec $2 &io $2 &random $1 &status $1 &sound $1 &syscall $1 ]
|
||||
|
||||
( byte to short )
|
||||
( x -- 00 x )
|
||||
@@ -12,36 +12,23 @@
|
||||
%RND { .Control/random DEI }
|
||||
%STACKTRACE { #ff .Control/random DEO }
|
||||
%SYS { .Control/syscall DEO }
|
||||
%INKEY { .Control/input DEI2 }
|
||||
%INKEY { .Control/io DEI2 }
|
||||
%PXL { .Control/io DEO2 }
|
||||
%DBG { #20 SYS SYS }
|
||||
%SND { .Control/sound DEO }
|
||||
|
||||
( x y -- ref* )
|
||||
%COORD { BTS ROT BTS SWP2 #0054 MUL2 ADD2 }
|
||||
( x y -- bitshift byteptr* )
|
||||
%PXLOFFSET { COORD DUP2 #03 SFT2 DUP2 #30 SFT2 ROT2 SWP2 SUB2 SWP POP ROT #fe00 ADD2 }
|
||||
|
||||
( x y -- )
|
||||
%PXL { PXLOFFSET DUP2 LDA #01 ROT #40 SFT SFT ORA ROT ROT STA }
|
||||
|
||||
( subtract #20 from the ASCII code and you get the offset from the nanofont label )
|
||||
%CHAR-TO-NF { #20 SUB ;nanofont ADD }
|
||||
|
||||
|0100
|
||||
#03 #02 #01
|
||||
ROT
|
||||
DBG DBG DBG
|
||||
;on-frame SETSCRVEC
|
||||
#30
|
||||
#10 #12
|
||||
BRK
|
||||
|
||||
@on-frame
|
||||
DUP SND
|
||||
INC
|
||||
( #10 #12 PXL )
|
||||
DUP2 INC PXL
|
||||
BRK
|
||||
|
||||
|
||||
@putc
|
||||
|
||||
JMP2r
|
||||
|
||||
Reference in New Issue
Block a user