(picture.tal) Added example of drawing a picture
This commit is contained in:
parent
4657fe2490
commit
91560c6d24
|
@ -0,0 +1,313 @@
|
|||
( GUI Picture )
|
||||
|
||||
%+ { ADD } %- { SUB } %* { MUL } %/ { DIV }
|
||||
%< { LTH } %> { GTH } %= { EQU } %! { NEQ }
|
||||
%++ { ADD2 } %-- { SUB2 } %** { MUL2 } %// { DIV2 }
|
||||
%<< { LTH2 } %>> { GTH2 } %== { EQU2 } %!! { NEQ2 }
|
||||
|
||||
%AUTO-NONE { #00 .Screen/auto DEO }
|
||||
%AUTO-XADDR { #05 .Screen/auto DEO }
|
||||
|
||||
( devices )
|
||||
|
||||
|00 @System &vector $2 &wst $1 &rst $1 &eaddr $2 &ecode $1 &pad $1 &r $2 &g $2 &b $2 &debug $1 &halt $1
|
||||
|20 @Screen &vector $2 &width $2 &height $2 &auto $1 &pad $1 &x $2 &y $2 &addr $2 &pixel $1 &sprite $1
|
||||
|
||||
( variables )
|
||||
|
||||
|0000
|
||||
|
||||
( program )
|
||||
|
||||
|0100
|
||||
|
||||
( theme )
|
||||
#f0d7 .System/r DEO2
|
||||
#f0de .System/g DEO2
|
||||
#f0dc .System/b DEO2
|
||||
|
||||
#0030 .Screen/x DEO2
|
||||
#0030 .Screen/y DEO2
|
||||
;picture-icn #20 #10 #01 ;draw-icn JSR2
|
||||
|
||||
BRK
|
||||
|
||||
@draw-icn ( addr* width height color -- )
|
||||
|
||||
AUTO-XADDR
|
||||
STH
|
||||
( set bounds ) ,&height STR ,&width STR .Screen/addr DEO2
|
||||
( set origin ) .Screen/x DEI2 ,&x STR2
|
||||
LIT &height $1 #00
|
||||
&ver
|
||||
LIT2 &x $2 .Screen/x DEO2
|
||||
LIT &width $1 #00
|
||||
&hor
|
||||
STHkr .Screen/sprite DEO
|
||||
INC GTHk ,&hor JCN
|
||||
POP2
|
||||
.Screen/y DEI2k #0008 ++ ROT DEO2
|
||||
INC GTHk ,&ver JCN
|
||||
POP2
|
||||
POPr
|
||||
AUTO-NONE
|
||||
|
||||
JMP2r
|
||||
|
||||
@picture-icn ( akane2010.bit 20 x 10 )
|
||||
0000 0000 0000 0000 2b41 2341 2b41 2341
|
||||
8881 8081 8880 8080 0a00 2000 8800 2000
|
||||
8004 2004 8804 2a04 0000 0000 8000 0000
|
||||
0307 0f0f 0f1f 1f5f ffff ffff ffff ffff
|
||||
ffff ffff ffff ffff ffff ffff ffff ffff
|
||||
ffff ffff ffff ffff ffff ffff ffff ffff
|
||||
ffff ffff ffff ffff ffff ffff ffff ffff
|
||||
ffff ffff ffff ffff ffff fff7 ffff efdf
|
||||
fbf7 efd7 efdf af5f fffd fbfd fbf5 ebd7
|
||||
eaf5 ead5 ead5 aa55 ab55 ab55 ab57 ab57
|
||||
fbf7 ebd7 ebd7 ab57 ffff ffff ffff fbf7
|
||||
ffff ffff ffff ffff ffff ffff ffff ffff
|
||||
ffff ffff ffff ffff ffff ffff ffff fefc
|
||||
80c0 8000 0000 0000 0000 0000 0000 0000
|
||||
0000 0000 0000 0000 2a54 2a54 2a54 2a54
|
||||
8800 2200 8800 2200 8800 2200 8800 2200
|
||||
0000 0000 0000 0000 2b41 2341 2b41 2341
|
||||
8880 8080 8880 a080 8800 2000 8800 2000
|
||||
8a05 2a05 8f0f 2a15 aa55 aafd ffff aa45
|
||||
bf7f ff7f ffff ffff ffff ffff ffff ffff
|
||||
ffff ffff ffff ffff ffff ffff ffff ffff
|
||||
ffff ffff ffff ffff ffff ffff ffff ffff
|
||||
ffff ffff ffff fefd ffff ffff ffff be7c
|
||||
ffff ffff 8a00 0200 befd fafd fe1f 2307
|
||||
bf5f bf7d bad5 eaf5 ead5 aa55 aa55 aa55
|
||||
aa55 aa55 aa55 aa55 aa55 aa55 aa55 ab57
|
||||
af57 af7f ffc5 a307 fbf7 ff9f 1f1f 8f9f
|
||||
ffff ffff ffff ffff ffff ffff ffff ffff
|
||||
ffff ffff ffff ffff fefd faf5 eaff ff5f
|
||||
0055 aa55 aaff ffff 0055 aa55 aaff ffff
|
||||
0055 aadf aaff ffff aa55 aad5 aaff ffff
|
||||
8840 aa77 aaff ffff 8800 aaff aaff ffff
|
||||
0000 0000 0000 0000 2b41 2341 2b41 2241
|
||||
8800 a000 8800 a004 8804 2004 8000 2240
|
||||
8810 0810 a010 2010 0200 0000 0000 0000
|
||||
bf3f 3f1f 0f07 0303 ffff ffff ffff ffff
|
||||
ffff ffff ffff ffff ffff ffff ffff ffff
|
||||
ffff ffff ffff ffff ffff ffff ffd7 ab55
|
||||
faf5 faf5 eaf5 eaf5 f870 e240 8840 8240
|
||||
8800 2200 8841 233f 8f1f 3f7f ffff ffff
|
||||
fadd eac1 e2c1 c2c1 aa55 aa55 aa55 aa55
|
||||
aa55 aa55 aa54 a040 ae54 a854 a855 2f07
|
||||
8f1f 1f3f bfff ffff 8f87 8f85 8205 2a05
|
||||
ffdf af5f bf7f bf77 ffff ffff ffff ffff
|
||||
fefd f8c0 80c0 80c0 aa55 2a15 0a15 0a15
|
||||
ab55 8000 8000 8000 fe55 0200 0800 2200
|
||||
aa55 2200 8800 2200 eb77 2a54 2a54 2a54
|
||||
ff55 2000 8800 2000 ff55 0000 0000 2000
|
||||
0000 0000 0000 0000 2a41 2241 2b41 2341
|
||||
8804 a004 8004 a004 0840 aa40 8850 8210
|
||||
a010 2040 a040 2040 0000 0000 0000 0000
|
||||
0301 0000 0000 0000 ffff ff7f 7f3f 3b07
|
||||
ffff ffff ffff ffff ffff ffff ffff ffff
|
||||
feff fefd fefd fefd aa55 aa55 aa55 aa55
|
||||
eaf5 fafd fafd fefd 8840 a250 a854 aa54
|
||||
bf1f 2f07 8800 8055 ffff fefc e800 0a54
|
||||
8201 2000 8000 8010 aa54 2800 0000 0000
|
||||
0000 0000 0000 0000 0301 0000 0000 0200
|
||||
fefc fa70 8801 aa50 8a05 0a05 0201 0303
|
||||
ef57 af5f af5f bf7f ffff ffff ffff ffff
|
||||
c0c0 a2c0 8880 a280 0a15 0a15 8a15 0a15
|
||||
0000 0000 8000 2000 0800 0200 0800 2000
|
||||
0800 2200 8800 0000 2a54 2a55 2a55 2a57
|
||||
8800 2000 a0ff ffff 8000 2000 a8ff ffff
|
||||
0000 0000 0000 0001 ab41 a341 ab5f ffff
|
||||
8004 a804 8eff ffff 8010 a200 a0c0 e2c1
|
||||
8040 80c0 80c0 8000 0000 0000 0000 0000
|
||||
0000 0000 0000 0000 0301 0101 0000 0000
|
||||
ffff ffff ff7f 1f0f ffff ffff ffff ffff
|
||||
fefd feff feff ffff aa55 aa55 aa55 aad5
|
||||
feff feff fe7f fe7f aa54 aa55 aa55 aa54
|
||||
0000 0000 0000 0000 0000 0000 0000 0000
|
||||
0800 0000 0000 0000 0000 0000 0000 0000
|
||||
0000 0001 0205 0a05 8040 2040 e070 e040
|
||||
0000 0000 0000 0000 0307 0307 0707 0f07
|
||||
ffff ffff ffff ffff ffff fefc fefc fcfc
|
||||
8207 3f7f 7f7f 7f7f 8aff ffff ffff ffff
|
||||
08c0 faf8 fcfc feff 8800 2000 8800 2000
|
||||
0000 2000 0000 0000 2b57 2f57 2b55 2a54
|
||||
ffff ffff ffff ffff ffff ffff ffff ffff
|
||||
0b03 0307 0707 0f1f ffff ffff ffff ffff
|
||||
ffff ffff ffff ffff e0f1 f9f1 faf3 faf7
|
||||
8000 0000 0000 0000 0000 0000 0000 0000
|
||||
0000 0000 0000 0000 0000 0000 0000 0000
|
||||
0707 0301 0000 0000 ffff ffff ff7f 3f1f
|
||||
ffff ffff ffff ffff eaf5 fafd feff ffff
|
||||
fe7d be7f be7d ffff aa54 aa54 aa54 aad5
|
||||
0000 0000 0000 0000 0000 0000 0000 0000
|
||||
0000 0000 0000 0000 0000 0000 0000 0000
|
||||
0201 0000 0000 0001 e040 0000 0000 0040
|
||||
0000 0000 0000 0000 0f07 0f07 0f0f 0f1f
|
||||
ffff ffff fffe fcfc f8f0 c280 0800 2200
|
||||
be7f 3e15 8a01 2205 ff5f af55 ab55 ab55
|
||||
feff ffff ffff bf7f 8000 2000 8800 a201
|
||||
8800 2000 0000 00f7 2854 2854 2854 28f4
|
||||
ff7f bf57 af5f 2f57 ffff ffff ffff ffff
|
||||
0f1f 0f07 0707 0707 ffff ffff ffff ffff
|
||||
ffff ffff fefd faf5 e2c4 8604 8844 a854
|
||||
0000 0000 0000 0000 0000 0000 0000 0000
|
||||
0000 0000 0000 0000 0000 0000 0000 0000
|
||||
0000 0000 0000 0000 0f03 0100 0000 0000
|
||||
ffff ff7f 0f07 0a05 ffff ffff ffff ff7f
|
||||
ffff ffff ffff ffff eaf5 fafd feff ffff
|
||||
8000 8040 a0d0 e8d4 0000 0000 0000 0000
|
||||
0000 0000 0000 0000 0000 0000 0000 0000
|
||||
0200 0000 0000 0000 8000 0000 0000 0000
|
||||
0000 0000 0001 0305 0f1f 3f7c f8f0 8201
|
||||
e8c4 2a11 a840 a200 8800 2200 2005 2000
|
||||
8215 2e57 2a55 aa55 aa55 aa55 aa55 3a15
|
||||
fe7c f8f0 e840 a250 0307 2f1f 8f1f 2f0f
|
||||
ffff ffff ffff ffff f8fc fefc feff fef0
|
||||
ab57 2b15 0a55 0a01 ffff feff ea55 8040
|
||||
0301 0005 aa10 0805 ffff ff5f aa05 2000
|
||||
eaf5 ead5 aa55 aa41 8810 b810 2070 2040
|
||||
0000 0000 0000 0000 0000 0000 0000 0000
|
||||
0000 0000 0000 0000 0000 0000 0204 0a10
|
||||
0000 0000 a805 2200 0000 0000 0040 2805
|
||||
0a05 0a10 2a41 a200 af57 a840 8844 0a10
|
||||
ffff ff7f 8f01 2004 ffff ffff ffff ff7f
|
||||
aed5 aad5 aad5 aad5 80c0 a85d ab55 aa55
|
||||
0000 0000 a054 aa55 0000 0000 0000 a055
|
||||
0000 0000 0000 0045 0000 0071 fa7c faf0
|
||||
0810 a240 0800 2001 0a04 0254 a850 8200
|
||||
0800 2200 8800 2200 8800 2200 8804 2a00
|
||||
8a05 2201 8a01 2001 a8d0 a0c4 8a54 a040
|
||||
2801 2000 8800 0250 8f01 8240 a011 2211
|
||||
af55 a040 8051 a815 e0c0 c240 8800 a200
|
||||
0840 2200 aa10 2214 2a05 2000 8800 2200
|
||||
8a00 2000 8000 2200 2a00 2200 8800 2200
|
||||
a214 2301 8000 2210 e040 80c0 6070 2010
|
||||
0000 0000 0000 0000 0000 0000 0000 0000
|
||||
0000 0001 0204 0814 2840 a200 8800 2200
|
||||
8800 2200 8800 2200 8b10 2240 0800 a200
|
||||
a855 2200 8800 2200 2040 a240 a810 2a04
|
||||
8810 2200 0845 a800 bf7f 3a11 3805 2301
|
||||
aa55 aa55 aa55 aa55 aa55 aa55 aa55 aa55
|
||||
aa55 aa55 aa55 aa55 aa55 aa55 aa75 fa7f
|
||||
ef75 bb5d bb5f bb5f f8f8 fafc f8fc fcfc
|
||||
8800 2201 8801 2201 0800 2200 0801 2204
|
||||
8800 2200 0850 2800 8010 0240 a810 2210
|
||||
8a01 2000 8800 2200 0800 a200 8800 2240
|
||||
a840 2200 a800 2200 8801 2a04 8805 2204
|
||||
8add aa45 8a14 2015 8800 a200 8800 a280
|
||||
8804 2804 8004 2204 8800 2200 8800 2200
|
||||
8800 0200 8840 0240 8800 2200 8800 2001
|
||||
8800 0240 8800 2200 b010 1810 b810 1810
|
||||
0000 0000 0000 0000 0000 0000 0000 0001
|
||||
0810 2240 8800 a200 8800 2200 8800 2201
|
||||
8801 2241 8a00 a204 8800 2200 8800 2200
|
||||
8800 2200 8800 2200 8a00 2201 8800 2200
|
||||
8a01 2200 0800 a200 0a05 aa75 aa05 2201
|
||||
aa55 aa55 aa55 aa55 aa55 aa55 aa55 aa55
|
||||
aa55 aa55 aa55 aa55 bf7f bf5f af47 8301
|
||||
bbd7 fbf1 f8fd feff fefc fefc fefe fefe
|
||||
8801 2241 2a05 2200 0040 8200 8800 0200
|
||||
0000 a204 a840 2200 0a50 8200 8800 2200
|
||||
a010 2200 8801 2200 8800 2200 2800 a240
|
||||
a800 2205 8205 2205 8a04 2254 a855 ab55
|
||||
3e15 2a75 ead5 aa55 82d5 ea75 aa75 aa75
|
||||
a85c aa50 a850 aa50 8800 2200 8800 2200
|
||||
0800 a200 8800 a200 8a01 2000 8801 2001
|
||||
0800 2200 8800 2200 8810 2810 8814 2804
|
||||
0000 0000 0000 0000 0204 0004 0810 0210
|
||||
8800 2200 8800 2200 8801 2001 8801 2200
|
||||
0804 2a00 0810 a200 8800 2200 8800 2200
|
||||
8800 2200 8800 2200 8800 2200 8801 2200
|
||||
0840 0240 a800 a210 8800 2200 8800 2200
|
||||
2a14 2200 8800 2200 aa00 8040 a804 2200
|
||||
a800 0000 0000 8050 0000 0000 0000 0001
|
||||
ff7f 3f1f 3f71 8200 feff feff ffff ff7f
|
||||
8800 2200 88f0 fafc a804 2200 aa11 0210
|
||||
8800 2200 0800 a200 8800 2200 8800 2200
|
||||
8800 2200 8800 2200 0840 2240 a800 221f
|
||||
8a01 2205 8205 befd a850 a854 a855 a955
|
||||
ff7f ffdd badd ba5d eaf5 ea75 ea75 ead5
|
||||
a850 aa50 a850 a250 8800 2a04 8a00 2200
|
||||
0800 0250 0800 0254 8011 2200 8800 2201
|
||||
0800 2055 aa55 aad5 8810 2040 a040 a040
|
||||
0000 0000 0000 0200 2800 2240 0840 0240
|
||||
8800 2200 8800 2200 8800 2200 8800 2200
|
||||
8800 2200 8800 2200 8800 2200 8800 2200
|
||||
8800 2200 8800 2200 8800 2200 8800 2200
|
||||
0850 2210 881c 2804 8800 2200 8800 2200
|
||||
8800 2200 8800 2200 8800 2200 8800 2200
|
||||
8a05 2200 8004 0f1f 0244 a818 9810 b2f0
|
||||
8800 2200 8800 2200 bf1f 2f1f 8f0f 2f07
|
||||
feff ffff ffff ffff 0090 e2f0 e0f0 f8fc
|
||||
8840 2200 a800 2210 8800 2200 8800 2200
|
||||
8800 2200 8800 2200 9f1f 2f0f 8f07 2305
|
||||
fefd fefd fefd fefd ab51 aa57 aa57 ae55
|
||||
ba5d ba55 aa55 aa55 ead5 ead5 aad5 aad5
|
||||
a857 bf7f ff7f ffff afff ffff ffff ffff
|
||||
80f5 ffff ffff ffff 8855 faf0 f8f8 f8fd
|
||||
aad5 aa55 2a55 2a55 a075 aa40 a040 a055
|
||||
0850 aa01 0201 0055 0840 8240 2800 2270
|
||||
8800 2200 8800 2200 8800 2200 8800 2200
|
||||
8800 2200 8800 2200 8800 2200 8800 2200
|
||||
8800 2200 8800 2200 8800 2200 8800 2200
|
||||
8a01 2001 8800 2200 8800 a2c0 a850 2834
|
||||
8800 2200 8800 2200 8800 2200 8800 2200
|
||||
bf7f ff7f ff7f 7f7f e8f0 e2f0 f0f0 fafc
|
||||
8800 2200 8800 2200 8f0f 2f1f 9f1f 3f7f
|
||||
ffff ffff fffd fefd fcfd fef5 aa55 ab57
|
||||
0050 e0f1 fafd eed5 0874 ae57 af5f be5d
|
||||
8800 22c0 b85c aa5c 8a04 2200 8800 2200
|
||||
fe7d 3e3d be1d 2e05 ae55 ae55 ae7d ee5d
|
||||
ab55 ab55 ab57 aa57 aa55 ab55 ab57 ab57
|
||||
ffff ffff ffff ffff ffff ffff ffff ffff
|
||||
ffff ffff ffff ffff ffff ffff ffff fefc
|
||||
ead5 eaf5 eaf5 aa15 bf5f bf5f bf5d aa51
|
||||
feff ffff ff75 aa40 e8f0 eae4 e064 a210
|
||||
8800 2200 8800 2200 8800 2200 8800 2200
|
||||
8800 2200 8800 2200 8800 2200 8800 2201
|
||||
8800 2005 8810 2200 8800 8200 8800 2200
|
||||
8800 2200 8800 2200 ba14 2a05 8607 2301
|
||||
0800 2210 0804 a200 8800 2201 8a04 2850
|
||||
7f7f ff7f 3f1f 3f1f fcfe ffff ffff f8fc
|
||||
8801 8fff ffff fe7d ffff ffff ebd7 af57
|
||||
feff ead7 abd5 aa55 ab55 aa55 ab75 faf5
|
||||
aed7 aa57 fa50 a0c1 be5f fa50 0000 0255
|
||||
b878 f87c 2f17 aa40 8800 2200 8840 2010
|
||||
8a05 2a05 0a1d 0a1d ae5d ae5d ae5d ee5d
|
||||
aa55 ae55 aa5d ba55 af5f ab5f bb77 ab77
|
||||
ffff ffff ffff ffff ffff ffff ffff ffff
|
||||
ffff ffff ffff ffff fefc fefc fefc feff
|
||||
0a15 0a05 0a05 0255 a850 a850 a850 a854
|
||||
8040 0000 0800 0814 2211 2010 2010 2210
|
||||
8800 2200 0800 2200 8800 2200 8800 2200
|
||||
8800 2200 8800 2200 8a04 2a10 a840 0200
|
||||
0800 2200 8800 2015 8800 2200 8800 a800
|
||||
8800 2200 8800 2240 8801 2201 8801 2001
|
||||
88c0 aad5 aad5 aa55 2000 ba55 aa55 aa57
|
||||
8f1f af5f afff bf7f fafd fcfc faf5 faff
|
||||
3a55 0e07 0301 80c0 aa55 eaf5 fbff ff7f
|
||||
aa55 ab7f ffff ffff fb75 f8f0 e0c0 80c0
|
||||
8a14 0800 0000 0000 aa00 0000 0000 0000
|
||||
0004 0201 0001 0001 2010 2040 8880 a001
|
||||
3e15 2040 e0f4 feff ef55 0000 0000 80d0
|
||||
fa55 0a15 0a15 0a15 bf77 a347 a347 83c7
|
||||
ffff ffff ffff ffff ffff ffff ffff ffff
|
||||
ffff ffff ffff ffff ffff ffff ffff ffff
|
||||
feff feff ffff aad5 af57 af57 ab57 ab55
|
||||
ffff ffff ffff aa55 e8f0 e2e0 e8e0 a240
|
||||
8800 2200 8800 2200 8800 2200 8800 2200
|
||||
8801 2204 8000 2810 0800 2204 8810 2240
|
||||
2040 2200 8800 2200 8800 2200 8800 2200
|
||||
8000 2a04 8a00 2211 8a07 2e0d 8a1d 3a7d
|
||||
aa55 aa55 aa55 aa55 ae55 af57 ab55 abff
|
||||
ffff ffff ffff ffff ffff ffff ffff ffff
|
||||
e0c0 e0f0 f8f0 f8f0 3f1f 0f07 0301 0001
|
||||
ffff ffff fefe fefc 8000 8000 0000 0000
|
||||
0000 0000 0000 0000 0000 0000 0000 0000
|
||||
0001 0001 0000 0000 8303 8343 8343 8343
|
||||
ffff ffff ffff ffff faff ffff ffff fbf7
|
||||
bafd ffff bfdf ff5f ef7f ffff af5f af5f
|
||||
ffff ffff ffff ffff ffff ffff ffff ffff
|
|
@ -1,121 +0,0 @@
|
|||
( GUI Proportional font )
|
||||
|
||||
( devices )
|
||||
|
||||
|00 @System [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ]
|
||||
|20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &pixel $1 &sprite $1 ]
|
||||
|
||||
( variables )
|
||||
|
||||
|0000
|
||||
|
||||
( program )
|
||||
|
||||
|0100
|
||||
|
||||
( theme ) #0f9f .System/r DEO2 #0f3f .System/g DEO2 #0f30 .System/b DEO2
|
||||
|
||||
#0000 ;draw JSR2
|
||||
#0001 ;draw JSR2
|
||||
#0002 ;draw JSR2
|
||||
|
||||
BRK
|
||||
|
||||
@draw ( extra-spacing* -- )
|
||||
STH2
|
||||
;text
|
||||
&loop
|
||||
LDAk
|
||||
DUP #00 EQU ,&end JCN
|
||||
DUP #0a EQU ,&linefeed JCN
|
||||
#0005 SFT2 ;font ADD2
|
||||
DUP2 .Screen/addr DEO2
|
||||
#09 .Screen/sprite DEO
|
||||
,get-x-advance JSR .Screen/x DEI2 ADD2 STH2kr ADD2 .Screen/x DEO2
|
||||
&next
|
||||
INC2
|
||||
,&loop JMP
|
||||
|
||||
&linefeed
|
||||
POP
|
||||
#0000 .Screen/x DEO2
|
||||
#0008 .Screen/y DEI2 ADD2 STH2kr ADD2 .Screen/y DEO2
|
||||
,&next JMP
|
||||
|
||||
&end
|
||||
POP POP2 POP2r
|
||||
JMP2r
|
||||
|
||||
@get-x-advance ( font-char-addr* -- advance* )
|
||||
( Save two 00 bytes for later use )
|
||||
#0000 SWP2
|
||||
( First, load the eight bytes that make up the character )
|
||||
LDA2k SWP2 #0002 ADD2
|
||||
LDA2k SWP2 #0002 ADD2
|
||||
LDA2k SWP2 #0002 ADD2
|
||||
LDA2
|
||||
( OR all the bytes together, so we know which columns contain filled pixels )
|
||||
ORA2 ORA2 ORA2 ORA
|
||||
( Find the lowest set bit (using one of the 00 bytes at the top, but not consuming it) )
|
||||
SUBk AND
|
||||
( Convert the nine possible values (00-80) into an offset into the magic table (00-08). )
|
||||
( They get jumbled up with these two operations, but each possible value remains unique )
|
||||
#a3 MUL #16 DIV
|
||||
( Load the byte from the magic table, return a short (consuming/returning the 00 bytes at the top) )
|
||||
;&magic ADD2 LDA
|
||||
JMP2r
|
||||
( The magic table performs the last bit of arithmetic we want:
|
||||
* the advance in x should be one more than the number of columns with filled pixels,
|
||||
* with a maximum of 8, and
|
||||
* a minimum of 3. )
|
||||
&magic
|
||||
03 ( lowest set bit is 00, 0 columns wide )
|
||||
06 ( lowest set bit is 08, 5 columns wide )
|
||||
05 ( lowest set bit is 10, 4 columns wide )
|
||||
08 ( lowest set bit is 02, 7 columns wide )
|
||||
04 ( lowest set bit is 20, 3 columns wide )
|
||||
03 ( lowest set bit is 80, 1 column wide )
|
||||
07 ( lowest set bit is 04, 6 columns wide )
|
||||
08 ( lowest set bit is 01, 8 columns wide )
|
||||
03 ( lowest set bit is 40, 2 columns wide )
|
||||
|
||||
@font ( spectrum-zx font, with each character moved to be flush left in its cell )
|
||||
[
|
||||
0000 0000 0000 0000 0000 4800 fc78 0000 0000 4800 7884 0000 0000 d8f8 f870 2000
|
||||
0020 70f8 f870 2000 0070 70f8 d820 7000 0020 70f8 f820 7000 0000 00c0 c000 0000
|
||||
00fc 8484 8484 fc00 0000 6090 9060 0000 0030 4884 8448 3000 003c 0c74 9490 6000
|
||||
0070 88d8 20f8 2000 0030 2020 20e0 e000 007c 4444 44cc cc00 0000 2088 0088 2000
|
||||
0000 80c0 e0c0 8000 0000 2060 e060 2000 0040 e000 00e0 4000 00a0 a0a0 a000 a000
|
||||
007c 9494 7414 1400 0018 608c c418 6000 0000 0000 0000 ffff 0040 e000 e040 00e0
|
||||
0020 70a8 2020 2000 0020 2020 a870 2000 0000 1008 fc08 1000 0000 2040 fc40 2000
|
||||
0000 8080 fc00 0000 0000 0048 cc48 0000 0000 2070 f800 0000 0000 00f8 7020 0000
|
||||
0000 0000 0000 0000 0080 8080 8000 8000 00a0 a000 0000 0000 0048 fc48 48fc 4800
|
||||
0020 78a0 7028 f020 0084 0810 2040 8400 0060 9064 9888 7400 0040 8000 0000 0000
|
||||
0040 8080 8080 4000 0080 4040 4040 8000 0000 5020 f820 5000 0000 2020 f820 2000
|
||||
0000 0000 0040 4080 0000 0000 f000 0000 0000 0000 0000 8000 0000 0810 2040 8000
|
||||
0078 8c94 a4c4 7800 0060 a020 2020 f800 0078 8404 7880 fc00 0078 8438 0484 7800
|
||||
0010 3050 90fc 1000 00fc 80f8 0484 7800 0078 80f8 8484 7800 00fc 0408 1020 2000
|
||||
0078 8478 8484 7800 0078 8484 7c04 7800 0000 0080 0000 8000 0000 4000 0040 4080
|
||||
0000 2040 8040 2000 0000 00f8 00f8 0000 0000 8040 2040 8000 0078 8404 1800 1000
|
||||
0078 84b4 a884 7800 0030 4884 fc84 8400 00f8 84f8 8484 f800 0078 8480 8084 7800
|
||||
00f0 8884 8488 f000 00fc 80f8 8080 fc00 007c 8080 f880 8000 0078 8480 9c84 7800
|
||||
0084 84fc 8484 8400 00f8 2020 2020 f800 0004 0404 8484 7800 0088 90e0 9088 8400
|
||||
0080 8080 8080 fc00 0084 ccb4 8484 8400 0084 c4a4 948c 8400 0078 8484 8484 7800
|
||||
00f8 8484 f880 8000 0078 8484 a494 7800 00f8 8484 f888 8400 0078 8078 0484 7800
|
||||
00fe 1010 1010 1000 0084 8484 8484 7800 0084 8484 8448 3000 0084 8484 b4cc 8400
|
||||
0084 4830 3048 8400 0082 4428 1010 1000 00fc 0810 2040 fc00 00c0 8080 8080 c000
|
||||
0080 4020 1008 0400 00c0 4040 4040 c000 0020 5088 0000 0000 0000 0000 0000 fc00
|
||||
0080 4000 0000 0000 0000 7008 7888 7800 0080 80f0 8888 f000 0000 7880 8080 7800
|
||||
0008 0878 8888 7800 0000 7088 f080 7800 0060 80e0 8080 8000 0000 7088 8878 0870
|
||||
0080 80b0 c888 8800 0040 00c0 4040 2000 0010 0010 1010 9060 0080 90a0 c0a0 9000
|
||||
0080 8080 8080 6000 0000 d0a8 a8a8 a800 0000 b0c8 8888 8800 0000 7088 8888 7000
|
||||
0000 f088 88f0 8080 0000 7888 8878 080c 0000 b0c0 8080 8000 0000 7080 7008 f000
|
||||
0040 40f0 4040 3000 0000 8888 8888 7000 0000 8888 5050 2000 0000 88a8 a8a8 5000
|
||||
0000 8850 2050 8800 0000 8888 8878 0870 0000 f810 2040 f800 0060 4080 8040 6000
|
||||
0080 8080 8080 8000 00c0 4020 2040 c000 0000 0064 9800 0000 3c42 99a1 a199 423c
|
||||
]
|
||||
|
||||
@text "Are 20 "proportional 20 "fonts 20 "a 20 "good 20 "idea? 0a 0a
|
||||
"The 20 "jury 20 "is 20 "still 20 "out, 20 "but 20 "one 20 "thing 20 "is 20 "certain: 0a
|
||||
"it 20 "is 20 "possible 20 "to 20 "print 20 "with 20 "these 20 "fonts 20 "in 20 "Uxn. 0a 0a 0a 00
|
||||
|
Binary file not shown.
Loading…
Reference in New Issue