1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2024-12-28 16:31:36 +00:00

Added pre-calculated char BOBs.

This commit is contained in:
jespergravgaard 2019-11-24 23:00:44 +01:00
parent 1883da7a86
commit 5463c3174e
7 changed files with 6692 additions and 0 deletions

View File

@ -37,6 +37,11 @@ public class TestPrograms {
public TestPrograms() { public TestPrograms() {
} }
@Test
public void testPreBob() throws IOException, URISyntaxException {
compileAndCompare("complex/prebob/prebob");
}
@Test @Test
public void testUnaryPlus() throws IOException, URISyntaxException { public void testUnaryPlus() throws IOException, URISyntaxException {
compileAndCompare("unary-plus"); compileAndCompare("unary-plus");

View File

@ -0,0 +1,191 @@
// Pre-calculated bobs inside a charset (pre-mpved to all x/y-combinations)
import "c64"
import "string"
// The prototype BOB (a 3x3 char image with a bob image in the upper 2x2 chars)
// The chars are layout as follows with data in chars 0, 1, 3, 4 initially
// 0 3 6
// 1 4 7
// 2 5 8
const char[3*3*8] PROTO_BOB = kickasm(resource "smiley.png") {{
.var pic = LoadPicture("smiley.png", List().add($000000, $ffffff))
.for (var x=0;x<3; x++)
.for (var y=0; y<24; y++)
.byte pic.getSinglecolorByte(x,y)
}};
// Sine used for the X-coordinate
const char[0x200] SIN_X_TAB = kickasm {{ .fill $200, 75.5+75.5*sin(i*2*PI/256) }};
// Sine used for the Y-coordinate
const char[0x200] SIN_Y_TAB = kickasm {{ .fill $200, 91.5+91.5*sin(i*2*PI/256) }};
// The screen
const char* SCREEN = 0x4000;
// The charset that will receive the shifted bobs
const char* BOB_CHARSET = 0x6000;
// Tables containing the char to use for a specific cell of a shifted BOB.
// char_id = BOB_TABLES[cell*BOB_SUBTABLE_SIZE + shift_y*BOB_SHIFTS_X + shift_x];
char[9*8*4] BOB_TABLES;
// The number of different X-shifts
const char BOB_SHIFTS_X = 4;
// The number of different Y-shifts
const char BOB_SHIFTS_Y = 8;
// The size of a sub-table of BOB_TABLES
const char BOB_SUBTABLE_SIZE = BOB_SHIFTS_X*BOB_SHIFTS_Y;
void main() {
prepareBobs();
vicSelectGfxBank(SCREEN);
*D018 = toD018(SCREEN, BOB_CHARSET);
// Clear screen
memset(SCREEN, 0x00, 1000);
/*
// Display some BOBs
char* screen = SCREEN;
char bob_table_idx = 0;
for(char i:0..7) {
for(char j:0..3) {
screen[0] = (BOB_TABLES+0*BOB_SUBTABLE_SIZE)[bob_table_idx];
screen[40] = (BOB_TABLES+1*BOB_SUBTABLE_SIZE)[bob_table_idx];
screen[80] = (BOB_TABLES+2*BOB_SUBTABLE_SIZE)[bob_table_idx];
screen[1] = (BOB_TABLES+3*BOB_SUBTABLE_SIZE)[bob_table_idx];
screen[41] = (BOB_TABLES+4*BOB_SUBTABLE_SIZE)[bob_table_idx];
screen[81] = (BOB_TABLES+5*BOB_SUBTABLE_SIZE)[bob_table_idx];
screen[2] = (BOB_TABLES+6*BOB_SUBTABLE_SIZE)[bob_table_idx];
screen[42] = (BOB_TABLES+7*BOB_SUBTABLE_SIZE)[bob_table_idx];
screen[82] = (BOB_TABLES+8*BOB_SUBTABLE_SIZE)[bob_table_idx];
screen += 120;
bob_table_idx++;
}
screen -= (120*4)-3;
}
*/
char sin_x_idx = 0;
char sin_y_idx = 73;
while(true) {
do { } while (*RASTER!=$ff);
//kickasm {{ .break }}
(*BORDERCOL)++;
renderBob((SIN_X_TAB)[sin_x_idx], (SIN_Y_TAB)[sin_y_idx]);
renderBob((SIN_X_TAB+15)[sin_x_idx], (SIN_Y_TAB+11)[sin_y_idx]);
renderBob((SIN_X_TAB+22)[sin_x_idx], (SIN_Y_TAB+30)[sin_y_idx]);
sin_x_idx++;
sin_y_idx++;
(*BORDERCOL)--;
}
}
// Render a single BOB at a given x/y-position
// X-position is 0-151. Each x-position is 2 pixels wide.
// Y-position is 0-183. Each y-position is 1 pixel high.
void renderBob(char xpos, char ypos) {
//kickasm {{ .break }}
char x_char_offset = xpos/BOB_SHIFTS_X;
char y_char_offset = ypos/BOB_SHIFTS_Y;
unsigned int y_offset = (unsigned int)y_char_offset*40;
char* screen = SCREEN+y_offset+x_char_offset;
char bob_table_idx = (ypos&7)*BOB_SHIFTS_X+(xpos&3);
screen[0] = (BOB_TABLES+0*BOB_SUBTABLE_SIZE)[bob_table_idx];
screen[40] = (BOB_TABLES+1*BOB_SUBTABLE_SIZE)[bob_table_idx];
screen[80] = (BOB_TABLES+2*BOB_SUBTABLE_SIZE)[bob_table_idx];
screen[1] = (BOB_TABLES+3*BOB_SUBTABLE_SIZE)[bob_table_idx];
screen[41] = (BOB_TABLES+4*BOB_SUBTABLE_SIZE)[bob_table_idx];
screen[81] = (BOB_TABLES+5*BOB_SUBTABLE_SIZE)[bob_table_idx];
screen[2] = (BOB_TABLES+6*BOB_SUBTABLE_SIZE)[bob_table_idx];
screen[42] = (BOB_TABLES+7*BOB_SUBTABLE_SIZE)[bob_table_idx];
screen[82] = (BOB_TABLES+8*BOB_SUBTABLE_SIZE)[bob_table_idx];
}
// Creates the pre-shifted bobs into BOB_CHARSET and populates the BOB_TABLES
// Modifies PROTO_BOB by shifting it around
void prepareBobs() {
bob_charset_next_id = 0;
// Ensure the first glyph is empty
bobCharsetFindOrAddGlyph(PROTO_BOB+48);
char bob_table_idx = 0;
for(char shift_y=0;shift_y<BOB_SHIFTS_Y;shift_y++) {
for(char shift_x=0;shift_x<BOB_SHIFTS_X;shift_x++) {
// Populate charset and tables
char* bob_glyph = PROTO_BOB;
char* bob_table = BOB_TABLES + bob_table_idx;
for(char cell = 0; cell<9; cell++) {
// Look for an existing char in BOB_CHARSET
*bob_table = bobCharsetFindOrAddGlyph(bob_glyph);
// Move to the next glyph
bob_glyph+=8;
// Move to the next sub-table
bob_table += BOB_SHIFTS_X*BOB_SHIFTS_Y;
}
// Move to the next bob table idx
bob_table_idx++;
// Shift PROTO_BOB right twice
shiftProtoBobRight();
shiftProtoBobRight();
}
// Shift PROTO_BOB down and 8px left
shiftProtoBobDown();
}
}
// Shift PROTO_BOB right one X pixel
void shiftProtoBobRight() {
char carry = 0;
char j = 0;
for(char i=0;i<3*3*8;i++) {
// Get the new carry
char new_carry = (PROTO_BOB[j]&1)?0x80ub:0ub;
// Shift value and add old carry
PROTO_BOB[j] = PROTO_BOB[j]>>1 | carry;
// Update carry
carry = new_carry;
// Increment j to iterate over the PROTO_BOB left-to-right, top-to-bottom (0, 24, 48, 1, 25, 49, ...)
if(j>=48) {
j-=47;
} else {
j+=24;
}
}
}
// Shift PROTO_BOB down one Y pixel
// At the same time restore PROTO_BOB X by shifting 8 pixels left
void shiftProtoBobDown() {
for(char i=23;i>0;i--) {
PROTO_BOB[i] = (PROTO_BOB+23)[i];
(PROTO_BOB+24)[i] = (PROTO_BOB+47)[i];
(PROTO_BOB+48)[i] = 0x00;
}
PROTO_BOB[0] = 0;
PROTO_BOB[24] = 0;
PROTO_BOB[48] = 0;
}
// BOB charset ID of the next glyph to be added
char bob_charset_next_id;
// Looks through BOB_CHARSET to find the passed bob glyph if present.
// If not present it is added
// Returns the glyph ID
char bobCharsetFindOrAddGlyph(char* bob_glyph) {
char* glyph_cursor = BOB_CHARSET;
byte glyph_id = 0;
while(glyph_id!=bob_charset_next_id) {
byte found = 1;
for(char i=0;i<8;i++) {
if(glyph_cursor[i]!=bob_glyph[i]) {
found = 0;
break;
}
}
if(found) return glyph_id;
glyph_id++;
glyph_cursor +=8;
}
// Not found - add it
for(char i=0;i<8;i++)
glyph_cursor[i]=bob_glyph[i];
bob_charset_next_id++;
return glyph_id;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 276 B

View File

@ -0,0 +1,457 @@
// Pre-calculated bobs inside a charset (pre-mpved to all x/y-combinations)
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
.label RASTER = $d012
.label BORDERCOL = $d020
.label D018 = $d018
// CIA#2 Port A: Serial bus, RS-232, VIC memory bank
.label CIA2_PORT_A = $dd00
// CIA #2 Port A data direction register.
.label CIA2_PORT_A_DDR = $dd02
// The screen
.label SCREEN = $4000
// The charset that will receive the shifted bobs
.label BOB_CHARSET = $6000
// The number of different X-shifts
.const BOB_SHIFTS_X = 4
// The number of different Y-shifts
.const BOB_SHIFTS_Y = 8
// The size of a sub-table of BOB_TABLES
.const BOB_SUBTABLE_SIZE = BOB_SHIFTS_X*BOB_SHIFTS_Y
// BOB charset ID of the next glyph to be added
.label bob_charset_next_id = $e
main: {
.const vicSelectGfxBank1_toDd001_return = 3^(>SCREEN)/$40
.const toD0181_return = (>BOB_CHARSET)/4&$f
/*
// Display some BOBs
char* screen = SCREEN;
char bob_table_idx = 0;
for(char i:0..7) {
for(char j:0..3) {
screen[0] = (BOB_TABLES+0*BOB_SUBTABLE_SIZE)[bob_table_idx];
screen[40] = (BOB_TABLES+1*BOB_SUBTABLE_SIZE)[bob_table_idx];
screen[80] = (BOB_TABLES+2*BOB_SUBTABLE_SIZE)[bob_table_idx];
screen[1] = (BOB_TABLES+3*BOB_SUBTABLE_SIZE)[bob_table_idx];
screen[41] = (BOB_TABLES+4*BOB_SUBTABLE_SIZE)[bob_table_idx];
screen[81] = (BOB_TABLES+5*BOB_SUBTABLE_SIZE)[bob_table_idx];
screen[2] = (BOB_TABLES+6*BOB_SUBTABLE_SIZE)[bob_table_idx];
screen[42] = (BOB_TABLES+7*BOB_SUBTABLE_SIZE)[bob_table_idx];
screen[82] = (BOB_TABLES+8*BOB_SUBTABLE_SIZE)[bob_table_idx];
screen += 120;
bob_table_idx++;
}
screen -= (120*4)-3;
}
*/
.label sin_x_idx = 2
.label sin_y_idx = 3
jsr prepareBobs
lda #3
sta CIA2_PORT_A_DDR
lda #vicSelectGfxBank1_toDd001_return
sta CIA2_PORT_A
lda #toD0181_return
sta D018
jsr memset
lda #$49
sta.z sin_y_idx
lda #0
sta.z sin_x_idx
__b2:
lda #$ff
cmp RASTER
bne __b2
inc BORDERCOL
ldy.z sin_x_idx
lda SIN_X_TAB,y
sta.z renderBob.xpos
ldy.z sin_y_idx
ldx SIN_Y_TAB,y
jsr renderBob
ldy.z sin_x_idx
lda SIN_X_TAB+$f,y
sta.z renderBob.xpos
ldy.z sin_y_idx
ldx SIN_Y_TAB+$b,y
jsr renderBob
ldy.z sin_x_idx
lda SIN_X_TAB+$16,y
sta.z renderBob.xpos
ldy.z sin_y_idx
ldx SIN_Y_TAB+$1e,y
jsr renderBob
inc.z sin_x_idx
inc.z sin_y_idx
dec BORDERCOL
jmp __b2
}
// Render a single BOB at a given x/y-position
// X-position is 0-151. Each x-position is 2 pixels wide.
// Y-position is 0-183. Each y-position is 1 pixel high.
// renderBob(byte zeropage(4) xpos, byte register(X) ypos)
renderBob: {
.label __2 = $a
.label __4 = $a
.label __7 = $e
.label xpos = 4
.label y_offset = $a
.label screen = $a
.label __10 = $c
.label __11 = $a
lda.z xpos
lsr
lsr
tay
txa
lsr
lsr
lsr
sta.z __2
lda #0
sta.z __2+1
lda.z __2
asl
sta.z __10
lda.z __2+1
rol
sta.z __10+1
asl.z __10
rol.z __10+1
lda.z __11
clc
adc.z __10
sta.z __11
lda.z __11+1
adc.z __10+1
sta.z __11+1
asl.z y_offset
rol.z y_offset+1
asl.z y_offset
rol.z y_offset+1
asl.z y_offset
rol.z y_offset+1
clc
lda.z __4
adc #<SCREEN
sta.z __4
lda.z __4+1
adc #>SCREEN
sta.z __4+1
tya
clc
adc.z screen
sta.z screen
bcc !+
inc.z screen+1
!:
txa
and #7
asl
asl
sta.z __7
lda #3
and.z xpos
clc
adc.z __7
tax
lda BOB_TABLES,x
ldy #0
sta (screen),y
lda BOB_TABLES+1*BOB_SUBTABLE_SIZE,x
ldy #$28
sta (screen),y
lda BOB_TABLES+2*BOB_SUBTABLE_SIZE,x
ldy #$50
sta (screen),y
lda BOB_TABLES+3*BOB_SUBTABLE_SIZE,x
ldy #1
sta (screen),y
lda BOB_TABLES+4*BOB_SUBTABLE_SIZE,x
ldy #$29
sta (screen),y
lda BOB_TABLES+5*BOB_SUBTABLE_SIZE,x
ldy #$51
sta (screen),y
lda BOB_TABLES+6*BOB_SUBTABLE_SIZE,x
ldy #2
sta (screen),y
lda BOB_TABLES+7*BOB_SUBTABLE_SIZE,x
ldy #$2a
sta (screen),y
lda BOB_TABLES+8*BOB_SUBTABLE_SIZE,x
ldy #$52
sta (screen),y
rts
}
// Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str.
memset: {
.label str = SCREEN
.const c = 0
.const num = $3e8
.label end = str+num
.label dst = 5
lda #<str
sta.z dst
lda #>str
sta.z dst+1
__b1:
lda.z dst+1
cmp #>end
bne __b2
lda.z dst
cmp #<end
bne __b2
rts
__b2:
lda #c
ldy #0
sta (dst),y
inc.z dst
bne !+
inc.z dst+1
!:
jmp __b1
}
// Creates the pre-shifted bobs into BOB_CHARSET and populates the BOB_TABLES
// Modifies PROTO_BOB by shifting it around
prepareBobs: {
.label bob_table = $a
.label shift_y = 2
// Populate charset and tables
.label bob_glyph = 5
.label cell = 8
.label bob_table_idx = 3
.label shift_x = 4
lda #<PROTO_BOB+$30
sta.z bobCharsetFindOrAddGlyph.bob_glyph
lda #>PROTO_BOB+$30
sta.z bobCharsetFindOrAddGlyph.bob_glyph+1
lda #0
sta.z bob_charset_next_id
jsr bobCharsetFindOrAddGlyph
lda #0
sta.z bob_table_idx
sta.z shift_y
__b1:
lda.z shift_y
cmp #BOB_SHIFTS_Y
bcc b1
rts
b1:
lda #0
sta.z shift_x
__b2:
lda.z shift_x
cmp #BOB_SHIFTS_X
bcc __b3
jsr shiftProtoBobDown
inc.z shift_y
jmp __b1
__b3:
lda.z bob_table_idx
clc
adc #<BOB_TABLES
sta.z bob_table
lda #>BOB_TABLES
adc #0
sta.z bob_table+1
lda #<PROTO_BOB
sta.z bob_glyph
lda #>PROTO_BOB
sta.z bob_glyph+1
lda #0
sta.z cell
__b5:
lda.z cell
cmp #9
bcc __b6
inc.z bob_table_idx
jsr shiftProtoBobRight
jsr shiftProtoBobRight
inc.z shift_x
jmp __b2
__b6:
jsr bobCharsetFindOrAddGlyph
lda.z bobCharsetFindOrAddGlyph.glyph_id
// Look for an existing char in BOB_CHARSET
ldy #0
sta (bob_table),y
// Move to the next glyph
lda #8
clc
adc.z bob_glyph
sta.z bob_glyph
bcc !+
inc.z bob_glyph+1
!:
// Move to the next sub-table
lda #BOB_SHIFTS_X*BOB_SHIFTS_Y
clc
adc.z bob_table
sta.z bob_table
bcc !+
inc.z bob_table+1
!:
inc.z cell
jmp __b5
}
// Looks through BOB_CHARSET to find the passed bob glyph if present.
// If not present it is added
// Returns the glyph ID
// bobCharsetFindOrAddGlyph(byte* zeropage(5) bob_glyph)
bobCharsetFindOrAddGlyph: {
.label bob_glyph = 5
.label i = 7
.label glyph_id = 9
.label glyph_cursor = $c
lda #<BOB_CHARSET
sta.z glyph_cursor
lda #>BOB_CHARSET
sta.z glyph_cursor+1
lda #0
sta.z glyph_id
__b1:
lda.z glyph_id
cmp.z bob_charset_next_id
bne b1
ldx #0
// Not found - add it
__b7:
cpx #8
bcc __b8
inc.z bob_charset_next_id
rts
__b8:
stx.z $ff
txa
tay
lda (bob_glyph),y
sta (glyph_cursor),y
inx
jmp __b7
b1:
lda #0
sta.z i
__b2:
lda.z i
cmp #8
bcc __b3
lda #1
jmp __b5
__b3:
ldy.z i
lda (glyph_cursor),y
tax
lda (bob_glyph),y
tay
sty.z $ff
cpx.z $ff
beq __b4
lda #0
__b5:
cmp #0
beq __b6
rts
__b6:
inc.z glyph_id
lda #8
clc
adc.z glyph_cursor
sta.z glyph_cursor
bcc !+
inc.z glyph_cursor+1
!:
jmp __b1
__b4:
inc.z i
jmp __b2
}
// Shift PROTO_BOB right one X pixel
shiftProtoBobRight: {
.label carry = 9
.label i = 8
ldy #0
ldx #0
txa
sta.z i
__b1:
lda.z i
cmp #3*3*8
bcc __b2
rts
__b2:
lda #1
and PROTO_BOB,x
cmp #0
bne __b3
lda #0
sta.z carry
jmp __b4
__b3:
lda #$80
sta.z carry
__b4:
lda PROTO_BOB,x
lsr
sty.z $ff
ora.z $ff
// Shift value and add old carry
sta PROTO_BOB,x
// Increment j to iterate over the PROTO_BOB left-to-right, top-to-bottom (0, 24, 48, 1, 25, 49, ...)
cpx #$30
bcs __b5
txa
axs #-[$18]
__b6:
inc.z i
ldy.z carry
jmp __b1
__b5:
txa
axs #$2f
jmp __b6
}
// Shift PROTO_BOB down one Y pixel
// At the same time restore PROTO_BOB X by shifting 8 pixels left
shiftProtoBobDown: {
ldx #$17
__b1:
cpx #0
bne __b2
lda #0
sta PROTO_BOB
sta PROTO_BOB+$18
sta PROTO_BOB+$30
rts
__b2:
lda PROTO_BOB+$17,x
sta PROTO_BOB,x
lda PROTO_BOB+$2f,x
sta PROTO_BOB+$18,x
lda #0
sta PROTO_BOB+$30,x
dex
jmp __b1
}
// The prototype BOB (a 3x3 char image with a bob image in the upper 2x2 chars)
// The chars are layout as follows with data in chars 0, 1, 3, 4 initially
// 0 3 6
// 1 4 7
// 2 5 8
PROTO_BOB:
.var pic = LoadPicture("smiley.png", List().add($000000, $ffffff))
.for (var x=0;x<3; x++)
.for (var y=0; y<24; y++)
.byte pic.getSinglecolorByte(x,y)
// Sine used for the X-coordinate
SIN_X_TAB:
.fill $200, 75.5+75.5*sin(i*2*PI/256)
// Sine used for the Y-coordinate
SIN_Y_TAB:
.fill $200, 91.5+91.5*sin(i*2*PI/256)
// Tables containing the char to use for a specific cell of a shifted BOB.
// char_id = BOB_TABLES[cell*BOB_SUBTABLE_SIZE + shift_y*BOB_SHIFTS_X + shift_x];
BOB_TABLES: .fill 9*8*4, 0

View File

@ -0,0 +1,272 @@
@begin: scope:[] from
[0] phi()
to:@1
@1: scope:[] from @begin
[1] phi()
[2] call main
to:@end
@end: scope:[] from @1
[3] phi()
(void()) main()
main: scope:[main] from @1
[4] phi()
[5] call prepareBobs
to:main::vicSelectGfxBank1
main::vicSelectGfxBank1: scope:[main] from main
[6] *((const byte*) CIA2_PORT_A_DDR) ← (byte) 3
to:main::vicSelectGfxBank1_toDd001
main::vicSelectGfxBank1_toDd001: scope:[main] from main::vicSelectGfxBank1
[7] phi()
to:main::vicSelectGfxBank1_@1
main::vicSelectGfxBank1_@1: scope:[main] from main::vicSelectGfxBank1_toDd001
[8] *((const byte*) CIA2_PORT_A) ← (const byte) main::vicSelectGfxBank1_toDd001_return#0
to:main::toD0181
main::toD0181: scope:[main] from main::vicSelectGfxBank1_@1
[9] phi()
to:main::@4
main::@4: scope:[main] from main::toD0181
[10] *((const byte*) D018) ← (const byte) main::toD0181_return#0
[11] call memset
to:main::@1
main::@1: scope:[main] from main::@4 main::@7
[12] (byte) main::sin_y_idx#7 ← phi( main::@4/(byte) $49 main::@7/(byte) main::sin_y_idx#1 )
[12] (byte) main::sin_x_idx#7 ← phi( main::@4/(byte) 0 main::@7/(byte) main::sin_x_idx#1 )
to:main::@2
main::@2: scope:[main] from main::@1 main::@2
[13] if(*((const byte*) RASTER)!=(byte) $ff) goto main::@2
to:main::@3
main::@3: scope:[main] from main::@2
[14] *((const byte*) BORDERCOL) ← ++ *((const byte*) BORDERCOL)
[15] (byte) renderBob::xpos#0 ← *((const byte*) SIN_X_TAB + (byte) main::sin_x_idx#7)
[16] (byte) renderBob::ypos#0 ← *((const byte*) SIN_Y_TAB + (byte) main::sin_y_idx#7)
[17] call renderBob
to:main::@5
main::@5: scope:[main] from main::@3
[18] (byte) renderBob::xpos#1 ← *((const byte*) SIN_X_TAB+(byte) $f + (byte) main::sin_x_idx#7)
[19] (byte) renderBob::ypos#1 ← *((const byte*) SIN_Y_TAB+(byte) $b + (byte) main::sin_y_idx#7)
[20] call renderBob
to:main::@6
main::@6: scope:[main] from main::@5
[21] (byte) renderBob::xpos#2 ← *((const byte*) SIN_X_TAB+(byte) $16 + (byte) main::sin_x_idx#7)
[22] (byte) renderBob::ypos#2 ← *((const byte*) SIN_Y_TAB+(byte) $1e + (byte) main::sin_y_idx#7)
[23] call renderBob
to:main::@7
main::@7: scope:[main] from main::@6
[24] (byte) main::sin_x_idx#1 ← ++ (byte) main::sin_x_idx#7
[25] (byte) main::sin_y_idx#1 ← ++ (byte) main::sin_y_idx#7
[26] *((const byte*) BORDERCOL) ← -- *((const byte*) BORDERCOL)
to:main::@1
(void()) renderBob((byte) renderBob::xpos , (byte) renderBob::ypos)
renderBob: scope:[renderBob] from main::@3 main::@5 main::@6
[27] (byte) renderBob::ypos#3 ← phi( main::@5/(byte) renderBob::ypos#1 main::@6/(byte) renderBob::ypos#2 main::@3/(byte) renderBob::ypos#0 )
[27] (byte) renderBob::xpos#3 ← phi( main::@5/(byte) renderBob::xpos#1 main::@6/(byte) renderBob::xpos#2 main::@3/(byte) renderBob::xpos#0 )
[28] (byte) renderBob::x_char_offset#0 ← (byte) renderBob::xpos#3 >> (byte) 2
[29] (byte) renderBob::y_char_offset#0 ← (byte) renderBob::ypos#3 >> (byte) 3
[30] (word~) renderBob::$2 ← (word)(byte) renderBob::y_char_offset#0
[31] (word~) renderBob::$10 ← (word~) renderBob::$2 << (byte) 2
[32] (word~) renderBob::$11 ← (word~) renderBob::$10 + (word~) renderBob::$2
[33] (word) renderBob::y_offset#0 ← (word~) renderBob::$11 << (byte) 3
[34] (byte*~) renderBob::$4 ← (const byte*) SCREEN + (word) renderBob::y_offset#0
[35] (byte*) renderBob::screen#0 ← (byte*~) renderBob::$4 + (byte) renderBob::x_char_offset#0
[36] (byte~) renderBob::$6 ← (byte) renderBob::ypos#3 & (byte) 7
[37] (byte~) renderBob::$7 ← (byte~) renderBob::$6 << (byte) 2
[38] (byte~) renderBob::$8 ← (byte) renderBob::xpos#3 & (byte) 3
[39] (byte) renderBob::bob_table_idx#0 ← (byte~) renderBob::$7 + (byte~) renderBob::$8
[40] *((byte*) renderBob::screen#0) ← *((const byte*) BOB_TABLES + (byte) renderBob::bob_table_idx#0)
[41] *((byte*) renderBob::screen#0 + (byte) $28) ← *((const byte*) BOB_TABLES+(byte) 1*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0)
[42] *((byte*) renderBob::screen#0 + (byte) $50) ← *((const byte*) BOB_TABLES+(byte) 2*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0)
[43] *((byte*) renderBob::screen#0 + (byte) 1) ← *((const byte*) BOB_TABLES+(byte) 3*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0)
[44] *((byte*) renderBob::screen#0 + (byte) $29) ← *((const byte*) BOB_TABLES+(byte) 4*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0)
[45] *((byte*) renderBob::screen#0 + (byte) $51) ← *((const byte*) BOB_TABLES+(byte) 5*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0)
[46] *((byte*) renderBob::screen#0 + (byte) 2) ← *((const byte*) BOB_TABLES+(byte) 6*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0)
[47] *((byte*) renderBob::screen#0 + (byte) $2a) ← *((const byte*) BOB_TABLES+(byte) 7*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0)
[48] *((byte*) renderBob::screen#0 + (byte) $52) ← *((const byte*) BOB_TABLES+(byte) 8*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0)
to:renderBob::@return
renderBob::@return: scope:[renderBob] from renderBob
[49] return
to:@return
(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num)
memset: scope:[memset] from main::@4
[50] phi()
to:memset::@1
memset::@1: scope:[memset] from memset memset::@2
[51] (byte*) memset::dst#2 ← phi( memset/(byte*)(const void*) memset::str#0 memset::@2/(byte*) memset::dst#1 )
[52] if((byte*) memset::dst#2!=(const byte*) memset::end#0) goto memset::@2
to:memset::@return
memset::@return: scope:[memset] from memset::@1
[53] return
to:@return
memset::@2: scope:[memset] from memset::@1
[54] *((byte*) memset::dst#2) ← (const byte) memset::c#0
[55] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2
to:memset::@1
(void()) prepareBobs()
prepareBobs: scope:[prepareBobs] from main
[56] phi()
[57] call bobCharsetFindOrAddGlyph
to:prepareBobs::@1
prepareBobs::@1: scope:[prepareBobs] from prepareBobs prepareBobs::@8
[58] (byte) prepareBobs::bob_table_idx#6 ← phi( prepareBobs/(byte) 0 prepareBobs::@8/(byte) prepareBobs::bob_table_idx#12 )
[58] (byte) bob_charset_next_id#14 ← phi( prepareBobs/(byte) bob_charset_next_id#16 prepareBobs::@8/(byte) bob_charset_next_id#30 )
[58] (byte) prepareBobs::shift_y#2 ← phi( prepareBobs/(byte) 0 prepareBobs::@8/(byte) prepareBobs::shift_y#1 )
[59] if((byte) prepareBobs::shift_y#2<(const byte) BOB_SHIFTS_Y) goto prepareBobs::@2
to:prepareBobs::@return
prepareBobs::@return: scope:[prepareBobs] from prepareBobs::@1
[60] return
to:@return
prepareBobs::@2: scope:[prepareBobs] from prepareBobs::@1 prepareBobs::@11
[61] (byte) bob_charset_next_id#30 ← phi( prepareBobs::@1/(byte) bob_charset_next_id#14 prepareBobs::@11/(byte) bob_charset_next_id#21 )
[61] (byte) prepareBobs::bob_table_idx#12 ← phi( prepareBobs::@1/(byte) prepareBobs::bob_table_idx#6 prepareBobs::@11/(byte) prepareBobs::bob_table_idx#1 )
[61] (byte) prepareBobs::shift_x#2 ← phi( prepareBobs::@1/(byte) 0 prepareBobs::@11/(byte) prepareBobs::shift_x#1 )
[62] if((byte) prepareBobs::shift_x#2<(const byte) BOB_SHIFTS_X) goto prepareBobs::@3
to:prepareBobs::@4
prepareBobs::@4: scope:[prepareBobs] from prepareBobs::@2
[63] phi()
[64] call shiftProtoBobDown
to:prepareBobs::@8
prepareBobs::@8: scope:[prepareBobs] from prepareBobs::@4
[65] (byte) prepareBobs::shift_y#1 ← ++ (byte) prepareBobs::shift_y#2
to:prepareBobs::@1
prepareBobs::@3: scope:[prepareBobs] from prepareBobs::@2
[66] (byte*) prepareBobs::bob_table#0 ← (const byte*) BOB_TABLES + (byte) prepareBobs::bob_table_idx#12
to:prepareBobs::@5
prepareBobs::@5: scope:[prepareBobs] from prepareBobs::@3 prepareBobs::@9
[67] (byte*) prepareBobs::bob_table#2 ← phi( prepareBobs::@9/(byte*) prepareBobs::bob_table#1 prepareBobs::@3/(byte*) prepareBobs::bob_table#0 )
[67] (byte) bob_charset_next_id#21 ← phi( prepareBobs::@9/(byte) bob_charset_next_id#16 prepareBobs::@3/(byte) bob_charset_next_id#30 )
[67] (byte*) prepareBobs::bob_glyph#2 ← phi( prepareBobs::@9/(byte*) prepareBobs::bob_glyph#1 prepareBobs::@3/(const byte*) PROTO_BOB )
[67] (byte) prepareBobs::cell#2 ← phi( prepareBobs::@9/(byte) prepareBobs::cell#1 prepareBobs::@3/(byte) 0 )
[68] if((byte) prepareBobs::cell#2<(byte) 9) goto prepareBobs::@6
to:prepareBobs::@7
prepareBobs::@7: scope:[prepareBobs] from prepareBobs::@5
[69] (byte) prepareBobs::bob_table_idx#1 ← ++ (byte) prepareBobs::bob_table_idx#12
[70] call shiftProtoBobRight
to:prepareBobs::@10
prepareBobs::@10: scope:[prepareBobs] from prepareBobs::@7
[71] phi()
[72] call shiftProtoBobRight
to:prepareBobs::@11
prepareBobs::@11: scope:[prepareBobs] from prepareBobs::@10
[73] (byte) prepareBobs::shift_x#1 ← ++ (byte) prepareBobs::shift_x#2
to:prepareBobs::@2
prepareBobs::@6: scope:[prepareBobs] from prepareBobs::@5
[74] (byte*) bobCharsetFindOrAddGlyph::bob_glyph#1 ← (byte*) prepareBobs::bob_glyph#2
[75] call bobCharsetFindOrAddGlyph
[76] (byte) bobCharsetFindOrAddGlyph::return#1 ← (byte) bobCharsetFindOrAddGlyph::glyph_id#11
to:prepareBobs::@9
prepareBobs::@9: scope:[prepareBobs] from prepareBobs::@6
[77] (byte~) prepareBobs::$5 ← (byte) bobCharsetFindOrAddGlyph::return#1
[78] *((byte*) prepareBobs::bob_table#2) ← (byte~) prepareBobs::$5
[79] (byte*) prepareBobs::bob_glyph#1 ← (byte*) prepareBobs::bob_glyph#2 + (byte) 8
[80] (byte*) prepareBobs::bob_table#1 ← (byte*) prepareBobs::bob_table#2 + (const byte) BOB_SHIFTS_X*(const byte) BOB_SHIFTS_Y
[81] (byte) prepareBobs::cell#1 ← ++ (byte) prepareBobs::cell#2
to:prepareBobs::@5
(byte()) bobCharsetFindOrAddGlyph((byte*) bobCharsetFindOrAddGlyph::bob_glyph)
bobCharsetFindOrAddGlyph: scope:[bobCharsetFindOrAddGlyph] from prepareBobs prepareBobs::@6
[82] (byte*) bobCharsetFindOrAddGlyph::bob_glyph#10 ← phi( prepareBobs/(const byte*) PROTO_BOB+(byte) $30 prepareBobs::@6/(byte*) bobCharsetFindOrAddGlyph::bob_glyph#1 )
[82] (byte) bob_charset_next_id#23 ← phi( prepareBobs/(byte) 0 prepareBobs::@6/(byte) bob_charset_next_id#21 )
to:bobCharsetFindOrAddGlyph::@1
bobCharsetFindOrAddGlyph::@1: scope:[bobCharsetFindOrAddGlyph] from bobCharsetFindOrAddGlyph bobCharsetFindOrAddGlyph::@6
[83] (byte*) bobCharsetFindOrAddGlyph::glyph_cursor#11 ← phi( bobCharsetFindOrAddGlyph/(const byte*) BOB_CHARSET bobCharsetFindOrAddGlyph::@6/(byte*) bobCharsetFindOrAddGlyph::glyph_cursor#1 )
[83] (byte) bobCharsetFindOrAddGlyph::glyph_id#11 ← phi( bobCharsetFindOrAddGlyph/(byte) 0 bobCharsetFindOrAddGlyph::@6/(byte) bobCharsetFindOrAddGlyph::glyph_id#1 )
[84] if((byte) bobCharsetFindOrAddGlyph::glyph_id#11!=(byte) bob_charset_next_id#23) goto bobCharsetFindOrAddGlyph::@2
to:bobCharsetFindOrAddGlyph::@7
bobCharsetFindOrAddGlyph::@7: scope:[bobCharsetFindOrAddGlyph] from bobCharsetFindOrAddGlyph::@1 bobCharsetFindOrAddGlyph::@8
[85] (byte) bobCharsetFindOrAddGlyph::i1#2 ← phi( bobCharsetFindOrAddGlyph::@8/(byte) bobCharsetFindOrAddGlyph::i1#1 bobCharsetFindOrAddGlyph::@1/(byte) 0 )
[86] if((byte) bobCharsetFindOrAddGlyph::i1#2<(byte) 8) goto bobCharsetFindOrAddGlyph::@8
to:bobCharsetFindOrAddGlyph::@9
bobCharsetFindOrAddGlyph::@9: scope:[bobCharsetFindOrAddGlyph] from bobCharsetFindOrAddGlyph::@7
[87] (byte) bob_charset_next_id#8 ← ++ (byte) bob_charset_next_id#23
to:bobCharsetFindOrAddGlyph::@return
bobCharsetFindOrAddGlyph::@return: scope:[bobCharsetFindOrAddGlyph] from bobCharsetFindOrAddGlyph::@5 bobCharsetFindOrAddGlyph::@9
[88] (byte) bob_charset_next_id#16 ← phi( bobCharsetFindOrAddGlyph::@5/(byte) bob_charset_next_id#23 bobCharsetFindOrAddGlyph::@9/(byte) bob_charset_next_id#8 )
[89] return
to:@return
bobCharsetFindOrAddGlyph::@8: scope:[bobCharsetFindOrAddGlyph] from bobCharsetFindOrAddGlyph::@7
[90] *((byte*) bobCharsetFindOrAddGlyph::glyph_cursor#11 + (byte) bobCharsetFindOrAddGlyph::i1#2) ← *((byte*) bobCharsetFindOrAddGlyph::bob_glyph#10 + (byte) bobCharsetFindOrAddGlyph::i1#2)
[91] (byte) bobCharsetFindOrAddGlyph::i1#1 ← ++ (byte) bobCharsetFindOrAddGlyph::i1#2
to:bobCharsetFindOrAddGlyph::@7
bobCharsetFindOrAddGlyph::@2: scope:[bobCharsetFindOrAddGlyph] from bobCharsetFindOrAddGlyph::@1 bobCharsetFindOrAddGlyph::@4
[92] (byte) bobCharsetFindOrAddGlyph::i#2 ← phi( bobCharsetFindOrAddGlyph::@1/(byte) 0 bobCharsetFindOrAddGlyph::@4/(byte) bobCharsetFindOrAddGlyph::i#1 )
[93] if((byte) bobCharsetFindOrAddGlyph::i#2<(byte) 8) goto bobCharsetFindOrAddGlyph::@3
to:bobCharsetFindOrAddGlyph::@5
bobCharsetFindOrAddGlyph::@3: scope:[bobCharsetFindOrAddGlyph] from bobCharsetFindOrAddGlyph::@2
[94] if(*((byte*) bobCharsetFindOrAddGlyph::glyph_cursor#11 + (byte) bobCharsetFindOrAddGlyph::i#2)==*((byte*) bobCharsetFindOrAddGlyph::bob_glyph#10 + (byte) bobCharsetFindOrAddGlyph::i#2)) goto bobCharsetFindOrAddGlyph::@4
to:bobCharsetFindOrAddGlyph::@5
bobCharsetFindOrAddGlyph::@5: scope:[bobCharsetFindOrAddGlyph] from bobCharsetFindOrAddGlyph::@2 bobCharsetFindOrAddGlyph::@3
[95] (byte) bobCharsetFindOrAddGlyph::found#2 ← phi( bobCharsetFindOrAddGlyph::@3/(byte) 0 bobCharsetFindOrAddGlyph::@2/(byte) 1 )
[96] if((byte) 0==(byte) bobCharsetFindOrAddGlyph::found#2) goto bobCharsetFindOrAddGlyph::@6
to:bobCharsetFindOrAddGlyph::@return
bobCharsetFindOrAddGlyph::@6: scope:[bobCharsetFindOrAddGlyph] from bobCharsetFindOrAddGlyph::@5
[97] (byte) bobCharsetFindOrAddGlyph::glyph_id#1 ← ++ (byte) bobCharsetFindOrAddGlyph::glyph_id#11
[98] (byte*) bobCharsetFindOrAddGlyph::glyph_cursor#1 ← (byte*) bobCharsetFindOrAddGlyph::glyph_cursor#11 + (byte) 8
to:bobCharsetFindOrAddGlyph::@1
bobCharsetFindOrAddGlyph::@4: scope:[bobCharsetFindOrAddGlyph] from bobCharsetFindOrAddGlyph::@3
[99] (byte) bobCharsetFindOrAddGlyph::i#1 ← ++ (byte) bobCharsetFindOrAddGlyph::i#2
to:bobCharsetFindOrAddGlyph::@2
(void()) shiftProtoBobRight()
shiftProtoBobRight: scope:[shiftProtoBobRight] from prepareBobs::@10 prepareBobs::@7
[100] phi()
to:shiftProtoBobRight::@1
shiftProtoBobRight::@1: scope:[shiftProtoBobRight] from shiftProtoBobRight shiftProtoBobRight::@6
[101] (byte) shiftProtoBobRight::carry#2 ← phi( shiftProtoBobRight/(byte) 0 shiftProtoBobRight::@6/(byte) shiftProtoBobRight::carry#10 )
[101] (byte) shiftProtoBobRight::j#3 ← phi( shiftProtoBobRight/(byte) 0 shiftProtoBobRight::@6/(byte) shiftProtoBobRight::j#10 )
[101] (byte) shiftProtoBobRight::i#2 ← phi( shiftProtoBobRight/(byte) 0 shiftProtoBobRight::@6/(byte) shiftProtoBobRight::i#1 )
[102] if((byte) shiftProtoBobRight::i#2<(byte)(number) 3*(number) 3*(number) 8) goto shiftProtoBobRight::@2
to:shiftProtoBobRight::@return
shiftProtoBobRight::@return: scope:[shiftProtoBobRight] from shiftProtoBobRight::@1
[103] return
to:@return
shiftProtoBobRight::@2: scope:[shiftProtoBobRight] from shiftProtoBobRight::@1
[104] (byte~) shiftProtoBobRight::$1 ← *((const byte*) PROTO_BOB + (byte) shiftProtoBobRight::j#3) & (byte) 1
[105] if((byte) 0!=(byte~) shiftProtoBobRight::$1) goto shiftProtoBobRight::@3
to:shiftProtoBobRight::@4
shiftProtoBobRight::@3: scope:[shiftProtoBobRight] from shiftProtoBobRight::@2
[106] phi()
to:shiftProtoBobRight::@4
shiftProtoBobRight::@4: scope:[shiftProtoBobRight] from shiftProtoBobRight::@2 shiftProtoBobRight::@3
[107] (byte) shiftProtoBobRight::carry#1 ← phi( shiftProtoBobRight::@3/(byte) $80 shiftProtoBobRight::@2/(byte) 0 )
[108] (byte~) shiftProtoBobRight::$5 ← *((const byte*) PROTO_BOB + (byte) shiftProtoBobRight::j#3) >> (byte) 1
[109] (byte~) shiftProtoBobRight::$6 ← (byte~) shiftProtoBobRight::$5 | (byte) shiftProtoBobRight::carry#2
[110] *((const byte*) PROTO_BOB + (byte) shiftProtoBobRight::j#3) ← (byte~) shiftProtoBobRight::$6
[111] if((byte) shiftProtoBobRight::j#3>=(byte) $30) goto shiftProtoBobRight::@5
to:shiftProtoBobRight::@7
shiftProtoBobRight::@7: scope:[shiftProtoBobRight] from shiftProtoBobRight::@4
[112] (byte) shiftProtoBobRight::j#2 ← (byte) shiftProtoBobRight::j#3 + (byte) $18
to:shiftProtoBobRight::@6
shiftProtoBobRight::@6: scope:[shiftProtoBobRight] from shiftProtoBobRight::@5 shiftProtoBobRight::@7
[113] (byte) shiftProtoBobRight::j#10 ← phi( shiftProtoBobRight::@7/(byte) shiftProtoBobRight::j#2 shiftProtoBobRight::@5/(byte) shiftProtoBobRight::j#1 )
[114] (byte) shiftProtoBobRight::i#1 ← ++ (byte) shiftProtoBobRight::i#2
[115] (byte) shiftProtoBobRight::carry#10 ← (byte) shiftProtoBobRight::carry#1
to:shiftProtoBobRight::@1
shiftProtoBobRight::@5: scope:[shiftProtoBobRight] from shiftProtoBobRight::@4
[116] (byte) shiftProtoBobRight::j#1 ← (byte) shiftProtoBobRight::j#3 - (byte) $2f
to:shiftProtoBobRight::@6
(void()) shiftProtoBobDown()
shiftProtoBobDown: scope:[shiftProtoBobDown] from prepareBobs::@4
[117] phi()
to:shiftProtoBobDown::@1
shiftProtoBobDown::@1: scope:[shiftProtoBobDown] from shiftProtoBobDown shiftProtoBobDown::@2
[118] (byte) shiftProtoBobDown::i#2 ← phi( shiftProtoBobDown/(byte) $17 shiftProtoBobDown::@2/(byte) shiftProtoBobDown::i#1 )
[119] if((byte) shiftProtoBobDown::i#2>(byte) 0) goto shiftProtoBobDown::@2
to:shiftProtoBobDown::@3
shiftProtoBobDown::@3: scope:[shiftProtoBobDown] from shiftProtoBobDown::@1
[120] *((const byte*) PROTO_BOB) ← (byte) 0
[121] *((const byte*) PROTO_BOB+(byte) $18) ← (byte) 0
[122] *((const byte*) PROTO_BOB+(byte) $30) ← (byte) 0
to:shiftProtoBobDown::@return
shiftProtoBobDown::@return: scope:[shiftProtoBobDown] from shiftProtoBobDown::@3
[123] return
to:@return
shiftProtoBobDown::@2: scope:[shiftProtoBobDown] from shiftProtoBobDown::@1
[124] *((const byte*) PROTO_BOB + (byte) shiftProtoBobDown::i#2) ← *((const byte*) PROTO_BOB+(byte) $17 + (byte) shiftProtoBobDown::i#2)
[125] *((const byte*) PROTO_BOB+(byte) $18 + (byte) shiftProtoBobDown::i#2) ← *((const byte*) PROTO_BOB+(byte) $2f + (byte) shiftProtoBobDown::i#2)
[126] *((const byte*) PROTO_BOB+(byte) $30 + (byte) shiftProtoBobDown::i#2) ← (byte) 0
[127] (byte) shiftProtoBobDown::i#1 ← -- (byte) shiftProtoBobDown::i#2
to:shiftProtoBobDown::@1

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,223 @@
(label) @1
(label) @begin
(label) @end
(const byte*) BOB_CHARSET = (byte*) 24576
(const byte) BOB_SHIFTS_X = (number) 4
(const byte) BOB_SHIFTS_Y = (number) 8
(const byte) BOB_SUBTABLE_SIZE = (const byte) BOB_SHIFTS_X*(const byte) BOB_SHIFTS_Y
(const byte*) BOB_TABLES = { fill( 9*8*4, 0) }
(const byte*) BORDERCOL = (byte*) 53280
(const byte*) CIA2_PORT_A = (byte*) 56576
(const byte*) CIA2_PORT_A_DDR = (byte*) 56578
(const byte*) D018 = (byte*) 53272
(const byte*) PROTO_BOB = kickasm {{ .var pic = LoadPicture("smiley.png", List().add($000000, $ffffff))
.for (var x=0;x<3; x++)
.for (var y=0; y<24; y++)
.byte pic.getSinglecolorByte(x,y)
}}
(const byte*) RASTER = (byte*) 53266
(const byte*) SCREEN = (byte*) 16384
(const byte*) SIN_X_TAB = kickasm {{ .fill $200, 75.5+75.5*sin(i*2*PI/256) }}
(const byte*) SIN_Y_TAB = kickasm {{ .fill $200, 91.5+91.5*sin(i*2*PI/256) }}
(byte()) bobCharsetFindOrAddGlyph((byte*) bobCharsetFindOrAddGlyph::bob_glyph)
(label) bobCharsetFindOrAddGlyph::@1
(label) bobCharsetFindOrAddGlyph::@2
(label) bobCharsetFindOrAddGlyph::@3
(label) bobCharsetFindOrAddGlyph::@4
(label) bobCharsetFindOrAddGlyph::@5
(label) bobCharsetFindOrAddGlyph::@6
(label) bobCharsetFindOrAddGlyph::@7
(label) bobCharsetFindOrAddGlyph::@8
(label) bobCharsetFindOrAddGlyph::@9
(label) bobCharsetFindOrAddGlyph::@return
(byte*) bobCharsetFindOrAddGlyph::bob_glyph
(byte*) bobCharsetFindOrAddGlyph::bob_glyph#1 bob_glyph zp[2]:5 2002.0
(byte*) bobCharsetFindOrAddGlyph::bob_glyph#10 bob_glyph zp[2]:5 7400.200000000001
(byte) bobCharsetFindOrAddGlyph::found
(byte) bobCharsetFindOrAddGlyph::found#2 reg byte a 10001.0
(byte*) bobCharsetFindOrAddGlyph::glyph_cursor
(byte*) bobCharsetFindOrAddGlyph::glyph_cursor#1 glyph_cursor zp[2]:12 20002.0
(byte*) bobCharsetFindOrAddGlyph::glyph_cursor#11 glyph_cursor zp[2]:12 10000.307692307691
(byte) bobCharsetFindOrAddGlyph::glyph_id
(byte) bobCharsetFindOrAddGlyph::glyph_id#1 glyph_id zp[1]:9 10001.0
(byte) bobCharsetFindOrAddGlyph::glyph_id#11 glyph_id zp[1]:9 1937.75
(byte) bobCharsetFindOrAddGlyph::i
(byte) bobCharsetFindOrAddGlyph::i#1 i zp[1]:7 200002.0
(byte) bobCharsetFindOrAddGlyph::i#2 i zp[1]:7 166668.3333333333
(byte) bobCharsetFindOrAddGlyph::i1
(byte) bobCharsetFindOrAddGlyph::i1#1 reg byte x 20002.0
(byte) bobCharsetFindOrAddGlyph::i1#2 reg byte x 16668.333333333332
(byte) bobCharsetFindOrAddGlyph::return
(byte) bobCharsetFindOrAddGlyph::return#1 reg byte a 2002.0
(byte) bob_charset_next_id
(byte) bob_charset_next_id#14 bob_charset_next_id zp[1]:14 12.0
(byte) bob_charset_next_id#16 bob_charset_next_id zp[1]:14 1100.6000000000001
(byte) bob_charset_next_id#21 bob_charset_next_id zp[1]:14 275.5
(byte) bob_charset_next_id#23 bob_charset_next_id zp[1]:14 1400.3333333333335
(byte) bob_charset_next_id#30 bob_charset_next_id zp[1]:14 37.33333333333333
(byte) bob_charset_next_id#8 bob_charset_next_id zp[1]:14 4.0
(void()) main()
(label) main::@1
(label) main::@2
(label) main::@3
(label) main::@4
(label) main::@5
(label) main::@6
(label) main::@7
(byte) main::sin_x_idx
(byte) main::sin_x_idx#1 sin_x_idx zp[1]:2 7.333333333333333
(byte) main::sin_x_idx#7 sin_x_idx zp[1]:2 4.583333333333333
(byte) main::sin_y_idx
(byte) main::sin_y_idx#1 sin_y_idx zp[1]:3 11.0
(byte) main::sin_y_idx#7 sin_y_idx zp[1]:3 4.230769230769231
(label) main::toD0181
(byte*) main::toD0181_gfx
(byte) main::toD0181_return
(const byte) main::toD0181_return#0 toD0181_return = >(word)(const byte*) BOB_CHARSET/(byte) 4&(byte) $f
(byte*) main::toD0181_screen
(label) main::vicSelectGfxBank1
(label) main::vicSelectGfxBank1_@1
(byte*) main::vicSelectGfxBank1_gfx
(label) main::vicSelectGfxBank1_toDd001
(byte*) main::vicSelectGfxBank1_toDd001_gfx
(byte) main::vicSelectGfxBank1_toDd001_return
(const byte) main::vicSelectGfxBank1_toDd001_return#0 vicSelectGfxBank1_toDd001_return = (byte) 3^>(word)(const byte*) SCREEN/(byte) $40
(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num)
(label) memset::@1
(label) memset::@2
(label) memset::@return
(byte) memset::c
(const byte) memset::c#0 c = (byte) 0
(byte*) memset::dst
(byte*) memset::dst#1 dst zp[2]:5 22.0
(byte*) memset::dst#2 dst zp[2]:5 14.666666666666666
(byte*) memset::end
(const byte*) memset::end#0 end = (byte*)(const void*) memset::str#0+(const word) memset::num#0
(word) memset::num
(const word) memset::num#0 num = (word) $3e8
(void*) memset::return
(void*) memset::str
(const void*) memset::str#0 str = (void*)(const byte*) SCREEN
(void()) prepareBobs()
(byte~) prepareBobs::$5 reg byte a 2002.0
(label) prepareBobs::@1
(label) prepareBobs::@10
(label) prepareBobs::@11
(label) prepareBobs::@2
(label) prepareBobs::@3
(label) prepareBobs::@4
(label) prepareBobs::@5
(label) prepareBobs::@6
(label) prepareBobs::@7
(label) prepareBobs::@8
(label) prepareBobs::@9
(label) prepareBobs::@return
(byte*) prepareBobs::bob_glyph
(byte*) prepareBobs::bob_glyph#1 bob_glyph zp[2]:5 667.3333333333334
(byte*) prepareBobs::bob_glyph#2 bob_glyph zp[2]:5 429.0
(byte*) prepareBobs::bob_table
(byte*) prepareBobs::bob_table#0 bob_table zp[2]:10 202.0
(byte*) prepareBobs::bob_table#1 bob_table zp[2]:10 1001.0
(byte*) prepareBobs::bob_table#2 bob_table zp[2]:10 388.0
(byte) prepareBobs::bob_table_idx
(byte) prepareBobs::bob_table_idx#1 bob_table_idx zp[1]:3 40.4
(byte) prepareBobs::bob_table_idx#12 bob_table_idx zp[1]:3 20.3125
(byte) prepareBobs::bob_table_idx#6 bob_table_idx zp[1]:3 11.0
(byte) prepareBobs::cell
(byte) prepareBobs::cell#1 cell zp[1]:8 2002.0
(byte) prepareBobs::cell#2 cell zp[1]:8 333.6666666666667
(byte) prepareBobs::shift_x
(byte) prepareBobs::shift_x#1 shift_x zp[1]:4 202.0
(byte) prepareBobs::shift_x#2 shift_x zp[1]:4 17.823529411764707
(byte) prepareBobs::shift_y
(byte) prepareBobs::shift_y#1 shift_y zp[1]:2 22.0
(byte) prepareBobs::shift_y#2 shift_y zp[1]:2 1.5
(void()) renderBob((byte) renderBob::xpos , (byte) renderBob::ypos)
(word~) renderBob::$10 zp[2]:12 4.0
(word~) renderBob::$11 zp[2]:10 4.0
(word~) renderBob::$2 zp[2]:10 3.0
(byte*~) renderBob::$4 zp[2]:10 4.0
(byte~) renderBob::$6 reg byte a 4.0
(byte~) renderBob::$7 zp[1]:14 2.0
(byte~) renderBob::$8 reg byte a 4.0
(label) renderBob::@return
(byte) renderBob::bob_table_idx
(byte) renderBob::bob_table_idx#0 reg byte x 2.2222222222222228
(byte*) renderBob::screen
(byte*) renderBob::screen#0 screen zp[2]:10 1.5384615384615383
(byte) renderBob::x_char_offset
(byte) renderBob::x_char_offset#0 reg byte y 0.5714285714285714
(byte) renderBob::xpos
(byte) renderBob::xpos#0 xpos zp[1]:4 11.0
(byte) renderBob::xpos#1 xpos zp[1]:4 11.0
(byte) renderBob::xpos#2 xpos zp[1]:4 11.0
(byte) renderBob::xpos#3 xpos zp[1]:4 3.3636363636363633
(byte) renderBob::y_char_offset
(byte) renderBob::y_char_offset#0 reg byte a 2.0
(word) renderBob::y_offset
(word) renderBob::y_offset#0 y_offset zp[2]:10 4.0
(byte) renderBob::ypos
(byte) renderBob::ypos#0 reg byte x 22.0
(byte) renderBob::ypos#1 reg byte x 22.0
(byte) renderBob::ypos#2 reg byte x 22.0
(byte) renderBob::ypos#3 reg byte x 4.111111111111112
(void()) shiftProtoBobDown()
(label) shiftProtoBobDown::@1
(label) shiftProtoBobDown::@2
(label) shiftProtoBobDown::@3
(label) shiftProtoBobDown::@return
(byte) shiftProtoBobDown::i
(byte) shiftProtoBobDown::i#1 reg byte x 202.0
(byte) shiftProtoBobDown::i#2 reg byte x 161.6
(void()) shiftProtoBobRight()
(byte~) shiftProtoBobRight::$1 reg byte a 2002.0
(byte~) shiftProtoBobRight::$5 reg byte a 2002.0
(byte~) shiftProtoBobRight::$6 reg byte a 2002.0
(label) shiftProtoBobRight::@1
(label) shiftProtoBobRight::@2
(label) shiftProtoBobRight::@3
(label) shiftProtoBobRight::@4
(label) shiftProtoBobRight::@5
(label) shiftProtoBobRight::@6
(label) shiftProtoBobRight::@7
(label) shiftProtoBobRight::@return
(byte) shiftProtoBobRight::carry
(byte) shiftProtoBobRight::carry#1 carry zp[1]:9 111.22222222222223
(byte) shiftProtoBobRight::carry#10 reg byte y 2002.0
(byte) shiftProtoBobRight::carry#2 reg byte y 286.0
(byte) shiftProtoBobRight::i
(byte) shiftProtoBobRight::i#1 i zp[1]:8 1001.0
(byte) shiftProtoBobRight::i#2 i zp[1]:8 231.0
(byte) shiftProtoBobRight::j
(byte) shiftProtoBobRight::j#1 reg byte x 2002.0
(byte) shiftProtoBobRight::j#10 reg byte x 1001.0
(byte) shiftProtoBobRight::j#2 reg byte x 2002.0
(byte) shiftProtoBobRight::j#3 reg byte x 700.7
(byte) shiftProtoBobRight::new_carry
reg byte x [ renderBob::ypos#3 renderBob::ypos#1 renderBob::ypos#2 renderBob::ypos#0 ]
zp[1]:2 [ prepareBobs::shift_y#2 prepareBobs::shift_y#1 main::sin_x_idx#7 main::sin_x_idx#1 ]
zp[1]:3 [ prepareBobs::bob_table_idx#6 prepareBobs::bob_table_idx#12 prepareBobs::bob_table_idx#1 main::sin_y_idx#7 main::sin_y_idx#1 ]
zp[1]:4 [ prepareBobs::shift_x#2 prepareBobs::shift_x#1 renderBob::xpos#3 renderBob::xpos#1 renderBob::xpos#2 renderBob::xpos#0 ]
zp[2]:5 [ prepareBobs::bob_glyph#2 prepareBobs::bob_glyph#1 bobCharsetFindOrAddGlyph::bob_glyph#10 bobCharsetFindOrAddGlyph::bob_glyph#1 memset::dst#2 memset::dst#1 ]
reg byte x [ bobCharsetFindOrAddGlyph::i1#2 bobCharsetFindOrAddGlyph::i1#1 ]
zp[1]:7 [ bobCharsetFindOrAddGlyph::i#2 bobCharsetFindOrAddGlyph::i#1 ]
reg byte a [ bobCharsetFindOrAddGlyph::found#2 ]
zp[1]:8 [ shiftProtoBobRight::i#2 shiftProtoBobRight::i#1 prepareBobs::cell#2 prepareBobs::cell#1 ]
reg byte x [ shiftProtoBobRight::j#3 shiftProtoBobRight::j#10 shiftProtoBobRight::j#2 shiftProtoBobRight::j#1 ]
reg byte y [ shiftProtoBobRight::carry#2 shiftProtoBobRight::carry#10 ]
zp[1]:9 [ shiftProtoBobRight::carry#1 bobCharsetFindOrAddGlyph::glyph_id#11 bobCharsetFindOrAddGlyph::glyph_id#1 ]
reg byte x [ shiftProtoBobDown::i#2 shiftProtoBobDown::i#1 ]
reg byte y [ renderBob::x_char_offset#0 ]
reg byte a [ renderBob::y_char_offset#0 ]
zp[2]:10 [ renderBob::$2 renderBob::$11 renderBob::y_offset#0 renderBob::$4 renderBob::screen#0 prepareBobs::bob_table#2 prepareBobs::bob_table#1 prepareBobs::bob_table#0 ]
zp[2]:12 [ renderBob::$10 bobCharsetFindOrAddGlyph::glyph_cursor#11 bobCharsetFindOrAddGlyph::glyph_cursor#1 ]
reg byte a [ renderBob::$6 ]
zp[1]:14 [ renderBob::$7 bob_charset_next_id#23 bob_charset_next_id#14 bob_charset_next_id#16 bob_charset_next_id#30 bob_charset_next_id#21 bob_charset_next_id#8 ]
reg byte a [ renderBob::$8 ]
reg byte x [ renderBob::bob_table_idx#0 ]
reg byte a [ bobCharsetFindOrAddGlyph::return#1 ]
reg byte a [ prepareBobs::$5 ]
reg byte a [ shiftProtoBobRight::$1 ]
reg byte a [ shiftProtoBobRight::$5 ]
reg byte a [ shiftProtoBobRight::$6 ]