1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2024-12-26 03:32:23 +00:00

Inlined sid_rnd() functions.

This commit is contained in:
jespergravgaard 2020-04-28 00:32:36 +02:00
parent 8f2b1c2134
commit eed25ff1cd
20 changed files with 11434 additions and 12240 deletions

View File

@ -197,8 +197,14 @@ __bbegin:
jsr main
rts
main: {
// sid_rnd_init()
jsr sid_rnd_init
// SID->CH3_FREQ = 0xffff
lda #<$ffff
sta SID+OFFSET_STRUCT_MOS6581_SID_CH3_FREQ
lda #>$ffff
sta SID+OFFSET_STRUCT_MOS6581_SID_CH3_FREQ+1
// SID->CH3_CONTROL = SID_CONTROL_NOISE
lda #SID_CONTROL_NOISE
sta SID+OFFSET_STRUCT_MOS6581_SID_CH3_CONTROL
// asm
sei
// render_init()
@ -1068,25 +1074,17 @@ play_spawn_current: {
// while(piece_idx==7)
lda #7
cmp.z piece_idx
beq __b3
beq sid_rnd1
// }
rts
__b3:
// sid_rnd()
jsr sid_rnd
sid_rnd1:
// return SID->CH3_OSC;
lda SID+OFFSET_STRUCT_MOS6581_SID_CH3_OSC
// piece_idx = sid_rnd()&7
and #7
sta.z piece_idx
jmp __b2
}
// Get a random number from the SID voice 3,
// Must be initialized with sid_rnd_init()
sid_rnd: {
// return SID->CH3_OSC;
lda SID+OFFSET_STRUCT_MOS6581_SID_CH3_OSC
// }
rts
}
// Update the score based on the number of lines removed
// play_update_score(byte register(X) removed)
play_update_score: {
@ -1899,19 +1897,6 @@ render_screen_original: {
// }
rts
}
// Initialize SID voice 3 for random number generation
sid_rnd_init: {
// SID->CH3_FREQ = 0xffff
lda #<$ffff
sta SID+OFFSET_STRUCT_MOS6581_SID_CH3_FREQ
lda #>$ffff
sta SID+OFFSET_STRUCT_MOS6581_SID_CH3_FREQ+1
// SID->CH3_CONTROL = SID_CONTROL_NOISE
lda #SID_CONTROL_NOISE
sta SID+OFFSET_STRUCT_MOS6581_SID_CH3_CONTROL
// }
rts
}
// Raster Interrupt Routine - sets up the sprites covering the playfield
// Repeats 10 timers every 2 lines from line IRQ_RASTER_FIRST
// Utilizes duplicated gfx in the sprites to allow for some leeway in updating the sprite pointers

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -168,29 +168,29 @@
(byte) current_orientation#7 current_orientation zp[1]:22 150001.5
(byte*) current_piece
(byte*) current_piece#10 current_piece zp[2]:19 8138.27027027027
(byte*) current_piece#100 current_piece_1 zp[2]:10 2000002.0
(byte*) current_piece#101 current_piece zp[2]:19 11.0
(byte*) current_piece#15 current_piece zp[2]:19 7706.51282051282
(byte*) current_piece#17 current_piece_1 zp[2]:10 1.1400006E7
(byte*) current_piece#28 current_piece zp[2]:19 300003.0
(byte*) current_piece#91 current_piece zp[2]:19 100001.0
(byte*) current_piece#94 current_piece_1 zp[2]:10 200002.0
(byte*) current_piece#95 current_piece_1 zp[2]:10 200002.0
(byte*) current_piece#93 current_piece zp[2]:19 100001.0
(byte*) current_piece#96 current_piece_1 zp[2]:10 200002.0
(byte*) current_piece#97 current_piece_1 zp[2]:10 200002.0
(byte*) current_piece#98 current_piece_1 zp[2]:10 2000002.0
(byte*) current_piece#99 current_piece zp[2]:19 11.0
(byte*) current_piece#98 current_piece_1 zp[2]:10 200002.0
(byte*) current_piece#99 current_piece_1 zp[2]:10 200002.0
(byte) current_piece_char
(byte) current_piece_char#10 current_piece_char zp[1]:21 1.8182183847272727E8
(byte) current_piece_char#100 current_piece_char_1 zp[1]:9 22.0
(byte) current_piece_char#101 current_piece_char_1 zp[1]:9 202.0
(byte) current_piece_char#16 current_piece_char zp[1]:21 5437.9729729729725
(byte) current_piece_char#29 current_piece_char zp[1]:21 300003.0
(byte) current_piece_char#5 current_piece_char zp[1]:21 31429.257142857143
(byte) current_piece_char#5 current_piece_char zp[1]:21 34375.75
(byte) current_piece_char#68 current_piece_char_1 zp[1]:9 47624.42857142857
(byte) current_piece_char#98 current_piece_char_1 zp[1]:9 22.0
(byte) current_piece_char#99 current_piece_char_1 zp[1]:9 202.0
(byte*) current_piece_gfx
(byte*) current_piece_gfx#110 current_piece_gfx_1 zp[2]:7 11.0
(byte*) current_piece_gfx#111 current_piece_gfx_1 zp[2]:7 101.0
(byte*) current_piece_gfx#115 current_piece_gfx zp[2]:23 200002.0
(byte*) current_piece_gfx#121 current_piece_gfx zp[2]:23 22.0
(byte*) current_piece_gfx#112 current_piece_gfx_1 zp[2]:7 11.0
(byte*) current_piece_gfx#113 current_piece_gfx_1 zp[2]:7 101.0
(byte*) current_piece_gfx#117 current_piece_gfx zp[2]:23 200002.0
(byte*) current_piece_gfx#123 current_piece_gfx zp[2]:23 22.0
(byte*) current_piece_gfx#13 current_piece_gfx zp[2]:23 1.8182183847272727E8
(byte*) current_piece_gfx#18 current_piece_gfx zp[2]:23 1009.7619047619048
(byte*) current_piece_gfx#20 current_piece_gfx zp[2]:23 15185.37037037037
@ -199,9 +199,9 @@
(byte*) current_piece_gfx#64 current_piece_gfx_1 zp[2]:7 47624.42857142857
(byte*) current_piece_gfx#7 current_piece_gfx zp[2]:23 200002.0
(byte) current_xpos
(byte) current_xpos#100 current_xpos zp[1]:25 61765.44117647059
(byte) current_xpos#117 current_xpos_1 zp[1]:6 7.333333333333333
(byte) current_xpos#118 current_xpos_1 zp[1]:6 67.33333333333333
(byte) current_xpos#100 current_xpos zp[1]:25 67742.74193548388
(byte) current_xpos#119 current_xpos_1 zp[1]:6 7.333333333333333
(byte) current_xpos#120 current_xpos_1 zp[1]:6 67.33333333333333
(byte) current_xpos#14 current_xpos zp[1]:25 1.8187293036363635E7
(byte) current_xpos#19 current_xpos zp[1]:25 1009.7619047619048
(byte) current_xpos#22 current_xpos zp[1]:25 36400.4
@ -216,14 +216,14 @@
(byte) current_ypos#19 current_ypos zp[1]:13 6425.74358974359
(byte) current_ypos#3 current_ypos zp[1]:13 200002.0
(byte) current_ypos#38 current_ypos zp[1]:13 300003.0
(byte) current_ypos#6 current_ypos zp[1]:13 63637.121212121216
(byte) current_ypos#96 reg byte x 5.5
(byte) current_ypos#97 reg byte x 40.4
(byte) current_ypos#6 current_ypos zp[1]:13 70000.83333333334
(byte) current_ypos#98 reg byte x 5.5
(byte) current_ypos#99 reg byte x 40.4
(byte) game_over
(byte) game_over#10 game_over zp[1]:27 6567.760869565218
(byte) game_over#15 game_over zp[1]:27 5705.54054054054
(byte) game_over#27 game_over zp[1]:27 300003.0
(byte) game_over#52 game_over zp[1]:27 42308.61538461538
(byte) game_over#52 game_over zp[1]:27 47827.13043478261
(byte) game_over#65 game_over zp[1]:27 78572.35714285714
(volatile byte) irq_cnt loadstore zp[1]:46 0.48000000000000004
(volatile byte) irq_raster_next loadstore zp[1]:43 0.44444444444444453
@ -372,14 +372,15 @@
(byte) main::key_event#0 reg byte x 1001.0
(byte) main::render
(byte) main::render#1 reg byte a 2002.0
(label) main::sid_rnd_init1
(byte) next_piece_idx
(byte) next_piece_idx#10 next_piece_idx zp[1]:26 6546.0
(byte) next_piece_idx#12 reg byte y 422.79999999999995
(byte) next_piece_idx#16 next_piece_idx zp[1]:26 5437.9729729729725
(byte) next_piece_idx#17 next_piece_idx zp[1]:26 1100013.0
(byte) next_piece_idx#30 next_piece_idx zp[1]:26 300003.0
(byte) next_piece_idx#76 reg byte y 22.0
(byte) next_piece_idx#77 reg byte y 202.0
(byte) next_piece_idx#77 reg byte y 22.0
(byte) next_piece_idx#78 reg byte y 202.0
(byte()) play_collision((byte) play_collision::xpos , (byte) play_collision::ypos , (byte) play_collision::orientation)
(byte~) play_collision::$14 reg byte a 2.0000000002E10
(byte~) play_collision::$5 reg byte a 2.00000000002E11
@ -637,20 +638,21 @@
(byte) play_remove_lines::y#8 y zp[1]:28 1.3333333346666667E8
(void()) play_spawn_current()
(byte~) play_spawn_current::$1 reg byte a 2000002.0
(byte~) play_spawn_current::$5 reg byte a 2.000000002E9
(byte~) play_spawn_current::$7 zp[1]:52 29411.79411764706
(byte~) play_spawn_current::$7 zp[1]:52 32258.09677419355
(label) play_spawn_current::@1
(label) play_spawn_current::@2
(label) play_spawn_current::@3
(label) play_spawn_current::@4
(label) play_spawn_current::@5
(label) play_spawn_current::@6
(label) play_spawn_current::@return
(byte) play_spawn_current::current_piece_idx
(byte) play_spawn_current::current_piece_idx#0 reg byte x 1250001.25
(byte) play_spawn_current::piece_idx
(byte) play_spawn_current::piece_idx#1 piece_idx zp[1]:26 2.000000002E9
(byte) play_spawn_current::piece_idx#2 piece_idx zp[1]:26 1.000050018E8
(label) play_spawn_current::sid_rnd1
(byte) play_spawn_current::sid_rnd1_return
(byte) play_spawn_current::sid_rnd1_return#0 reg byte a 2.000000002E9
(void()) play_update_score((byte) play_update_score::removed)
(byte~) play_update_score::$2 reg byte a 2000002.0
(byte~) play_update_score::$4 reg byte a 2000002.0
@ -877,9 +879,9 @@
(byte) render_screen_render#18 render_screen_render zp[1]:3 84.76923076923077
(byte) render_screen_render#22 reg byte x 7700.153846153846
(byte) render_screen_render#33 render_screen_render_1 zp[1]:5 4766.761904761905
(byte) render_screen_render#63 reg byte x 202.0
(byte) render_screen_render#64 render_screen_render_1 zp[1]:5 50.5
(byte) render_screen_render#65 reg byte x 101.0
(byte) render_screen_render#64 reg byte x 202.0
(byte) render_screen_render#65 render_screen_render_1 zp[1]:5 50.5
(byte) render_screen_render#66 reg byte x 101.0
(byte) render_screen_show
(byte) render_screen_show#13 render_screen_show zp[1]:2 367.33333333333337
(byte) render_screen_show#16 render_screen_show zp[1]:2 577.65
@ -902,16 +904,9 @@
(const byte) render_show::toD0182_return#0 toD0182_return = >(word)(const nomodify byte*) PLAYFIELD_SCREEN_2&(word) $3fff*(byte) 4|>(word)(const nomodify byte*) PLAYFIELD_CHARSET/(byte) 4&(byte) $f
(byte*) render_show::toD0182_screen
(const dword*) score_add_bcd[(number) 5] = { fill( 5, 0) }
(volatile dword) score_bcd loadstore zp[4]:39 14598.569343065694
(volatile dword) score_bcd loadstore zp[4]:39 14492.782608695652
(const byte**) screen_lines_1[(const nomodify byte) PLAYFIELD_LINES] = { fill( PLAYFIELD_LINES, 0) }
(const byte**) screen_lines_2[(const nomodify byte) PLAYFIELD_LINES] = { fill( PLAYFIELD_LINES, 0) }
(byte()) sid_rnd()
(label) sid_rnd::@return
(byte) sid_rnd::return
(byte) sid_rnd::return#0 reg byte a 3.666666667333333E9
(byte) sid_rnd::return#2 reg byte a 2.000000002E9
(void()) sid_rnd_init()
(label) sid_rnd_init::@return
(void()) sprites_init()
(label) sprites_init::@1
(label) sprites_init::@return
@ -962,18 +957,18 @@ zp[1]:3 [ render_screen_render#18 render_screen_render#11 ]
zp[1]:4 [ current_movedown_counter#16 current_movedown_counter#14 current_movedown_counter#12 ]
reg byte y [ render_bcd::only_low#6 ]
reg byte x [ render_bcd::bcd#6 render_bcd::bcd#0 render_bcd::bcd#1 render_bcd::bcd#2 render_bcd::bcd#3 render_bcd::bcd#4 render_bcd::bcd#5 ]
reg byte x [ render_screen_render#15 render_screen_render#65 ]
reg byte y [ next_piece_idx#12 next_piece_idx#76 next_piece_idx#77 ]
reg byte x [ render_screen_render#15 render_screen_render#66 ]
reg byte y [ next_piece_idx#12 next_piece_idx#77 next_piece_idx#78 ]
reg byte x [ render_next::c#2 render_next::c#1 ]
reg byte x [ current_ypos#13 current_ypos#96 current_ypos#97 ]
zp[1]:5 [ render_screen_render#33 render_screen_render#64 render_next::l#7 render_next::l#1 ]
zp[1]:6 [ current_xpos#59 current_xpos#117 current_xpos#118 ]
zp[2]:7 [ current_piece_gfx#64 current_piece_gfx#110 current_piece_gfx#111 render_next::next_piece_gfx#2 render_next::next_piece_gfx#3 render_next::next_piece_gfx#8 render_next::next_piece_gfx#1 render_score::screen#3 render_bcd::screen#6 render_bcd::screen#0 render_bcd::screen#1 render_bcd::screen#2 render_bcd::screen#3 render_bcd::screen#4 render_bcd::screen#5 ]
zp[1]:9 [ current_piece_char#68 current_piece_char#98 current_piece_char#99 ]
reg byte x [ current_ypos#13 current_ypos#98 current_ypos#99 ]
zp[1]:5 [ render_screen_render#33 render_screen_render#65 render_next::l#7 render_next::l#1 ]
zp[1]:6 [ current_xpos#59 current_xpos#119 current_xpos#120 ]
zp[2]:7 [ current_piece_gfx#64 current_piece_gfx#112 current_piece_gfx#113 render_next::next_piece_gfx#2 render_next::next_piece_gfx#3 render_next::next_piece_gfx#8 render_next::next_piece_gfx#1 render_score::screen#3 render_bcd::screen#6 render_bcd::screen#0 render_bcd::screen#1 render_bcd::screen#2 render_bcd::screen#3 render_bcd::screen#4 render_bcd::screen#5 ]
zp[1]:9 [ current_piece_char#68 current_piece_char#100 current_piece_char#101 ]
reg byte x [ render_moving::c#2 render_moving::c#1 ]
reg byte x [ render_screen_render#22 render_screen_render#63 ]
reg byte x [ render_screen_render#22 render_screen_render#64 ]
reg byte a [ play_move_rotate::return#2 ]
zp[2]:10 [ current_piece#17 current_piece#94 current_piece#95 current_piece#96 current_piece#97 current_piece#98 play_collision::piece_gfx#0 render_playfield::screen_line#2 render_playfield::screen_line#0 render_playfield::screen_line#1 render_next::screen_next_area#5 render_next::screen_next_area#10 render_next::screen_next_area#11 render_next::screen_next_area#4 render_next::screen_next_area#3 render_bcd::offset#6 render_bcd::screen_pos#3 render_bcd::screen_pos#0 render_bcd::screen_pos#2 ]
zp[2]:10 [ current_piece#17 current_piece#96 current_piece#97 current_piece#98 current_piece#99 current_piece#100 play_collision::piece_gfx#0 render_playfield::screen_line#2 render_playfield::screen_line#0 render_playfield::screen_line#1 render_next::screen_next_area#5 render_next::screen_next_area#10 render_next::screen_next_area#11 render_next::screen_next_area#4 render_next::screen_next_area#3 render_bcd::offset#6 render_bcd::screen_pos#3 render_bcd::screen_pos#0 render_bcd::screen_pos#2 ]
reg byte x [ play_collision::orientation#5 play_collision::orientation#0 play_collision::orientation#1 play_collision::orientation#2 play_collision::orientation#3 ]
reg byte x [ play_collision::c#2 play_collision::c#1 ]
reg byte a [ play_collision::return#15 ]
@ -984,10 +979,10 @@ zp[2]:14 [ lines_bcd#26 lines_bcd#19 lines_bcd#15 lines_bcd#17 lines_bcd#29 ]
zp[1]:16 [ level#33 level#10 level#17 level#19 level#21 ]
zp[1]:17 [ current_movedown_slow#37 current_movedown_slow#14 current_movedown_slow#1 current_movedown_slow#21 current_movedown_slow#23 current_movedown_slow#65 current_movedown_slow#10 ]
zp[1]:18 [ level_bcd#31 level_bcd#11 level_bcd#17 level_bcd#19 level_bcd#62 level_bcd#21 level_bcd#8 ]
zp[2]:19 [ current_piece#28 current_piece#10 current_piece#99 current_piece#15 current_piece#91 ]
zp[2]:19 [ current_piece#28 current_piece#10 current_piece#101 current_piece#15 current_piece#93 ]
zp[1]:21 [ current_piece_char#29 current_piece_char#10 current_piece_char#5 current_piece_char#16 ]
zp[1]:22 [ current_orientation#37 current_orientation#13 current_orientation#17 current_orientation#20 current_orientation#25 current_orientation#7 ]
zp[2]:23 [ current_piece_gfx#35 current_piece_gfx#13 current_piece_gfx#121 current_piece_gfx#18 current_piece_gfx#20 current_piece_gfx#21 current_piece_gfx#7 current_piece_gfx#115 ]
zp[2]:23 [ current_piece_gfx#35 current_piece_gfx#13 current_piece_gfx#123 current_piece_gfx#18 current_piece_gfx#20 current_piece_gfx#21 current_piece_gfx#7 current_piece_gfx#117 ]
zp[1]:25 [ current_xpos#43 current_xpos#14 current_xpos#100 current_xpos#19 current_xpos#22 current_xpos#26 current_xpos#6 current_xpos#8 ]
reg byte x [ play_move_down::return#3 ]
zp[1]:26 [ next_piece_idx#17 next_piece_idx#30 next_piece_idx#10 play_spawn_current::piece_idx#2 next_piece_idx#16 play_spawn_current::piece_idx#1 ]
@ -1065,9 +1060,7 @@ reg byte x [ play_update_score::removed#0 ]
reg byte x [ play_spawn_current::current_piece_idx#0 ]
reg byte a [ play_collision::return#10 ]
reg byte a [ play_spawn_current::$1 ]
reg byte a [ sid_rnd::return#2 ]
reg byte a [ play_spawn_current::$5 ]
reg byte a [ sid_rnd::return#0 ]
reg byte a [ play_spawn_current::sid_rnd1_return#0 ]
reg byte a [ play_update_score::$2 ]
zp[1]:52 [ play_update_score::lines_before#0 play_spawn_current::$7 ]
reg byte a [ play_update_score::$9 ]

View File

@ -63,8 +63,14 @@ main: {
sta.z fillscreen.screen+1
ldx #YELLOW
jsr fillscreen
// sid_rnd_init()
jsr sid_rnd_init
// SID->CH3_FREQ = 0xffff
lda #<$ffff
sta SID+OFFSET_STRUCT_MOS6581_SID_CH3_FREQ
lda #>$ffff
sta SID+OFFSET_STRUCT_MOS6581_SID_CH3_FREQ+1
// SID->CH3_CONTROL = SID_CONTROL_NOISE
lda #SID_CONTROL_NOISE
sta SID+OFFSET_STRUCT_MOS6581_SID_CH3_CONTROL
// makecharset(CHARSET)
jsr makecharset
__b1:
@ -126,15 +132,15 @@ fire: {
// for(; buffer != (BUFFER+(25*40)); ++screen, ++buffer)
lda.z buffer_1+1
cmp #>BUFFER+$19*$28
bne __b7
bne sid_rnd1
lda.z buffer_1
cmp #<BUFFER+$19*$28
bne __b7
bne sid_rnd1
// }
rts
__b7:
// sid_rnd()
jsr sid_rnd
sid_rnd1:
// return SID->CH3_OSC;
lda SID+OFFSET_STRUCT_MOS6581_SID_CH3_OSC
// (sid_rnd())/$10
lsr
lsr
@ -201,14 +207,6 @@ fire: {
!:
jmp __b1
}
// Get a random number from the SID voice 3,
// Must be initialized with sid_rnd_init()
sid_rnd: {
// return SID->CH3_OSC;
lda SID+OFFSET_STRUCT_MOS6581_SID_CH3_OSC
// }
rts
}
// Make a fire-friendly charset in chars $00-$3f of the passed charset
makecharset: {
.label __13 = $d
@ -371,19 +369,6 @@ makecharset: {
jmp __b1
bittab: .byte 1, 2, 4, 8, $10, $20, $40, $80
}
// Initialize SID voice 3 for random number generation
sid_rnd_init: {
// SID->CH3_FREQ = 0xffff
lda #<$ffff
sta SID+OFFSET_STRUCT_MOS6581_SID_CH3_FREQ
lda #>$ffff
sta SID+OFFSET_STRUCT_MOS6581_SID_CH3_FREQ+1
// SID->CH3_CONTROL = SID_CONTROL_NOISE
lda #SID_CONTROL_NOISE
sta SID+OFFSET_STRUCT_MOS6581_SID_CH3_CONTROL
// }
rts
}
// Fill a screen (1000 chars) with a specific char
// fillscreen(byte* zp($b) screen, byte register(X) fill)
fillscreen: {

View File

@ -14,194 +14,174 @@ main: scope:[main] from @1
[5] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK
[6] *((const nomodify byte*) BGCOL) ← (const nomodify byte) BLACK
[7] call fillscreen
to:main::@4
main::@4: scope:[main] from main
to:main::@5
main::@5: scope:[main] from main
[8] phi()
[9] call fillscreen
to:main::@5
main::@5: scope:[main] from main::@4
[10] phi()
[11] call fillscreen
to:main::@6
main::@6: scope:[main] from main::@5
[12] phi()
[13] call fillscreen
[10] phi()
[11] call fillscreen
to:main::@7
main::@7: scope:[main] from main::@6
[14] phi()
[15] call sid_rnd_init
to:main::@8
main::@8: scope:[main] from main::@7
[12] phi()
[13] call fillscreen
to:main::sid_rnd_init1
main::sid_rnd_init1: scope:[main] from main::@7
[14] *((word*)(const nomodify struct MOS6581_SID*) SID+(const byte) OFFSET_STRUCT_MOS6581_SID_CH3_FREQ) ← (word) $ffff
[15] *((byte*)(const nomodify struct MOS6581_SID*) SID+(const byte) OFFSET_STRUCT_MOS6581_SID_CH3_CONTROL) ← (const nomodify byte) SID_CONTROL_NOISE
to:main::@2
main::@2: scope:[main] from main::sid_rnd_init1
[16] phi()
[17] call makecharset
to:main::@1
main::@1: scope:[main] from main::@3 main::@8
main::@1: scope:[main] from main::@2 main::@4
[18] phi()
[19] call fire
to:main::toD0181
main::toD0181: scope:[main] from main::@1
[20] phi()
to:main::@2
main::@2: scope:[main] from main::toD0181
to:main::@3
main::@3: scope:[main] from main::toD0181
[21] *((const nomodify byte*) D018) ← (const byte) main::toD0181_return#0
[22] call fire
to:main::toD0182
main::toD0182: scope:[main] from main::@2
main::toD0182: scope:[main] from main::@3
[23] phi()
to:main::@3
main::@3: scope:[main] from main::toD0182
to:main::@4
main::@4: scope:[main] from main::toD0182
[24] *((const nomodify byte*) D018) ← (const byte) main::toD0182_return#0
to:main::@1
(void()) fire((byte*) fire::screenbase)
fire: scope:[fire] from main::@1 main::@2
[25] (byte*) fire::screen#0 ← phi( main::@1/(const byte*) SCREEN1 main::@2/(const byte*) SCREEN2 )
[26] (byte*) fire::screen#11 ← (byte*) fire::screen#0
fire: scope:[fire] from main::@1 main::@3
[25] (byte*) fire::screen#0 ← phi( main::@1/(const byte*) SCREEN1 main::@3/(const byte*) SCREEN2 )
[26] (byte*) fire::screen#12 ← (byte*) fire::screen#0
to:fire::@1
fire::@1: scope:[fire] from fire fire::@4
[27] (byte*) fire::screen#4 ← phi( fire/(byte*) fire::screen#11 fire::@4/(byte*) fire::screen#2 )
[27] (byte*) fire::screen#4 ← phi( fire/(byte*) fire::screen#12 fire::@4/(byte*) fire::screen#2 )
[27] (byte*) fire::buffer#4 ← phi( fire/(const byte*) BUFFER fire::@4/(byte*) fire::buffer#2 )
[28] if((byte*) fire::buffer#4!=(const byte*) BUFFER+(word)(number) $18*(number) $28) goto fire::@2
to:fire::@3
fire::@3: scope:[fire] from fire::@1
[29] (byte*) fire::screen#1 ← (byte*) fire::screen#0 + (word)(number) $18*(number) $28
to:fire::@6
fire::@6: scope:[fire] from fire::@3 fire::@8
[30] (byte*) fire::screen#10 ← phi( fire::@3/(byte*) fire::screen#1 fire::@8/(byte*) fire::screen#3 )
[30] (byte*) fire::buffer#10 ← phi( fire::@3/(const byte*) BUFFER+(word)(number) $18*(number) $28 fire::@8/(byte*) fire::buffer#3 )
[31] if((byte*) fire::buffer#10!=(const byte*) BUFFER+(word)(number) $19*(number) $28) goto fire::@7
fire::@6: scope:[fire] from fire::@3 fire::@7
[30] (byte*) fire::screen#10 ← phi( fire::@3/(byte*) fire::screen#1 fire::@7/(byte*) fire::screen#3 )
[30] (byte*) fire::buffer#10 ← phi( fire::@3/(const byte*) BUFFER+(word)(number) $18*(number) $28 fire::@7/(byte*) fire::buffer#3 )
[31] if((byte*) fire::buffer#10!=(const byte*) BUFFER+(word)(number) $19*(number) $28) goto fire::sid_rnd1
to:fire::@return
fire::@return: scope:[fire] from fire::@6
[32] return
to:@return
fire::@7: scope:[fire] from fire::@6
[33] phi()
[34] call sid_rnd
[35] (byte) sid_rnd::return#2 ← (byte) sid_rnd::return#0
to:fire::@8
fire::@8: scope:[fire] from fire::@7
[36] (byte~) fire::$12 ← (byte) sid_rnd::return#2
[37] (byte~) fire::$13 ← (byte~) fire::$12 >> (byte) 4
[38] (byte~) fire::$14 ← (byte) $30 + (byte~) fire::$13
[39] *((byte*) fire::buffer#10) ← (byte~) fire::$14
[40] *((byte*) fire::screen#10) ← *((byte*) fire::buffer#10)
[41] (byte*) fire::screen#3 ← ++ (byte*) fire::screen#10
[42] (byte*) fire::buffer#3 ← ++ (byte*) fire::buffer#10
fire::sid_rnd1: scope:[fire] from fire::@6
[33] (byte) fire::sid_rnd1_return#0 ← *((byte*)(const nomodify struct MOS6581_SID*) SID+(const byte) OFFSET_STRUCT_MOS6581_SID_CH3_OSC)
to:fire::@7
fire::@7: scope:[fire] from fire::sid_rnd1
[34] (byte~) fire::$13 ← (byte) fire::sid_rnd1_return#0 >> (byte) 4
[35] (byte~) fire::$14 ← (byte) $30 + (byte~) fire::$13
[36] *((byte*) fire::buffer#10) ← (byte~) fire::$14
[37] *((byte*) fire::screen#10) ← *((byte*) fire::buffer#10)
[38] (byte*) fire::screen#3 ← ++ (byte*) fire::screen#10
[39] (byte*) fire::buffer#3 ← ++ (byte*) fire::buffer#10
to:fire::@6
fire::@2: scope:[fire] from fire::@1
[43] (byte~) fire::$4 ← *((byte*) fire::buffer#4 + (byte)(number) $28-(number) 1) + *((byte*) fire::buffer#4 + (byte)(number) $28-(number) 1)
[44] (byte~) fire::$5 ← (byte~) fire::$4 + *((byte*) fire::buffer#4 + (byte) $28)
[45] (byte~) fire::$6 ← (byte~) fire::$5 + *((byte*) fire::buffer#4 + (byte) $29)
[46] (byte) fire::c#0 ← (byte~) fire::$6 >> (byte) 2
[47] if((byte) fire::c#0<(byte) 2+(byte) 1) goto fire::@4
[40] (byte~) fire::$4 ← *((byte*) fire::buffer#4 + (byte)(number) $28-(number) 1) + *((byte*) fire::buffer#4 + (byte)(number) $28-(number) 1)
[41] (byte~) fire::$5 ← (byte~) fire::$4 + *((byte*) fire::buffer#4 + (byte) $28)
[42] (byte~) fire::$6 ← (byte~) fire::$5 + *((byte*) fire::buffer#4 + (byte) $29)
[43] (byte) fire::c#0 ← (byte~) fire::$6 >> (byte) 2
[44] if((byte) fire::c#0<(byte) 2+(byte) 1) goto fire::@4
to:fire::@5
fire::@5: scope:[fire] from fire::@2
[48] (byte) fire::c#1 ← (byte) fire::c#0 - (byte) 3
[45] (byte) fire::c#1 ← (byte) fire::c#0 - (byte) 3
to:fire::@4
fire::@4: scope:[fire] from fire::@2 fire::@5
[49] (byte) fire::c#2 ← phi( fire::@2/(byte) fire::c#0 fire::@5/(byte) fire::c#1 )
[50] *((byte*) fire::buffer#4) ← (byte) fire::c#2
[51] *((byte*) fire::screen#4) ← *((byte*) fire::buffer#4)
[52] (byte*) fire::screen#2 ← ++ (byte*) fire::screen#4
[53] (byte*) fire::buffer#2 ← ++ (byte*) fire::buffer#4
[46] (byte) fire::c#2 ← phi( fire::@2/(byte) fire::c#0 fire::@5/(byte) fire::c#1 )
[47] *((byte*) fire::buffer#4) ← (byte) fire::c#2
[48] *((byte*) fire::screen#4) ← *((byte*) fire::buffer#4)
[49] (byte*) fire::screen#2 ← ++ (byte*) fire::screen#4
[50] (byte*) fire::buffer#2 ← ++ (byte*) fire::buffer#4
to:fire::@1
(byte()) sid_rnd()
sid_rnd: scope:[sid_rnd] from fire::@7
[54] (byte) sid_rnd::return#0 ← *((byte*)(const nomodify struct MOS6581_SID*) SID+(const byte) OFFSET_STRUCT_MOS6581_SID_CH3_OSC)
to:sid_rnd::@return
sid_rnd::@return: scope:[sid_rnd] from sid_rnd
[55] return
to:@return
(void()) makecharset((byte*) makecharset::charset)
makecharset: scope:[makecharset] from main::@8
[56] phi()
makecharset: scope:[makecharset] from main::@2
[51] phi()
to:makecharset::@1
makecharset::@1: scope:[makecharset] from makecharset makecharset::@2
[57] (byte*) makecharset::font#2 ← phi( makecharset/(const byte*) CHARSET makecharset::@2/(byte*) makecharset::font#1 )
[58] if((byte*) makecharset::font#2!=(const byte*) CHARSET+(byte)(number) 1*(number) 8) goto makecharset::@2
[52] (byte*) makecharset::font#2 ← phi( makecharset/(const byte*) CHARSET makecharset::@2/(byte*) makecharset::font#1 )
[53] if((byte*) makecharset::font#2!=(const byte*) CHARSET+(byte)(number) 1*(number) 8) goto makecharset::@2
to:makecharset::@3
makecharset::@3: scope:[makecharset] from makecharset::@1 makecharset::@4
[59] (byte*) makecharset::font1#2 ← phi( makecharset::@1/(const byte*) CHARSET+(word)(number) $40*(number) 8 makecharset::@4/(byte*) makecharset::font1#1 )
[60] if((byte*) makecharset::font1#2!=(const byte*) CHARSET+(word)(number) $100*(number) 8) goto makecharset::@4
[54] (byte*) makecharset::font1#2 ← phi( makecharset::@1/(const byte*) CHARSET+(word)(number) $40*(number) 8 makecharset::@4/(byte*) makecharset::font1#1 )
[55] if((byte*) makecharset::font1#2!=(const byte*) CHARSET+(word)(number) $100*(number) 8) goto makecharset::@4
to:makecharset::@5
makecharset::@5: scope:[makecharset] from makecharset::@3 makecharset::@7
[61] (byte) makecharset::c#2 ← phi( makecharset::@7/(byte) makecharset::c#1 makecharset::@3/(byte) 0 )
[62] if((byte) makecharset::c#2<(byte) $40) goto makecharset::@6
[56] (byte) makecharset::c#2 ← phi( makecharset::@7/(byte) makecharset::c#1 makecharset::@3/(byte) 0 )
[57] if((byte) makecharset::c#2<(byte) $40) goto makecharset::@6
to:makecharset::@return
makecharset::@return: scope:[makecharset] from makecharset::@5
[63] return
[58] return
to:@return
makecharset::@6: scope:[makecharset] from makecharset::@10 makecharset::@5
[64] (byte) makecharset::bc#6 ← phi( makecharset::@10/(byte) makecharset::bc#3 makecharset::@5/(byte) 0 )
[64] (byte) makecharset::i#2 ← phi( makecharset::@10/(byte) makecharset::i#1 makecharset::@5/(byte) 0 )
[65] if((byte) makecharset::i#2<(byte) 8) goto makecharset::@8
[59] (byte) makecharset::bc#6 ← phi( makecharset::@10/(byte) makecharset::bc#3 makecharset::@5/(byte) 0 )
[59] (byte) makecharset::i#2 ← phi( makecharset::@10/(byte) makecharset::i#1 makecharset::@5/(byte) 0 )
[60] if((byte) makecharset::i#2<(byte) 8) goto makecharset::@8
to:makecharset::@7
makecharset::@7: scope:[makecharset] from makecharset::@6
[66] (byte) makecharset::c#1 ← ++ (byte) makecharset::c#2
[61] (byte) makecharset::c#1 ← ++ (byte) makecharset::c#2
to:makecharset::@5
makecharset::@8: scope:[makecharset] from makecharset::@11 makecharset::@6
[67] (byte) makecharset::b#2 ← phi( makecharset::@6/(byte) 0 makecharset::@11/(byte) makecharset::b#6 )
[67] (byte) makecharset::bc#3 ← phi( makecharset::@6/(byte) makecharset::bc#6 makecharset::@11/(byte) makecharset::bc#7 )
[67] (byte) makecharset::ii#2 ← phi( makecharset::@6/(byte) 0 makecharset::@11/(byte) makecharset::ii#1 )
[68] if((byte) makecharset::ii#2<(byte) 8) goto makecharset::@9
[62] (byte) makecharset::b#2 ← phi( makecharset::@6/(byte) 0 makecharset::@11/(byte) makecharset::b#6 )
[62] (byte) makecharset::bc#3 ← phi( makecharset::@6/(byte) makecharset::bc#6 makecharset::@11/(byte) makecharset::bc#7 )
[62] (byte) makecharset::ii#2 ← phi( makecharset::@6/(byte) 0 makecharset::@11/(byte) makecharset::ii#1 )
[63] if((byte) makecharset::ii#2<(byte) 8) goto makecharset::@9
to:makecharset::@10
makecharset::@10: scope:[makecharset] from makecharset::@8
[69] (word~) makecharset::$17 ← (word)(byte) makecharset::c#2
[70] (word~) makecharset::$15 ← (word~) makecharset::$17 << (byte) 3
[71] (word~) makecharset::$16 ← (word~) makecharset::$15 + (byte) makecharset::i#2
[72] (byte*~) makecharset::$18 ← (const byte*) CHARSET+(byte)(number) 1*(number) 8 + (word~) makecharset::$16
[73] *((byte*~) makecharset::$18) ← (byte) makecharset::b#2
[74] (byte) makecharset::i#1 ← ++ (byte) makecharset::i#2
[64] (word~) makecharset::$17 ← (word)(byte) makecharset::c#2
[65] (word~) makecharset::$15 ← (word~) makecharset::$17 << (byte) 3
[66] (word~) makecharset::$16 ← (word~) makecharset::$15 + (byte) makecharset::i#2
[67] (byte*~) makecharset::$18 ← (const byte*) CHARSET+(byte)(number) 1*(number) 8 + (word~) makecharset::$16
[68] *((byte*~) makecharset::$18) ← (byte) makecharset::b#2
[69] (byte) makecharset::i#1 ← ++ (byte) makecharset::i#2
to:makecharset::@6
makecharset::@9: scope:[makecharset] from makecharset::@8
[75] (byte) makecharset::bc#1 ← (byte) makecharset::bc#3 + (byte) makecharset::c#2
[76] if((byte) makecharset::bc#1<(byte) $3f+(byte) 1) goto makecharset::@11
[70] (byte) makecharset::bc#1 ← (byte) makecharset::bc#3 + (byte) makecharset::c#2
[71] if((byte) makecharset::bc#1<(byte) $3f+(byte) 1) goto makecharset::@11
to:makecharset::@12
makecharset::@12: scope:[makecharset] from makecharset::@9
[77] (byte) makecharset::bc#2 ← (byte) makecharset::bc#1 - (byte) $40
[78] (byte~) makecharset::$11 ← (byte) makecharset::i#2 & (byte) 1
[79] (byte~) makecharset::$12 ← (byte) makecharset::ii#2 + (byte~) makecharset::$11
[80] (byte~) makecharset::$13 ← (byte~) makecharset::$12 & (byte) 7
[81] (byte) makecharset::b#1 ← (byte) makecharset::b#2 + *((const to_nomodify byte*) makecharset::bittab + (byte~) makecharset::$13)
[72] (byte) makecharset::bc#2 ← (byte) makecharset::bc#1 - (byte) $40
[73] (byte~) makecharset::$11 ← (byte) makecharset::i#2 & (byte) 1
[74] (byte~) makecharset::$12 ← (byte) makecharset::ii#2 + (byte~) makecharset::$11
[75] (byte~) makecharset::$13 ← (byte~) makecharset::$12 & (byte) 7
[76] (byte) makecharset::b#1 ← (byte) makecharset::b#2 + *((const to_nomodify byte*) makecharset::bittab + (byte~) makecharset::$13)
to:makecharset::@11
makecharset::@11: scope:[makecharset] from makecharset::@12 makecharset::@9
[82] (byte) makecharset::b#6 ← phi( makecharset::@9/(byte) makecharset::b#2 makecharset::@12/(byte) makecharset::b#1 )
[82] (byte) makecharset::bc#7 ← phi( makecharset::@9/(byte) makecharset::bc#1 makecharset::@12/(byte) makecharset::bc#2 )
[83] (byte) makecharset::ii#1 ← ++ (byte) makecharset::ii#2
[77] (byte) makecharset::b#6 ← phi( makecharset::@9/(byte) makecharset::b#2 makecharset::@12/(byte) makecharset::b#1 )
[77] (byte) makecharset::bc#7 ← phi( makecharset::@9/(byte) makecharset::bc#1 makecharset::@12/(byte) makecharset::bc#2 )
[78] (byte) makecharset::ii#1 ← ++ (byte) makecharset::ii#2
to:makecharset::@8
makecharset::@4: scope:[makecharset] from makecharset::@3
[84] *((byte*) makecharset::font1#2) ← (byte) $ff
[85] (byte*) makecharset::font1#1 ← ++ (byte*) makecharset::font1#2
[79] *((byte*) makecharset::font1#2) ← (byte) $ff
[80] (byte*) makecharset::font1#1 ← ++ (byte*) makecharset::font1#2
to:makecharset::@3
makecharset::@2: scope:[makecharset] from makecharset::@1
[86] *((byte*) makecharset::font#2) ← (byte) 0
[87] (byte*) makecharset::font#1 ← ++ (byte*) makecharset::font#2
[81] *((byte*) makecharset::font#2) ← (byte) 0
[82] (byte*) makecharset::font#1 ← ++ (byte*) makecharset::font#2
to:makecharset::@1
(void()) sid_rnd_init()
sid_rnd_init: scope:[sid_rnd_init] from main::@7
[88] *((word*)(const nomodify struct MOS6581_SID*) SID+(const byte) OFFSET_STRUCT_MOS6581_SID_CH3_FREQ) ← (word) $ffff
[89] *((byte*)(const nomodify struct MOS6581_SID*) SID+(const byte) OFFSET_STRUCT_MOS6581_SID_CH3_CONTROL) ← (const nomodify byte) SID_CONTROL_NOISE
to:sid_rnd_init::@return
sid_rnd_init::@return: scope:[sid_rnd_init] from sid_rnd_init
[90] return
to:@return
(void()) fillscreen((byte*) fillscreen::screen , (byte) fillscreen::fill)
fillscreen: scope:[fillscreen] from main main::@4 main::@5 main::@6
[91] (byte*) fillscreen::screen#6 ← phi( main/(const byte*) BUFFER main::@4/(const byte*) SCREEN1 main::@5/(const byte*) SCREEN2 main::@6/(const nomodify byte*) COLS )
[91] (byte) fillscreen::fill#5 ← phi( main/(byte) 0 main::@4/(byte) 0 main::@5/(byte) 0 main::@6/(const nomodify byte) YELLOW )
fillscreen: scope:[fillscreen] from main main::@5 main::@6 main::@7
[83] (byte*) fillscreen::screen#6 ← phi( main/(const byte*) BUFFER main::@5/(const byte*) SCREEN1 main::@6/(const byte*) SCREEN2 main::@7/(const nomodify byte*) COLS )
[83] (byte) fillscreen::fill#5 ← phi( main/(byte) 0 main::@5/(byte) 0 main::@6/(byte) 0 main::@7/(const nomodify byte) YELLOW )
to:fillscreen::@1
fillscreen::@1: scope:[fillscreen] from fillscreen fillscreen::@1
[92] (word) fillscreen::i#2 ← phi( fillscreen/(word) 0 fillscreen::@1/(word) fillscreen::i#1 )
[92] (byte*) fillscreen::screen#5 ← phi( fillscreen/(byte*) fillscreen::screen#6 fillscreen::@1/(byte*) fillscreen::screen#4 )
[93] *((byte*) fillscreen::screen#5) ← (byte) fillscreen::fill#5
[94] (byte*) fillscreen::screen#4 ← ++ (byte*) fillscreen::screen#5
[95] (word) fillscreen::i#1 ← ++ (word) fillscreen::i#2
[96] if((word) fillscreen::i#1!=(word) $3e8) goto fillscreen::@1
[84] (word) fillscreen::i#2 ← phi( fillscreen/(word) 0 fillscreen::@1/(word) fillscreen::i#1 )
[84] (byte*) fillscreen::screen#5 ← phi( fillscreen/(byte*) fillscreen::screen#6 fillscreen::@1/(byte*) fillscreen::screen#4 )
[85] *((byte*) fillscreen::screen#5) ← (byte) fillscreen::fill#5
[86] (byte*) fillscreen::screen#4 ← ++ (byte*) fillscreen::screen#5
[87] (word) fillscreen::i#1 ← ++ (word) fillscreen::i#2
[88] if((word) fillscreen::i#1!=(word) $3e8) goto fillscreen::@1
to:fillscreen::@return
fillscreen::@return: scope:[fillscreen] from fillscreen::@1
[97] return
[89] return
to:@return

File diff suppressed because it is too large Load Diff

View File

@ -66,7 +66,6 @@
(byte*) fillscreen::screen#5 screen zp[2]:11 1552.0
(byte*) fillscreen::screen#6 screen zp[2]:11 101.0
(void()) fire((byte*) fire::screenbase)
(byte~) fire::$12 reg byte a 200002.0
(byte~) fire::$13 reg byte a 200002.0
(byte~) fire::$14 reg byte a 200002.0
(byte~) fire::$4 reg byte a 200002.0
@ -79,10 +78,9 @@
(label) fire::@5
(label) fire::@6
(label) fire::@7
(label) fire::@8
(label) fire::@return
(byte*) fire::buffer
(byte*) fire::buffer#10 buffer_1 zp[2]:9 45455.0
(byte*) fire::buffer#10 buffer_1 zp[2]:9 62500.625
(byte*) fire::buffer#2 buffer zp[2]:4 200002.0
(byte*) fire::buffer#3 buffer_1 zp[2]:9 200002.0
(byte*) fire::buffer#4 buffer zp[2]:4 75000.75
@ -93,12 +91,15 @@
(byte*) fire::screen
(byte*) fire::screen#0 screen zp[2]:2 133.46666666666667
(byte*) fire::screen#1 screen zp[2]:2 2002.0
(byte*) fire::screen#10 screen zp[2]:2 30100.4
(byte*) fire::screen#11 screen_1 zp[2]:11 2002.0
(byte*) fire::screen#10 screen zp[2]:2 43000.57142857143
(byte*) fire::screen#12 screen_1 zp[2]:11 2002.0
(byte*) fire::screen#2 screen_1 zp[2]:11 100001.0
(byte*) fire::screen#3 screen zp[2]:2 100001.0
(byte*) fire::screen#4 screen_1 zp[2]:11 27364.0
(byte*) fire::screenbase
(label) fire::sid_rnd1
(byte) fire::sid_rnd1_return
(byte) fire::sid_rnd1_return#0 reg byte a 200002.0
(void()) main()
(label) main::@1
(label) main::@2
@ -107,7 +108,7 @@
(label) main::@5
(label) main::@6
(label) main::@7
(label) main::@8
(label) main::sid_rnd_init1
(label) main::toD0181
(byte*) main::toD0181_gfx
(byte) main::toD0181_return
@ -166,13 +167,6 @@
(byte) makecharset::ii
(byte) makecharset::ii#1 ii zp[1]:8 200002.0
(byte) makecharset::ii#2 ii zp[1]:8 40000.4
(byte()) sid_rnd()
(label) sid_rnd::@return
(byte) sid_rnd::return
(byte) sid_rnd::return#0 reg byte a 366667.3333333334
(byte) sid_rnd::return#2 reg byte a 200002.0
(void()) sid_rnd_init()
(label) sid_rnd_init::@return
reg byte a [ fire::c#2 fire::c#0 fire::c#1 ]
zp[2]:2 [ makecharset::font#2 makecharset::font#1 fire::screen#0 fire::screen#10 fire::screen#1 fire::screen#3 ]
@ -184,15 +178,13 @@ zp[1]:8 [ makecharset::ii#2 makecharset::ii#1 ]
reg byte y [ makecharset::b#2 makecharset::b#6 makecharset::b#1 ]
reg byte x [ fillscreen::fill#5 ]
zp[2]:9 [ fillscreen::i#2 fillscreen::i#1 fire::buffer#10 fire::buffer#3 ]
reg byte a [ sid_rnd::return#2 ]
reg byte a [ fire::$12 ]
reg byte a [ fire::sid_rnd1_return#0 ]
reg byte a [ fire::$13 ]
reg byte a [ fire::$14 ]
reg byte a [ fire::$4 ]
reg byte a [ fire::$5 ]
reg byte a [ fire::$6 ]
reg byte a [ sid_rnd::return#0 ]
zp[2]:11 [ makecharset::$17 makecharset::$15 makecharset::$16 makecharset::$18 fillscreen::screen#5 fillscreen::screen#6 fillscreen::screen#4 fire::screen#4 fire::screen#11 fire::screen#2 ]
zp[2]:11 [ makecharset::$17 makecharset::$15 makecharset::$16 makecharset::$18 fillscreen::screen#5 fillscreen::screen#6 fillscreen::screen#4 fire::screen#4 fire::screen#12 fire::screen#2 ]
reg byte a [ makecharset::$11 ]
reg byte a [ makecharset::$12 ]
zp[1]:13 [ makecharset::$13 ]

View File

@ -336,8 +336,14 @@ makecharset: {
.label i = $d
.label c = 9
.label __16 = $10
// sid_rnd_init()
jsr sid_rnd_init
// SID->CH3_FREQ = 0xffff
lda #<$ffff
sta SID+OFFSET_STRUCT_MOS6581_SID_CH3_FREQ
lda #>$ffff
sta SID+OFFSET_STRUCT_MOS6581_SID_CH3_FREQ+1
// SID->CH3_CONTROL = SID_CONTROL_NOISE
lda #SID_CONTROL_NOISE
sta SID+OFFSET_STRUCT_MOS6581_SID_CH3_CONTROL
// print_cls()
jsr print_cls
lda #<print_line_cursor
@ -377,10 +383,10 @@ makecharset: {
and.z c
// if ((c & 0x07) == 0)
cmp #0
bne __b11
bne __b10
// print_char('.')
jsr print_char
__b11:
__b10:
// for (unsigned int c = 0; c < 0x100; ++c)
inc.z c
bne !+
@ -393,7 +399,7 @@ makecharset: {
__b5:
// for (unsigned char ii = 0; ii < 8; ++ii)
cpx #8
bcc __b6
bcc sid_rnd1
// c*8
lda.z c
asl
@ -427,34 +433,26 @@ makecharset: {
// for ( unsigned char i = 0; i < 8; ++i)
inc.z i
jmp __b3
__b6:
// sid_rnd()
jsr sid_rnd
sid_rnd1:
// return SID->CH3_OSC;
lda SID+OFFSET_STRUCT_MOS6581_SID_CH3_OSC
// sid_rnd() & 0xFF
and #$ff
sta.z __7
// if ((sid_rnd() & 0xFF) > s)
lda.z s
cmp.z __7
bcs __b8
bcs __b7
// b |= bittab[ii]
tya
ora bittab,x
tay
__b8:
__b7:
// for (unsigned char ii = 0; ii < 8; ++ii)
inx
jmp __b5
bittab: .byte 1, 2, 4, 8, $10, $20, $40, $80
}
// Get a random number from the SID voice 3,
// Must be initialized with sid_rnd_init()
sid_rnd: {
// return SID->CH3_OSC;
lda SID+OFFSET_STRUCT_MOS6581_SID_CH3_OSC
// }
rts
}
// Print a single char
print_char: {
.const ch = '.'
@ -509,19 +507,6 @@ memset: {
inc.z dst+1
!:
jmp __b1
}
// Initialize SID voice 3 for random number generation
sid_rnd_init: {
// SID->CH3_FREQ = 0xffff
lda #<$ffff
sta SID+OFFSET_STRUCT_MOS6581_SID_CH3_FREQ
lda #>$ffff
sta SID+OFFSET_STRUCT_MOS6581_SID_CH3_FREQ+1
// SID->CH3_CONTROL = SID_CONTROL_NOISE
lda #SID_CONTROL_NOISE
sta SID+OFFSET_STRUCT_MOS6581_SID_CH3_CONTROL
// }
rts
}
.align $100
SINTABLE:

View File

@ -202,117 +202,100 @@ doplasma::@2: scope:[doplasma] from doplasma::@1
(void()) makecharset((byte*) makecharset::charset)
makecharset: scope:[makecharset] from main::@2
[97] phi()
[98] call sid_rnd_init
to:makecharset::@12
makecharset::@12: scope:[makecharset] from makecharset
[99] phi()
[100] call print_cls
to:makecharset::sid_rnd_init1
makecharset::sid_rnd_init1: scope:[makecharset] from makecharset
[98] *((word*)(const nomodify struct MOS6581_SID*) SID+(const byte) OFFSET_STRUCT_MOS6581_SID_CH3_FREQ) ← (word) $ffff
[99] *((byte*)(const nomodify struct MOS6581_SID*) SID+(const byte) OFFSET_STRUCT_MOS6581_SID_CH3_CONTROL) ← (const nomodify byte) SID_CONTROL_NOISE
to:makecharset::@11
makecharset::@11: scope:[makecharset] from makecharset::sid_rnd_init1
[100] phi()
[101] call print_cls
to:makecharset::@1
makecharset::@1: scope:[makecharset] from makecharset::@11 makecharset::@12
[101] (byte*) print_char_cursor#18 ← phi( makecharset::@11/(byte*) print_char_cursor#30 makecharset::@12/(const byte*) print_line_cursor#0 )
[101] (word) makecharset::c#2 ← phi( makecharset::@11/(word) makecharset::c#1 makecharset::@12/(word) 0 )
[102] if((word) makecharset::c#2<(word) $100) goto makecharset::@2
makecharset::@1: scope:[makecharset] from makecharset::@10 makecharset::@11
[102] (byte*) print_char_cursor#18 ← phi( makecharset::@10/(byte*) print_char_cursor#30 makecharset::@11/(const byte*) print_line_cursor#0 )
[102] (word) makecharset::c#2 ← phi( makecharset::@10/(word) makecharset::c#1 makecharset::@11/(word) 0 )
[103] if((word) makecharset::c#2<(word) $100) goto makecharset::@2
to:makecharset::@return
makecharset::@return: scope:[makecharset] from makecharset::@1
[103] return
[104] return
to:@return
makecharset::@2: scope:[makecharset] from makecharset::@1
[104] (byte~) makecharset::$3 ← < (word) makecharset::c#2
[105] (byte) makecharset::s#0 ← *((const to_nomodify byte*) SINTABLE + (byte~) makecharset::$3)
[105] (byte~) makecharset::$3 ← < (word) makecharset::c#2
[106] (byte) makecharset::s#0 ← *((const to_nomodify byte*) SINTABLE + (byte~) makecharset::$3)
to:makecharset::@3
makecharset::@3: scope:[makecharset] from makecharset::@2 makecharset::@7
[106] (byte) makecharset::i#2 ← phi( makecharset::@2/(byte) 0 makecharset::@7/(byte) makecharset::i#1 )
[107] if((byte) makecharset::i#2<(byte) 8) goto makecharset::@5
makecharset::@3: scope:[makecharset] from makecharset::@2 makecharset::@6
[107] (byte) makecharset::i#2 ← phi( makecharset::@2/(byte) 0 makecharset::@6/(byte) makecharset::i#1 )
[108] if((byte) makecharset::i#2<(byte) 8) goto makecharset::@5
to:makecharset::@4
makecharset::@4: scope:[makecharset] from makecharset::@3
[108] (byte~) makecharset::$12 ← (word) makecharset::c#2 & (byte) 7
[109] if((byte~) makecharset::$12!=(byte) 0) goto makecharset::@11
to:makecharset::@10
makecharset::@10: scope:[makecharset] from makecharset::@4
[110] phi()
[111] call print_char
to:makecharset::@11
makecharset::@11: scope:[makecharset] from makecharset::@10 makecharset::@4
[112] (byte*) print_char_cursor#30 ← phi( makecharset::@10/(byte*) print_char_cursor#1 makecharset::@4/(byte*) print_char_cursor#18 )
[113] (word) makecharset::c#1 ← ++ (word) makecharset::c#2
to:makecharset::@1
makecharset::@5: scope:[makecharset] from makecharset::@3 makecharset::@8
[114] (byte) makecharset::b#2 ← phi( makecharset::@3/(byte) 0 makecharset::@8/(byte) makecharset::b#6 )
[114] (byte) makecharset::ii#2 ← phi( makecharset::@3/(byte) 0 makecharset::@8/(byte) makecharset::ii#1 )
[115] if((byte) makecharset::ii#2<(byte) 8) goto makecharset::@6
to:makecharset::@7
makecharset::@7: scope:[makecharset] from makecharset::@5
[116] (word~) makecharset::$10 ← (word) makecharset::c#2 << (byte) 3
[117] (word~) makecharset::$11 ← (word~) makecharset::$10 + (byte) makecharset::i#2
[118] (byte*~) makecharset::$16 ← (const nomodify byte*) CHARSET + (word~) makecharset::$11
[119] *((byte*~) makecharset::$16) ← (byte) makecharset::b#2
[120] (byte) makecharset::i#1 ← ++ (byte) makecharset::i#2
to:makecharset::@3
makecharset::@6: scope:[makecharset] from makecharset::@5
[121] phi()
[122] call sid_rnd
[123] (byte) sid_rnd::return#2 ← (byte) sid_rnd::return#0
to:makecharset::@13
makecharset::@13: scope:[makecharset] from makecharset::@6
[124] (byte~) makecharset::$6 ← (byte) sid_rnd::return#2
[125] (byte~) makecharset::$7 ← (byte~) makecharset::$6 & (byte) $ff
[126] if((byte~) makecharset::$7<=(byte) makecharset::s#0) goto makecharset::@8
[109] (byte~) makecharset::$12 ← (word) makecharset::c#2 & (byte) 7
[110] if((byte~) makecharset::$12!=(byte) 0) goto makecharset::@10
to:makecharset::@9
makecharset::@9: scope:[makecharset] from makecharset::@13
[127] (byte) makecharset::b#1 ← (byte) makecharset::b#2 | *((const to_nomodify byte*) makecharset::bittab + (byte) makecharset::ii#2)
makecharset::@9: scope:[makecharset] from makecharset::@4
[111] phi()
[112] call print_char
to:makecharset::@10
makecharset::@10: scope:[makecharset] from makecharset::@4 makecharset::@9
[113] (byte*) print_char_cursor#30 ← phi( makecharset::@9/(byte*) print_char_cursor#1 makecharset::@4/(byte*) print_char_cursor#18 )
[114] (word) makecharset::c#1 ← ++ (word) makecharset::c#2
to:makecharset::@1
makecharset::@5: scope:[makecharset] from makecharset::@3 makecharset::@7
[115] (byte) makecharset::b#2 ← phi( makecharset::@3/(byte) 0 makecharset::@7/(byte) makecharset::b#6 )
[115] (byte) makecharset::ii#2 ← phi( makecharset::@3/(byte) 0 makecharset::@7/(byte) makecharset::ii#1 )
[116] if((byte) makecharset::ii#2<(byte) 8) goto makecharset::sid_rnd1
to:makecharset::@6
makecharset::@6: scope:[makecharset] from makecharset::@5
[117] (word~) makecharset::$10 ← (word) makecharset::c#2 << (byte) 3
[118] (word~) makecharset::$11 ← (word~) makecharset::$10 + (byte) makecharset::i#2
[119] (byte*~) makecharset::$16 ← (const nomodify byte*) CHARSET + (word~) makecharset::$11
[120] *((byte*~) makecharset::$16) ← (byte) makecharset::b#2
[121] (byte) makecharset::i#1 ← ++ (byte) makecharset::i#2
to:makecharset::@3
makecharset::sid_rnd1: scope:[makecharset] from makecharset::@5
[122] (byte) makecharset::sid_rnd1_return#0 ← *((byte*)(const nomodify struct MOS6581_SID*) SID+(const byte) OFFSET_STRUCT_MOS6581_SID_CH3_OSC)
to:makecharset::@12
makecharset::@12: scope:[makecharset] from makecharset::sid_rnd1
[123] (byte~) makecharset::$7 ← (byte) makecharset::sid_rnd1_return#0 & (byte) $ff
[124] if((byte~) makecharset::$7<=(byte) makecharset::s#0) goto makecharset::@7
to:makecharset::@8
makecharset::@8: scope:[makecharset] from makecharset::@13 makecharset::@9
[128] (byte) makecharset::b#6 ← phi( makecharset::@9/(byte) makecharset::b#1 makecharset::@13/(byte) makecharset::b#2 )
[129] (byte) makecharset::ii#1 ← ++ (byte) makecharset::ii#2
makecharset::@8: scope:[makecharset] from makecharset::@12
[125] (byte) makecharset::b#1 ← (byte) makecharset::b#2 | *((const to_nomodify byte*) makecharset::bittab + (byte) makecharset::ii#2)
to:makecharset::@7
makecharset::@7: scope:[makecharset] from makecharset::@12 makecharset::@8
[126] (byte) makecharset::b#6 ← phi( makecharset::@12/(byte) makecharset::b#2 makecharset::@8/(byte) makecharset::b#1 )
[127] (byte) makecharset::ii#1 ← ++ (byte) makecharset::ii#2
to:makecharset::@5
(byte()) sid_rnd()
sid_rnd: scope:[sid_rnd] from makecharset::@6
[130] (byte) sid_rnd::return#0 ← *((byte*)(const nomodify struct MOS6581_SID*) SID+(const byte) OFFSET_STRUCT_MOS6581_SID_CH3_OSC)
to:sid_rnd::@return
sid_rnd::@return: scope:[sid_rnd] from sid_rnd
[131] return
to:@return
(void()) print_char((byte) print_char::ch)
print_char: scope:[print_char] from makecharset::@10
[132] *((byte*) print_char_cursor#18) ← (const byte) print_char::ch#0
[133] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#18
print_char: scope:[print_char] from makecharset::@9
[128] *((byte*) print_char_cursor#18) ← (const byte) print_char::ch#0
[129] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#18
to:print_char::@return
print_char::@return: scope:[print_char] from print_char
[134] return
[130] return
to:@return
(void()) print_cls()
print_cls: scope:[print_cls] from makecharset::@12
[135] phi()
[136] call memset
print_cls: scope:[print_cls] from makecharset::@11
[131] phi()
[132] call memset
to:print_cls::@return
print_cls::@return: scope:[print_cls] from print_cls
[137] return
[133] return
to:@return
(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num)
memset: scope:[memset] from print_cls
[138] phi()
[134] phi()
to:memset::@1
memset::@1: scope:[memset] from memset memset::@2
[139] (byte*) memset::dst#2 ← phi( memset/(byte*)(const void*) memset::str#0 memset::@2/(byte*) memset::dst#1 )
[140] if((byte*) memset::dst#2!=(const byte*) memset::end#0) goto memset::@2
[135] (byte*) memset::dst#2 ← phi( memset/(byte*)(const void*) memset::str#0 memset::@2/(byte*) memset::dst#1 )
[136] if((byte*) memset::dst#2!=(const byte*) memset::end#0) goto memset::@2
to:memset::@return
memset::@return: scope:[memset] from memset::@1
[141] return
[137] return
to:@return
memset::@2: scope:[memset] from memset::@1
[142] *((byte*) memset::dst#2) ← (const byte) memset::c#0
[143] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2
[138] *((byte*) memset::dst#2) ← (const byte) memset::c#0
[139] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2
to:memset::@1
(void()) sid_rnd_init()
sid_rnd_init: scope:[sid_rnd_init] from makecharset
[144] *((word*)(const nomodify struct MOS6581_SID*) SID+(const byte) OFFSET_STRUCT_MOS6581_SID_CH3_FREQ) ← (word) $ffff
[145] *((byte*)(const nomodify struct MOS6581_SID*) SID+(const byte) OFFSET_STRUCT_MOS6581_SID_CH3_CONTROL) ← (const nomodify byte) SID_CONTROL_NOISE
to:sid_rnd_init::@return
sid_rnd_init::@return: scope:[sid_rnd_init] from sid_rnd_init
[146] return
to:@return

File diff suppressed because it is too large Load Diff

View File

@ -189,13 +189,11 @@
(byte~) makecharset::$12 reg byte a 2002.0
(byte*~) makecharset::$16 zp[2]:16 20002.0
(byte~) makecharset::$3 reg byte x 2002.0
(byte~) makecharset::$6 reg byte a 200002.0
(byte~) makecharset::$7 zp[1]:18 200002.0
(label) makecharset::@1
(label) makecharset::@10
(label) makecharset::@11
(label) makecharset::@12
(label) makecharset::@13
(label) makecharset::@2
(label) makecharset::@3
(label) makecharset::@4
@ -207,21 +205,25 @@
(label) makecharset::@return
(byte) makecharset::b
(byte) makecharset::b#1 reg byte y 200002.0
(byte) makecharset::b#2 reg byte y 28182.181818181816
(byte) makecharset::b#2 reg byte y 38750.5
(byte) makecharset::b#6 reg byte y 150001.5
(const to_nomodify byte*) makecharset::bittab[(number) 8] = { (byte) 1, (byte) 2, (byte) 4, (byte) 8, (byte) $10, (byte) $20, (byte) $40, (byte) $80 }
(word) makecharset::c
(word) makecharset::c#1 c zp[2]:9 2002.0
(word) makecharset::c#2 c zp[2]:9 555.7777777777778
(word) makecharset::c#2 c zp[2]:9 625.25
(byte*) makecharset::charset
(byte) makecharset::i
(byte) makecharset::i#1 i zp[1]:13 20002.0
(byte) makecharset::i#2 i zp[1]:13 2353.176470588235
(byte) makecharset::i#2 i zp[1]:13 2857.4285714285716
(byte) makecharset::ii
(byte) makecharset::ii#1 reg byte x 200002.0
(byte) makecharset::ii#2 reg byte x 40000.4
(byte) makecharset::ii#2 reg byte x 57143.42857142857
(byte) makecharset::s
(byte) makecharset::s#0 s zp[1]:15 5315.894736842105
(byte) makecharset::s#0 s zp[1]:15 6312.625
(label) makecharset::sid_rnd1
(byte) makecharset::sid_rnd1_return
(byte) makecharset::sid_rnd1_return#0 reg byte a 200002.0
(label) makecharset::sid_rnd_init1
(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num)
(label) memset::@1
(label) memset::@2
@ -244,20 +246,13 @@
(const byte) print_char::ch#0 ch = (byte) '.'
(byte*) print_char_cursor
(byte*) print_char_cursor#1 print_char_cursor zp[2]:11 3667.333333333333
(byte*) print_char_cursor#18 print_char_cursor zp[2]:11 846.3076923076923
(byte*) print_char_cursor#18 print_char_cursor zp[2]:11 956.695652173913
(byte*) print_char_cursor#30 print_char_cursor zp[2]:11 1501.5
(void()) print_cls()
(label) print_cls::@return
(byte*) print_line_cursor
(const byte*) print_line_cursor#0 print_line_cursor = (byte*) 1024
(byte*) print_screen
(byte()) sid_rnd()
(label) sid_rnd::@return
(byte) sid_rnd::return
(byte) sid_rnd::return#0 reg byte a 366667.3333333334
(byte) sid_rnd::return#2 reg byte a 200002.0
(void()) sid_rnd_init()
(label) sid_rnd_init::@return
zp[1]:2 [ c1A#1 c1A#3 ]
zp[1]:3 [ c1B#1 c1B#3 ]
@ -306,7 +301,5 @@ reg byte x [ makecharset::$3 ]
zp[1]:15 [ makecharset::s#0 doplasma::c1a#2 doplasma::c1a#0 doplasma::c1a#1 ]
reg byte a [ makecharset::$12 ]
zp[2]:16 [ makecharset::$10 makecharset::$11 makecharset::$16 memset::dst#2 memset::dst#1 ]
reg byte a [ sid_rnd::return#2 ]
reg byte a [ makecharset::$6 ]
reg byte a [ makecharset::sid_rnd1_return#0 ]
zp[1]:18 [ makecharset::$7 doplasma::c1b#2 doplasma::c1b#0 doplasma::c1b#1 ]
reg byte a [ sid_rnd::return#0 ]

View File

@ -232,8 +232,14 @@ makecharset: {
.label i = $d
.label c = 9
.label __16 = $f
// sid_rnd_init()
jsr sid_rnd_init
// SID->CH3_FREQ = 0xffff
lda #<$ffff
sta SID+OFFSET_STRUCT_MOS6581_SID_CH3_FREQ
lda #>$ffff
sta SID+OFFSET_STRUCT_MOS6581_SID_CH3_FREQ+1
// SID->CH3_CONTROL = SID_CONTROL_NOISE
lda #SID_CONTROL_NOISE
sta SID+OFFSET_STRUCT_MOS6581_SID_CH3_CONTROL
// print_cls()
jsr print_cls
lda #<print_line_cursor
@ -273,10 +279,10 @@ makecharset: {
and.z c
// if ((c & 0x07) == 0)
cmp #0
bne __b11
bne __b10
// print_char('.')
jsr print_char
__b11:
__b10:
// for (unsigned int c = 0; c < 0x100; ++c)
inc.z c
bne !+
@ -289,7 +295,7 @@ makecharset: {
__b5:
// for (char ii = 0; ii < 8; ++ii)
cpx #8
bcc __b6
bcc sid_rnd1
// c*8
lda.z c
asl
@ -323,34 +329,26 @@ makecharset: {
// for ( char i = 0; i < 8; ++i)
inc.z i
jmp __b3
__b6:
// sid_rnd()
jsr sid_rnd
sid_rnd1:
// return SID->CH3_OSC;
lda SID+OFFSET_STRUCT_MOS6581_SID_CH3_OSC
// sid_rnd() & 0xFF
and #$ff
sta.z __7
// if ((sid_rnd() & 0xFF) > s)
lda.z s
cmp.z __7
bcs __b8
bcs __b7
// b |= bittab[ii]
tya
ora bittab,x
tay
__b8:
__b7:
// for (char ii = 0; ii < 8; ++ii)
inx
jmp __b5
bittab: .byte 1, 2, 4, 8, $10, $20, $40, $80
}
// Get a random number from the SID voice 3,
// Must be initialized with sid_rnd_init()
sid_rnd: {
// return SID->CH3_OSC;
lda SID+OFFSET_STRUCT_MOS6581_SID_CH3_OSC
// }
rts
}
// Print a single char
print_char: {
.const ch = '.'
@ -405,19 +403,6 @@ memset: {
inc.z dst+1
!:
jmp __b1
}
// Initialize SID voice 3 for random number generation
sid_rnd_init: {
// SID->CH3_FREQ = 0xffff
lda #<$ffff
sta SID+OFFSET_STRUCT_MOS6581_SID_CH3_FREQ
lda #>$ffff
sta SID+OFFSET_STRUCT_MOS6581_SID_CH3_FREQ+1
// SID->CH3_CONTROL = SID_CONTROL_NOISE
lda #SID_CONTROL_NOISE
sta SID+OFFSET_STRUCT_MOS6581_SID_CH3_CONTROL
// }
rts
}
.align $100
SINTABLE:

View File

@ -119,117 +119,100 @@ doplasma::@2: scope:[doplasma] from doplasma::@1
(void()) makecharset((byte*) makecharset::charset)
makecharset: scope:[makecharset] from main::@2
[54] phi()
[55] call sid_rnd_init
to:makecharset::@12
makecharset::@12: scope:[makecharset] from makecharset
[56] phi()
[57] call print_cls
to:makecharset::sid_rnd_init1
makecharset::sid_rnd_init1: scope:[makecharset] from makecharset
[55] *((word*)(const nomodify struct MOS6581_SID*) SID+(const byte) OFFSET_STRUCT_MOS6581_SID_CH3_FREQ) ← (word) $ffff
[56] *((byte*)(const nomodify struct MOS6581_SID*) SID+(const byte) OFFSET_STRUCT_MOS6581_SID_CH3_CONTROL) ← (const nomodify byte) SID_CONTROL_NOISE
to:makecharset::@11
makecharset::@11: scope:[makecharset] from makecharset::sid_rnd_init1
[57] phi()
[58] call print_cls
to:makecharset::@1
makecharset::@1: scope:[makecharset] from makecharset::@11 makecharset::@12
[58] (byte*) print_char_cursor#18 ← phi( makecharset::@11/(byte*) print_char_cursor#29 makecharset::@12/(const byte*) print_line_cursor#0 )
[58] (word) makecharset::c#2 ← phi( makecharset::@11/(word) makecharset::c#1 makecharset::@12/(word) 0 )
[59] if((word) makecharset::c#2<(word) $100) goto makecharset::@2
makecharset::@1: scope:[makecharset] from makecharset::@10 makecharset::@11
[59] (byte*) print_char_cursor#18 ← phi( makecharset::@10/(byte*) print_char_cursor#29 makecharset::@11/(const byte*) print_line_cursor#0 )
[59] (word) makecharset::c#2 ← phi( makecharset::@10/(word) makecharset::c#1 makecharset::@11/(word) 0 )
[60] if((word) makecharset::c#2<(word) $100) goto makecharset::@2
to:makecharset::@return
makecharset::@return: scope:[makecharset] from makecharset::@1
[60] return
[61] return
to:@return
makecharset::@2: scope:[makecharset] from makecharset::@1
[61] (byte~) makecharset::$3 ← < (word) makecharset::c#2
[62] (byte) makecharset::s#0 ← *((const to_nomodify byte*) SINTABLE + (byte~) makecharset::$3)
[62] (byte~) makecharset::$3 ← < (word) makecharset::c#2
[63] (byte) makecharset::s#0 ← *((const to_nomodify byte*) SINTABLE + (byte~) makecharset::$3)
to:makecharset::@3
makecharset::@3: scope:[makecharset] from makecharset::@2 makecharset::@7
[63] (byte) makecharset::i#2 ← phi( makecharset::@2/(byte) 0 makecharset::@7/(byte) makecharset::i#1 )
[64] if((byte) makecharset::i#2<(byte) 8) goto makecharset::@5
makecharset::@3: scope:[makecharset] from makecharset::@2 makecharset::@6
[64] (byte) makecharset::i#2 ← phi( makecharset::@2/(byte) 0 makecharset::@6/(byte) makecharset::i#1 )
[65] if((byte) makecharset::i#2<(byte) 8) goto makecharset::@5
to:makecharset::@4
makecharset::@4: scope:[makecharset] from makecharset::@3
[65] (byte~) makecharset::$12 ← (word) makecharset::c#2 & (byte) 7
[66] if((byte~) makecharset::$12!=(byte) 0) goto makecharset::@11
to:makecharset::@10
makecharset::@10: scope:[makecharset] from makecharset::@4
[67] phi()
[68] call print_char
to:makecharset::@11
makecharset::@11: scope:[makecharset] from makecharset::@10 makecharset::@4
[69] (byte*) print_char_cursor#29 ← phi( makecharset::@10/(byte*) print_char_cursor#1 makecharset::@4/(byte*) print_char_cursor#18 )
[70] (word) makecharset::c#1 ← ++ (word) makecharset::c#2
to:makecharset::@1
makecharset::@5: scope:[makecharset] from makecharset::@3 makecharset::@8
[71] (byte) makecharset::b#2 ← phi( makecharset::@3/(byte) 0 makecharset::@8/(byte) makecharset::b#6 )
[71] (byte) makecharset::ii#2 ← phi( makecharset::@3/(byte) 0 makecharset::@8/(byte) makecharset::ii#1 )
[72] if((byte) makecharset::ii#2<(byte) 8) goto makecharset::@6
to:makecharset::@7
makecharset::@7: scope:[makecharset] from makecharset::@5
[73] (word~) makecharset::$10 ← (word) makecharset::c#2 << (byte) 3
[74] (word~) makecharset::$11 ← (word~) makecharset::$10 + (byte) makecharset::i#2
[75] (byte*~) makecharset::$16 ← (const nomodify byte*) CHARSET + (word~) makecharset::$11
[76] *((byte*~) makecharset::$16) ← (byte) makecharset::b#2
[77] (byte) makecharset::i#1 ← ++ (byte) makecharset::i#2
to:makecharset::@3
makecharset::@6: scope:[makecharset] from makecharset::@5
[78] phi()
[79] call sid_rnd
[80] (byte) sid_rnd::return#2 ← (byte) sid_rnd::return#0
to:makecharset::@13
makecharset::@13: scope:[makecharset] from makecharset::@6
[81] (byte~) makecharset::$6 ← (byte) sid_rnd::return#2
[82] (byte~) makecharset::$7 ← (byte~) makecharset::$6 & (byte) $ff
[83] if((byte~) makecharset::$7<=(byte) makecharset::s#0) goto makecharset::@8
[66] (byte~) makecharset::$12 ← (word) makecharset::c#2 & (byte) 7
[67] if((byte~) makecharset::$12!=(byte) 0) goto makecharset::@10
to:makecharset::@9
makecharset::@9: scope:[makecharset] from makecharset::@13
[84] (byte) makecharset::b#1 ← (byte) makecharset::b#2 | *((const to_nomodify byte*) makecharset::bittab + (byte) makecharset::ii#2)
makecharset::@9: scope:[makecharset] from makecharset::@4
[68] phi()
[69] call print_char
to:makecharset::@10
makecharset::@10: scope:[makecharset] from makecharset::@4 makecharset::@9
[70] (byte*) print_char_cursor#29 ← phi( makecharset::@9/(byte*) print_char_cursor#1 makecharset::@4/(byte*) print_char_cursor#18 )
[71] (word) makecharset::c#1 ← ++ (word) makecharset::c#2
to:makecharset::@1
makecharset::@5: scope:[makecharset] from makecharset::@3 makecharset::@7
[72] (byte) makecharset::b#2 ← phi( makecharset::@3/(byte) 0 makecharset::@7/(byte) makecharset::b#6 )
[72] (byte) makecharset::ii#2 ← phi( makecharset::@3/(byte) 0 makecharset::@7/(byte) makecharset::ii#1 )
[73] if((byte) makecharset::ii#2<(byte) 8) goto makecharset::sid_rnd1
to:makecharset::@6
makecharset::@6: scope:[makecharset] from makecharset::@5
[74] (word~) makecharset::$10 ← (word) makecharset::c#2 << (byte) 3
[75] (word~) makecharset::$11 ← (word~) makecharset::$10 + (byte) makecharset::i#2
[76] (byte*~) makecharset::$16 ← (const nomodify byte*) CHARSET + (word~) makecharset::$11
[77] *((byte*~) makecharset::$16) ← (byte) makecharset::b#2
[78] (byte) makecharset::i#1 ← ++ (byte) makecharset::i#2
to:makecharset::@3
makecharset::sid_rnd1: scope:[makecharset] from makecharset::@5
[79] (byte) makecharset::sid_rnd1_return#0 ← *((byte*)(const nomodify struct MOS6581_SID*) SID+(const byte) OFFSET_STRUCT_MOS6581_SID_CH3_OSC)
to:makecharset::@12
makecharset::@12: scope:[makecharset] from makecharset::sid_rnd1
[80] (byte~) makecharset::$7 ← (byte) makecharset::sid_rnd1_return#0 & (byte) $ff
[81] if((byte~) makecharset::$7<=(byte) makecharset::s#0) goto makecharset::@7
to:makecharset::@8
makecharset::@8: scope:[makecharset] from makecharset::@13 makecharset::@9
[85] (byte) makecharset::b#6 ← phi( makecharset::@9/(byte) makecharset::b#1 makecharset::@13/(byte) makecharset::b#2 )
[86] (byte) makecharset::ii#1 ← ++ (byte) makecharset::ii#2
makecharset::@8: scope:[makecharset] from makecharset::@12
[82] (byte) makecharset::b#1 ← (byte) makecharset::b#2 | *((const to_nomodify byte*) makecharset::bittab + (byte) makecharset::ii#2)
to:makecharset::@7
makecharset::@7: scope:[makecharset] from makecharset::@12 makecharset::@8
[83] (byte) makecharset::b#6 ← phi( makecharset::@12/(byte) makecharset::b#2 makecharset::@8/(byte) makecharset::b#1 )
[84] (byte) makecharset::ii#1 ← ++ (byte) makecharset::ii#2
to:makecharset::@5
(byte()) sid_rnd()
sid_rnd: scope:[sid_rnd] from makecharset::@6
[87] (byte) sid_rnd::return#0 ← *((byte*)(const nomodify struct MOS6581_SID*) SID+(const byte) OFFSET_STRUCT_MOS6581_SID_CH3_OSC)
to:sid_rnd::@return
sid_rnd::@return: scope:[sid_rnd] from sid_rnd
[88] return
to:@return
(void()) print_char((byte) print_char::ch)
print_char: scope:[print_char] from makecharset::@10
[89] *((byte*) print_char_cursor#18) ← (const byte) print_char::ch#0
[90] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#18
print_char: scope:[print_char] from makecharset::@9
[85] *((byte*) print_char_cursor#18) ← (const byte) print_char::ch#0
[86] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#18
to:print_char::@return
print_char::@return: scope:[print_char] from print_char
[91] return
[87] return
to:@return
(void()) print_cls()
print_cls: scope:[print_cls] from makecharset::@12
[92] phi()
[93] call memset
print_cls: scope:[print_cls] from makecharset::@11
[88] phi()
[89] call memset
to:print_cls::@return
print_cls::@return: scope:[print_cls] from print_cls
[94] return
[90] return
to:@return
(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num)
memset: scope:[memset] from print_cls
[95] phi()
[91] phi()
to:memset::@1
memset::@1: scope:[memset] from memset memset::@2
[96] (byte*) memset::dst#2 ← phi( memset/(byte*)(const void*) memset::str#0 memset::@2/(byte*) memset::dst#1 )
[97] if((byte*) memset::dst#2!=(const byte*) memset::end#0) goto memset::@2
[92] (byte*) memset::dst#2 ← phi( memset/(byte*)(const void*) memset::str#0 memset::@2/(byte*) memset::dst#1 )
[93] if((byte*) memset::dst#2!=(const byte*) memset::end#0) goto memset::@2
to:memset::@return
memset::@return: scope:[memset] from memset::@1
[98] return
[94] return
to:@return
memset::@2: scope:[memset] from memset::@1
[99] *((byte*) memset::dst#2) ← (const byte) memset::c#0
[100] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2
[95] *((byte*) memset::dst#2) ← (const byte) memset::c#0
[96] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2
to:memset::@1
(void()) sid_rnd_init()
sid_rnd_init: scope:[sid_rnd_init] from makecharset
[101] *((word*)(const nomodify struct MOS6581_SID*) SID+(const byte) OFFSET_STRUCT_MOS6581_SID_CH3_FREQ) ← (word) $ffff
[102] *((byte*)(const nomodify struct MOS6581_SID*) SID+(const byte) OFFSET_STRUCT_MOS6581_SID_CH3_CONTROL) ← (const nomodify byte) SID_CONTROL_NOISE
to:sid_rnd_init::@return
sid_rnd_init::@return: scope:[sid_rnd_init] from sid_rnd_init
[103] return
to:@return

File diff suppressed because it is too large Load Diff

View File

@ -150,13 +150,11 @@
(byte~) makecharset::$12 reg byte a 2002.0
(byte*~) makecharset::$16 zp[2]:15 20002.0
(byte~) makecharset::$3 reg byte x 2002.0
(byte~) makecharset::$6 reg byte a 200002.0
(byte~) makecharset::$7 zp[1]:17 200002.0
(label) makecharset::@1
(label) makecharset::@10
(label) makecharset::@11
(label) makecharset::@12
(label) makecharset::@13
(label) makecharset::@2
(label) makecharset::@3
(label) makecharset::@4
@ -168,21 +166,25 @@
(label) makecharset::@return
(byte) makecharset::b
(byte) makecharset::b#1 reg byte y 200002.0
(byte) makecharset::b#2 reg byte y 28182.181818181816
(byte) makecharset::b#2 reg byte y 38750.5
(byte) makecharset::b#6 reg byte y 150001.5
(const to_nomodify byte*) makecharset::bittab[(number) 8] = { (byte) 1, (byte) 2, (byte) 4, (byte) 8, (byte) $10, (byte) $20, (byte) $40, (byte) $80 }
(word) makecharset::c
(word) makecharset::c#1 c zp[2]:9 2002.0
(word) makecharset::c#2 c zp[2]:9 555.7777777777778
(word) makecharset::c#2 c zp[2]:9 625.25
(byte*) makecharset::charset
(byte) makecharset::i
(byte) makecharset::i#1 i zp[1]:13 20002.0
(byte) makecharset::i#2 i zp[1]:13 2353.176470588235
(byte) makecharset::i#2 i zp[1]:13 2857.4285714285716
(byte) makecharset::ii
(byte) makecharset::ii#1 reg byte x 200002.0
(byte) makecharset::ii#2 reg byte x 40000.4
(byte) makecharset::ii#2 reg byte x 57143.42857142857
(byte) makecharset::s
(byte) makecharset::s#0 s zp[1]:14 5315.894736842105
(byte) makecharset::s#0 s zp[1]:14 6312.625
(label) makecharset::sid_rnd1
(byte) makecharset::sid_rnd1_return
(byte) makecharset::sid_rnd1_return#0 reg byte a 200002.0
(label) makecharset::sid_rnd_init1
(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num)
(label) memset::@1
(label) memset::@2
@ -205,20 +207,13 @@
(const byte) print_char::ch#0 ch = (byte) '.'
(byte*) print_char_cursor
(byte*) print_char_cursor#1 print_char_cursor zp[2]:11 3667.333333333333
(byte*) print_char_cursor#18 print_char_cursor zp[2]:11 846.3076923076923
(byte*) print_char_cursor#18 print_char_cursor zp[2]:11 956.695652173913
(byte*) print_char_cursor#29 print_char_cursor zp[2]:11 1501.5
(void()) print_cls()
(label) print_cls::@return
(byte*) print_line_cursor
(const byte*) print_line_cursor#0 print_line_cursor = (byte*) 1024
(byte*) print_screen
(byte()) sid_rnd()
(label) sid_rnd::@return
(byte) sid_rnd::return
(byte) sid_rnd::return#0 reg byte a 366667.3333333334
(byte) sid_rnd::return#2 reg byte a 200002.0
(void()) sid_rnd_init()
(label) sid_rnd_init::@return
zp[1]:2 [ c1A#10 c1A#14 c1A#4 ]
zp[1]:3 [ c1B#10 c1B#14 c1B#4 ]
@ -241,7 +236,5 @@ reg byte x [ makecharset::$3 ]
zp[1]:14 [ makecharset::s#0 doplasma::c1a#2 doplasma::c1a#0 doplasma::c1a#1 ]
reg byte a [ makecharset::$12 ]
zp[2]:15 [ makecharset::$10 makecharset::$11 makecharset::$16 memset::dst#2 memset::dst#1 ]
reg byte a [ sid_rnd::return#2 ]
reg byte a [ makecharset::$6 ]
reg byte a [ makecharset::sid_rnd1_return#0 ]
zp[1]:17 [ makecharset::$7 doplasma::c1b#2 doplasma::c1b#0 doplasma::c1b#1 ]
reg byte a [ sid_rnd::return#0 ]

View File

@ -260,8 +260,14 @@ make_plasma_charset: {
.label i = 6
.label c = 9
.label __16 = $1e
// sid_rnd_init()
jsr sid_rnd_init
// SID->CH3_FREQ = 0xffff
lda #<$ffff
sta SID+OFFSET_STRUCT_MOS6581_SID_CH3_FREQ
lda #>$ffff
sta SID+OFFSET_STRUCT_MOS6581_SID_CH3_FREQ+1
// SID->CH3_CONTROL = SID_CONTROL_NOISE
lda #SID_CONTROL_NOISE
sta SID+OFFSET_STRUCT_MOS6581_SID_CH3_CONTROL
// print_cls()
jsr print_cls
lda #<print_line_cursor
@ -301,10 +307,10 @@ make_plasma_charset: {
and.z c
// if ((c & 0x07) == 0)
cmp #0
bne __b11
bne __b10
// print_char('.')
jsr print_char
__b11:
__b10:
// for (unsigned int c = 0; c < 0x100; ++c)
inc.z c
bne !+
@ -317,7 +323,7 @@ make_plasma_charset: {
__b5:
// for (char ii = 0; ii < 8; ++ii)
cpx #8
bcc __b6
bcc sid_rnd1
// c*8
lda.z c
asl
@ -351,34 +357,26 @@ make_plasma_charset: {
// for ( char i = 0; i < 8; ++i)
inc.z i
jmp __b3
__b6:
// sid_rnd()
jsr sid_rnd
sid_rnd1:
// return SID->CH3_OSC;
lda SID+OFFSET_STRUCT_MOS6581_SID_CH3_OSC
// sid_rnd() & 0xFF
and #$ff
sta.z __7
// if ((sid_rnd() & 0xFF) > s)
lda.z s
cmp.z __7
bcs __b8
bcs __b7
// b |= bittab[ii]
tya
ora bittab,x
tay
__b8:
__b7:
// for (char ii = 0; ii < 8; ++ii)
inx
jmp __b5
bittab: .byte 1, 2, 4, 8, $10, $20, $40, $80
}
// Get a random number from the SID voice 3,
// Must be initialized with sid_rnd_init()
sid_rnd: {
// return SID->CH3_OSC;
lda SID+OFFSET_STRUCT_MOS6581_SID_CH3_OSC
// }
rts
}
// Print a single char
print_char: {
.const ch = '.'
@ -406,19 +404,6 @@ print_cls: {
// }
rts
}
// Initialize SID voice 3 for random number generation
sid_rnd_init: {
// SID->CH3_FREQ = 0xffff
lda #<$ffff
sta SID+OFFSET_STRUCT_MOS6581_SID_CH3_FREQ
lda #>$ffff
sta SID+OFFSET_STRUCT_MOS6581_SID_CH3_FREQ+1
// SID->CH3_CONTROL = SID_CONTROL_NOISE
lda #SID_CONTROL_NOISE
sta SID+OFFSET_STRUCT_MOS6581_SID_CH3_CONTROL
// }
rts
}
// Populates 1000 bytes (a screen) with values representing the angle to the center.
// Utilizes symmetry around the center
// init_angle_screen(byte* zp(9) screen)

View File

@ -120,437 +120,420 @@ memset::@3: scope:[memset] from memset::@2
(void()) make_plasma_charset((byte*) make_plasma_charset::charset)
make_plasma_charset: scope:[make_plasma_charset] from main::@6
[52] phi()
[53] call sid_rnd_init
to:make_plasma_charset::@12
make_plasma_charset::@12: scope:[make_plasma_charset] from make_plasma_charset
[54] phi()
[55] call print_cls
to:make_plasma_charset::sid_rnd_init1
make_plasma_charset::sid_rnd_init1: scope:[make_plasma_charset] from make_plasma_charset
[53] *((word*)(const nomodify struct MOS6581_SID*) SID+(const byte) OFFSET_STRUCT_MOS6581_SID_CH3_FREQ) ← (word) $ffff
[54] *((byte*)(const nomodify struct MOS6581_SID*) SID+(const byte) OFFSET_STRUCT_MOS6581_SID_CH3_CONTROL) ← (const nomodify byte) SID_CONTROL_NOISE
to:make_plasma_charset::@11
make_plasma_charset::@11: scope:[make_plasma_charset] from make_plasma_charset::sid_rnd_init1
[55] phi()
[56] call print_cls
to:make_plasma_charset::@1
make_plasma_charset::@1: scope:[make_plasma_charset] from make_plasma_charset::@11 make_plasma_charset::@12
[56] (byte*) print_char_cursor#18 ← phi( make_plasma_charset::@11/(byte*) print_char_cursor#30 make_plasma_charset::@12/(const byte*) print_line_cursor#0 )
[56] (word) make_plasma_charset::c#2 ← phi( make_plasma_charset::@11/(word) make_plasma_charset::c#1 make_plasma_charset::@12/(word) 0 )
[57] if((word) make_plasma_charset::c#2<(word) $100) goto make_plasma_charset::@2
make_plasma_charset::@1: scope:[make_plasma_charset] from make_plasma_charset::@10 make_plasma_charset::@11
[57] (byte*) print_char_cursor#18 ← phi( make_plasma_charset::@10/(byte*) print_char_cursor#30 make_plasma_charset::@11/(const byte*) print_line_cursor#0 )
[57] (word) make_plasma_charset::c#2 ← phi( make_plasma_charset::@10/(word) make_plasma_charset::c#1 make_plasma_charset::@11/(word) 0 )
[58] if((word) make_plasma_charset::c#2<(word) $100) goto make_plasma_charset::@2
to:make_plasma_charset::@return
make_plasma_charset::@return: scope:[make_plasma_charset] from make_plasma_charset::@1
[58] return
[59] return
to:@return
make_plasma_charset::@2: scope:[make_plasma_charset] from make_plasma_charset::@1
[59] (byte~) make_plasma_charset::$3 ← < (word) make_plasma_charset::c#2
[60] (byte) make_plasma_charset::s#0 ← *((const to_nomodify byte*) SINTABLE + (byte~) make_plasma_charset::$3)
[60] (byte~) make_plasma_charset::$3 ← < (word) make_plasma_charset::c#2
[61] (byte) make_plasma_charset::s#0 ← *((const to_nomodify byte*) SINTABLE + (byte~) make_plasma_charset::$3)
to:make_plasma_charset::@3
make_plasma_charset::@3: scope:[make_plasma_charset] from make_plasma_charset::@2 make_plasma_charset::@7
[61] (byte) make_plasma_charset::i#2 ← phi( make_plasma_charset::@2/(byte) 0 make_plasma_charset::@7/(byte) make_plasma_charset::i#1 )
[62] if((byte) make_plasma_charset::i#2<(byte) 8) goto make_plasma_charset::@5
make_plasma_charset::@3: scope:[make_plasma_charset] from make_plasma_charset::@2 make_plasma_charset::@6
[62] (byte) make_plasma_charset::i#2 ← phi( make_plasma_charset::@2/(byte) 0 make_plasma_charset::@6/(byte) make_plasma_charset::i#1 )
[63] if((byte) make_plasma_charset::i#2<(byte) 8) goto make_plasma_charset::@5
to:make_plasma_charset::@4
make_plasma_charset::@4: scope:[make_plasma_charset] from make_plasma_charset::@3
[63] (byte~) make_plasma_charset::$12 ← (word) make_plasma_charset::c#2 & (byte) 7
[64] if((byte~) make_plasma_charset::$12!=(byte) 0) goto make_plasma_charset::@11
to:make_plasma_charset::@10
make_plasma_charset::@10: scope:[make_plasma_charset] from make_plasma_charset::@4
[65] phi()
[66] call print_char
to:make_plasma_charset::@11
make_plasma_charset::@11: scope:[make_plasma_charset] from make_plasma_charset::@10 make_plasma_charset::@4
[67] (byte*) print_char_cursor#30 ← phi( make_plasma_charset::@10/(byte*) print_char_cursor#1 make_plasma_charset::@4/(byte*) print_char_cursor#18 )
[68] (word) make_plasma_charset::c#1 ← ++ (word) make_plasma_charset::c#2
to:make_plasma_charset::@1
make_plasma_charset::@5: scope:[make_plasma_charset] from make_plasma_charset::@3 make_plasma_charset::@8
[69] (byte) make_plasma_charset::b#2 ← phi( make_plasma_charset::@3/(byte) 0 make_plasma_charset::@8/(byte) make_plasma_charset::b#6 )
[69] (byte) make_plasma_charset::ii#2 ← phi( make_plasma_charset::@3/(byte) 0 make_plasma_charset::@8/(byte) make_plasma_charset::ii#1 )
[70] if((byte) make_plasma_charset::ii#2<(byte) 8) goto make_plasma_charset::@6
to:make_plasma_charset::@7
make_plasma_charset::@7: scope:[make_plasma_charset] from make_plasma_charset::@5
[71] (word~) make_plasma_charset::$10 ← (word) make_plasma_charset::c#2 << (byte) 3
[72] (word~) make_plasma_charset::$11 ← (word~) make_plasma_charset::$10 + (byte) make_plasma_charset::i#2
[73] (byte*~) make_plasma_charset::$16 ← (const nomodify byte*) CHARSET + (word~) make_plasma_charset::$11
[74] *((byte*~) make_plasma_charset::$16) ← (byte) make_plasma_charset::b#2
[75] (byte) make_plasma_charset::i#1 ← ++ (byte) make_plasma_charset::i#2
to:make_plasma_charset::@3
make_plasma_charset::@6: scope:[make_plasma_charset] from make_plasma_charset::@5
[76] phi()
[77] call sid_rnd
[78] (byte) sid_rnd::return#2 ← (byte) sid_rnd::return#0
to:make_plasma_charset::@13
make_plasma_charset::@13: scope:[make_plasma_charset] from make_plasma_charset::@6
[79] (byte~) make_plasma_charset::$6 ← (byte) sid_rnd::return#2
[80] (byte~) make_plasma_charset::$7 ← (byte~) make_plasma_charset::$6 & (byte) $ff
[81] if((byte~) make_plasma_charset::$7<=(byte) make_plasma_charset::s#0) goto make_plasma_charset::@8
[64] (byte~) make_plasma_charset::$12 ← (word) make_plasma_charset::c#2 & (byte) 7
[65] if((byte~) make_plasma_charset::$12!=(byte) 0) goto make_plasma_charset::@10
to:make_plasma_charset::@9
make_plasma_charset::@9: scope:[make_plasma_charset] from make_plasma_charset::@13
[82] (byte) make_plasma_charset::b#1 ← (byte) make_plasma_charset::b#2 | *((const to_nomodify byte*) make_plasma_charset::bittab + (byte) make_plasma_charset::ii#2)
make_plasma_charset::@9: scope:[make_plasma_charset] from make_plasma_charset::@4
[66] phi()
[67] call print_char
to:make_plasma_charset::@10
make_plasma_charset::@10: scope:[make_plasma_charset] from make_plasma_charset::@4 make_plasma_charset::@9
[68] (byte*) print_char_cursor#30 ← phi( make_plasma_charset::@9/(byte*) print_char_cursor#1 make_plasma_charset::@4/(byte*) print_char_cursor#18 )
[69] (word) make_plasma_charset::c#1 ← ++ (word) make_plasma_charset::c#2
to:make_plasma_charset::@1
make_plasma_charset::@5: scope:[make_plasma_charset] from make_plasma_charset::@3 make_plasma_charset::@7
[70] (byte) make_plasma_charset::b#2 ← phi( make_plasma_charset::@3/(byte) 0 make_plasma_charset::@7/(byte) make_plasma_charset::b#6 )
[70] (byte) make_plasma_charset::ii#2 ← phi( make_plasma_charset::@3/(byte) 0 make_plasma_charset::@7/(byte) make_plasma_charset::ii#1 )
[71] if((byte) make_plasma_charset::ii#2<(byte) 8) goto make_plasma_charset::sid_rnd1
to:make_plasma_charset::@6
make_plasma_charset::@6: scope:[make_plasma_charset] from make_plasma_charset::@5
[72] (word~) make_plasma_charset::$10 ← (word) make_plasma_charset::c#2 << (byte) 3
[73] (word~) make_plasma_charset::$11 ← (word~) make_plasma_charset::$10 + (byte) make_plasma_charset::i#2
[74] (byte*~) make_plasma_charset::$16 ← (const nomodify byte*) CHARSET + (word~) make_plasma_charset::$11
[75] *((byte*~) make_plasma_charset::$16) ← (byte) make_plasma_charset::b#2
[76] (byte) make_plasma_charset::i#1 ← ++ (byte) make_plasma_charset::i#2
to:make_plasma_charset::@3
make_plasma_charset::sid_rnd1: scope:[make_plasma_charset] from make_plasma_charset::@5
[77] (byte) make_plasma_charset::sid_rnd1_return#0 ← *((byte*)(const nomodify struct MOS6581_SID*) SID+(const byte) OFFSET_STRUCT_MOS6581_SID_CH3_OSC)
to:make_plasma_charset::@12
make_plasma_charset::@12: scope:[make_plasma_charset] from make_plasma_charset::sid_rnd1
[78] (byte~) make_plasma_charset::$7 ← (byte) make_plasma_charset::sid_rnd1_return#0 & (byte) $ff
[79] if((byte~) make_plasma_charset::$7<=(byte) make_plasma_charset::s#0) goto make_plasma_charset::@7
to:make_plasma_charset::@8
make_plasma_charset::@8: scope:[make_plasma_charset] from make_plasma_charset::@13 make_plasma_charset::@9
[83] (byte) make_plasma_charset::b#6 ← phi( make_plasma_charset::@9/(byte) make_plasma_charset::b#1 make_plasma_charset::@13/(byte) make_plasma_charset::b#2 )
[84] (byte) make_plasma_charset::ii#1 ← ++ (byte) make_plasma_charset::ii#2
make_plasma_charset::@8: scope:[make_plasma_charset] from make_plasma_charset::@12
[80] (byte) make_plasma_charset::b#1 ← (byte) make_plasma_charset::b#2 | *((const to_nomodify byte*) make_plasma_charset::bittab + (byte) make_plasma_charset::ii#2)
to:make_plasma_charset::@7
make_plasma_charset::@7: scope:[make_plasma_charset] from make_plasma_charset::@12 make_plasma_charset::@8
[81] (byte) make_plasma_charset::b#6 ← phi( make_plasma_charset::@12/(byte) make_plasma_charset::b#2 make_plasma_charset::@8/(byte) make_plasma_charset::b#1 )
[82] (byte) make_plasma_charset::ii#1 ← ++ (byte) make_plasma_charset::ii#2
to:make_plasma_charset::@5
(byte()) sid_rnd()
sid_rnd: scope:[sid_rnd] from make_plasma_charset::@6
[85] (byte) sid_rnd::return#0 ← *((byte*)(const nomodify struct MOS6581_SID*) SID+(const byte) OFFSET_STRUCT_MOS6581_SID_CH3_OSC)
to:sid_rnd::@return
sid_rnd::@return: scope:[sid_rnd] from sid_rnd
[86] return
to:@return
(void()) print_char((byte) print_char::ch)
print_char: scope:[print_char] from make_plasma_charset::@10
[87] *((byte*) print_char_cursor#18) ← (const byte) print_char::ch#0
[88] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#18
print_char: scope:[print_char] from make_plasma_charset::@9
[83] *((byte*) print_char_cursor#18) ← (const byte) print_char::ch#0
[84] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#18
to:print_char::@return
print_char::@return: scope:[print_char] from print_char
[89] return
[85] return
to:@return
(void()) print_cls()
print_cls: scope:[print_cls] from make_plasma_charset::@12
[90] phi()
[91] call memset
print_cls: scope:[print_cls] from make_plasma_charset::@11
[86] phi()
[87] call memset
to:print_cls::@return
print_cls::@return: scope:[print_cls] from print_cls
[92] return
to:@return
(void()) sid_rnd_init()
sid_rnd_init: scope:[sid_rnd_init] from make_plasma_charset
[93] *((word*)(const nomodify struct MOS6581_SID*) SID+(const byte) OFFSET_STRUCT_MOS6581_SID_CH3_FREQ) ← (word) $ffff
[94] *((byte*)(const nomodify struct MOS6581_SID*) SID+(const byte) OFFSET_STRUCT_MOS6581_SID_CH3_CONTROL) ← (const nomodify byte) SID_CONTROL_NOISE
to:sid_rnd_init::@return
sid_rnd_init::@return: scope:[sid_rnd_init] from sid_rnd_init
[95] return
[88] return
to:@return
(void()) init_angle_screen((byte*) init_angle_screen::screen)
init_angle_screen: scope:[init_angle_screen] from main::@5
[96] (byte*) init_angle_screen::screen_topline#0 ← (byte*) init_angle_screen::screen#0 + (word)(number) $28*(number) $c
[97] (byte*) init_angle_screen::screen_bottomline#0 ← (byte*) init_angle_screen::screen#0 + (word)(number) $28*(number) $c
[89] (byte*) init_angle_screen::screen_topline#0 ← (byte*) init_angle_screen::screen#0 + (word)(number) $28*(number) $c
[90] (byte*) init_angle_screen::screen_bottomline#0 ← (byte*) init_angle_screen::screen#0 + (word)(number) $28*(number) $c
to:init_angle_screen::@1
init_angle_screen::@1: scope:[init_angle_screen] from init_angle_screen init_angle_screen::@4
[98] (byte*) init_angle_screen::screen_bottomline#6 ← phi( init_angle_screen/(byte*) init_angle_screen::screen_bottomline#0 init_angle_screen::@4/(byte*) init_angle_screen::screen_bottomline#1 )
[98] (byte*) init_angle_screen::screen_topline#6 ← phi( init_angle_screen/(byte*) init_angle_screen::screen_topline#0 init_angle_screen::@4/(byte*) init_angle_screen::screen_topline#1 )
[98] (byte) init_angle_screen::y#5 ← phi( init_angle_screen/(byte) 0 init_angle_screen::@4/(byte) init_angle_screen::y#1 )
[91] (byte*) init_angle_screen::screen_bottomline#6 ← phi( init_angle_screen/(byte*) init_angle_screen::screen_bottomline#0 init_angle_screen::@4/(byte*) init_angle_screen::screen_bottomline#1 )
[91] (byte*) init_angle_screen::screen_topline#6 ← phi( init_angle_screen/(byte*) init_angle_screen::screen_topline#0 init_angle_screen::@4/(byte*) init_angle_screen::screen_topline#1 )
[91] (byte) init_angle_screen::y#5 ← phi( init_angle_screen/(byte) 0 init_angle_screen::@4/(byte) init_angle_screen::y#1 )
to:init_angle_screen::@2
init_angle_screen::@2: scope:[init_angle_screen] from init_angle_screen::@1 init_angle_screen::@5
[99] (byte) init_angle_screen::xb#2 ← phi( init_angle_screen::@1/(byte) $27 init_angle_screen::@5/(byte) init_angle_screen::xb#1 )
[99] (byte) init_angle_screen::x#2 ← phi( init_angle_screen::@1/(byte) 0 init_angle_screen::@5/(byte) init_angle_screen::x#1 )
[100] if((byte) init_angle_screen::x#2<(byte) $13+(byte) 1) goto init_angle_screen::@3
[92] (byte) init_angle_screen::xb#2 ← phi( init_angle_screen::@1/(byte) $27 init_angle_screen::@5/(byte) init_angle_screen::xb#1 )
[92] (byte) init_angle_screen::x#2 ← phi( init_angle_screen::@1/(byte) 0 init_angle_screen::@5/(byte) init_angle_screen::x#1 )
[93] if((byte) init_angle_screen::x#2<(byte) $13+(byte) 1) goto init_angle_screen::@3
to:init_angle_screen::@4
init_angle_screen::@4: scope:[init_angle_screen] from init_angle_screen::@2
[101] (byte*) init_angle_screen::screen_topline#1 ← (byte*) init_angle_screen::screen_topline#6 - (byte) $28
[102] (byte*) init_angle_screen::screen_bottomline#1 ← (byte*) init_angle_screen::screen_bottomline#6 + (byte) $28
[103] (byte) init_angle_screen::y#1 ← ++ (byte) init_angle_screen::y#5
[104] if((byte) init_angle_screen::y#1!=(byte) $d) goto init_angle_screen::@1
[94] (byte*) init_angle_screen::screen_topline#1 ← (byte*) init_angle_screen::screen_topline#6 - (byte) $28
[95] (byte*) init_angle_screen::screen_bottomline#1 ← (byte*) init_angle_screen::screen_bottomline#6 + (byte) $28
[96] (byte) init_angle_screen::y#1 ← ++ (byte) init_angle_screen::y#5
[97] if((byte) init_angle_screen::y#1!=(byte) $d) goto init_angle_screen::@1
to:init_angle_screen::@return
init_angle_screen::@return: scope:[init_angle_screen] from init_angle_screen::@4
[105] return
[98] return
to:@return
init_angle_screen::@3: scope:[init_angle_screen] from init_angle_screen::@2
[106] (byte~) init_angle_screen::$3 ← (byte) init_angle_screen::x#2 << (byte) 1
[107] (byte~) init_angle_screen::$4 ← (byte) $27 - (byte~) init_angle_screen::$3
[108] (word) init_angle_screen::xw#0 ← (byte~) init_angle_screen::$4 w= (byte) 0
[109] (byte~) init_angle_screen::$5 ← (byte) init_angle_screen::y#5 << (byte) 1
[110] (word) init_angle_screen::yw#0 ← (byte~) init_angle_screen::$5 w= (byte) 0
[111] (signed word) atan2_16::x#0 ← (signed word)(word) init_angle_screen::xw#0
[112] (signed word) atan2_16::y#0 ← (signed word)(word) init_angle_screen::yw#0
[113] call atan2_16
[114] (word) atan2_16::return#2 ← (word) atan2_16::return#0
[99] (byte~) init_angle_screen::$3 ← (byte) init_angle_screen::x#2 << (byte) 1
[100] (byte~) init_angle_screen::$4 ← (byte) $27 - (byte~) init_angle_screen::$3
[101] (word) init_angle_screen::xw#0 ← (byte~) init_angle_screen::$4 w= (byte) 0
[102] (byte~) init_angle_screen::$5 ← (byte) init_angle_screen::y#5 << (byte) 1
[103] (word) init_angle_screen::yw#0 ← (byte~) init_angle_screen::$5 w= (byte) 0
[104] (signed word) atan2_16::x#0 ← (signed word)(word) init_angle_screen::xw#0
[105] (signed word) atan2_16::y#0 ← (signed word)(word) init_angle_screen::yw#0
[106] call atan2_16
[107] (word) atan2_16::return#2 ← (word) atan2_16::return#0
to:init_angle_screen::@5
init_angle_screen::@5: scope:[init_angle_screen] from init_angle_screen::@3
[115] (word) init_angle_screen::angle_w#0 ← (word) atan2_16::return#2
[116] (word~) init_angle_screen::$7 ← (word) init_angle_screen::angle_w#0 + (byte) $80
[117] (byte) init_angle_screen::ang_w#0 ← > (word~) init_angle_screen::$7
[118] *((byte*) init_angle_screen::screen_bottomline#6 + (byte) init_angle_screen::xb#2) ← (byte) init_angle_screen::ang_w#0
[119] (byte~) init_angle_screen::$9 ← - (byte) init_angle_screen::ang_w#0
[120] *((byte*) init_angle_screen::screen_topline#6 + (byte) init_angle_screen::xb#2) ← (byte~) init_angle_screen::$9
[121] (byte~) init_angle_screen::$10 ← (byte) $80 + (byte) init_angle_screen::ang_w#0
[122] *((byte*) init_angle_screen::screen_topline#6 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$10
[123] (byte~) init_angle_screen::$11 ← (byte) $80 - (byte) init_angle_screen::ang_w#0
[124] *((byte*) init_angle_screen::screen_bottomline#6 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$11
[125] (byte) init_angle_screen::x#1 ← ++ (byte) init_angle_screen::x#2
[126] (byte) init_angle_screen::xb#1 ← -- (byte) init_angle_screen::xb#2
[108] (word) init_angle_screen::angle_w#0 ← (word) atan2_16::return#2
[109] (word~) init_angle_screen::$7 ← (word) init_angle_screen::angle_w#0 + (byte) $80
[110] (byte) init_angle_screen::ang_w#0 ← > (word~) init_angle_screen::$7
[111] *((byte*) init_angle_screen::screen_bottomline#6 + (byte) init_angle_screen::xb#2) ← (byte) init_angle_screen::ang_w#0
[112] (byte~) init_angle_screen::$9 ← - (byte) init_angle_screen::ang_w#0
[113] *((byte*) init_angle_screen::screen_topline#6 + (byte) init_angle_screen::xb#2) ← (byte~) init_angle_screen::$9
[114] (byte~) init_angle_screen::$10 ← (byte) $80 + (byte) init_angle_screen::ang_w#0
[115] *((byte*) init_angle_screen::screen_topline#6 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$10
[116] (byte~) init_angle_screen::$11 ← (byte) $80 - (byte) init_angle_screen::ang_w#0
[117] *((byte*) init_angle_screen::screen_bottomline#6 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$11
[118] (byte) init_angle_screen::x#1 ← ++ (byte) init_angle_screen::x#2
[119] (byte) init_angle_screen::xb#1 ← -- (byte) init_angle_screen::xb#2
to:init_angle_screen::@2
(word()) atan2_16((signed word) atan2_16::x , (signed word) atan2_16::y)
atan2_16: scope:[atan2_16] from init_angle_screen::@3
[127] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1
[120] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1
to:atan2_16::@2
atan2_16::@2: scope:[atan2_16] from atan2_16
[128] (signed word~) atan2_16::$2 ← - (signed word) atan2_16::y#0
[121] (signed word~) atan2_16::$2 ← - (signed word) atan2_16::y#0
to:atan2_16::@3
atan2_16::@3: scope:[atan2_16] from atan2_16::@1 atan2_16::@2
[129] (signed word) atan2_16::yi#0 ← phi( atan2_16::@1/(signed word) atan2_16::yi#16 atan2_16::@2/(signed word~) atan2_16::$2 )
[130] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4
[122] (signed word) atan2_16::yi#0 ← phi( atan2_16::@1/(signed word) atan2_16::yi#16 atan2_16::@2/(signed word~) atan2_16::$2 )
[123] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4
to:atan2_16::@5
atan2_16::@5: scope:[atan2_16] from atan2_16::@3
[131] (signed word~) atan2_16::$7 ← - (signed word) atan2_16::x#0
[124] (signed word~) atan2_16::$7 ← - (signed word) atan2_16::x#0
to:atan2_16::@6
atan2_16::@6: scope:[atan2_16] from atan2_16::@4 atan2_16::@5
[132] (signed word) atan2_16::xi#0 ← phi( atan2_16::@4/(signed word) atan2_16::xi#13 atan2_16::@5/(signed word~) atan2_16::$7 )
[125] (signed word) atan2_16::xi#0 ← phi( atan2_16::@4/(signed word) atan2_16::xi#13 atan2_16::@5/(signed word~) atan2_16::$7 )
to:atan2_16::@10
atan2_16::@10: scope:[atan2_16] from atan2_16::@19 atan2_16::@6
[133] (word) atan2_16::angle#12 ← phi( atan2_16::@19/(word) atan2_16::angle#13 atan2_16::@6/(word) 0 )
[133] (byte) atan2_16::i#2 ← phi( atan2_16::@19/(byte) atan2_16::i#1 atan2_16::@6/(byte) 0 )
[133] (signed word) atan2_16::xi#3 ← phi( atan2_16::@19/(signed word) atan2_16::xi#8 atan2_16::@6/(signed word) atan2_16::xi#0 )
[133] (signed word) atan2_16::yi#3 ← phi( atan2_16::@19/(signed word) atan2_16::yi#8 atan2_16::@6/(signed word) atan2_16::yi#0 )
[134] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@11
[126] (word) atan2_16::angle#12 ← phi( atan2_16::@19/(word) atan2_16::angle#13 atan2_16::@6/(word) 0 )
[126] (byte) atan2_16::i#2 ← phi( atan2_16::@19/(byte) atan2_16::i#1 atan2_16::@6/(byte) 0 )
[126] (signed word) atan2_16::xi#3 ← phi( atan2_16::@19/(signed word) atan2_16::xi#8 atan2_16::@6/(signed word) atan2_16::xi#0 )
[126] (signed word) atan2_16::yi#3 ← phi( atan2_16::@19/(signed word) atan2_16::yi#8 atan2_16::@6/(signed word) atan2_16::yi#0 )
[127] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@11
to:atan2_16::@12
atan2_16::@12: scope:[atan2_16] from atan2_16::@10 atan2_16::@19
[135] (word) atan2_16::angle#6 ← phi( atan2_16::@10/(word) atan2_16::angle#12 atan2_16::@19/(word) atan2_16::angle#13 )
[136] (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 >> (byte) 1
[137] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7
[128] (word) atan2_16::angle#6 ← phi( atan2_16::@10/(word) atan2_16::angle#12 atan2_16::@19/(word) atan2_16::angle#13 )
[129] (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 >> (byte) 1
[130] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7
to:atan2_16::@21
atan2_16::@21: scope:[atan2_16] from atan2_16::@12
[138] (word) atan2_16::angle#4 ← (word) $8000 - (word) atan2_16::angle#1
[131] (word) atan2_16::angle#4 ← (word) $8000 - (word) atan2_16::angle#1
to:atan2_16::@7
atan2_16::@7: scope:[atan2_16] from atan2_16::@12 atan2_16::@21
[139] (word) atan2_16::angle#11 ← phi( atan2_16::@12/(word) atan2_16::angle#1 atan2_16::@21/(word) atan2_16::angle#4 )
[140] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8
[132] (word) atan2_16::angle#11 ← phi( atan2_16::@12/(word) atan2_16::angle#1 atan2_16::@21/(word) atan2_16::angle#4 )
[133] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8
to:atan2_16::@9
atan2_16::@9: scope:[atan2_16] from atan2_16::@7
[141] (word) atan2_16::angle#5 ← - (word) atan2_16::angle#11
[134] (word) atan2_16::angle#5 ← - (word) atan2_16::angle#11
to:atan2_16::@8
atan2_16::@8: scope:[atan2_16] from atan2_16::@7 atan2_16::@9
[142] (word) atan2_16::return#0 ← phi( atan2_16::@7/(word) atan2_16::angle#11 atan2_16::@9/(word) atan2_16::angle#5 )
[135] (word) atan2_16::return#0 ← phi( atan2_16::@7/(word) atan2_16::angle#11 atan2_16::@9/(word) atan2_16::angle#5 )
to:atan2_16::@return
atan2_16::@return: scope:[atan2_16] from atan2_16::@8
[143] return
[136] return
to:@return
atan2_16::@11: scope:[atan2_16] from atan2_16::@10
[144] (byte) atan2_16::shift#5 ← (byte) atan2_16::i#2
[145] (signed word) atan2_16::xd#10 ← (signed word) atan2_16::xi#3
[146] (signed word) atan2_16::yd#10 ← (signed word) atan2_16::yi#3
[137] (byte) atan2_16::shift#5 ← (byte) atan2_16::i#2
[138] (signed word) atan2_16::xd#10 ← (signed word) atan2_16::xi#3
[139] (signed word) atan2_16::yd#10 ← (signed word) atan2_16::yi#3
to:atan2_16::@13
atan2_16::@13: scope:[atan2_16] from atan2_16::@11 atan2_16::@14
[147] (signed word) atan2_16::yd#3 ← phi( atan2_16::@11/(signed word) atan2_16::yd#10 atan2_16::@14/(signed word) atan2_16::yd#1 )
[147] (signed word) atan2_16::xd#3 ← phi( atan2_16::@11/(signed word) atan2_16::xd#10 atan2_16::@14/(signed word) atan2_16::xd#1 )
[147] (byte) atan2_16::shift#2 ← phi( atan2_16::@11/(byte) atan2_16::shift#5 atan2_16::@14/(byte) atan2_16::shift#1 )
[148] if((byte) atan2_16::shift#2>=(byte) 2) goto atan2_16::@14
[140] (signed word) atan2_16::yd#3 ← phi( atan2_16::@11/(signed word) atan2_16::yd#10 atan2_16::@14/(signed word) atan2_16::yd#1 )
[140] (signed word) atan2_16::xd#3 ← phi( atan2_16::@11/(signed word) atan2_16::xd#10 atan2_16::@14/(signed word) atan2_16::xd#1 )
[140] (byte) atan2_16::shift#2 ← phi( atan2_16::@11/(byte) atan2_16::shift#5 atan2_16::@14/(byte) atan2_16::shift#1 )
[141] if((byte) atan2_16::shift#2>=(byte) 2) goto atan2_16::@14
to:atan2_16::@15
atan2_16::@15: scope:[atan2_16] from atan2_16::@13
[149] if((byte) 0==(byte) atan2_16::shift#2) goto atan2_16::@17
[142] if((byte) 0==(byte) atan2_16::shift#2) goto atan2_16::@17
to:atan2_16::@16
atan2_16::@16: scope:[atan2_16] from atan2_16::@15
[150] (signed word) atan2_16::xd#2 ← (signed word) atan2_16::xd#3 >> (signed byte) 1
[151] (signed word) atan2_16::yd#2 ← (signed word) atan2_16::yd#3 >> (signed byte) 1
[143] (signed word) atan2_16::xd#2 ← (signed word) atan2_16::xd#3 >> (signed byte) 1
[144] (signed word) atan2_16::yd#2 ← (signed word) atan2_16::yd#3 >> (signed byte) 1
to:atan2_16::@17
atan2_16::@17: scope:[atan2_16] from atan2_16::@15 atan2_16::@16
[152] (signed word) atan2_16::xd#5 ← phi( atan2_16::@15/(signed word) atan2_16::xd#3 atan2_16::@16/(signed word) atan2_16::xd#2 )
[152] (signed word) atan2_16::yd#5 ← phi( atan2_16::@15/(signed word) atan2_16::yd#3 atan2_16::@16/(signed word) atan2_16::yd#2 )
[153] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@18
[145] (signed word) atan2_16::xd#5 ← phi( atan2_16::@15/(signed word) atan2_16::xd#3 atan2_16::@16/(signed word) atan2_16::xd#2 )
[145] (signed word) atan2_16::yd#5 ← phi( atan2_16::@15/(signed word) atan2_16::yd#3 atan2_16::@16/(signed word) atan2_16::yd#2 )
[146] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@18
to:atan2_16::@20
atan2_16::@20: scope:[atan2_16] from atan2_16::@17
[154] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#5
[155] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#5
[156] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 << (byte) 1
[157] (word) atan2_16::angle#3 ← (word) atan2_16::angle#12 - *((const word*) CORDIC_ATAN2_ANGLES_16 + (byte~) atan2_16::$23)
[147] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#5
[148] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#5
[149] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 << (byte) 1
[150] (word) atan2_16::angle#3 ← (word) atan2_16::angle#12 - *((const word*) CORDIC_ATAN2_ANGLES_16 + (byte~) atan2_16::$23)
to:atan2_16::@19
atan2_16::@19: scope:[atan2_16] from atan2_16::@18 atan2_16::@20
[158] (signed word) atan2_16::xi#8 ← phi( atan2_16::@18/(signed word) atan2_16::xi#1 atan2_16::@20/(signed word) atan2_16::xi#2 )
[158] (word) atan2_16::angle#13 ← phi( atan2_16::@18/(word) atan2_16::angle#2 atan2_16::@20/(word) atan2_16::angle#3 )
[158] (signed word) atan2_16::yi#8 ← phi( atan2_16::@18/(signed word) atan2_16::yi#1 atan2_16::@20/(signed word) atan2_16::yi#2 )
[159] (byte) atan2_16::i#1 ← ++ (byte) atan2_16::i#2
[160] if((byte) atan2_16::i#1==(const nomodify byte) CORDIC_ITERATIONS_16-(byte) 1+(byte) 1) goto atan2_16::@12
[151] (signed word) atan2_16::xi#8 ← phi( atan2_16::@18/(signed word) atan2_16::xi#1 atan2_16::@20/(signed word) atan2_16::xi#2 )
[151] (word) atan2_16::angle#13 ← phi( atan2_16::@18/(word) atan2_16::angle#2 atan2_16::@20/(word) atan2_16::angle#3 )
[151] (signed word) atan2_16::yi#8 ← phi( atan2_16::@18/(signed word) atan2_16::yi#1 atan2_16::@20/(signed word) atan2_16::yi#2 )
[152] (byte) atan2_16::i#1 ← ++ (byte) atan2_16::i#2
[153] if((byte) atan2_16::i#1==(const nomodify byte) CORDIC_ITERATIONS_16-(byte) 1+(byte) 1) goto atan2_16::@12
to:atan2_16::@10
atan2_16::@18: scope:[atan2_16] from atan2_16::@17
[161] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#5
[162] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#5
[163] (byte~) atan2_16::$22 ← (byte) atan2_16::i#2 << (byte) 1
[164] (word) atan2_16::angle#2 ← (word) atan2_16::angle#12 + *((const word*) CORDIC_ATAN2_ANGLES_16 + (byte~) atan2_16::$22)
[154] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#5
[155] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#5
[156] (byte~) atan2_16::$22 ← (byte) atan2_16::i#2 << (byte) 1
[157] (word) atan2_16::angle#2 ← (word) atan2_16::angle#12 + *((const word*) CORDIC_ATAN2_ANGLES_16 + (byte~) atan2_16::$22)
to:atan2_16::@19
atan2_16::@14: scope:[atan2_16] from atan2_16::@13
[165] (signed word) atan2_16::xd#1 ← (signed word) atan2_16::xd#3 >> (signed byte) 2
[166] (signed word) atan2_16::yd#1 ← (signed word) atan2_16::yd#3 >> (signed byte) 2
[167] (byte) atan2_16::shift#1 ← (byte) atan2_16::shift#2 - (byte) 2
[158] (signed word) atan2_16::xd#1 ← (signed word) atan2_16::xd#3 >> (signed byte) 2
[159] (signed word) atan2_16::yd#1 ← (signed word) atan2_16::yd#3 >> (signed byte) 2
[160] (byte) atan2_16::shift#1 ← (byte) atan2_16::shift#2 - (byte) 2
to:atan2_16::@13
atan2_16::@4: scope:[atan2_16] from atan2_16::@3
[168] (signed word) atan2_16::xi#13 ← (signed word) atan2_16::x#0
[161] (signed word) atan2_16::xi#13 ← (signed word) atan2_16::x#0
to:atan2_16::@6
atan2_16::@1: scope:[atan2_16] from atan2_16
[169] (signed word) atan2_16::yi#16 ← (signed word) atan2_16::y#0
[162] (signed word) atan2_16::yi#16 ← (signed word) atan2_16::y#0
to:atan2_16::@3
(void()) init_dist_screen((byte*) init_dist_screen::screen)
init_dist_screen: scope:[init_dist_screen] from main
[170] phi()
[171] call init_squares
[163] phi()
[164] call init_squares
to:init_dist_screen::@11
init_dist_screen::@11: scope:[init_dist_screen] from init_dist_screen
[172] (byte*) init_dist_screen::screen_bottomline#0 ← (byte*) init_dist_screen::screen#0 + (word)(number) $28*(number) $18
[165] (byte*) init_dist_screen::screen_bottomline#0 ← (byte*) init_dist_screen::screen#0 + (word)(number) $28*(number) $18
to:init_dist_screen::@1
init_dist_screen::@1: scope:[init_dist_screen] from init_dist_screen::@11 init_dist_screen::@7
[173] (byte*) init_dist_screen::screen_bottomline#11 ← phi( init_dist_screen::@11/(byte*) init_dist_screen::screen_bottomline#0 init_dist_screen::@7/(byte*) init_dist_screen::screen_bottomline#1 )
[173] (byte*) init_dist_screen::screen_topline#11 ← phi( init_dist_screen::@11/(byte*) init_dist_screen::screen#0 init_dist_screen::@7/(byte*) init_dist_screen::screen_topline#1 )
[173] (byte) init_dist_screen::y#10 ← phi( init_dist_screen::@11/(byte) 0 init_dist_screen::@7/(byte) init_dist_screen::y#1 )
[174] (byte) init_dist_screen::y2#0 ← (byte) init_dist_screen::y#10 << (byte) 1
[175] if((byte) init_dist_screen::y2#0>=(byte) $18) goto init_dist_screen::@2
[166] (byte*) init_dist_screen::screen_bottomline#11 ← phi( init_dist_screen::@11/(byte*) init_dist_screen::screen_bottomline#0 init_dist_screen::@7/(byte*) init_dist_screen::screen_bottomline#1 )
[166] (byte*) init_dist_screen::screen_topline#11 ← phi( init_dist_screen::@11/(byte*) init_dist_screen::screen#0 init_dist_screen::@7/(byte*) init_dist_screen::screen_topline#1 )
[166] (byte) init_dist_screen::y#10 ← phi( init_dist_screen::@11/(byte) 0 init_dist_screen::@7/(byte) init_dist_screen::y#1 )
[167] (byte) init_dist_screen::y2#0 ← (byte) init_dist_screen::y#10 << (byte) 1
[168] if((byte) init_dist_screen::y2#0>=(byte) $18) goto init_dist_screen::@2
to:init_dist_screen::@3
init_dist_screen::@3: scope:[init_dist_screen] from init_dist_screen::@1
[176] (byte~) init_dist_screen::$5 ← (byte) $18 - (byte) init_dist_screen::y2#0
[169] (byte~) init_dist_screen::$5 ← (byte) $18 - (byte) init_dist_screen::y2#0
to:init_dist_screen::@4
init_dist_screen::@4: scope:[init_dist_screen] from init_dist_screen::@2 init_dist_screen::@3
[177] (byte) init_dist_screen::yd#0 ← phi( init_dist_screen::@2/(byte~) init_dist_screen::$7 init_dist_screen::@3/(byte~) init_dist_screen::$5 )
[178] (byte) sqr::val#0 ← (byte) init_dist_screen::yd#0
[179] call sqr
[180] (word) sqr::return#2 ← (word) sqr::return#0
[170] (byte) init_dist_screen::yd#0 ← phi( init_dist_screen::@2/(byte~) init_dist_screen::$7 init_dist_screen::@3/(byte~) init_dist_screen::$5 )
[171] (byte) sqr::val#0 ← (byte) init_dist_screen::yd#0
[172] call sqr
[173] (word) sqr::return#2 ← (word) sqr::return#0
to:init_dist_screen::@12
init_dist_screen::@12: scope:[init_dist_screen] from init_dist_screen::@4
[181] (word) init_dist_screen::yds#0 ← (word) sqr::return#2
[174] (word) init_dist_screen::yds#0 ← (word) sqr::return#2
to:init_dist_screen::@5
init_dist_screen::@5: scope:[init_dist_screen] from init_dist_screen::@12 init_dist_screen::@14
[182] (byte) init_dist_screen::xb#2 ← phi( init_dist_screen::@12/(byte) $27 init_dist_screen::@14/(byte) init_dist_screen::xb#1 )
[182] (byte) init_dist_screen::x#2 ← phi( init_dist_screen::@12/(byte) 0 init_dist_screen::@14/(byte) init_dist_screen::x#1 )
[183] if((byte) init_dist_screen::x#2<(byte) $13+(byte) 1) goto init_dist_screen::@6
[175] (byte) init_dist_screen::xb#2 ← phi( init_dist_screen::@12/(byte) $27 init_dist_screen::@14/(byte) init_dist_screen::xb#1 )
[175] (byte) init_dist_screen::x#2 ← phi( init_dist_screen::@12/(byte) 0 init_dist_screen::@14/(byte) init_dist_screen::x#1 )
[176] if((byte) init_dist_screen::x#2<(byte) $13+(byte) 1) goto init_dist_screen::@6
to:init_dist_screen::@7
init_dist_screen::@7: scope:[init_dist_screen] from init_dist_screen::@5
[184] (byte*) init_dist_screen::screen_topline#1 ← (byte*) init_dist_screen::screen_topline#11 + (byte) $28
[185] (byte*) init_dist_screen::screen_bottomline#1 ← (byte*) init_dist_screen::screen_bottomline#11 - (byte) $28
[186] (byte) init_dist_screen::y#1 ← ++ (byte) init_dist_screen::y#10
[187] if((byte) init_dist_screen::y#1!=(byte) $d) goto init_dist_screen::@1
[177] (byte*) init_dist_screen::screen_topline#1 ← (byte*) init_dist_screen::screen_topline#11 + (byte) $28
[178] (byte*) init_dist_screen::screen_bottomline#1 ← (byte*) init_dist_screen::screen_bottomline#11 - (byte) $28
[179] (byte) init_dist_screen::y#1 ← ++ (byte) init_dist_screen::y#10
[180] if((byte) init_dist_screen::y#1!=(byte) $d) goto init_dist_screen::@1
to:init_dist_screen::@return
init_dist_screen::@return: scope:[init_dist_screen] from init_dist_screen::@7
[188] return
[181] return
to:@return
init_dist_screen::@6: scope:[init_dist_screen] from init_dist_screen::@5
[189] (byte) init_dist_screen::x2#0 ← (byte) init_dist_screen::x#2 << (byte) 1
[190] if((byte) init_dist_screen::x2#0>=(byte) $27) goto init_dist_screen::@8
[182] (byte) init_dist_screen::x2#0 ← (byte) init_dist_screen::x#2 << (byte) 1
[183] if((byte) init_dist_screen::x2#0>=(byte) $27) goto init_dist_screen::@8
to:init_dist_screen::@9
init_dist_screen::@9: scope:[init_dist_screen] from init_dist_screen::@6
[191] (byte~) init_dist_screen::$14 ← (byte) $27 - (byte) init_dist_screen::x2#0
[184] (byte~) init_dist_screen::$14 ← (byte) $27 - (byte) init_dist_screen::x2#0
to:init_dist_screen::@10
init_dist_screen::@10: scope:[init_dist_screen] from init_dist_screen::@8 init_dist_screen::@9
[192] (byte) init_dist_screen::xd#0 ← phi( init_dist_screen::@8/(byte~) init_dist_screen::$16 init_dist_screen::@9/(byte~) init_dist_screen::$14 )
[193] (byte) sqr::val#1 ← (byte) init_dist_screen::xd#0
[194] call sqr
[195] (word) sqr::return#3 ← (word) sqr::return#0
[185] (byte) init_dist_screen::xd#0 ← phi( init_dist_screen::@8/(byte~) init_dist_screen::$16 init_dist_screen::@9/(byte~) init_dist_screen::$14 )
[186] (byte) sqr::val#1 ← (byte) init_dist_screen::xd#0
[187] call sqr
[188] (word) sqr::return#3 ← (word) sqr::return#0
to:init_dist_screen::@13
init_dist_screen::@13: scope:[init_dist_screen] from init_dist_screen::@10
[196] (word) init_dist_screen::xds#0 ← (word) sqr::return#3
[197] (word) init_dist_screen::ds#0 ← (word) init_dist_screen::xds#0 + (word) init_dist_screen::yds#0
[198] (word) sqrt::val#0 ← (word) init_dist_screen::ds#0
[199] call sqrt
[200] (byte) sqrt::return#2 ← (byte) sqrt::return#0
[189] (word) init_dist_screen::xds#0 ← (word) sqr::return#3
[190] (word) init_dist_screen::ds#0 ← (word) init_dist_screen::xds#0 + (word) init_dist_screen::yds#0
[191] (word) sqrt::val#0 ← (word) init_dist_screen::ds#0
[192] call sqrt
[193] (byte) sqrt::return#2 ← (byte) sqrt::return#0
to:init_dist_screen::@14
init_dist_screen::@14: scope:[init_dist_screen] from init_dist_screen::@13
[201] (byte) init_dist_screen::d#0 ← (byte) sqrt::return#2
[202] *((byte*) init_dist_screen::screen_topline#11 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0
[203] *((byte*) init_dist_screen::screen_bottomline#11 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0
[204] *((byte*) init_dist_screen::screen_topline#11 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0
[205] *((byte*) init_dist_screen::screen_bottomline#11 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0
[206] (byte) init_dist_screen::x#1 ← ++ (byte) init_dist_screen::x#2
[207] (byte) init_dist_screen::xb#1 ← -- (byte) init_dist_screen::xb#2
[194] (byte) init_dist_screen::d#0 ← (byte) sqrt::return#2
[195] *((byte*) init_dist_screen::screen_topline#11 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0
[196] *((byte*) init_dist_screen::screen_bottomline#11 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0
[197] *((byte*) init_dist_screen::screen_topline#11 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0
[198] *((byte*) init_dist_screen::screen_bottomline#11 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0
[199] (byte) init_dist_screen::x#1 ← ++ (byte) init_dist_screen::x#2
[200] (byte) init_dist_screen::xb#1 ← -- (byte) init_dist_screen::xb#2
to:init_dist_screen::@5
init_dist_screen::@8: scope:[init_dist_screen] from init_dist_screen::@6
[208] (byte~) init_dist_screen::$16 ← (byte) init_dist_screen::x2#0 - (byte) $27
[201] (byte~) init_dist_screen::$16 ← (byte) init_dist_screen::x2#0 - (byte) $27
to:init_dist_screen::@10
init_dist_screen::@2: scope:[init_dist_screen] from init_dist_screen::@1
[209] (byte~) init_dist_screen::$7 ← (byte) init_dist_screen::y2#0 - (byte) $18
[202] (byte~) init_dist_screen::$7 ← (byte) init_dist_screen::y2#0 - (byte) $18
to:init_dist_screen::@4
(byte()) sqrt((word) sqrt::val)
sqrt: scope:[sqrt] from init_dist_screen::@13
[210] (word) bsearch16u::key#0 ← (word) sqrt::val#0
[211] (word*) bsearch16u::items#1 ← (word*)(void*) SQUARES#1
[212] call bsearch16u
[213] (word*) bsearch16u::return#3 ← (word*) bsearch16u::return#1
[203] (word) bsearch16u::key#0 ← (word) sqrt::val#0
[204] (word*) bsearch16u::items#1 ← (word*)(void*) SQUARES#1
[205] call bsearch16u
[206] (word*) bsearch16u::return#3 ← (word*) bsearch16u::return#1
to:sqrt::@1
sqrt::@1: scope:[sqrt] from sqrt
[214] (word*) sqrt::found#0 ← (word*) bsearch16u::return#3
[215] (word~) sqrt::$2 ← (word*) sqrt::found#0 - (word*)(void*) SQUARES#1
[216] (word~) sqrt::$1 ← (word~) sqrt::$2 >> (byte) 1
[217] (byte) sqrt::return#0 ← (byte)(word~) sqrt::$1
[207] (word*) sqrt::found#0 ← (word*) bsearch16u::return#3
[208] (word~) sqrt::$2 ← (word*) sqrt::found#0 - (word*)(void*) SQUARES#1
[209] (word~) sqrt::$1 ← (word~) sqrt::$2 >> (byte) 1
[210] (byte) sqrt::return#0 ← (byte)(word~) sqrt::$1
to:sqrt::@return
sqrt::@return: scope:[sqrt] from sqrt::@1
[218] return
[211] return
to:@return
(word*()) bsearch16u((word) bsearch16u::key , (word*) bsearch16u::items , (byte) bsearch16u::num)
bsearch16u: scope:[bsearch16u] from sqrt
[219] phi()
[212] phi()
to:bsearch16u::@3
bsearch16u::@3: scope:[bsearch16u] from bsearch16u bsearch16u::@7
[220] (word*) bsearch16u::items#2 ← phi( bsearch16u/(word*) bsearch16u::items#1 bsearch16u::@7/(word*) bsearch16u::items#8 )
[220] (byte) bsearch16u::num#3 ← phi( bsearch16u/(const byte) NUM_SQUARES#3 bsearch16u::@7/(byte) bsearch16u::num#0 )
[221] if((byte) bsearch16u::num#3>(byte) 0) goto bsearch16u::@4
[213] (word*) bsearch16u::items#2 ← phi( bsearch16u/(word*) bsearch16u::items#1 bsearch16u::@7/(word*) bsearch16u::items#8 )
[213] (byte) bsearch16u::num#3 ← phi( bsearch16u/(const byte) NUM_SQUARES#3 bsearch16u::@7/(byte) bsearch16u::num#0 )
[214] if((byte) bsearch16u::num#3>(byte) 0) goto bsearch16u::@4
to:bsearch16u::@5
bsearch16u::@5: scope:[bsearch16u] from bsearch16u::@3
[222] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@2
[215] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@2
to:bsearch16u::@1
bsearch16u::@1: scope:[bsearch16u] from bsearch16u::@5
[223] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#2 - (byte) 1*(const byte) SIZEOF_WORD
[216] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#2 - (byte) 1*(const byte) SIZEOF_WORD
to:bsearch16u::@2
bsearch16u::@2: scope:[bsearch16u] from bsearch16u::@1 bsearch16u::@5
[224] (word*) bsearch16u::return#2 ← phi( bsearch16u::@5/(word*) bsearch16u::items#2 bsearch16u::@1/(word*~) bsearch16u::$2 )
[217] (word*) bsearch16u::return#2 ← phi( bsearch16u::@5/(word*) bsearch16u::items#2 bsearch16u::@1/(word*~) bsearch16u::$2 )
to:bsearch16u::@return
bsearch16u::@return: scope:[bsearch16u] from bsearch16u::@2 bsearch16u::@8
[225] (word*) bsearch16u::return#1 ← phi( bsearch16u::@2/(word*) bsearch16u::return#2 bsearch16u::@8/(word*) bsearch16u::return#7 )
[226] return
[218] (word*) bsearch16u::return#1 ← phi( bsearch16u::@2/(word*) bsearch16u::return#2 bsearch16u::@8/(word*) bsearch16u::return#7 )
[219] return
to:@return
bsearch16u::@4: scope:[bsearch16u] from bsearch16u::@3
[227] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#3 >> (byte) 1
[228] (byte~) bsearch16u::$14 ← (byte~) bsearch16u::$6 << (byte) 1
[229] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#2 + (byte~) bsearch16u::$14
[230] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0)
[231] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6
[220] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#3 >> (byte) 1
[221] (byte~) bsearch16u::$14 ← (byte~) bsearch16u::$6 << (byte) 1
[222] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#2 + (byte~) bsearch16u::$14
[223] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0)
[224] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6
to:bsearch16u::@8
bsearch16u::@8: scope:[bsearch16u] from bsearch16u::@4
[232] (word*) bsearch16u::return#7 ← (word*) bsearch16u::pivot#0
[225] (word*) bsearch16u::return#7 ← (word*) bsearch16u::pivot#0
to:bsearch16u::@return
bsearch16u::@6: scope:[bsearch16u] from bsearch16u::@4
[233] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@7
[226] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@7
to:bsearch16u::@9
bsearch16u::@9: scope:[bsearch16u] from bsearch16u::@6
[234] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD
[235] (byte) bsearch16u::num#1 ← -- (byte) bsearch16u::num#3
[227] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD
[228] (byte) bsearch16u::num#1 ← -- (byte) bsearch16u::num#3
to:bsearch16u::@7
bsearch16u::@7: scope:[bsearch16u] from bsearch16u::@6 bsearch16u::@9
[236] (word*) bsearch16u::items#8 ← phi( bsearch16u::@9/(word*) bsearch16u::items#0 bsearch16u::@6/(word*) bsearch16u::items#2 )
[236] (byte) bsearch16u::num#5 ← phi( bsearch16u::@9/(byte) bsearch16u::num#1 bsearch16u::@6/(byte) bsearch16u::num#3 )
[237] (byte) bsearch16u::num#0 ← (byte) bsearch16u::num#5 >> (byte) 1
[229] (word*) bsearch16u::items#8 ← phi( bsearch16u::@9/(word*) bsearch16u::items#0 bsearch16u::@6/(word*) bsearch16u::items#2 )
[229] (byte) bsearch16u::num#5 ← phi( bsearch16u::@9/(byte) bsearch16u::num#1 bsearch16u::@6/(byte) bsearch16u::num#3 )
[230] (byte) bsearch16u::num#0 ← (byte) bsearch16u::num#5 >> (byte) 1
to:bsearch16u::@3
(word()) sqr((byte) sqr::val)
sqr: scope:[sqr] from init_dist_screen::@10 init_dist_screen::@4
[238] (byte) sqr::val#2 ← phi( init_dist_screen::@10/(byte) sqr::val#1 init_dist_screen::@4/(byte) sqr::val#0 )
[239] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1
[240] (word) sqr::return#0 ← *((word*)(void*) SQUARES#1 + (byte~) sqr::$0)
[231] (byte) sqr::val#2 ← phi( init_dist_screen::@10/(byte) sqr::val#1 init_dist_screen::@4/(byte) sqr::val#0 )
[232] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1
[233] (word) sqr::return#0 ← *((word*)(void*) SQUARES#1 + (byte~) sqr::$0)
to:sqr::@return
sqr::@return: scope:[sqr] from sqr
[241] return
[234] return
to:@return
(void()) init_squares()
init_squares: scope:[init_squares] from init_dist_screen
[242] phi()
[243] call malloc
[235] phi()
[236] call malloc
to:init_squares::@3
init_squares::@3: scope:[init_squares] from init_squares
[244] (void*) SQUARES#1 ← (void*)(byte*) malloc::mem#0
[245] (word*) init_squares::squares#0 ← (word*)(void*) SQUARES#1
[237] (void*) SQUARES#1 ← (void*)(byte*) malloc::mem#0
[238] (word*) init_squares::squares#0 ← (word*)(void*) SQUARES#1
to:init_squares::@1
init_squares::@1: scope:[init_squares] from init_squares::@2 init_squares::@3
[246] (word*) init_squares::squares#2 ← phi( init_squares::@2/(word*) init_squares::squares#1 init_squares::@3/(word*) init_squares::squares#0 )
[246] (word) init_squares::sqr#2 ← phi( init_squares::@2/(word) init_squares::sqr#1 init_squares::@3/(word) 0 )
[246] (byte) init_squares::i#2 ← phi( init_squares::@2/(byte) init_squares::i#1 init_squares::@3/(byte) 0 )
[247] if((byte) init_squares::i#2<(const byte) NUM_SQUARES#3) goto init_squares::@2
[239] (word*) init_squares::squares#2 ← phi( init_squares::@2/(word*) init_squares::squares#1 init_squares::@3/(word*) init_squares::squares#0 )
[239] (word) init_squares::sqr#2 ← phi( init_squares::@2/(word) init_squares::sqr#1 init_squares::@3/(word) 0 )
[239] (byte) init_squares::i#2 ← phi( init_squares::@2/(byte) init_squares::i#1 init_squares::@3/(byte) 0 )
[240] if((byte) init_squares::i#2<(const byte) NUM_SQUARES#3) goto init_squares::@2
to:init_squares::@return
init_squares::@return: scope:[init_squares] from init_squares::@1
[248] return
[241] return
to:@return
init_squares::@2: scope:[init_squares] from init_squares::@1
[249] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2
[250] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD
[251] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1
[252] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1
[253] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4
[254] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2
[242] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2
[243] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD
[244] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1
[245] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1
[246] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4
[247] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2
to:init_squares::@1
(void*()) malloc((word) malloc::size)
malloc: scope:[malloc] from @1 @3 init_squares
[255] (word) malloc::size#3 ← phi( @1/(word) $3e8 @3/(word) $3e8 init_squares/(const byte) NUM_SQUARES#3*(const byte) SIZEOF_WORD )
[255] (byte*) heap_head#12 ← phi( @1/(const byte*) HEAP_TOP @3/(byte*) heap_head#1 init_squares/(byte*) heap_head#1 )
[256] (byte*) malloc::mem#0 ← (byte*) heap_head#12 - (word) malloc::size#3
[257] (byte*) heap_head#1 ← (byte*) malloc::mem#0
[248] (word) malloc::size#3 ← phi( @1/(word) $3e8 @3/(word) $3e8 init_squares/(const byte) NUM_SQUARES#3*(const byte) SIZEOF_WORD )
[248] (byte*) heap_head#12 ← phi( @1/(const byte*) HEAP_TOP @3/(byte*) heap_head#1 init_squares/(byte*) heap_head#1 )
[249] (byte*) malloc::mem#0 ← (byte*) heap_head#12 - (word) malloc::size#3
[250] (byte*) heap_head#1 ← (byte*) malloc::mem#0
to:malloc::@return
malloc::@return: scope:[malloc] from malloc
[258] return
[251] return
to:@return

File diff suppressed because it is too large Load Diff

View File

@ -353,13 +353,11 @@
(byte~) make_plasma_charset::$12 reg byte a 2002.0
(byte*~) make_plasma_charset::$16 zp[2]:30 20002.0
(byte~) make_plasma_charset::$3 reg byte x 2002.0
(byte~) make_plasma_charset::$6 reg byte a 200002.0
(byte~) make_plasma_charset::$7 zp[1]:22 200002.0
(label) make_plasma_charset::@1
(label) make_plasma_charset::@10
(label) make_plasma_charset::@11
(label) make_plasma_charset::@12
(label) make_plasma_charset::@13
(label) make_plasma_charset::@2
(label) make_plasma_charset::@3
(label) make_plasma_charset::@4
@ -371,21 +369,25 @@
(label) make_plasma_charset::@return
(byte) make_plasma_charset::b
(byte) make_plasma_charset::b#1 reg byte y 200002.0
(byte) make_plasma_charset::b#2 reg byte y 28182.181818181816
(byte) make_plasma_charset::b#2 reg byte y 38750.5
(byte) make_plasma_charset::b#6 reg byte y 150001.5
(const to_nomodify byte*) make_plasma_charset::bittab[(number) 8] = { (byte) 1, (byte) 2, (byte) 4, (byte) 8, (byte) $10, (byte) $20, (byte) $40, (byte) $80 }
(word) make_plasma_charset::c
(word) make_plasma_charset::c#1 c zp[2]:9 2002.0
(word) make_plasma_charset::c#2 c zp[2]:9 555.7777777777778
(word) make_plasma_charset::c#2 c zp[2]:9 625.25
(byte*) make_plasma_charset::charset
(byte) make_plasma_charset::i
(byte) make_plasma_charset::i#1 i zp[1]:6 20002.0
(byte) make_plasma_charset::i#2 i zp[1]:6 2353.176470588235
(byte) make_plasma_charset::i#2 i zp[1]:6 2857.4285714285716
(byte) make_plasma_charset::ii
(byte) make_plasma_charset::ii#1 reg byte x 200002.0
(byte) make_plasma_charset::ii#2 reg byte x 40000.4
(byte) make_plasma_charset::ii#2 reg byte x 57143.42857142857
(byte) make_plasma_charset::s
(byte) make_plasma_charset::s#0 s zp[1]:23 5315.894736842105
(byte) make_plasma_charset::s#0 s zp[1]:23 6312.625
(label) make_plasma_charset::sid_rnd1
(byte) make_plasma_charset::sid_rnd1_return
(byte) make_plasma_charset::sid_rnd1_return#0 reg byte a 200002.0
(label) make_plasma_charset::sid_rnd_init1
(void*()) malloc((word) malloc::size)
(label) malloc::@return
(byte*) malloc::mem
@ -416,20 +418,13 @@
(const byte) print_char::ch#0 ch = (byte) '.'
(byte*) print_char_cursor
(byte*) print_char_cursor#1 print_char_cursor zp[2]:4 3667.333333333333
(byte*) print_char_cursor#18 print_char_cursor zp[2]:4 846.3076923076923
(byte*) print_char_cursor#18 print_char_cursor zp[2]:4 956.695652173913
(byte*) print_char_cursor#30 print_char_cursor zp[2]:4 1501.5
(void()) print_cls()
(label) print_cls::@return
(byte*) print_line_cursor
(const byte*) print_line_cursor#0 print_line_cursor = (byte*) 1024
(byte*) print_screen
(byte()) sid_rnd()
(label) sid_rnd::@return
(byte) sid_rnd::return
(byte) sid_rnd::return#0 reg byte a 366667.3333333334
(byte) sid_rnd::return#2 reg byte a 200002.0
(void()) sid_rnd_init()
(label) sid_rnd_init::@return
(byte) sin_offset_x
(byte) sin_offset_x#10 sin_offset_x zp[1]:2 137.75
(byte) sin_offset_x#12 sin_offset_x zp[1]:2 133.66666666666669
@ -489,10 +484,8 @@ reg byte a [ doplasma::$2 ]
zp[2]:20 [ memset::end#0 doplasma::sin_x#0 bsearch16u::return#1 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#1 bsearch16u::items#8 bsearch16u::$2 bsearch16u::return#7 bsearch16u::items#0 bsearch16u::return#3 sqrt::found#0 sqrt::$2 sqrt::$1 atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ]
reg byte x [ make_plasma_charset::$3 ]
reg byte a [ make_plasma_charset::$12 ]
reg byte a [ sid_rnd::return#2 ]
reg byte a [ make_plasma_charset::$6 ]
reg byte a [ make_plasma_charset::sid_rnd1_return#0 ]
zp[1]:22 [ make_plasma_charset::$7 init_dist_screen::x#2 init_dist_screen::x#1 init_angle_screen::x#2 init_angle_screen::x#1 ]
reg byte a [ sid_rnd::return#0 ]
reg byte a [ init_angle_screen::$3 ]
reg byte a [ init_angle_screen::$4 ]
reg byte a [ init_angle_screen::$5 ]