1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2024-10-21 02:24:34 +00:00

Put font-hex into a lib file

This commit is contained in:
jespergravgaard 2019-06-23 11:26:11 +02:00
parent 74c7abe229
commit 306bbc381f
10 changed files with 1925 additions and 1668 deletions

View File

@ -36,8 +36,8 @@ public class TestPrograms {
}
@Test
public void testFontHex() throws IOException, URISyntaxException {
compileAndCompare("font-hex");
public void testFontHexShow() throws IOException, URISyntaxException {
compileAndCompare("font-hex-show");
}
@Test

View File

@ -0,0 +1,17 @@
// Shows a font where each char contains the number of the char (00-ff)
import "c64"
import "string"
import "font-hex"
byte* SCREEN = 0x0400;
byte* CHARSET = 0x2000;
void main() {
*D018 = toD018(SCREEN, CHARSET);
init_font_hex(CHARSET);
// Show all chars on screen
for (byte c: 0..255) {
SCREEN[c] = c;
}
}

View File

@ -1,40 +1,26 @@
// Creates a font where each char contains the number of the char (00-ff)
import "c64"
import "string"
byte* SCREEN = 0x0400;
byte* CHARSET = 0x2000;
void main() {
*D018 = toD018(SCREEN, CHARSET);
// Make charset from proto chars
byte* charset = CHARSET;
void init_font_hex(byte* charset) {
byte* proto_hi = FONT_HEX_PROTO;
for( byte c: 0..15 ) {
byte* proto_lo = FONT_HEX_PROTO;
for( byte c: 0..15 ) {
byte idx = 0;
charset[idx++] = 0;
for( byte i: 0..4) {
charset[i] = proto_hi[i]<<3 | proto_lo[i];
charset[idx++] = proto_hi[i]<<4 | proto_lo[i]<<1;
}
charset[5] = 0;
charset[6] = 0;
charset[7] = 0;
charset[idx++] = 0;
charset[idx++] = 0;
proto_lo += 5;
charset += 8;
}
proto_hi += 5;
}
// Show all chars on screen
for (byte c: 0..255) {
SCREEN[c] = c;
}
}
// Bit patterns for symbols 0-f (3x5 pixels)
// Bit patterns for symbols 0-f (3x5 pixels) used in font hex
byte[] FONT_HEX_PROTO = {
// 0
0b010,
@ -109,11 +95,11 @@ byte[] FONT_HEX_PROTO = {
0b101,
0b110,
// c
0b011,
0b010,
0b101,
0b100,
0b100,
0b100,
0b011,
0b101,
0b010,
// d
0b110,
0b101,
@ -123,13 +109,13 @@ byte[] FONT_HEX_PROTO = {
// e
0b111,
0b100,
0b111,
0b110,
0b100,
0b111,
// f
0b111,
0b100,
0b111,
0b110,
0b100,
0b100
};

View File

@ -1,4 +1,4 @@
// Creates a font where each char contains the number of the char (00-ff)
// Shows a font where each char contains the number of the char (00-ff)
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
@ -7,46 +7,77 @@
.label CHARSET = $2000
main: {
.const toD0181_return = (>(SCREEN&$3fff)*4)|(>CHARSET)/4&$f
.label proto_lo = 5
.label charset = 7
.label proto_hi = 2
.label c = 4
lda #toD0181_return
sta D018
jsr init_font_hex
ldx #0
// Show all chars on screen
b1:
txa
sta SCREEN,x
inx
cpx #0
bne b1
rts
}
// Make charset from proto chars
// init_font_hex(byte* zeropage(5) charset)
init_font_hex: {
.label _0 = $b
.label idx = $a
.label proto_lo = 7
.label charset = 5
.label c1 = 9
.label proto_hi = 2
.label c = 4
lda #0
sta c
lda #<CHARSET
sta charset
lda #>CHARSET
sta charset+1
lda #<FONT_HEX_PROTO
sta proto_hi
lda #>FONT_HEX_PROTO
sta proto_hi+1
lda #<CHARSET
sta charset
lda #>CHARSET
sta charset+1
b1:
ldx #0
lda #0
sta c1
lda #<FONT_HEX_PROTO
sta proto_lo
lda #>FONT_HEX_PROTO
sta proto_lo+1
b2:
ldy #0
lda #0
tay
sta (charset),y
lda #1
sta idx
ldx #0
b3:
txa
tay
lda (proto_hi),y
asl
asl
asl
ora (proto_lo),y
asl
sta _0
txa
tay
lda (proto_lo),y
asl
ora _0
ldy idx
sta (charset),y
iny
cpy #5
inc idx
inx
cpx #5
bne b3
lda #0
ldy #5
ldy idx
sta (charset),y
ldy #6
sta (charset),y
ldy #7
iny
sta (charset),y
lda #5
clc
@ -62,8 +93,9 @@ main: {
bcc !+
inc charset+1
!:
inx
cpx #$10
inc c1
lda #$10
cmp c1
bne b2
lda #5
clc
@ -76,15 +108,7 @@ main: {
lda #$10
cmp c
bne b1
ldx #0
// Show all chars on screen
b6:
txa
sta SCREEN,x
inx
cpx #0
bne b6
rts
}
// Bit patterns for symbols 0-f (3x5 pixels)
FONT_HEX_PROTO: .byte 2, 5, 5, 5, 2, 6, 2, 2, 2, 7, 6, 1, 2, 4, 7, 6, 1, 2, 1, 6, 5, 5, 7, 1, 1, 7, 4, 6, 1, 6, 3, 4, 6, 5, 2, 7, 1, 1, 1, 1, 2, 5, 2, 5, 2, 2, 5, 3, 1, 1, 2, 5, 7, 5, 5, 6, 5, 6, 5, 6, 3, 4, 4, 4, 3, 6, 5, 5, 5, 6, 7, 4, 7, 4, 7, 7, 4, 7, 4, 4
// Bit patterns for symbols 0-f (3x5 pixels) used in font hex
FONT_HEX_PROTO: .byte 2, 5, 5, 5, 2, 6, 2, 2, 2, 7, 6, 1, 2, 4, 7, 6, 1, 2, 1, 6, 5, 5, 7, 1, 1, 7, 4, 6, 1, 6, 3, 4, 6, 5, 2, 7, 1, 1, 1, 1, 2, 5, 2, 5, 2, 2, 5, 3, 1, 1, 2, 5, 7, 5, 5, 6, 5, 6, 5, 6, 2, 5, 4, 5, 2, 6, 5, 5, 5, 6, 7, 4, 6, 4, 7, 7, 4, 6, 4, 4

View File

@ -0,0 +1,70 @@
@begin: scope:[] from
[0] phi()
to:@1
@1: scope:[] from @begin
[1] phi()
[2] call main
to:@end
@end: scope:[] from @1
[3] phi()
main: scope:[main] from @1
[4] phi()
to:main::toD0181
main::toD0181: scope:[main] from main
[5] phi()
to:main::@2
main::@2: scope:[main] from main::toD0181
[6] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0
[7] call init_font_hex
to:main::@1
main::@1: scope:[main] from main::@1 main::@2
[8] (byte) main::c#2 ← phi( main::@1/(byte) main::c#1 main::@2/(byte) 0 )
[9] *((const byte*) SCREEN#0 + (byte) main::c#2) ← (byte) main::c#2
[10] (byte) main::c#1 ← ++ (byte) main::c#2
[11] if((byte) main::c#1!=(byte) 0) goto main::@1
to:main::@return
main::@return: scope:[main] from main::@1
[12] return
to:@return
init_font_hex: scope:[init_font_hex] from main::@2
[13] phi()
to:init_font_hex::@1
init_font_hex::@1: scope:[init_font_hex] from init_font_hex init_font_hex::@5
[14] (byte) init_font_hex::c#6 ← phi( init_font_hex/(byte) 0 init_font_hex::@5/(byte) init_font_hex::c#1 )
[14] (byte*) init_font_hex::proto_hi#6 ← phi( init_font_hex/(const byte[]) FONT_HEX_PROTO#0 init_font_hex::@5/(byte*) init_font_hex::proto_hi#1 )
[14] (byte*) init_font_hex::charset#5 ← phi( init_font_hex/(const byte*) CHARSET#0 init_font_hex::@5/(byte*) init_font_hex::charset#0 )
to:init_font_hex::@2
init_font_hex::@2: scope:[init_font_hex] from init_font_hex::@1 init_font_hex::@4
[15] (byte) init_font_hex::c1#4 ← phi( init_font_hex::@1/(byte) 0 init_font_hex::@4/(byte) init_font_hex::c1#1 )
[15] (byte*) init_font_hex::proto_lo#4 ← phi( init_font_hex::@1/(const byte[]) FONT_HEX_PROTO#0 init_font_hex::@4/(byte*) init_font_hex::proto_lo#1 )
[15] (byte*) init_font_hex::charset#2 ← phi( init_font_hex::@1/(byte*) init_font_hex::charset#5 init_font_hex::@4/(byte*) init_font_hex::charset#0 )
[16] *((byte*) init_font_hex::charset#2) ← (byte) 0
to:init_font_hex::@3
init_font_hex::@3: scope:[init_font_hex] from init_font_hex::@2 init_font_hex::@3
[17] (byte) init_font_hex::idx#5 ← phi( init_font_hex::@2/(byte) 1 init_font_hex::@3/(byte) init_font_hex::idx#2 )
[17] (byte) init_font_hex::i#2 ← phi( init_font_hex::@2/(byte) 0 init_font_hex::@3/(byte) init_font_hex::i#1 )
[18] (byte~) init_font_hex::$0 ← *((byte*) init_font_hex::proto_hi#6 + (byte) init_font_hex::i#2) << (byte) 4
[19] (byte~) init_font_hex::$1 ← *((byte*) init_font_hex::proto_lo#4 + (byte) init_font_hex::i#2) << (byte) 1
[20] (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1
[21] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#5) ← (byte~) init_font_hex::$2
[22] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5
[23] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2
[24] if((byte) init_font_hex::i#1!=(byte) 5) goto init_font_hex::@3
to:init_font_hex::@4
init_font_hex::@4: scope:[init_font_hex] from init_font_hex::@3
[25] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0
[26] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2
[27] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0
[28] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5
[29] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8
[30] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4
[31] if((byte) init_font_hex::c1#1!=(byte) $10) goto init_font_hex::@2
to:init_font_hex::@5
init_font_hex::@5: scope:[init_font_hex] from init_font_hex::@4
[32] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5
[33] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6
[34] if((byte) init_font_hex::c#1!=(byte) $10) goto init_font_hex::@1
to:init_font_hex::@return
init_font_hex::@return: scope:[init_font_hex] from init_font_hex::@5
[35] return
to:@return

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,78 @@
(label) @1
(label) @begin
(label) @end
(byte*) CHARSET
(const byte*) CHARSET#0 CHARSET = (byte*) 8192
(byte*) D018
(const byte*) D018#0 D018 = (byte*) 53272
(byte[]) FONT_HEX_PROTO
(const byte[]) FONT_HEX_PROTO#0 FONT_HEX_PROTO = { (byte) 2, (byte) 5, (byte) 5, (byte) 5, (byte) 2, (byte) 6, (byte) 2, (byte) 2, (byte) 2, (byte) 7, (byte) 6, (byte) 1, (byte) 2, (byte) 4, (byte) 7, (byte) 6, (byte) 1, (byte) 2, (byte) 1, (byte) 6, (byte) 5, (byte) 5, (byte) 7, (byte) 1, (byte) 1, (byte) 7, (byte) 4, (byte) 6, (byte) 1, (byte) 6, (byte) 3, (byte) 4, (byte) 6, (byte) 5, (byte) 2, (byte) 7, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 2, (byte) 5, (byte) 2, (byte) 5, (byte) 2, (byte) 2, (byte) 5, (byte) 3, (byte) 1, (byte) 1, (byte) 2, (byte) 5, (byte) 7, (byte) 5, (byte) 5, (byte) 6, (byte) 5, (byte) 6, (byte) 5, (byte) 6, (byte) 2, (byte) 5, (byte) 4, (byte) 5, (byte) 2, (byte) 6, (byte) 5, (byte) 5, (byte) 5, (byte) 6, (byte) 7, (byte) 4, (byte) 6, (byte) 4, (byte) 7, (byte) 7, (byte) 4, (byte) 6, (byte) 4, (byte) 4 }
(byte*) SCREEN
(const byte*) SCREEN#0 SCREEN = (byte*) 1024
(void()) init_font_hex((byte*) init_font_hex::charset)
(byte~) init_font_hex::$0 $0 zp ZP_BYTE:11 1001.0
(byte~) init_font_hex::$1 reg byte a 2002.0
(byte~) init_font_hex::$2 reg byte a 2002.0
(label) init_font_hex::@1
(label) init_font_hex::@2
(label) init_font_hex::@3
(label) init_font_hex::@4
(label) init_font_hex::@5
(label) init_font_hex::@return
(byte) init_font_hex::c
(byte) init_font_hex::c#1 c zp ZP_BYTE:4 16.5
(byte) init_font_hex::c#6 c zp ZP_BYTE:4 1.1578947368421053
(byte) init_font_hex::c1
(byte) init_font_hex::c1#1 c1 zp ZP_BYTE:9 151.5
(byte) init_font_hex::c1#4 c1 zp ZP_BYTE:9 13.466666666666667
(byte*) init_font_hex::charset
(byte*) init_font_hex::charset#0 charset zp ZP_WORD:5 35.5
(byte*) init_font_hex::charset#2 charset zp ZP_WORD:5 108.35714285714285
(byte*) init_font_hex::charset#5 charset zp ZP_WORD:5 22.0
(byte) init_font_hex::i
(byte) init_font_hex::i#1 reg byte x 1501.5
(byte) init_font_hex::i#2 reg byte x 667.3333333333334
(byte) init_font_hex::idx
(byte) init_font_hex::idx#2 idx zp ZP_BYTE:10 551.0
(byte) init_font_hex::idx#3 reg byte y 202.0
(byte) init_font_hex::idx#5 idx zp ZP_BYTE:10 600.5999999999999
(byte*) init_font_hex::proto_hi
(byte*) init_font_hex::proto_hi#1 proto_hi zp ZP_WORD:2 7.333333333333333
(byte*) init_font_hex::proto_hi#6 proto_hi zp ZP_WORD:2 56.83333333333334
(byte*) init_font_hex::proto_lo
(byte*) init_font_hex::proto_lo#1 proto_lo zp ZP_WORD:7 50.5
(byte*) init_font_hex::proto_lo#4 proto_lo zp ZP_WORD:7 92.53846153846155
(void()) main()
(label) main::@1
(label) main::@2
(label) main::@return
(byte) main::c
(byte) main::c#1 reg byte x 16.5
(byte) main::c#2 reg byte x 22.0
(label) main::toD0181
(word~) main::toD0181_$0
(number~) main::toD0181_$1
(number~) main::toD0181_$2
(number~) main::toD0181_$3
(word~) main::toD0181_$4
(byte~) main::toD0181_$5
(number~) main::toD0181_$6
(number~) main::toD0181_$7
(number~) main::toD0181_$8
(byte*) main::toD0181_gfx
(byte) main::toD0181_return
(const byte) main::toD0181_return#0 toD0181_return = >(word)(const byte*) SCREEN#0&(word) $3fff*(byte) 4|>(word)(const byte*) CHARSET#0/(byte) 4&(byte) $f
(byte*) main::toD0181_screen
reg byte x [ main::c#2 main::c#1 ]
zp ZP_WORD:2 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ]
zp ZP_BYTE:4 [ init_font_hex::c#6 init_font_hex::c#1 ]
zp ZP_WORD:5 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ]
zp ZP_WORD:7 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ]
zp ZP_BYTE:9 [ init_font_hex::c1#4 init_font_hex::c1#1 ]
reg byte x [ init_font_hex::i#2 init_font_hex::i#1 ]
zp ZP_BYTE:10 [ init_font_hex::idx#5 init_font_hex::idx#2 ]
zp ZP_BYTE:11 [ init_font_hex::$0 ]
reg byte a [ init_font_hex::$1 ]
reg byte a [ init_font_hex::$2 ]
reg byte y [ init_font_hex::idx#3 ]

View File

@ -1,59 +0,0 @@
@begin: scope:[] from
[0] phi()
to:@1
@1: scope:[] from @begin
[1] phi()
[2] call main
to:@end
@end: scope:[] from @1
[3] phi()
main: scope:[main] from @1
[4] phi()
to:main::toD0181
main::toD0181: scope:[main] from main
[5] phi()
to:main::@7
main::@7: scope:[main] from main::toD0181
[6] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0
to:main::@1
main::@1: scope:[main] from main::@5 main::@7
[7] (byte) main::c#6 ← phi( main::@5/(byte) main::c#1 main::@7/(byte) 0 )
[7] (byte*) main::charset#5 ← phi( main::@5/(byte*) main::charset#1 main::@7/(const byte*) CHARSET#0 )
[7] (byte*) main::proto_hi#6 ← phi( main::@5/(byte*) main::proto_hi#1 main::@7/(const byte[]) FONT_HEX_PROTO#0 )
to:main::@2
main::@2: scope:[main] from main::@1 main::@4
[8] (byte) main::c1#4 ← phi( main::@1/(byte) 0 main::@4/(byte) main::c1#1 )
[8] (byte*) main::charset#4 ← phi( main::@1/(byte*) main::charset#5 main::@4/(byte*) main::charset#1 )
[8] (byte*) main::proto_lo#4 ← phi( main::@1/(const byte[]) FONT_HEX_PROTO#0 main::@4/(byte*) main::proto_lo#1 )
to:main::@3
main::@3: scope:[main] from main::@2 main::@3
[9] (byte) main::i#2 ← phi( main::@2/(byte) 0 main::@3/(byte) main::i#1 )
[10] (byte~) main::$1 ← *((byte*) main::proto_hi#6 + (byte) main::i#2) << (byte) 3
[11] (byte~) main::$2 ← (byte~) main::$1 | *((byte*) main::proto_lo#4 + (byte) main::i#2)
[12] *((byte*) main::charset#4 + (byte) main::i#2) ← (byte~) main::$2
[13] (byte) main::i#1 ← ++ (byte) main::i#2
[14] if((byte) main::i#1!=(byte) 5) goto main::@3
to:main::@4
main::@4: scope:[main] from main::@3
[15] *((byte*) main::charset#4 + (byte) 5) ← (byte) 0
[16] *((byte*) main::charset#4 + (byte) 6) ← (byte) 0
[17] *((byte*) main::charset#4 + (byte) 7) ← (byte) 0
[18] (byte*) main::proto_lo#1 ← (byte*) main::proto_lo#4 + (byte) 5
[19] (byte*) main::charset#1 ← (byte*) main::charset#4 + (byte) 8
[20] (byte) main::c1#1 ← ++ (byte) main::c1#4
[21] if((byte) main::c1#1!=(byte) $10) goto main::@2
to:main::@5
main::@5: scope:[main] from main::@4
[22] (byte*) main::proto_hi#1 ← (byte*) main::proto_hi#6 + (byte) 5
[23] (byte) main::c#1 ← ++ (byte) main::c#6
[24] if((byte) main::c#1!=(byte) $10) goto main::@1
to:main::@6
main::@6: scope:[main] from main::@5 main::@6
[25] (byte) main::c2#2 ← phi( main::@5/(byte) 0 main::@6/(byte) main::c2#1 )
[26] *((const byte*) SCREEN#0 + (byte) main::c2#2) ← (byte) main::c2#2
[27] (byte) main::c2#1 ← ++ (byte) main::c2#2
[28] if((byte) main::c2#1!=(byte) 0) goto main::@6
to:main::@return
main::@return: scope:[main] from main::@6
[29] return
to:@return

File diff suppressed because it is too large Load Diff

View File

@ -1,68 +0,0 @@
(label) @1
(label) @begin
(label) @end
(byte*) CHARSET
(const byte*) CHARSET#0 CHARSET = (byte*) 8192
(byte*) D018
(const byte*) D018#0 D018 = (byte*) 53272
(byte[]) FONT_HEX_PROTO
(const byte[]) FONT_HEX_PROTO#0 FONT_HEX_PROTO = { (byte) 2, (byte) 5, (byte) 5, (byte) 5, (byte) 2, (byte) 6, (byte) 2, (byte) 2, (byte) 2, (byte) 7, (byte) 6, (byte) 1, (byte) 2, (byte) 4, (byte) 7, (byte) 6, (byte) 1, (byte) 2, (byte) 1, (byte) 6, (byte) 5, (byte) 5, (byte) 7, (byte) 1, (byte) 1, (byte) 7, (byte) 4, (byte) 6, (byte) 1, (byte) 6, (byte) 3, (byte) 4, (byte) 6, (byte) 5, (byte) 2, (byte) 7, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 2, (byte) 5, (byte) 2, (byte) 5, (byte) 2, (byte) 2, (byte) 5, (byte) 3, (byte) 1, (byte) 1, (byte) 2, (byte) 5, (byte) 7, (byte) 5, (byte) 5, (byte) 6, (byte) 5, (byte) 6, (byte) 5, (byte) 6, (byte) 3, (byte) 4, (byte) 4, (byte) 4, (byte) 3, (byte) 6, (byte) 5, (byte) 5, (byte) 5, (byte) 6, (byte) 7, (byte) 4, (byte) 7, (byte) 4, (byte) 7, (byte) 7, (byte) 4, (byte) 7, (byte) 4, (byte) 4 }
(byte*) SCREEN
(const byte*) SCREEN#0 SCREEN = (byte*) 1024
(void()) main()
(byte~) main::$1 reg byte a 2002.0
(byte~) main::$2 reg byte a 2002.0
(label) main::@1
(label) main::@2
(label) main::@3
(label) main::@4
(label) main::@5
(label) main::@6
(label) main::@7
(label) main::@return
(byte) main::c
(byte) main::c#1 c zp ZP_BYTE:4 16.5
(byte) main::c#6 c zp ZP_BYTE:4 1.375
(byte) main::c1
(byte) main::c1#1 reg byte x 151.5
(byte) main::c1#4 reg byte x 16.833333333333332
(byte) main::c2
(byte) main::c2#1 reg byte x 16.5
(byte) main::c2#2 reg byte x 22.0
(byte*) main::charset
(byte*) main::charset#1 charset zp ZP_WORD:7 35.5
(byte*) main::charset#4 charset zp ZP_WORD:7 137.90909090909093
(byte*) main::charset#5 charset zp ZP_WORD:7 22.0
(byte) main::i
(byte) main::i#1 reg byte y 1501.5
(byte) main::i#2 reg byte y 1251.25
(byte*) main::proto_hi
(byte*) main::proto_hi#1 proto_hi zp ZP_WORD:2 7.333333333333333
(byte*) main::proto_hi#6 proto_hi zp ZP_WORD:2 68.2
(byte*) main::proto_lo
(byte*) main::proto_lo#1 proto_lo zp ZP_WORD:5 50.5
(byte*) main::proto_lo#4 proto_lo zp ZP_WORD:5 120.29999999999998
(label) main::toD0181
(word~) main::toD0181_$0
(number~) main::toD0181_$1
(number~) main::toD0181_$2
(number~) main::toD0181_$3
(word~) main::toD0181_$4
(byte~) main::toD0181_$5
(number~) main::toD0181_$6
(number~) main::toD0181_$7
(number~) main::toD0181_$8
(byte*) main::toD0181_gfx
(byte) main::toD0181_return
(const byte) main::toD0181_return#0 toD0181_return = >(word)(const byte*) SCREEN#0&(word) $3fff*(byte) 4|>(word)(const byte*) CHARSET#0/(byte) 4&(byte) $f
(byte*) main::toD0181_screen
zp ZP_WORD:2 [ main::proto_hi#6 main::proto_hi#1 ]
zp ZP_BYTE:4 [ main::c#6 main::c#1 ]
zp ZP_WORD:5 [ main::proto_lo#4 main::proto_lo#1 ]
zp ZP_WORD:7 [ main::charset#4 main::charset#5 main::charset#1 ]
reg byte x [ main::c1#4 main::c1#1 ]
reg byte y [ main::i#2 main::i#1 ]
reg byte x [ main::c2#2 main::c2#1 ]
reg byte a [ main::$1 ]
reg byte a [ main::$2 ]