diff --git a/src/main/fragment/cache/fragment-cache-wdc65c02.asm b/src/main/fragment/cache/fragment-cache-wdc65c02.asm index 97cb1ce46..fea942840 100644 --- a/src/main/fragment/cache/fragment-cache-wdc65c02.asm +++ b/src/main/fragment/cache/fragment-cache-wdc65c02.asm @@ -3006,3 +3006,1286 @@ lda {z1} sta {z1}+1 lda #0 sta {z1} +//FRAGMENT vwuz1_le_vwuc1_then_la1 +lda {z1}+1 +cmp #>{c1} +bne !+ +lda {z1} +cmp #<{c1} +!: +bcc {la1} +beq {la1} +//FRAGMENT vbuz1=vwuz2_band_vbuc1 +lda #{c1} +and {z2} +sta {z1} +//FRAGMENT vbsz1=pbsc1_derefidx_vbuz2 +ldy {z2} +lda {c1},y +sta {z1} +//FRAGMENT vwuz1=vwuz2_ror_3 +lda {z2}+1 +lsr +sta {z1}+1 +lda {z2} +ror +sta {z1} +lsr {z1}+1 +ror {z1} +lsr {z1}+1 +ror {z1} +//FRAGMENT _deref_pwuz1=vwuz2 +ldy #0 +lda {z2} +sta ({z1}),y +iny +lda {z2}+1 +sta ({z1}),y +//FRAGMENT pbuz1=pbuc1_plus_vwuz2 +clc +lda {z2} +adc #<{c1} +sta {z1} +lda {z2}+1 +adc #>{c1} +sta {z1}+1 +//FRAGMENT vbsz1=vbsz1_minus_1 +dec {z1} +//FRAGMENT vbuz1=vbuz1_ror_1 +lsr {z1} +//FRAGMENT vwuz1=vwuz2_ror_2 +lda {z2}+1 +lsr +sta {z1}+1 +lda {z2} +ror +sta {z1} +lsr {z1}+1 +ror {z1} +//FRAGMENT vbsz1=vbsz1_minus_2 +dec {z1} +dec {z1} +//FRAGMENT vbuz1=vbuz1_ror_2 +lda {z1} +lsr +lsr +sta {z1} +//FRAGMENT vwuz1=vwuz2_ror_1 +lda {z2}+1 +lsr +sta {z1}+1 +lda {z2} +ror +sta {z1} +//FRAGMENT vbsz1=vbsz1_minus_vbsc1 +lda {z1} +sec +sbc #{c1} +sta {z1} +//FRAGMENT vbuz1=vbuz1_ror_4 +lda {z1} +lsr +lsr +lsr +lsr +sta {z1} +//FRAGMENT vbsz1_ge_0_then_la1 +lda {z1} +cmp #0 +bpl {la1} +//FRAGMENT vbuz1=vbuz2_plus_vbuz3 +lda {z2} +clc +adc {z3} +sta {z1} +//FRAGMENT vwuz1=vwuz2_rol_2 +lda {z2} +asl +sta {z1} +lda {z2}+1 +rol +sta {z1}+1 +asl {z1} +rol {z1}+1 +//FRAGMENT pduz1=pduc1_plus_vwuz2 +clc +lda {z2} +adc #<{c1} +sta {z1} +lda {z2}+1 +adc #>{c1} +sta {z1}+1 +//FRAGMENT _deref_pduz1=vduz2 +ldy #0 +lda {z2} +sta ({z1}),y +iny +lda {z2}+1 +sta ({z1}),y +iny +lda {z2}+2 +sta ({z1}),y +iny +lda {z2}+3 +sta ({z1}),y +//FRAGMENT vduz1=vduz1_plus_vwuz2 +lda {z1} +clc +adc {z2} +sta {z1} +lda {z1}+1 +adc {z2}+1 +sta {z1}+1 +lda {z1}+2 +adc #0 +sta {z1}+2 +lda {z1}+3 +adc #0 +sta {z1}+3 +//FRAGMENT vwuz1=vwuz2_minus_vwuz3 +lda {z2} +sec +sbc {z3} +sta {z1} +lda {z2}+1 +sbc {z3}+1 +sta {z1}+1 +//FRAGMENT vwuz1=vwuz2_rol_7 +lda {z2}+1 +lsr +lda {z2} +ror +sta {z1}+1 +lda #0 +ror +sta {z1} +//FRAGMENT vwuz1=vwuz2_bxor_vwuz3 +lda {z2} +eor {z3} +sta {z1} +lda {z2}+1 +eor {z3}+1 +sta {z1}+1 +//FRAGMENT vwuz1=vwuz2_ror_9 +lda {z2}+1 +lsr +sta {z1} +lda #0 +sta {z1}+1 +//FRAGMENT vwuz1=vwuz2_rol_8 +lda {z2} +sta {z1}+1 +lda #0 +sta {z1} +//FRAGMENT _deref_pbuc1_neq_pbuc2_derefidx_vbuz1_then_la1 +lda {c1} +ldy {z1} +cmp {c2},y +bne {la1} +//FRAGMENT vduz1=_dword_vwuz2 +lda {z2} +sta {z1} +lda {z2}+1 +sta {z1}+1 +lda #0 +sta {z1}+2 +sta {z1}+3 +//FRAGMENT vwuz1_neq_0_then_la1 +lda {z1} +ora {z1}+1 +bne {la1} +//FRAGMENT vbuz1_eq_0_then_la1 +lda {z1} +cmp #0 +beq {la1} +//FRAGMENT vduz1=vduz1_plus_vduz2 +lda {z1} +clc +adc {z2} +sta {z1} +lda {z1}+1 +adc {z2}+1 +sta {z1}+1 +lda {z1}+2 +adc {z2}+2 +sta {z1}+2 +lda {z1}+3 +adc {z2}+3 +sta {z1}+3 +//FRAGMENT vwuz1=vwuz1_ror_1 +lsr {z1}+1 +ror {z1} +//FRAGMENT vduz1_lt_vduz2_then_la1 +lda {z1}+3 +cmp {z2}+3 +bcc {la1} +bne !+ +lda {z1}+2 +cmp {z2}+2 +bcc {la1} +bne !+ +lda {z1}+1 +cmp {z2}+1 +bcc {la1} +bne !+ +lda {z1} +cmp {z2} +bcc {la1} +!: +//FRAGMENT vduz1=_inc_vduz1 +inc {z1} +bne !+ +inc {z1}+1 +bne !+ +inc {z1}+2 +bne !+ +inc {z1}+3 +!: +//FRAGMENT vwuz1_ge_vwuz2_then_la1 +lda {z2}+1 +cmp {z1}+1 +bne !+ +lda {z2} +cmp {z1} +beq {la1} +!: +bcc {la1} +//FRAGMENT vwuz1=vwuz1_minus_vwuz2 +lda {z1} +sec +sbc {z2} +sta {z1} +lda {z1}+1 +sbc {z2}+1 +sta {z1}+1 +//FRAGMENT vwuz1=vwuz2_plus_1 +clc +lda {z2} +adc #1 +sta {z1} +lda {z2}+1 +adc #0 +sta {z1}+1 +//FRAGMENT vwuz1=vwuz1_rol_1 +asl {z1} +rol {z1}+1 +//FRAGMENT vwuz1=vwuz1_bor_vbuc1 +lda #{c1} +ora {z1} +sta {z1} +//FRAGMENT vduz1=_dword__deref_pwuz2 +ldy #0 +sty {z1}+2 +sty {z1}+3 +lda ({z2}),y +sta {z1} +iny +lda ({z2}),y +sta {z1}+1 +//FRAGMENT vduz1=_deref_pduz2 +ldy #0 +lda ({z2}),y +sta {z1} +iny +lda ({z2}),y +sta {z1}+1 +iny +lda ({z2}),y +sta {z1}+2 +iny +lda ({z2}),y +sta {z1}+3 +//FRAGMENT vduz1=vduz2_plus_vduz3 +lda {z2} +clc +adc {z3} +sta {z1} +lda {z2}+1 +adc {z3}+1 +sta {z1}+1 +lda {z2}+2 +adc {z3}+2 +sta {z1}+2 +lda {z2}+3 +adc {z3}+3 +sta {z1}+3 +//FRAGMENT vbuz1=vbuz1_rol_vbuz2 +lda {z1} +ldy {z2} +cpy #0 +beq !e+ +!: +asl +dey +bne !- +!e: +sta {z1} +//FRAGMENT vbuz1=_bnot__deref_pbuz2 +ldy #0 +lda ({z2}),y +eor #$ff +sta {z1} +//FRAGMENT vbuz1=_deref_pbuc1_band_vbuz2 +lda {c1} +and {z2} +sta {z1} +//FRAGMENT vbuaa=vwuz1_band_vbuc1 +lda #{c1} +and {z1} +//FRAGMENT vbuxx=vwuz1_band_vbuc1 +lda #{c1} +and {z1} +tax +//FRAGMENT vbuyy=vwuz1_band_vbuc1 +lda #{c1} +and {z1} +tay +//FRAGMENT vbsaa=pbsc1_derefidx_vbuz1 +ldy {z1} +lda {c1},y +//FRAGMENT vbsxx=pbsc1_derefidx_vbuz1 +ldy {z1} +ldx {c1},y +//FRAGMENT vbsyy=pbsc1_derefidx_vbuz1 +ldx {z1} +ldy {c1},x +//FRAGMENT vbuxx=vbuxx_ror_2 +txa +lsr +lsr +tax +//FRAGMENT vbsxx=vbsxx_minus_vbsc1 +txa +sec +sbc #{c1} +tax +//FRAGMENT vbsxx_ge_0_then_la1 +cpx #0 +bpl {la1} +//FRAGMENT vbuaa=vbuz1_rol_2 +lda {z1} +asl +asl +//FRAGMENT vbuyy=vbuz1_rol_2 +lda {z1} +asl +asl +tay +//FRAGMENT vbuz1=vbuaa_plus_vbuz2 +clc +adc {z2} +sta {z1} +//FRAGMENT vbuz1=vbuxx_plus_vbuz2 +txa +clc +adc {z2} +sta {z1} +//FRAGMENT vbuz1=vbuyy_plus_vbuz2 +tya +clc +adc {z2} +sta {z1} +//FRAGMENT vbuaa=vbuz1_plus_vbuz2 +lda {z1} +clc +adc {z2} +//FRAGMENT vbuaa=vbuaa_plus_vbuz1 +clc +adc {z1} +//FRAGMENT vbuaa=vbuxx_plus_vbuz1 +txa +clc +adc {z1} +//FRAGMENT vbuaa=vbuyy_plus_vbuz1 +tya +clc +adc {z1} +//FRAGMENT vbuxx=vbuz1_plus_vbuz2 +lda {z1} +clc +adc {z2} +tax +//FRAGMENT vbuxx=vbuaa_plus_vbuz1 +clc +adc {z1} +tax +//FRAGMENT vbuxx=vbuxx_plus_vbuz1 +txa +clc +adc {z1} +tax +//FRAGMENT vbuxx=vbuyy_plus_vbuz1 +tya +clc +adc {z1} +tax +//FRAGMENT vbuyy=vbuz1_plus_vbuz2 +lda {z1} +clc +adc {z2} +tay +//FRAGMENT vbuyy=vbuaa_plus_vbuz1 +clc +adc {z1} +tay +//FRAGMENT vbuyy=vbuxx_plus_vbuz1 +txa +clc +adc {z1} +tay +//FRAGMENT vbuyy=vbuyy_plus_vbuz1 +tya +clc +adc {z1} +tay +//FRAGMENT _deref_pbuc1_neq_pbuc2_derefidx_vbuaa_then_la1 +tay +lda {c1} +cmp {c2},y +bne {la1} +//FRAGMENT _deref_pbuc1_neq_pbuc2_derefidx_vbuxx_then_la1 +lda {c2},x +cmp {c1} +bne {la1} +//FRAGMENT _deref_pbuc1_neq_pbuc2_derefidx_vbuyy_then_la1 +lda {c1} +cmp {c2},y +bne {la1} +//FRAGMENT vbuaa_eq_0_then_la1 +cmp #0 +beq {la1} +//FRAGMENT vbuxx=vbuxx_rol_vbuz1 +txa +ldx {z1} +cpx #0 +beq !e+ +!: +asl +dex +bne !- +!e: +tax +//FRAGMENT vbuz1=vbuz1_rol_vbuaa +tay +lda {z1} +cpy #0 +beq !e+ +!: +asl +dey +bne !- +!e: +sta {z1} +//FRAGMENT vbuxx=vbuxx_rol_vbuaa +tay +txa +cpy #0 +beq !e+ +!: +asl +dey +bne !- +!e: +tax +//FRAGMENT vbuz1=vbuz1_rol_vbuxx +lda {z1} +cpx #0 +beq !e+ +!: +asl +dex +bne !- +!e: +sta {z1} +//FRAGMENT vbuxx=vbuxx_rol_vbuxx +txa +tax +cpx #0 +beq !e+ +!: +asl +dex +bne !- +!e: +tax +//FRAGMENT vbuz1=vbuz1_rol_vbuyy +lda {z1} +cpy #0 +beq !e+ +!: +asl +dey +bne !- +!e: +sta {z1} +//FRAGMENT vbuxx=vbuxx_rol_vbuyy +txa +cpy #0 +beq !e+ +!: +asl +dey +bne !- +!e: +tax +//FRAGMENT vbuaa=_bnot__deref_pbuz1 +ldy #0 +lda ({z1}),y +eor #$ff +//FRAGMENT vbuxx=_bnot__deref_pbuz1 +ldy #0 +lda ({z1}),y +eor #$ff +tax +//FRAGMENT vbuyy=_bnot__deref_pbuz1 +ldy #0 +lda ({z1}),y +eor #$ff +tay +//FRAGMENT vbuz1=_deref_pbuc1_band_vbuaa +and {c1} +sta {z1} +//FRAGMENT vbuz1=_deref_pbuc1_band_vbuxx +txa +and {c1} +sta {z1} +//FRAGMENT vbuz1=_deref_pbuc1_band_vbuyy +tya +and {c1} +sta {z1} +//FRAGMENT vbuaa=_deref_pbuc1_band_vbuz1 +lda {c1} +and {z1} +//FRAGMENT vbuaa=_deref_pbuc1_band_vbuaa +and {c1} +//FRAGMENT vbuaa=_deref_pbuc1_band_vbuxx +txa +and {c1} +//FRAGMENT vbuaa=_deref_pbuc1_band_vbuyy +tya +and {c1} +//FRAGMENT vbuxx=_deref_pbuc1_band_vbuz1 +lda {c1} +and {z1} +tax +//FRAGMENT vbuxx=_deref_pbuc1_band_vbuaa +and {c1} +tax +//FRAGMENT vbuxx=_deref_pbuc1_band_vbuxx +txa +and {c1} +tax +//FRAGMENT vbuxx=_deref_pbuc1_band_vbuyy +tya +and {c1} +tax +//FRAGMENT vbuyy=_deref_pbuc1_band_vbuz1 +lda {c1} +and {z1} +tay +//FRAGMENT vbuyy=_deref_pbuc1_band_vbuaa +and {c1} +tay +//FRAGMENT vbuyy=_deref_pbuc1_band_vbuxx +txa +and {c1} +tay +//FRAGMENT vbuyy=_deref_pbuc1_band_vbuyy +tya +and {c1} +tay +//FRAGMENT vbuz1=vbuaa_bor_vbuxx +stx $ff +ora $ff +sta {z1} +//FRAGMENT vbuaa=vbuaa_bor_vbuxx +stx $ff +ora $ff +//FRAGMENT vbuxx=vbuaa_bor_vbuxx +stx $ff +ora $ff +tax +//FRAGMENT vbuyy=vbuaa_bor_vbuxx +stx $ff +ora $ff +tay +//FRAGMENT vbuz1=vbuxx_bor_vbuz2 +txa +ora {z2} +sta {z1} +//FRAGMENT vbuz1=vbuxx_bor_vbuxx +stx {z1} +//FRAGMENT vbuxx_eq_0_then_la1 +cpx #0 +beq {la1} +//FRAGMENT vbuyy_eq_0_then_la1 +cpy #0 +beq {la1} +//FRAGMENT vbuxx=vbuxx_ror_1 +txa +lsr +tax +//FRAGMENT vbsxx=vbsxx_minus_1 +dex +//FRAGMENT vbsxx=vbsxx_minus_2 +dex +dex +//FRAGMENT vbuz1=vbuyy_bor_vbuxx +txa +sty $ff +ora $ff +sta {z1} +//FRAGMENT vwuz1=vwuz1_bxor_vwuz2 +lda {z1} +eor {z2} +sta {z1} +lda {z1}+1 +eor {z2}+1 +sta {z1}+1 +//FRAGMENT pduz1=pduc1_plus_vwuz1 +clc +lda {z1} +adc #<{c1} +sta {z1} +lda {z1}+1 +adc #>{c1} +sta {z1}+1 +//FRAGMENT vduz1=vbuc1 +lda #{c1} +sta {z1} +lda #0 +sta {z1}+1 +sta {z1}+2 +sta {z1}+3 +//FRAGMENT pbuc1_derefidx_vbuz1=pbuc1_derefidx_vbuz1_plus_1 +ldy {z1} +lda {c1},y +inc +sta {c1},y +//FRAGMENT vwuz1=vwuz1_plus_vwuc1 +clc +lda {z1} +adc #<{c1} +sta {z1} +lda {z1}+1 +adc #>{c1} +sta {z1}+1 +//FRAGMENT vbuz1=vbuz1_plus_2 +lda {z1} +clc +adc #2 +sta {z1} +//FRAGMENT vwuz1=_inc_vwuz2 +clc +lda {z2} +adc #1 +sta {z1} +lda {z2}+1 +adc #0 +sta {z1}+1 +//FRAGMENT vwuz1=vwuz2_band_vbuc1 +lda #{c1} +and {z2} +sta {z1} +lda #0 +sta {z1}+1 +//FRAGMENT vduz1=vwuc1 +NO_SYNTHESIS +//FRAGMENT vduz1=_deref_pduc1 +lda {c1} +sta {z1} +lda {c1}+1 +sta {z1}+1 +lda {c1}+2 +sta {z1}+2 +lda {c1}+3 +sta {z1}+3 +//FRAGMENT vwuz1=vwuc1_rol_vbuz2 +ldy {z2} +lda #<{c1} +sta {z1} +lda #>{c1}+1 +sta {z1}+1 +cpy #0 +beq !e+ +!: +asl {z1} +rol {z1}+1 +dey +bne !- +!e: +//FRAGMENT vduz1=vduz2_plus_vwuz3 +lda {z2} +clc +adc {z3} +sta {z1} +lda {z2}+1 +adc {z3}+1 +sta {z1}+1 +lda {z2}+2 +adc #0 +sta {z1}+2 +lda {z2}+3 +adc #0 +sta {z1}+3 +//FRAGMENT vduz1=vduz2_plus_vbuz3 +lda {z3} +clc +adc {z2} +sta {z1} +lda {z2}+1 +adc #0 +sta {z1}+1 +lda {z2}+2 +adc #0 +sta {z1}+2 +lda {z2}+3 +adc #0 +sta {z1}+3 +//FRAGMENT pbuc1_derefidx_vbuaa=pbuc1_derefidx_vbuaa_plus_1 +tay +lda {c1},y +inc +sta {c1},y +//FRAGMENT pbuc1_derefidx_vbuxx=pbuc1_derefidx_vbuxx_plus_1 +lda {c1},x +inc +sta {c1},x +//FRAGMENT pbuc1_derefidx_vbuyy=pbuc1_derefidx_vbuyy_plus_1 +lda {c1},y +inc +sta {c1},y +//FRAGMENT vbuxx=vbuxx_plus_2 +inx +inx +//FRAGMENT pbuc1_derefidx_vbuaa=vbuc2 +tay +lda #{c2} +sta {c1},y +//FRAGMENT pbuc1_derefidx_vbuyy=vbuc2 +lda #{c2} +sta {c1},y +//FRAGMENT vwuz1=vwuc1_rol_vbuaa +tay +lda #<{c1} +sta {z1} +lda #>{c1}+1 +sta {z1}+1 +cpy #0 +beq !e+ +!: +asl {z1} +rol {z1}+1 +dey +bne !- +!e: +//FRAGMENT vwuz1=vwuc1_rol_vbuxx +lda #<{c1} +sta {z1} +lda #>{c1}+1 +sta {z1}+1 +cpx #0 +beq !e+ +!: +asl {z1} +rol {z1}+1 +dex +bne !- +!e: +//FRAGMENT vwuz1=vwuc1_rol_vbuyy +lda #<{c1} +sta {z1} +lda #>{c1}+1 +sta {z1}+1 +cpy #0 +beq !e+ +!: +asl {z1} +rol {z1}+1 +dey +bne !- +!e: +//FRAGMENT vbuz1=vbuyy_bor_vbuz2 +tya +ora {z2} +sta {z1} +//FRAGMENT vbuaa=vbuxx_bor_vbuz1 +txa +ora {z1} +//FRAGMENT vbuaa=vbuyy_bor_vbuz1 +tya +ora {z1} +//FRAGMENT vbuxx=vbuxx_bor_vbuz1 +txa +ora {z1} +tax +//FRAGMENT vbuxx=vbuyy_bor_vbuz1 +tya +ora {z1} +tax +//FRAGMENT vbuyy=vbuxx_bor_vbuz1 +txa +ora {z1} +tay +//FRAGMENT vbuyy=vbuyy_bor_vbuz1 +tya +ora {z1} +tay +//FRAGMENT vwuz1=_word_vbuyy +tya +sta {z1} +lda #0 +sta {z1}+1 +//FRAGMENT vwuz1=vwuz2_rol_vbuxx +lda {z2} +sta {z1} +lda {z2}+1 +sta {z1}+1 +cpx #0 +beq !e+ +!: +asl {z1} +rol {z1}+1 +dex +bne !- +!e: +//FRAGMENT vwuz1=vwuz2_rol_vbuyy +lda {z2} +sta {z1} +lda {z2}+1 +sta {z1}+1 +cpy #0 +beq !e+ +!: +asl {z1} +rol {z1}+1 +dey +bne !- +!e: +//FRAGMENT vduz1=vduz2_plus_vbuaa +clc +adc {z2} +sta {z1} +lda {z2}+1 +adc #0 +sta {z1}+1 +lda {z2}+2 +adc #0 +sta {z1}+2 +lda {z2}+3 +adc #0 +sta {z1}+3 +//FRAGMENT vduz1=vduz2_plus_vbuxx +txa +clc +adc {z2} +sta {z1} +lda {z2}+1 +adc #0 +sta {z1}+1 +lda {z2}+2 +adc #0 +sta {z1}+2 +lda {z2}+3 +adc #0 +sta {z1}+3 +//FRAGMENT vduz1=vduz2_plus_vbuyy +tya +clc +adc {z2} +sta {z1} +lda {z2}+1 +adc #0 +sta {z1}+1 +lda {z2}+2 +adc #0 +sta {z1}+2 +lda {z2}+3 +adc #0 +sta {z1}+3 +//FRAGMENT vbuz1=vbuaa_bor_vbuc1 +ora #{c1} +sta {z1} +//FRAGMENT vbuxx=vbuaa_bor_vbuc1 +ora #{c1} +tax +//FRAGMENT vbuyy=vbuaa_bor_vbuc1 +ora #{c1} +tay +//FRAGMENT vbuz1=vbuyy_bor_vbuc1 +tya +ora #{c1} +sta {z1} +//FRAGMENT vbuaa=vbuyy_bor_vbuc1 +tya +ora #{c1} +//FRAGMENT vbuxx=vbuyy_bor_vbuc1 +tya +ora #{c1} +tax +//FRAGMENT vbuyy_neq_0_then_la1 +cpy #0 +bne {la1} +//FRAGMENT vbuyy=vbuyy_plus_2 +iny +iny +//FRAGMENT vbuaa=vbuaa_bor_vbuyy +sty $ff +ora $ff +//FRAGMENT vbuz1=vbuaa_bor_vbuyy +sty $ff +ora $ff +sta {z1} +//FRAGMENT vwuz1=vwuz1_band_vbuc1 +lda #{c1} +and {z1} +sta {z1} +lda #0 +sta {z1}+1 +//FRAGMENT vduz1=vduz1_plus_vbuaa +clc +adc {z1} +sta {z1} +lda {z1}+1 +adc #0 +sta {z1}+1 +lda {z1}+2 +adc #0 +sta {z1}+2 +lda {z1}+3 +adc #0 +sta {z1}+3 +//FRAGMENT vbuz1=vbuaa_bor_vbuz1 +ora {z1} +sta {z1} +//FRAGMENT vduz1_lt_vduc1_then_la1 +lda {z1}+3 +cmp #>{c1}>>$10 +bcc {la1} +bne !+ +lda {z1}+2 +cmp #<{c1}>>$10 +bcc {la1} +bne !+ +lda {z1}+1 +cmp #>{c1} +bcc {la1} +bne !+ +lda {z1} +cmp #<{c1} +bcc {la1} +!: +//FRAGMENT vduz1=vduz2_plus_vbuc1 +lda #{c1} +clc +adc {z2} +sta {z1} +lda {z2}+1 +adc #0 +sta {z1}+1 +lda {z2}+2 +adc #0 +sta {z1}+2 +lda {z2}+3 +adc #0 +sta {z1}+3 +//FRAGMENT vwuz1=vwuz2_bor_vbuz3 +lda {z3} +ora {z2} +sta {z1} +lda {z2}+1 +sta {z1}+1 +//FRAGMENT vwuz1=vwuz2_ror_5 +lda {z2}+1 +lsr +sta {z1}+1 +lda {z2} +ror +sta {z1} +lsr {z1}+1 +ror {z1} +lsr {z1}+1 +ror {z1} +lsr {z1}+1 +ror {z1} +lsr {z1}+1 +ror {z1} +//FRAGMENT vwuz1=vwuz2_rol_3 +lda {z2} +asl +sta {z1} +lda {z2}+1 +rol +sta {z1}+1 +asl {z1} +rol {z1}+1 +asl {z1} +rol {z1}+1 +//FRAGMENT vbuz1=_byte_vwuz2 +lda {z2} +sta {z1} +//FRAGMENT vwuz1=vwuz2_band_vwuc1 +lda {z2} +and #<{c1} +sta {z1} +lda {z2}+1 +and #>{c1} +sta {z1}+1 +//FRAGMENT vwuz1=vwuz2_plus_vwuc1 +clc +lda {z2} +adc #<{c1} +sta {z1} +lda {z2}+1 +adc #>{c1} +sta {z1}+1 +//FRAGMENT vduz1=vduz1_plus_vwuc1 +lda {z1} +clc +adc #<{c1} +sta {z1} +lda {z1}+1 +adc #>{c1} +sta {z1}+1 +lda {z1}+2 +adc #0 +sta {z1}+2 +lda {z1}+3 +adc #0 +sta {z1}+3 +//FRAGMENT vbuz1=_byte_vduz2 +lda {z2} +sta {z1} +//FRAGMENT vduz1=pduc1_derefidx_vbuz2 +ldy {z2} +lda {c1},y +sta {z1} +lda {c1}+1,y +sta {z1}+1 +lda {c1}+2,y +sta {z1}+2 +lda {c1}+3,y +sta {z1}+3 +//FRAGMENT vduz1_ge_vduz2_then_la1 +lda {z1}+3 +cmp {z2}+3 +bcc !+ +bne {la1} +lda {z1}+2 +cmp {z2}+2 +bcc !+ +bne {la1} +lda {z1}+1 +cmp {z2}+1 +bcc !+ +bne {la1} +lda {z1} +cmp {z2} +bcs {la1} +!: +//FRAGMENT vduz1=vduz1_minus_vduz2 +lda {z1} +sec +sbc {z2} +sta {z1} +lda {z1}+1 +sbc {z2}+1 +sta {z1}+1 +lda {z1}+2 +sbc {z2}+2 +sta {z1}+2 +lda {z1}+3 +sbc {z2}+3 +sta {z1}+3 +//FRAGMENT vwuz1=vwuz2_bor_vbuxx +txa +ora {z2} +sta {z1} +lda {z2}+1 +sta {z1}+1 +//FRAGMENT vwuz1=vwuz2_bor_vbuyy +tya +ora {z2} +sta {z1} +lda {z2}+1 +sta {z1}+1 +//FRAGMENT vbuaa=_byte_vwuz1 +lda {z1} +//FRAGMENT vbuxx=_byte_vwuz1 +lda {z1} +tax +//FRAGMENT vbuyy=_byte_vwuz1 +lda {z1} +tay +//FRAGMENT vbuaa=_byte_vduz1 +lda {z1} +//FRAGMENT vbuxx=_byte_vduz1 +lda {z1} +tax +//FRAGMENT vbuyy=_byte_vduz1 +lda {z1} +tay +//FRAGMENT vbuz1=vbuaa_rol_2 +asl +asl +sta {z1} +//FRAGMENT vbuz1=vbuyy_rol_2 +tya +asl +asl +sta {z1} +//FRAGMENT vbuaa=vbuaa_rol_2 +asl +asl +//FRAGMENT vbuaa=vbuxx_rol_2 +txa +asl +asl +//FRAGMENT vbuaa=vbuyy_rol_2 +tya +asl +asl +//FRAGMENT vbuxx=vbuaa_rol_2 +asl +asl +tax +//FRAGMENT vbuxx=vbuyy_rol_2 +tya +asl +asl +tax +//FRAGMENT vbuyy=vbuaa_rol_2 +asl +asl +tay +//FRAGMENT vbuyy=vbuxx_rol_2 +txa +asl +asl +tay +//FRAGMENT vbuyy=vbuyy_rol_2 +tya +asl +asl +tay +//FRAGMENT vduz1=pduc1_derefidx_vbuaa +tay +lda {c1},y +sta {z1} +lda {c1}+1,y +sta {z1}+1 +lda {c1}+2,y +sta {z1}+2 +lda {c1}+3,y +sta {z1}+3 +//FRAGMENT vduz1=pduc1_derefidx_vbuxx +lda {c1},x +sta {z1} +lda {c1}+1,x +sta {z1}+1 +lda {c1}+2,x +sta {z1}+2 +lda {c1}+3,x +sta {z1}+3 +//FRAGMENT vduz1=pduc1_derefidx_vbuyy +lda {c1},y +sta {z1} +lda {c1}+1,y +sta {z1}+1 +lda {c1}+2,y +sta {z1}+2 +lda {c1}+3,y +sta {z1}+3 +//FRAGMENT vbuyy_ge_vbuz1_then_la1 +cpy {z1} +bcs {la1} +//FRAGMENT vwuz1=vwuz1_rol_8 +lda {z1} +sta {z1}+1 +lda #0 +sta {z1} +//FRAGMENT vwuz1=vwuz1_bor_vbuxx +txa +ora {z1} +sta {z1} +//FRAGMENT vwuz1=vwuz1_rol_3 +asl {z1} +rol {z1}+1 +asl {z1} +rol {z1}+1 +asl {z1} +rol {z1}+1 +//FRAGMENT vwuz1=vwuz1_band_vwuc1 +lda {z1} +and #<{c1} +sta {z1} +lda {z1}+1 +and #>{c1} +sta {z1}+1 +//FRAGMENT vwuz1=vwuz1_ror_5 +lsr {z1}+1 +ror {z1} +lsr {z1}+1 +ror {z1} +lsr {z1}+1 +ror {z1} +lsr {z1}+1 +ror {z1} +lsr {z1}+1 +ror {z1} +//FRAGMENT _deref_pssc1=_deref_pssc2_memcpy_vbuc3 +ldy #{c3} +!: +lda {c2}-1,y +sta {c1}-1,y +dey +bne !- +//FRAGMENT vduz1=vwsc1 +NO_SYNTHESIS +//FRAGMENT _deref_pwuc1=vbuc2 +lda #0 +sta {c1}+1 +lda #<{c2} +sta {c1} +//FRAGMENT pbuz1=pbuz2_plus_vwuc1 +clc +lda {z2} +adc #<{c1} +sta {z1} +lda {z2}+1 +adc #>{c1} +sta {z1}+1 +//FRAGMENT pbuz1_neq_vwuc1_then_la1 +lda {z1}+1 +cmp #>{c1} +bne {la1} +lda {z1} +cmp #<{c1} +bne {la1} +//FRAGMENT 0_neq__deref_pbuz1_then_la1 +ldy #0 +lda ({z1}),y +cmp #0 +bne {la1} +//FRAGMENT vduz1=vduz2_plus_vduz1 +lda {z1} +clc +adc {z2} +sta {z1} +lda {z1}+1 +adc {z2}+1 +sta {z1}+1 +lda {z1}+2 +adc {z2}+2 +sta {z1}+2 +lda {z1}+3 +adc {z2}+3 +sta {z1}+3 +//FRAGMENT pbuz1=pbuz1_plus_vwuc1 +clc +lda {z1} +adc #<{c1} +sta {z1} +lda {z1}+1 +adc #>{c1} +sta {z1}+1 diff --git a/src/main/kc/include/cbm.h b/src/main/kc/include/cbm.h index 9dcfa6c07..d6fead029 100644 --- a/src/main/kc/include/cbm.h +++ b/src/main/kc/include/cbm.h @@ -16,7 +16,11 @@ void cbm_k_ciout (unsigned char C); unsigned char cbm_k_ckout (unsigned char FN); void cbm_k_clall (void); void cbm_k_clrch (void); + +// Read a byte from the input channel +// return: next byte in buffer or 0 if buffer is empty. unsigned char cbm_k_getin (void); + unsigned cbm_k_iobase (void); void cbm_k_listen (unsigned char dev); unsigned char cbm_k_readst (void); @@ -52,7 +56,6 @@ char* cbm_k_load(unsigned char flag, char* addr); // return: unsigned char cbm_k_save(char* start, char* end); - void cbm_k_settim (unsigned long timer); void cbm_k_talk (unsigned char dev); void cbm_k_tksa (unsigned char addr); diff --git a/src/main/kc/include/cx16-kernal.h b/src/main/kc/include/cx16-kernal.h new file mode 100644 index 000000000..e09a2c4c0 --- /dev/null +++ b/src/main/kc/include/cx16-kernal.h @@ -0,0 +1,15 @@ +// Kernal SETNAM function +// SETNAM. Set file name parameters. +void setnam(char* filename); + +// SETLFS. Set file parameters. +void setlfs(char device); + +// LOAD. Load or verify file. (Must call SETLFS and SETNAM beforehands.) +// - verify: 0 = Load, 1-255 = Verify +// Returns a status, 0xff: Success other: Kernal Error Code +char load(char* address, char verify); + +// GETIN. Read a byte from the input channel +// return: next byte in buffer or 0 if buffer is empty. +char getin(); diff --git a/src/main/kc/include/cx16-vera.h b/src/main/kc/include/cx16-vera.h index 8c77d1a2c..e015d6631 100644 --- a/src/main/kc/include/cx16-vera.h +++ b/src/main/kc/include/cx16-vera.h @@ -262,5 +262,8 @@ struct VERA_SPRITE { // - bits 0-3 Palette offset (if 4bpp Color index 1-15 is modified by adding 16 x palette offset) char CTRL2; }; + +// 4BPP sprite mode (add to VERA_SPRITE.ADDR to enable) +const unsigned int VERA_SPRITE_4BPP = 0x0000; // 8BPP sprite mode (add to VERA_SPRITE.ADDR to enable) const unsigned int VERA_SPRITE_8BPP = 0x8000; diff --git a/src/main/kc/include/cx16.h b/src/main/kc/include/cx16.h index 5c201a142..7379ddf7a 100644 --- a/src/main/kc/include/cx16.h +++ b/src/main/kc/include/cx16.h @@ -37,11 +37,19 @@ void()** const KERNEL_IRQ = 0x0314; // $0316 (RAM) BRK vector - The vector used when the KERNAL serves IRQ caused by a BRK void()** const KERNEL_BRK = 0x0316; + // VRAM Address of the default screen char * const DEFAULT_SCREEN = 0x0000; // VRAM Bank (0/1) of the default screen char * const DEFAULT_SCREEN_VBANK = 0; + +// Load a file to memory +// Returns a status: +// - 0xff: Success +// - other: Kernal Error Code (https://commodore.ca/manuals/pdfs/commodore_error_messages.pdf) +char LoadFileBanked( char device, char* filename, dword address); + // Put a single byte into VRAM. // Uses VERA DATA0 // - vbank: Which 64K VRAM bank to put data into (0/1) @@ -64,6 +72,13 @@ char vpeek(char vbank, char* vaddr); // - num: The number of bytes to copy void memcpy_to_vram(char vbank, void* vdest, void* src, unsigned int num ); +// Copy block of banked internal memory (256 banks at A000-BFFF) to VERA VRAM. +// Copies the values of num bytes from the location pointed to by source directly to the memory block pointed to by destination in VRAM. +// - vdest: dword of the destination address in VRAM +// - src: dword of source banked address in RAM. This address is a linair project of the banked memory of 512K to 2048K. +// - num: dword of the number of bytes to copy +void bnkcpy_vram_address(dword vdest, dword src, dword num ); + // Copy block of memory (from VRAM to VRAM) // Copies the values from the location pointed by src to the location pointed by dest. // The method uses the VERA access ports 0 and 1 to copy data from and to in VRAM. @@ -76,10 +91,18 @@ void memcpy_to_vram(char vbank, void* vdest, void* src, unsigned int num ); // - num: The number of bytes to copy void memcpy_in_vram(char dest_bank, void *dest, char dest_increment, char src_bank, void *src, char src_increment, unsigned int num ); -// Set block of memory to a value in VRAM. +// Set block of memory in VRAM to a value . // Sets num bytes to a value to the memory block pointed to by destination in VRAM. // - vbank: Which 64K VRAM bank to put data into (0/1) // - vdest: The destination address in VRAM // - data: The value to set the vram with. // - num: The number of bytes to set void memset_vram(char vbank, void* vdest, char data, unsigned long num ); + +// Set block of memory in VRAM to a word value . +// Sets num words to a value to the memory block pointed to by destination in VRAM. +// - vbank: Which 64K VRAM bank to put data into (0/1) +// - vdest: The destination address in VRAM +// - data: The value to set the vram with. +// - num: The number of bytes to set +void memset_vram_word(char vbank, void* vdest, unsigned int data, unsigned long num ); diff --git a/src/main/kc/include/peekpoke.h b/src/main/kc/include/peekpoke.h new file mode 100644 index 000000000..ad3b51bee --- /dev/null +++ b/src/main/kc/include/peekpoke.h @@ -0,0 +1,16 @@ +// PEEK and POKE macros for those who want to write BASIC code in C +// Based on https://github.com/cc65/cc65/blob/master/include/peekpoke.h + +// Read the absolute memory given by addr and return the value read. +#define PEEK(addr) (*(unsigned char*) (addr)) + +// Read the absolute memory given by addr and return the value read. +// The byte read from the higher address is the high byte of the return value. +#define PEEKW(addr) (*(unsigned int*) (addr)) + +// Writes the value val to the absolute memory address given by addr. +#define POKE(addr,val) (*(unsigned char*) (addr) = (val)) + +// Writes the value val to the absolute memory address given by addr. +// The low byte of val is written to the addr, the high byte is written to addr+1. +#define POKEW(addr,val) (*(unsigned int*) (addr) = (val)) diff --git a/src/main/kc/lib/cx16-kernal.c b/src/main/kc/lib/cx16-kernal.c new file mode 100644 index 000000000..45cb67928 --- /dev/null +++ b/src/main/kc/lib/cx16-kernal.c @@ -0,0 +1,62 @@ +#include +#include + +// Kernal SETNAM function +// SETNAM. Set file name parameters. +void setnam(char* filename) { + char filename_len = (char)strlen(filename); + asm { + // Kernal SETNAM function + // SETNAM. Set file name parameters. + // Input: A = File name length; X/Y = Pointer to file name. + lda filename_len + ldx filename + ldy filename+1 + jsr $ffbd + } +} + +// SETLFS. Set file parameters. +void setlfs(char device) { + asm { + // SETLFS. Set file parameters. + // Input: A = Logical number; X = Device number; Y = Secondary address. + ldx device + lda #1 + ldy #0 + jsr $ffba + } +} + +// LOAD. Load or verify file. (Must call SETLFS and SETNAM beforehands.) +// - verify: 0 = Load, 1-255 = Verify +// +// Returns a status, 0xff: Success other: Kernal Error Code +char load(char* address, char verify) { + char status; + asm { + //LOAD. Load or verify file. (Must call SETLFS and SETNAM beforehands.) + // Input: A: 0 = Load, 1-255 = Verify; X/Y = Load address (if secondary address = 0). + // Output: Carry: 0 = No errors, 1 = Error; A = KERNAL error code (if Carry = 1); X/Y = Address of last byte loaded/verified (if Carry = 0). + ldx address + ldy address+1 + lda verify + jsr $ffd5 + bcs error + lda #$ff + error: + sta status + } + return status; +} + +// GETIN. Read a byte from the input channel +// return: next byte in buffer or 0 if buffer is empty. +char getin() { + char ch; + asm { + jsr $ffe4 + sta ch + } + return ch; +} diff --git a/src/main/kc/lib/cx16.c b/src/main/kc/lib/cx16.c index 090457791..898851c70 100644 --- a/src/main/kc/lib/cx16.c +++ b/src/main/kc/lib/cx16.c @@ -3,6 +3,22 @@ // https://github.com/commanderx16/x16-docs/blob/master/Commander%20X16%20Programmer's%20Reference%20Guide.md #include +#include +#include + +// Load a file to memory +// Returns a status: +// - 0xff: Success +// - other: Kernal Error Code (https://commodore.ca/manuals/pdfs/commodore_error_messages.pdf) +char LoadFileBanked( char device, char* filename, dword address) { + setnam(filename); + setlfs(device); + char bank = (byte)(((((word)<(>address)<<8)|>(>5)+((word)<(>address)<<3)); + char* addr = ((PORT_A = (char)bank; // select the bank + return load(addr, 0); +} // Put a single byte into VRAM. // Uses VERA DATA0 @@ -55,6 +71,39 @@ void memcpy_to_vram(char vbank, void* vdest, void* src, unsigned int num ) { *VERA_DATA0 = *s; } +// Copy block of banked internal memory (256 banks at A000-BFFF) to VERA VRAM. +// Copies the values of num bytes from the location pointed to by source directly to the memory block pointed to by destination in VRAM. +// - vdest: dword of the destination address in VRAM +// - src: dword of source banked address in RAM. This address is a linair project of the banked memory of 512K to 2048K. +// - num: dword of the number of bytes to copy +void bnkcpy_vram_address(dword vdest, dword src, dword num ) { + // Select DATA0 + *VERA_CTRL &= ~VERA_ADDRSEL; + // Set address + *VERA_ADDRX_L = <((vdest); + *VERA_ADDRX_H |= VERA_INC_1; + + dword beg = src; + dword end = src+num; + + char bank = (byte)(((((word)<(>beg)<<8)|>(>5)+((word)<(>beg)<<3)); + + char* addr = ((vdest; + *VERA_ADDRX_H = VERA_INC_1 | vbank; + // Transfer the data + for(unsigned long i = 0; idata; + } +} + // Copy block of memory (from VRAM to VRAM) // Copies the values from the location pointed by src to the location pointed by dest. // The method uses the VERA access ports 0 and 1 to copy data from and to in VRAM. diff --git a/src/test/java/dk/camelot64/kickc/test/TestPrograms.java b/src/test/java/dk/camelot64/kickc/test/TestPrograms.java index 628626867..cf07627f7 100644 --- a/src/test/java/dk/camelot64/kickc/test/TestPrograms.java +++ b/src/test/java/dk/camelot64/kickc/test/TestPrograms.java @@ -467,11 +467,6 @@ public class TestPrograms { compileAndCompare("examples/nes/nes-demo.c"); } - //@Test - //public void testCx16Vera() throws IOException, URISyntaxException { - // compileAndCompare("examples/cx16/cx16-vera.c"); - //} - @Test public void testCx16VeralibTilemap8bpp() throws IOException, URISyntaxException { compileAndCompare("examples/cx16/veralib/tilemap_8bpp_16_x_16.c"); @@ -482,6 +477,16 @@ public class TestPrograms { compileAndCompare("examples/cx16/veralib/bitmap_8bpp_320_x_240.c"); } + @Test + public void testCx16BankAddressing() throws IOException, URISyntaxException { + compileAndCompare("examples/cx16/cx16-bankaddressing.c"); + } + + @Test + public void testCx16LoadFileInBank() throws IOException, URISyntaxException { + compileAndCompare("examples/cx16/cx16-bankload.c"); + } + @Test public void testCx16VeraLayers() throws IOException, URISyntaxException { compileAndCompare("examples/cx16/cx16-veralayers.c"); diff --git a/src/test/kc/examples/cx16/cx16-bankaddressing.c b/src/test/kc/examples/cx16/cx16-bankaddressing.c new file mode 100644 index 000000000..891269299 --- /dev/null +++ b/src/test/kc/examples/cx16/cx16-bankaddressing.c @@ -0,0 +1,36 @@ +// Example program for the Commander X16 +// Demonstrates some bank addressing calculations + +#pragma target(cx16) + +#include +#include <6502.h> +#include +#include +#include +#include + +void main() { + + dword src = (dword)0x02000; + dword num = 64*64*2; + + word inc = 0x0123; + + for(dword src=0x0000;src<0x3F000;src+=num) { + + dword calcbeg = src; + dword calcend = src+num+(-1); + byte bankbeg = (byte)(((((word)<(>calcbeg)<<8)|>(>5)+((word)<(>calcbeg)<<3)); + byte bankend = (byte)(((((word)<(>calcend)<<8)|>(>5)+((word)<(>calcend)<<3)); + const word borderbeg = 0xA000; + const word borderend = 0xA000+0x1FFF; + word beg = (( +#include +#include +#include +#include <6502.h> +#include +#include +#include + +#pragma data_seg(Sprite) +export char SPRITE_PIXELS[] = kickasm(resource "ship.png") {{ + .var pic = LoadPicture("ship.png") + // palette: rgb->idx + .var palette = Hashtable() + // RGB value for each palette index + .var palList = List() + // Next palette index + .var nxt_idx = 0; + // Extract palette while outputting pixels as palete index values + .for (var y=0; y<64; y++) { + .for (var x=0;x<64; x++) { + // Find palette index (add if not known) + .var rgb = pic.getPixel(x,y); + .var idx = palette.get(rgb) + .if(idx==null) { + .eval idx = nxt_idx++; + .eval palette.put(rgb,idx); + .eval palList.add(rgb) + } + } + } + .if(nxt_idx>16) .error "Image has too many colours "+nxt_idx + + .for(var i=0;i<16;i++) { + .var rgb = palList.get(i) + .var red = floor(rgb / [256*256]) + .var green = floor(rgb/256) & 255 + .var blue = rgb & 255 + // bits 4-8: green, bits 0-3 blue + .byte green&$f0 | blue/16 + // bits bits 0-3 red + .byte red/16 + } + + .for (var y=0; y<64; y++) { + .for (var x=0;x<64; x+=2) { + // Find palette index (add if not known) + .var rgb = pic.getPixel(x,y); + .var idx1 = palette.get(rgb) + .if(idx1==null) { + .printnow "unknown rgb value!" + } + // Find palette index (add if not known) + .eval rgb = pic.getPixel(x+1,y); + .var idx2 = palette.get(rgb) + .if(idx2==null) { + .printnow "unknown rgb value!" + } + .byte idx1*16+idx2; + } + } +}}; + +#pragma data_seg(Data) + + + + + +void main() { + + vera_layer_set_text_color_mode( 1, VERA_LAYER_CONFIG_16C ); + screenlayer(1); + clrscr(); + printf("\n\nsprite banked file load and display demo.\n"); + + const dword BANK_SPRITE = 0x12000; // Load in bank 9. + const dword VRAM_SPRITE = 0x10000; // Load in bank 9. + // Sprite attributes: 8bpp, in front, 64x64, address SPRITE_PIXELS_VRAM + struct VERA_SPRITE SPRITE_ATTR = { <(VRAM_SPRITE/32)|VERA_SPRITE_8BPP, 320-32, 240-32, 0x0c, 0xf1 }; + + char status = LoadFileBanked(8, "SPRITE", BANK_SPRITE ); + + bnkcpy_vram_address(VERA_PALETTE+32, BANK_SPRITE-2, 32); + bnkcpy_vram_address(VRAM_SPRITE, BANK_SPRITE+32-2, 64*32); + + SPRITE_ATTR.ADDR = <(VRAM_SPRITE/32)|VERA_SPRITE_4BPP; + SPRITE_ATTR.X = 100; + SPRITE_ATTR.Y = 100; + memcpy_to_vram((char)>VERA_SPRITE_ATTR, +#include +#include + +// Find the value of a keypress as returned by kernal getin() +void main() { + printf("\npress a key\n"); + char test = 0; + while(test==0) test=getin(); + printf("\nchar = %u\n", test); +} \ No newline at end of file diff --git a/src/test/kc/examples/cx16/cx16-sprites.c b/src/test/kc/examples/cx16/cx16-sprites.c index c48ef0f6e..7582b92f3 100644 --- a/src/test/kc/examples/cx16/cx16-sprites.c +++ b/src/test/kc/examples/cx16/cx16-sprites.c @@ -8,7 +8,7 @@ #define NUM_SPRITES 32 // A 64*64 8bpp TUT sprite and palette -__align(0x1000) char SPRITE_PIXELS[64*64+0x200] = kickasm(resource "tut.png") {{ +__align(0x0400) char SPRITE_PIXELS[64*64+0x200] = kickasm(resource "tut.png") {{ .var pic = LoadPicture("tut.png") // palette: rgb->idx .var palette = Hashtable() diff --git a/src/test/kc/examples/cx16/cx16-vera.c b/src/test/kc/examples/cx16/cx16-veramodes.c similarity index 98% rename from src/test/kc/examples/cx16/cx16-vera.c rename to src/test/kc/examples/cx16/cx16-veramodes.c index 6062ed0c9..fb283c974 100644 --- a/src/test/kc/examples/cx16/cx16-vera.c +++ b/src/test/kc/examples/cx16/cx16-veramodes.c @@ -6,14 +6,13 @@ #pragma target(cx16) #include #include +#include #include #include #include #include -char fgetc(); - void main() { do { @@ -48,7 +47,7 @@ void main() { byte menu = 0; while(menu==0) { - menu = fgetc(); + menu = getin(); } textcolor(WHITE); @@ -78,25 +77,25 @@ void main() { text_8_x_8_1BPP_16_color(); break; case 66: - //text_8_x_8_1BPP_256_color(); + text_8_x_8_1BPP_256_color(); break; case 67: tile_8_x_8_2BPP_4_color(); break; case 68: - //tile_16_x_16_2BPP_4_color(); + tile_16_x_16_2BPP_4_color(); break; case 69: - //tile_8_x_8_4BPP_16_color(); + tile_8_x_8_4BPP_16_color(); break; case 70: - //tile_16_x_16_4BPP_16_color(); + tile_16_x_16_4BPP_16_color(); break; case 71: - //tile_8_x_8_8BPP_256_color(); + tile_8_x_8_8BPP_256_color(); break; case 72: - //tile_16_x_16_8BPP_256_color(); + tile_16_x_16_8BPP_256_color(); break; } @@ -113,17 +112,6 @@ void main() { } -char fgetc() { - char * const GETIN = 0xFFE4; - char ch; - asm { - jsr GETIN - sta ch - } - return ch; -} - - void tile_16_x_16_8BPP_256_color() { vera_layer_mode_text( 1, 0x00000, 0x0F800, 128, 128, 8, 8, 256 ); @@ -221,7 +209,7 @@ void tile_16_x_16_8BPP_256_color() { vera_layer_show(0); - while(!fgetc()); + while(!getin()); vera_tile_area(0, 0, 0, 0, 40, 30, 0, 0, 0); @@ -238,7 +226,7 @@ void tile_16_x_16_8BPP_256_color() { row += 2; } - while(!fgetc()); + while(!getin()); memcpy_in_vram(0, 0xF800, VERA_INC_1, 1, 0xF000, VERA_INC_1, 256*8); // We copy the 128 character set of 8 bytes each. } @@ -322,7 +310,7 @@ void tile_8_x_8_8BPP_256_color() { printf("each offset aligns to multiples of 16 colors in the palette!.\n"); printf("however, the first color will always be transparent (black).\n"); - while(!fgetc()); + while(!getin()); memcpy_in_vram(0, 0xF800, VERA_INC_1, 1, 0xF000, VERA_INC_1, 256*8); // We copy the 128 character set of 8 bytes each. } @@ -537,7 +525,7 @@ void tile_16_x_16_4BPP_16_color() { printf("each offset aligns to multiples of 16 colors in the palette!.\n"); printf("however, the first color will always be transparent (black).\n"); - while(!fgetc()); + while(!getin()); } @@ -652,7 +640,7 @@ void tile_8_x_8_4BPP_16_color() { printf("each offset aligns to multiples of 16 colors in the palette!.\n"); printf("however, the first color will always be transparent (black).\n"); - while(!fgetc()); + while(!getin()); } @@ -735,7 +723,7 @@ void tile_16_x_16_2BPP_4_color() { printf("can be used per offset!\n"); printf("however, the first color will always be transparent (black).\n"); - while(!fgetc()); + while(!getin()); } void tile_8_x_8_2BPP_4_color() { @@ -799,7 +787,7 @@ void tile_8_x_8_2BPP_4_color() { printf("can be used per offset!\n"); printf("however, the first color will always be transparent (black).\n"); - while(!fgetc()); + while(!getin()); } @@ -828,7 +816,7 @@ void text_8_x_8_1BPP_256_color() { printf("however, the first color will always be transparent (black).\n"); printf("in this mode, the background color cannot be set and is always transparent.\n"); - while(!fgetc()); + while(!getin()); } void text_8_x_8_1BPP_16_color() { @@ -861,7 +849,7 @@ void text_8_x_8_1BPP_16_color() { printf("however, the first color will always be transparent (black).\n"); printf("in this mode, the background color cannot be set and is always transparent.\n"); - while(!fgetc()); + while(!getin()); } @@ -900,7 +888,7 @@ void bitmap_320_x_240_1BPP() { textcolor(YELLOW); printf("press a key ..."); - while(!fgetc()) { + while(!getin()) { bitmap_line(modr16u(rand(),320,0), modr16u(rand(),320,0), modr16u(rand(),200,0), modr16u(rand(),200,0), rand()&1); }; @@ -917,7 +905,7 @@ void bitmap_320_x_240_1BPP() { word x = 0; byte color = 0; - while(!fgetc()) { + while(!getin()) { bitmap_line(x, x, 0, 199, color); color++; if(color>1) color=0; @@ -964,7 +952,7 @@ void bitmap_640_x_480_1BPP() { textcolor(YELLOW); printf("press a key ..."); - while(!fgetc()) { + while(!getin()) { bitmap_line(modr16u(rand(),639,0), modr16u(rand(),639,0), modr16u(rand(),399,0), modr16u(rand(),399,0), rand()&1); }; @@ -981,7 +969,7 @@ void bitmap_640_x_480_1BPP() { word x = 0; byte color = 0; - while(!fgetc()) { + while(!getin()) { bitmap_line(x, x, 0, 399, color); color++; if(color>1) color=0; @@ -1026,7 +1014,7 @@ void bitmap_320_x_240_2BPP() { textcolor(YELLOW); printf("press a key ..."); - while(!fgetc()) { + while(!getin()) { bitmap_line(modr16u(rand(),320,0), modr16u(rand(),320,0), modr16u(rand(),200,0), modr16u(rand(),200,0), rand()&3); }; @@ -1043,7 +1031,7 @@ void bitmap_320_x_240_2BPP() { word x = 0; byte color = 0; - while(!fgetc()) { + while(!getin()) { bitmap_line(x, x, 0, 199, color); color++; if(color>3) color=0; @@ -1088,7 +1076,7 @@ void bitmap_640_x_480_2BPP() { textcolor(YELLOW); printf("press a key ..."); - while(!fgetc()) { + while(!getin()) { bitmap_line(modr16u(rand(),639,0), modr16u(rand(),639,0), modr16u(rand(),399,0), modr16u(rand(),399,0), rand()&3); }; @@ -1105,7 +1093,7 @@ void bitmap_640_x_480_2BPP() { word x = 0; byte color = 0; - while(!fgetc()) { + while(!getin()) { bitmap_line(x, x, 0, 399, color); color++; if(color>3) color=0; @@ -1151,7 +1139,7 @@ void bitmap_320_x_240_4BPP() { textcolor(YELLOW); printf("press a key ..."); - while(!fgetc()) { + while(!getin()) { bitmap_line(modr16u(rand(),320,0), modr16u(rand(),320,0), modr16u(rand(),200,0), modr16u(rand(),200,0), rand()&15); }; @@ -1168,7 +1156,7 @@ void bitmap_320_x_240_4BPP() { word x = 0; byte color = 0; - while(!fgetc()) { + while(!getin()) { bitmap_line(x, x, 0, 199, color); color++; if(color>15) color=0; @@ -1214,7 +1202,7 @@ void bitmap_320_x_240_8BPP() { textcolor(YELLOW); printf("press a key ..."); - while(!fgetc()) { + while(!getin()) { bitmap_line(modr16u(rand(),320,0), modr16u(rand(),320,0), modr16u(rand(),200,0), modr16u(rand(),200,0), rand()&255); }; @@ -1231,7 +1219,7 @@ void bitmap_320_x_240_8BPP() { word x = 0; byte color = 0; - while(!fgetc()) { + while(!getin()) { bitmap_line(x, x, 0, 199, color); color++; x++; diff --git a/src/test/kc/examples/cx16/ship.png b/src/test/kc/examples/cx16/ship.png new file mode 100644 index 000000000..295195466 Binary files /dev/null and b/src/test/kc/examples/cx16/ship.png differ diff --git a/src/test/kc/examples/cx16/spacedemo/Metal_1/frame_1.png b/src/test/kc/examples/cx16/spacedemo/Metal_1/frame_1.png new file mode 100644 index 000000000..86a26465f Binary files /dev/null and b/src/test/kc/examples/cx16/spacedemo/Metal_1/frame_1.png differ diff --git a/src/test/kc/examples/cx16/spacedemo/Metal_1/frame_2.png b/src/test/kc/examples/cx16/spacedemo/Metal_1/frame_2.png new file mode 100644 index 000000000..2de84d925 Binary files /dev/null and b/src/test/kc/examples/cx16/spacedemo/Metal_1/frame_2.png differ diff --git a/src/test/kc/examples/cx16/spacedemo/Metal_1/frame_3.png b/src/test/kc/examples/cx16/spacedemo/Metal_1/frame_3.png new file mode 100644 index 000000000..6e2214315 Binary files /dev/null and b/src/test/kc/examples/cx16/spacedemo/Metal_1/frame_3.png differ diff --git a/src/test/kc/examples/cx16/spacedemo/Metal_1/frame_4.png b/src/test/kc/examples/cx16/spacedemo/Metal_1/frame_4.png new file mode 100644 index 000000000..0b142132f Binary files /dev/null and b/src/test/kc/examples/cx16/spacedemo/Metal_1/frame_4.png differ diff --git a/src/test/kc/examples/cx16/spacedemo/Metal_1/metal_1.png b/src/test/kc/examples/cx16/spacedemo/Metal_1/metal_1.png new file mode 100644 index 000000000..7cbec374e Binary files /dev/null and b/src/test/kc/examples/cx16/spacedemo/Metal_1/metal_1.png differ diff --git a/src/test/kc/examples/cx16/spacedemo/Metal_1/metal_2.png b/src/test/kc/examples/cx16/spacedemo/Metal_1/metal_2.png new file mode 100644 index 000000000..162915e83 Binary files /dev/null and b/src/test/kc/examples/cx16/spacedemo/Metal_1/metal_2.png differ diff --git a/src/test/kc/examples/cx16/spacedemo/Metal_1/metal_3.png b/src/test/kc/examples/cx16/spacedemo/Metal_1/metal_3.png new file mode 100644 index 000000000..6a08b2887 Binary files /dev/null and b/src/test/kc/examples/cx16/spacedemo/Metal_1/metal_3.png differ diff --git a/src/test/kc/examples/cx16/spacedemo/Metal_1/metal_4.png b/src/test/kc/examples/cx16/spacedemo/Metal_1/metal_4.png new file mode 100644 index 000000000..f24b5a851 Binary files /dev/null and b/src/test/kc/examples/cx16/spacedemo/Metal_1/metal_4.png differ diff --git a/src/test/kc/examples/cx16/spacedemo/Ship_1/ship_1_360_1.png b/src/test/kc/examples/cx16/spacedemo/Ship_1/ship_1_360_1.png new file mode 100644 index 000000000..295195466 Binary files /dev/null and b/src/test/kc/examples/cx16/spacedemo/Ship_1/ship_1_360_1.png differ diff --git a/src/test/kc/examples/cx16/spacedemo/Ship_1/ship_1_360_10.png b/src/test/kc/examples/cx16/spacedemo/Ship_1/ship_1_360_10.png new file mode 100644 index 000000000..d40a2936f Binary files /dev/null and b/src/test/kc/examples/cx16/spacedemo/Ship_1/ship_1_360_10.png differ diff --git a/src/test/kc/examples/cx16/spacedemo/Ship_1/ship_1_360_11.png b/src/test/kc/examples/cx16/spacedemo/Ship_1/ship_1_360_11.png new file mode 100644 index 000000000..62ad7fb17 Binary files /dev/null and b/src/test/kc/examples/cx16/spacedemo/Ship_1/ship_1_360_11.png differ diff --git a/src/test/kc/examples/cx16/spacedemo/Ship_1/ship_1_360_12.png b/src/test/kc/examples/cx16/spacedemo/Ship_1/ship_1_360_12.png new file mode 100644 index 000000000..c58128a1d Binary files /dev/null and b/src/test/kc/examples/cx16/spacedemo/Ship_1/ship_1_360_12.png differ diff --git a/src/test/kc/examples/cx16/spacedemo/Ship_1/ship_1_360_2.png b/src/test/kc/examples/cx16/spacedemo/Ship_1/ship_1_360_2.png new file mode 100644 index 000000000..b690978fb Binary files /dev/null and b/src/test/kc/examples/cx16/spacedemo/Ship_1/ship_1_360_2.png differ diff --git a/src/test/kc/examples/cx16/spacedemo/Ship_1/ship_1_360_3.png b/src/test/kc/examples/cx16/spacedemo/Ship_1/ship_1_360_3.png new file mode 100644 index 000000000..e324623f2 Binary files /dev/null and b/src/test/kc/examples/cx16/spacedemo/Ship_1/ship_1_360_3.png differ diff --git a/src/test/kc/examples/cx16/spacedemo/Ship_1/ship_1_360_4.png b/src/test/kc/examples/cx16/spacedemo/Ship_1/ship_1_360_4.png new file mode 100644 index 000000000..e25c7f99a Binary files /dev/null and b/src/test/kc/examples/cx16/spacedemo/Ship_1/ship_1_360_4.png differ diff --git a/src/test/kc/examples/cx16/spacedemo/Ship_1/ship_1_360_5.png b/src/test/kc/examples/cx16/spacedemo/Ship_1/ship_1_360_5.png new file mode 100644 index 000000000..9a1920d03 Binary files /dev/null and b/src/test/kc/examples/cx16/spacedemo/Ship_1/ship_1_360_5.png differ diff --git a/src/test/kc/examples/cx16/spacedemo/Ship_1/ship_1_360_6.png b/src/test/kc/examples/cx16/spacedemo/Ship_1/ship_1_360_6.png new file mode 100644 index 000000000..6f8717f84 Binary files /dev/null and b/src/test/kc/examples/cx16/spacedemo/Ship_1/ship_1_360_6.png differ diff --git a/src/test/kc/examples/cx16/spacedemo/Ship_1/ship_1_360_7.png b/src/test/kc/examples/cx16/spacedemo/Ship_1/ship_1_360_7.png new file mode 100644 index 000000000..c5651f50a Binary files /dev/null and b/src/test/kc/examples/cx16/spacedemo/Ship_1/ship_1_360_7.png differ diff --git a/src/test/kc/examples/cx16/spacedemo/Ship_1/ship_1_360_8.png b/src/test/kc/examples/cx16/spacedemo/Ship_1/ship_1_360_8.png new file mode 100644 index 000000000..c9930517d Binary files /dev/null and b/src/test/kc/examples/cx16/spacedemo/Ship_1/ship_1_360_8.png differ diff --git a/src/test/kc/examples/cx16/spacedemo/Ship_1/ship_1_360_9.png b/src/test/kc/examples/cx16/spacedemo/Ship_1/ship_1_360_9.png new file mode 100644 index 000000000..544b19308 Binary files /dev/null and b/src/test/kc/examples/cx16/spacedemo/Ship_1/ship_1_360_9.png differ diff --git a/src/test/kc/examples/cx16/spacedemo/spacedemo.c b/src/test/kc/examples/cx16/spacedemo/spacedemo.c new file mode 100644 index 000000000..7a1fdb595 --- /dev/null +++ b/src/test/kc/examples/cx16/spacedemo/spacedemo.c @@ -0,0 +1,382 @@ +// Example program for the Commander X16 + +#pragma target(cx16) +#pragma link("spacedemo.ld") + +#pragma data_seg(Data) + +#include +#include +#include +#include <6502.h> +#include +#include +#include + +const byte NUM_SPRITES = 12; +const byte NUM_TILES_SMALL = 4; +const byte NUM_TILES_LARGE = 4; + +#pragma data_seg(Palettes) +export char* PALETTES; + +#pragma data_seg(Sprites) +export char SPRITE_PIXELS[] = kickasm(resource "Ship_1/ship_1_360_1.png") {{ + .var pic = LoadPicture("Ship_1/ship_1_360_1.png") + // palette: rgb->idx + .var palette = Hashtable() + // RGB value for each palette index + .var palList = List() + // Next palette index + .var nxt_idx = 0; + // Extract palette while outputting pixels as palete index values + .for (var y=0; y<64; y++) { + .for (var x=0;x<64; x++) { + // Find palette index (add if not known) + .var rgb = pic.getPixel(x,y); + .var idx = palette.get(rgb) + .if(idx==null) { + .eval idx = nxt_idx++; + .eval palette.put(rgb,idx); + .eval palList.add(rgb) + } + } + } + .if(nxt_idx>16) .error "Image has too many colours "+nxt_idx + + .segment Palettes + .for(var i=0;i<16;i++) { + .var rgb = palList.get(i) + .var red = floor(rgb / [256*256]) + .var green = floor(rgb/256) & 255 + .var blue = rgb & 255 + // bits 4-8: green, bits 0-3 blue + .byte green&$f0 | blue/16 + // bits bits 0-3 red + .byte red/16 + } + + .segment Sprites + .for(var p=1;p<=NUM_SPRITES;p++) { + .var pic = LoadPicture("Ship_1/ship_1_360_" + p + ".png") + .for (var y=0; y<64; y++) { + .for (var x=0;x<64; x+=2) { + // Find palette index (add if not known) + .var rgb = pic.getPixel(x,y); + .var idx1 = palette.get(rgb) + .if(idx1==null) { + .printnow "unknown rgb value!" + } + // Find palette index (add if not known) + .eval rgb = pic.getPixel(x+1,y); + .var idx2 = palette.get(rgb) + .if(idx2==null) { + .printnow "unknown rgb value!" + } + .byte idx1*16+idx2; + } + } + } +}}; + +#pragma data_seg(TileS) +export char TILE_PIXELS_SMALL[] = kickasm(resource "Metal_1/frame_1.png") {{ + // palette: rgb->idx + .var palette2 = Hashtable() + // RGB value for each palette index + .var palList2 = List() + // Next palette index + // Extract palette while outputting pixels as palete index values + .var nxt_idx2 = 0; + .for(var p=1;p<=NUM_TILES_SMALL;p++) { + .var pic = LoadPicture("Metal_1/frame_" + p + ".png") + .for (var y=0; y<32; y++) { + .for (var x=0;x<32; x++) { + // Find palette index (add if not known) + .var rgb = pic.getPixel(x,y); + .var idx = palette2.get(rgb) + .if(idx==null) { + .eval idx = nxt_idx2++; + .eval palette2.put(rgb,idx); + .eval palList2.add(rgb) + } + } + } + } + .if(nxt_idx2>16) .error "Image has too many colours "+nxt_idx2 + + .segment Palettes + .for(var i=0;i<16;i++) { + .var rgb = 16*256*256+16*256+16 + .if(iidx + .var palette3 = Hashtable() + // RGB value for each palette index + .var palList3 = List() + // Next palette index + .var nxt_idx3 = 0; + // Extract palette while outputting pixels as palete index values + .for (var y=0; y<64; y++) { + .for (var x=0;x<64; x++) { + // Find palette index (add if not known) + .var rgb = pic3.getPixel(x,y); + .var idx = palette3.get(rgb) + .if(idx==null) { + .eval idx = nxt_idx3++; + .eval palette3.put(rgb,idx); + .eval palList3.add(rgb) + } + } + } + .if(nxt_idx3>16) .error "Image has too many colours "+nxt_idx3 + + .segment Palettes + .for(var i=0;i<16;i++) { + .var rgb = 0 + .if(iVERA_SPRITE_ATTR, vram_sprite_attr, &SPRITE_ATTR, sizeof(SPRITE_ATTR)); + vram_sprite_attr += sizeof(SPRITE_ATTR); + sprite_offset += 64; + } + // Enable sprites + *VERA_CTRL &= ~VERA_DCSEL; + *VERA_DC_VIDEO |= VERA_SPRITES_ENABLE; + // Enable VSYNC IRQ (also set line bit 8 to 0) + SEI(); + *KERNEL_IRQ = &irq_vsync; + *VERA_IEN = VERA_VSYNC; + CLI(); + + while(!getin()); +} + +volatile byte i = 0; +volatile byte a = 4; +volatile word vscroll = 0; +volatile word scroll_action = 2; + +// VSYNC Interrupt Routine +__interrupt(rom_sys_cx16) void irq_vsync() { + // Move the sprite around + + a--; + if(a==0) { + a=4; + const char vram_sprite_attr_bank = (char)>VERA_SPRITE_ATTR; + char *vram_sprite_attr = =NUM_SPRITES) { + x-=NUM_SPRITES; + } + SPRITE_ATTR.ADDR = sprites[x]; + SPRITE_ATTR.X = (word)40+((word)(s&03)<<7); + SPRITE_ATTR.Y = (word)100+((word)(s>>2)<<7); + // Copy sprite positions to VRAM (the 4 relevant bytes in VERA_SPRITE_ATTR) + memcpy_to_vram(vram_sprite_attr_bank, vram_sprite_attr, &SPRITE_ATTR, 6); + vram_sprite_attr += sizeof(SPRITE_ATTR); + } + + i++; + if(i>=NUM_SPRITES) i=0; + + } + + if(scroll_action--) { + scroll_action = 2; + vscroll++; + if(vscroll>(32+64)*2-1) vscroll=0; + vera_layer_set_vertical_scroll(0,vscroll); + } + + // Reset the VSYNC interrupt + *VERA_ISR = VERA_VSYNC; +} diff --git a/src/test/kc/examples/cx16/spacedemo/spacedemo.ld b/src/test/kc/examples/cx16/spacedemo/spacedemo.ld new file mode 100644 index 000000000..59bb4b240 --- /dev/null +++ b/src/test/kc/examples/cx16/spacedemo/spacedemo.ld @@ -0,0 +1,16 @@ +// Create a bunch of files +.file [name="%O", type="prg", segments="Program"] +.file [name="SPRITES", type="bin", segments="Sprites"] +.file [name="TILES", type="bin", segments="TileS"] +.file [name="TILEB", type="bin", segments="TileB"] +.file [name="PALETTES", type="bin", segments="Palettes"] +.segmentdef Program [segments="Basic, Code, Data"] +.segmentdef Basic [start=$0801] +.segmentdef Code [start=%P] +.segmentdef Data [startAfter="Code"] +.segment Basic +:BasicUpstart(%E) +.segmentdef Sprites +.segmentdef TileS +.segmentdef TileB +.segmentdef Palettes diff --git a/src/test/ref/examples/cx16/cx16-bankaddressing.asm b/src/test/ref/examples/cx16/cx16-bankaddressing.asm new file mode 100644 index 000000000..c1f2818e4 --- /dev/null +++ b/src/test/ref/examples/cx16/cx16-bankaddressing.asm @@ -0,0 +1,1941 @@ +// Example program for the Commander X16 +// Demonstrates some bank addressing calculations +.cpu _65c02 + // Commodore 64 PRG executable file +.file [name="cx16-bankaddressing.prg", type="prg", segments="Program"] +.segmentdef Program [segments="Basic, Code, Data"] +.segmentdef Basic [start=$0801] +.segmentdef Code [start=$80d] +.segmentdef Data [startAfter="Code"] +.segment Basic +:BasicUpstart(__start) + .const WHITE = 1 + .const BLUE = 6 + .const VERA_INC_1 = $10 + .const VERA_ADDRSEL = 1 + .const VERA_LAYER_WIDTH_128 = $20 + .const VERA_LAYER_WIDTH_MASK = $30 + .const VERA_LAYER_HEIGHT_64 = $40 + .const VERA_LAYER_HEIGHT_MASK = $c0 + .const VERA_LAYER_CONFIG_256C = 8 + .const VERA_LAYER_TILEBASE_MASK = $fc + .const SIZEOF_WORD = 2 + .const SIZEOF_POINTER = 2 + .const SIZEOF_DWORD = 4 + .const OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS = 1 + .const SIZEOF_STRUCT_PRINTF_BUFFER_NUMBER = $c + // $9F20 VRAM Address (7:0) + .label VERA_ADDRX_L = $9f20 + // $9F21 VRAM Address (15:8) + .label VERA_ADDRX_M = $9f21 + // $9F22 VRAM Address (7:0) + // Bit 4-7: Address Increment The following is the amount incremented per value value:increment + // 0:0, 1:1, 2:2, 3:4, 4:8, 5:16, 6:32, 7:64, 8:128, 9:256, 10:512, 11:40, 12:80, 13:160, 14:320, 15:640 + // Bit 3: DECR Setting the DECR bit, will decrement instead of increment by the value set by the 'Address Increment' field. + // Bit 0: VRAM Address (16) + .label VERA_ADDRX_H = $9f22 + // $9F23 DATA0 VRAM Data port 0 + .label VERA_DATA0 = $9f23 + // $9F24 DATA1 VRAM Data port 1 + .label VERA_DATA1 = $9f24 + // $9F25 CTRL Control + // Bit 7: Reset + // Bit 1: DCSEL + // Bit 2: ADDRSEL + .label VERA_CTRL = $9f25 + // $9F2A DC_HSCALE (DCSEL=0) Active Display H-Scale + .label VERA_DC_HSCALE = $9f2a + // $9F2B DC_VSCALE (DCSEL=0) Active Display V-Scale + .label VERA_DC_VSCALE = $9f2b + // $9F2D L0_CONFIG Layer 0 Configuration + .label VERA_L0_CONFIG = $9f2d + // $9F2E L0_MAPBASE Layer 0 Map Base Address (16:9) + .label VERA_L0_MAPBASE = $9f2e + // Bit 0: Tile Width (0:8 pixels, 1:16 pixels) + .label VERA_L0_TILEBASE = $9f2f + // $9F34 L1_CONFIG Layer 1 Configuration + .label VERA_L1_CONFIG = $9f34 + // $9F35 L1_MAPBASE Layer 1 Map Base Address (16:9) + .label VERA_L1_MAPBASE = $9f35 + // $9F36 L1_TILEBASE Layer 1 Tile Base + // Bit 2-7: Tile Base Address (16:11) + // Bit 1: Tile Height (0:8 pixels, 1:16 pixels) + // Bit 0: Tile Width (0:8 pixels, 1:16 pixels) + .label VERA_L1_TILEBASE = $9f36 + // Variable holding the screen width; + .label conio_screen_width = $12 + // Variable holding the screen height; + .label conio_screen_height = $13 + // Variable holding the screen layer on the VERA card with which conio interacts; + .label conio_screen_layer = $14 + // Variables holding the current map width and map height of the layer. + .label conio_width = $15 + .label conio_height = $17 + .label conio_rowshift = $19 + .label conio_rowskip = $1a + .label CONIO_SCREEN_BANK = $38 + // The screen width + // The screen height + // The text screen base address, which is a 16:0 bit value in VERA VRAM. + // That is 128KB addressable space, thus 17 bits in total. + // CONIO_SCREEN_TEXT contains bits 15:0 of the address. + // CONIO_SCREEN_BANK contains bit 16, the the 64K memory bank in VERA VRAM (the upper 17th bit). + // !!! note that these values are not const for the cx16! + // This conio implements the two layers of VERA, which can be layer 0 or layer 1. + // Configuring conio to output to a different layer, will change these fields to the address base + // configured using VERA_L0_MAPBASE = 0x9f2e or VERA_L1_MAPBASE = 0x9f35. + // Using the function setscreenlayer(layer) will re-calculate using CONIO_SCREEN_TEXT and CONIO_SCREEN_BASE + // based on the values of VERA_L0_MAPBASE or VERA_L1_MAPBASE, mapping the base address of the selected layer. + // The function setscreenlayermapbase(layer,mapbase) allows to configure bit 16:9 of the + // mapbase address of the time map in VRAM of the selected layer VERA_L0_MAPBASE or VERA_L1_MAPBASE. + .label CONIO_SCREEN_TEXT = $39 +.segment Code +__start: { + // conio_screen_width = 0 + lda #0 + sta.z conio_screen_width + // conio_screen_height = 0 + sta.z conio_screen_height + // conio_screen_layer = 1 + lda #1 + sta.z conio_screen_layer + // conio_width = 0 + lda #<0 + sta.z conio_width + sta.z conio_width+1 + // conio_height = 0 + sta.z conio_height + sta.z conio_height+1 + // conio_rowshift = 0 + sta.z conio_rowshift + // conio_rowskip = 0 + sta.z conio_rowskip + sta.z conio_rowskip+1 + // #pragma constructor_for(conio_x16_init, cputc, clrscr, cscroll) + jsr conio_x16_init + jsr main + rts +} +// Set initial cursor position +conio_x16_init: { + // Position cursor at current line + .label BASIC_CURSOR_LINE = $d6 + .label line = 2 + // line = *BASIC_CURSOR_LINE + lda BASIC_CURSOR_LINE + sta.z line + // vera_layer_mode_text(1,(dword)0x00000,(dword)0x0F800,128,64,8,8,16) + jsr vera_layer_mode_text + // screensize(&conio_screen_width, &conio_screen_height) + jsr screensize + // screenlayer(1) + jsr screenlayer + // vera_layer_set_textcolor(1, WHITE) + jsr vera_layer_set_textcolor + // vera_layer_set_backcolor(1, BLUE) + jsr vera_layer_set_backcolor + // vera_layer_set_mapbase(0,0x20) + ldx #$20 + lda #0 + jsr vera_layer_set_mapbase + // vera_layer_set_mapbase(1,0x00) + ldx #0 + lda #1 + jsr vera_layer_set_mapbase + // if(line>=CONIO_HEIGHT) + lda.z line + cmp.z conio_screen_height + bcc __b1 + // line=CONIO_HEIGHT-1 + ldx.z conio_screen_height + dex + stx.z line + __b1: + // gotoxy(0, line) + ldx.z line + jsr gotoxy + // } + rts +} +// Functions for performing input and output. +main: { + .const borderbeg = $a000 + .const inc = $123 + .label __1 = $1c + .label __3 = $20 + .label __4 = $20 + .label __6 = $22 + .label __8 = $24 + .label __9 = $24 + .label __10 = $26 + .label __11 = $26 + .label __13 = $24 + .label __14 = $2b + .label __15 = $2b + .label __17 = $2d + .label __19 = $2f + .label __20 = $2f + .label __21 = $31 + .label __22 = $31 + .label __24 = $2f + .label __25 = $f + .label __27 = $36 + .label __30 = $24 + .label __31 = $28 + .label __32 = $2f + .label __33 = $33 + .label calcend = $1c + .label bankbeg = $2a + .label bankend = $35 + .label beg = $f + .label end = $36 + .label num = 7 + .label src1 = 3 + lda #<$40*$40*2 + sta.z num + lda #>$40*$40*2 + sta.z num+1 + lda #<$40*$40*2>>$10 + sta.z num+2 + lda #>$40*$40*2>>$10 + sta.z num+3 + lda #<0 + sta.z src1 + sta.z src1+1 + lda #<0>>$10 + sta.z src1+2 + lda #>0>>$10 + sta.z src1+3 + __b1: + // for(dword src=0x0000;src<0x3F000;src+=num) + lda.z src1+3 + cmp #>$3f000>>$10 + bcc __b2 + bne !+ + lda.z src1+2 + cmp #<$3f000>>$10 + bcc __b2 + bne !+ + lda.z src1+1 + cmp #>$3f000 + bcc __b2 + bne !+ + lda.z src1 + cmp #<$3f000 + bcc __b2 + !: + // } + rts + __b2: + // src+num + lda.z src1 + clc + adc.z num + sta.z __1 + lda.z src1+1 + adc.z num+1 + sta.z __1+1 + lda.z src1+2 + adc.z num+2 + sta.z __1+2 + lda.z src1+3 + adc.z num+3 + sta.z __1+3 + // calcend = src+num+(-1) + lda.z calcend + clc + adc #-1 + sta.z calcend + bcc !+ + inc.z calcend+1 + bne !+ + inc.z calcend+2 + bne !+ + inc.z calcend+3 + !: + // >calcbeg + lda.z src1+2 + sta.z __3 + lda.z src1+3 + sta.z __3+1 + // (>calcbeg)<<8 + lda.z __4 + sta.z __4+1 + lda #0 + sta.z __4 + // <(>calcbeg)<<8 + tay + // (calcbeg)<<8)|>(calcbeg)<<8)|>(>5 + lsr.z __9+1 + ror.z __9 + lsr.z __9+1 + ror.z __9 + lsr.z __9+1 + ror.z __9 + lsr.z __9+1 + ror.z __9 + lsr.z __9+1 + ror.z __9 + // >calcbeg + lda.z src1+2 + sta.z __10 + lda.z src1+3 + sta.z __10+1 + // (>calcbeg)<<3 + asl.z __11 + rol.z __11+1 + asl.z __11 + rol.z __11+1 + asl.z __11 + rol.z __11+1 + // <(>calcbeg)<<3 + lda.z __11 + // ((((word)<(>calcbeg)<<8)|>(>5)+((word)<(>calcbeg)<<3) + sta.z __31 + tya + sta.z __31+1 + lda.z __13 + clc + adc.z __31 + sta.z __13 + lda.z __13+1 + adc.z __31+1 + sta.z __13+1 + // bankbeg = (byte)(((((word)<(>calcbeg)<<8)|>(>5)+((word)<(>calcbeg)<<3)) + lda.z __13 + sta.z bankbeg + // >calcend + lda.z calcend+2 + sta.z __14 + lda.z calcend+3 + sta.z __14+1 + // (>calcend)<<8 + lda.z __15 + sta.z __15+1 + tya + sta.z __15 + // <(>calcend)<<8 + tay + // (calcend)<<8)|>(calcend)<<8)|>(>5 + lsr.z __20+1 + ror.z __20 + lsr.z __20+1 + ror.z __20 + lsr.z __20+1 + ror.z __20 + lsr.z __20+1 + ror.z __20 + lsr.z __20+1 + ror.z __20 + // >calcend + lda.z calcend+2 + sta.z __21 + lda.z calcend+3 + sta.z __21+1 + // (>calcend)<<3 + asl.z __22 + rol.z __22+1 + asl.z __22 + rol.z __22+1 + asl.z __22 + rol.z __22+1 + // <(>calcend)<<3 + lda.z __22 + // ((((word)<(>calcend)<<8)|>(>5)+((word)<(>calcend)<<3) + sta.z __33 + tya + sta.z __33+1 + lda.z __24 + clc + adc.z __33 + sta.z __24 + lda.z __24+1 + adc.z __33+1 + sta.z __24+1 + // bankend = (byte)(((((word)<(>calcend)<<8)|>(>5)+((word)<(>calcend)<<3)) + lda.z __24 + sta.z bankend + // $1fff + sta.z beg+1 + // $1fff + sta.z end+1 + // beg += borderbeg + // same for the end; + clc + lda.z beg + adc #borderbeg + sta.z beg+1 + // end += borderbeg + clc + lda.z end + adc #borderbeg + sta.z end+1 + // printf("cbeg=%x, add=%x, cend=%x, bbeg=%x, bend=%x, beg=%x, end=%x\n", calcbeg, num, calcend, bankbeg, bankend, beg, end ) + lda #s + sta.z cputs.s+1 + jsr cputs + // printf("cbeg=%x, add=%x, cend=%x, bbeg=%x, bend=%x, beg=%x, end=%x\n", calcbeg, num, calcend, bankbeg, bankend, beg, end ) + lda.z src1 + sta.z printf_ulong.uvalue + lda.z src1+1 + sta.z printf_ulong.uvalue+1 + lda.z src1+2 + sta.z printf_ulong.uvalue+2 + lda.z src1+3 + sta.z printf_ulong.uvalue+3 + jsr printf_ulong + // printf("cbeg=%x, add=%x, cend=%x, bbeg=%x, bend=%x, beg=%x, end=%x\n", calcbeg, num, calcend, bankbeg, bankend, beg, end ) + lda #s1 + sta.z cputs.s+1 + jsr cputs + // printf("cbeg=%x, add=%x, cend=%x, bbeg=%x, bend=%x, beg=%x, end=%x\n", calcbeg, num, calcend, bankbeg, bankend, beg, end ) + lda.z num + sta.z printf_ulong.uvalue + lda.z num+1 + sta.z printf_ulong.uvalue+1 + lda.z num+2 + sta.z printf_ulong.uvalue+2 + lda.z num+3 + sta.z printf_ulong.uvalue+3 + jsr printf_ulong + // printf("cbeg=%x, add=%x, cend=%x, bbeg=%x, bend=%x, beg=%x, end=%x\n", calcbeg, num, calcend, bankbeg, bankend, beg, end ) + lda #s2 + sta.z cputs.s+1 + jsr cputs + // printf("cbeg=%x, add=%x, cend=%x, bbeg=%x, bend=%x, beg=%x, end=%x\n", calcbeg, num, calcend, bankbeg, bankend, beg, end ) + lda.z calcend + sta.z printf_ulong.uvalue + lda.z calcend+1 + sta.z printf_ulong.uvalue+1 + lda.z calcend+2 + sta.z printf_ulong.uvalue+2 + lda.z calcend+3 + sta.z printf_ulong.uvalue+3 + jsr printf_ulong + // printf("cbeg=%x, add=%x, cend=%x, bbeg=%x, bend=%x, beg=%x, end=%x\n", calcbeg, num, calcend, bankbeg, bankend, beg, end ) + lda #s3 + sta.z cputs.s+1 + jsr cputs + // printf("cbeg=%x, add=%x, cend=%x, bbeg=%x, bend=%x, beg=%x, end=%x\n", calcbeg, num, calcend, bankbeg, bankend, beg, end ) + ldx.z bankbeg + jsr printf_uchar + // printf("cbeg=%x, add=%x, cend=%x, bbeg=%x, bend=%x, beg=%x, end=%x\n", calcbeg, num, calcend, bankbeg, bankend, beg, end ) + lda #s4 + sta.z cputs.s+1 + jsr cputs + // printf("cbeg=%x, add=%x, cend=%x, bbeg=%x, bend=%x, beg=%x, end=%x\n", calcbeg, num, calcend, bankbeg, bankend, beg, end ) + ldx.z bankend + jsr printf_uchar + // printf("cbeg=%x, add=%x, cend=%x, bbeg=%x, bend=%x, beg=%x, end=%x\n", calcbeg, num, calcend, bankbeg, bankend, beg, end ) + lda #s5 + sta.z cputs.s+1 + jsr cputs + // printf("cbeg=%x, add=%x, cend=%x, bbeg=%x, bend=%x, beg=%x, end=%x\n", calcbeg, num, calcend, bankbeg, bankend, beg, end ) + jsr printf_uint + // printf("cbeg=%x, add=%x, cend=%x, bbeg=%x, bend=%x, beg=%x, end=%x\n", calcbeg, num, calcend, bankbeg, bankend, beg, end ) + lda #s6 + sta.z cputs.s+1 + jsr cputs + // printf("cbeg=%x, add=%x, cend=%x, bbeg=%x, bend=%x, beg=%x, end=%x\n", calcbeg, num, calcend, bankbeg, bankend, beg, end ) + lda.z end + sta.z printf_uint.uvalue + lda.z end+1 + sta.z printf_uint.uvalue+1 + jsr printf_uint + // printf("cbeg=%x, add=%x, cend=%x, bbeg=%x, bend=%x, beg=%x, end=%x\n", calcbeg, num, calcend, bankbeg, bankend, beg, end ) + lda #s7 + sta.z cputs.s+1 + jsr cputs + // num+=inc + lda.z num + clc + adc #inc + sta.z num+1 + lda.z num+2 + adc #0 + sta.z num+2 + lda.z num+3 + adc #0 + sta.z num+3 + // src+=num + lda.z src1 + clc + adc.z num + sta.z src1 + lda.z src1+1 + adc.z num+1 + sta.z src1+1 + lda.z src1+2 + adc.z num+2 + sta.z src1+2 + lda.z src1+3 + adc.z num+3 + sta.z src1+3 + jmp __b1 + .segment Data + s: .text "cbeg=" + .byte 0 + s1: .text ", add=" + .byte 0 + s2: .text ", cend=" + .byte 0 + s3: .text ", bbeg=" + .byte 0 + s4: .text ", bend=" + .byte 0 + s5: .text ", beg=" + .byte 0 + s6: .text ", end=" + .byte 0 + s7: .text @"\n" + .byte 0 +} +.segment Code +// Set a vera layer in text mode and configure the: +// - layer: Value of 0 or 1. +// - mapbase_address: A dword typed address (4 bytes), that specifies the full address of the map base. +// The function does the translation from the dword that contains the 17 bit address, +// to the respective mapbase vera register. +// Note that the register only specifies bits 16:9 of the address, +// so the resulting address in the VERA VRAM is always aligned to a multiple of 512 bytes. +// - tilebase_address: A dword typed address (4 bytes), that specifies the base address of the tile map. +// The function does the translation from the dword that contains the 17 bit address, +// to the respective tilebase vera register. +// Note that the resulting vera register holds only specifies bits 16:11 of the address, +// so the resulting address in the VERA VRAM is always aligned to a multiple of 2048 bytes! +// - mapwidth: The width of the map in number of tiles. +// - mapheight: The height of the map in number of tiles. +// - tilewidth: The width of a tile, which can be 8 or 16 pixels. +// - tileheight: The height of a tile, which can be 8 or 16 pixels. +// - color_mode: The color mode, which can be 16 or 256. +vera_layer_mode_text: { + .label layer = 1 + .label mapbase_address = 0 + .label tilebase_address = $f800 + // vera_layer_mode_tile( layer, mapbase_address, tilebase_address, mapwidth, mapheight, tilewidth, tileheight, 1 ) + jsr vera_layer_mode_tile + // vera_layer_set_text_color_mode( layer, VERA_LAYER_CONFIG_16C ) + jsr vera_layer_set_text_color_mode + // } + rts +} +// Return the current screen size. +screensize: { + .label x = conio_screen_width + .label y = conio_screen_height + // hscale = (*VERA_DC_HSCALE) >> 7 + lda VERA_DC_HSCALE + rol + rol + and #1 + // 40 << hscale + tay + lda #$28 + cpy #0 + beq !e+ + !: + asl + dey + bne !- + !e: + // *x = 40 << hscale + sta.z x + // vscale = (*VERA_DC_VSCALE) >> 7 + lda VERA_DC_VSCALE + rol + rol + and #1 + // 30 << vscale + tay + lda #$1e + cpy #0 + beq !e+ + !: + asl + dey + bne !- + !e: + // *y = 30 << vscale + sta.z y + // } + rts +} +// Set the layer with which the conio will interact. +// - layer: value of 0 or 1. +screenlayer: { + .const layer = 1 + .label __2 = $3b + .label __4 = $3d + .label __5 = $49 + .label vera_layer_get_width1_config = $4b + .label vera_layer_get_width1_return = $3b + .label vera_layer_get_height1_config = $3f + .label vera_layer_get_height1_return = $49 + // conio_screen_layer = layer + lda #layer + sta.z conio_screen_layer + // vera_layer_get_mapbase_bank(conio_screen_layer) + tax + jsr vera_layer_get_mapbase_bank + sta.z CONIO_SCREEN_BANK + // vera_layer_get_mapbase_offset(conio_screen_layer) + lda.z conio_screen_layer + jsr vera_layer_get_mapbase_offset + lda.z vera_layer_get_mapbase_offset.return + sta.z CONIO_SCREEN_TEXT + lda.z vera_layer_get_mapbase_offset.return+1 + sta.z CONIO_SCREEN_TEXT+1 + // vera_layer_get_width(conio_screen_layer) + lda.z conio_screen_layer + // config = vera_layer_config[layer] + asl + tay + lda vera_layer_config,y + sta.z vera_layer_get_width1_config + lda vera_layer_config+1,y + sta.z vera_layer_get_width1_config+1 + // *config & VERA_LAYER_WIDTH_MASK + lda #VERA_LAYER_WIDTH_MASK + ldy #0 + and (vera_layer_get_width1_config),y + // (*config & VERA_LAYER_WIDTH_MASK) >> 4 + lsr + lsr + lsr + lsr + // return VERA_LAYER_WIDTH[ (*config & VERA_LAYER_WIDTH_MASK) >> 4]; + asl + tay + lda VERA_LAYER_WIDTH,y + sta.z vera_layer_get_width1_return + lda VERA_LAYER_WIDTH+1,y + sta.z vera_layer_get_width1_return+1 + // } + // vera_layer_get_width(conio_screen_layer) + // conio_width = vera_layer_get_width(conio_screen_layer) + lda.z __2 + sta.z conio_width + lda.z __2+1 + sta.z conio_width+1 + // vera_layer_get_rowshift(conio_screen_layer) + ldx.z conio_screen_layer + jsr vera_layer_get_rowshift + // conio_rowshift = vera_layer_get_rowshift(conio_screen_layer) + sta.z conio_rowshift + // vera_layer_get_rowskip(conio_screen_layer) + lda.z conio_screen_layer + jsr vera_layer_get_rowskip + // conio_rowskip = vera_layer_get_rowskip(conio_screen_layer) + lda.z __4 + sta.z conio_rowskip + lda.z __4+1 + sta.z conio_rowskip+1 + // vera_layer_get_height(conio_screen_layer) + lda.z conio_screen_layer + // config = vera_layer_config[layer] + asl + tay + lda vera_layer_config,y + sta.z vera_layer_get_height1_config + lda vera_layer_config+1,y + sta.z vera_layer_get_height1_config+1 + // *config & VERA_LAYER_HEIGHT_MASK + lda #VERA_LAYER_HEIGHT_MASK + ldy #0 + and (vera_layer_get_height1_config),y + // (*config & VERA_LAYER_HEIGHT_MASK) >> 6 + rol + rol + rol + and #3 + // return VERA_LAYER_HEIGHT[ (*config & VERA_LAYER_HEIGHT_MASK) >> 6]; + asl + tay + lda VERA_LAYER_HEIGHT,y + sta.z vera_layer_get_height1_return + lda VERA_LAYER_HEIGHT+1,y + sta.z vera_layer_get_height1_return+1 + // } + // vera_layer_get_height(conio_screen_layer) + // conio_height = vera_layer_get_height(conio_screen_layer) + lda.z __5 + sta.z conio_height + lda.z __5+1 + sta.z conio_height+1 + // } + rts +} +// Set the front color for text output. The old front text color setting is returned. +// - layer: Value of 0 or 1. +// - color: a 4 bit value ( decimal between 0 and 15) when the VERA works in 16x16 color text mode. +// An 8 bit value (decimal between 0 and 255) when the VERA works in 256 text mode. +// Note that on the VERA, the transparent color has value 0. +vera_layer_set_textcolor: { + .const layer = 1 + // vera_layer_textcolor[layer] = color + lda #WHITE + sta vera_layer_textcolor+layer + // } + rts +} +// Set the back color for text output. The old back text color setting is returned. +// - layer: Value of 0 or 1. +// - color: a 4 bit value ( decimal between 0 and 15). +// This will only work when the VERA is in 16 color mode! +// Note that on the VERA, the transparent color has value 0. +vera_layer_set_backcolor: { + .const layer = 1 + // vera_layer_backcolor[layer] = color + lda #BLUE + sta vera_layer_backcolor+layer + // } + rts +} +// Set the base of the map layer with which the conio will interact. +// - layer: Value of 0 or 1. +// - mapbase: Specifies the base address of the tile map. +// Note that the register only specifies bits 16:9 of the address, +// so the resulting address in the VERA VRAM is always aligned to a multiple of 512 bytes. +// vera_layer_set_mapbase(byte register(A) layer, byte register(X) mapbase) +vera_layer_set_mapbase: { + .label addr = $3b + // addr = vera_layer_mapbase[layer] + asl + tay + lda vera_layer_mapbase,y + sta.z addr + lda vera_layer_mapbase+1,y + sta.z addr+1 + // *addr = mapbase + txa + ldy #0 + sta (addr),y + // } + rts +} +// Set the cursor to the specified position +// gotoxy(byte register(X) y) +gotoxy: { + .label __6 = $3d + .label line_offset = $3d + // if(y>CONIO_HEIGHT) + lda.z conio_screen_height + stx.z $ff + cmp.z $ff + bcs __b1 + ldx #0 + __b1: + // if(x>=CONIO_WIDTH) + lda.z conio_screen_width + // conio_cursor_x[conio_screen_layer] = x + lda #0 + ldy.z conio_screen_layer + sta conio_cursor_x,y + // conio_cursor_y[conio_screen_layer] = y + txa + sta conio_cursor_y,y + // (unsigned int)y << conio_rowshift + txa + sta.z __6 + lda #0 + sta.z __6+1 + // line_offset = (unsigned int)y << conio_rowshift + ldy.z conio_rowshift + beq !e+ + !: + asl.z line_offset + rol.z line_offset+1 + dey + bne !- + !e: + // conio_line_text[conio_screen_layer] = line_offset + lda.z conio_screen_layer + asl + tay + lda.z line_offset + sta conio_line_text,y + lda.z line_offset+1 + sta conio_line_text+1,y + // } + rts +} +// Output a NUL-terminated string at the current cursor position +// cputs(byte* zp($22) s) +cputs: { + .label s = $22 + __b1: + // while(c=*s++) + ldy #0 + lda (s),y + inc.z s + bne !+ + inc.z s+1 + !: + cmp #0 + bne __b2 + // } + rts + __b2: + // cputc(c) + sta.z cputc.c + jsr cputc + jmp __b1 +} +// Print an unsigned int using a specific format +// printf_ulong(dword zp($b) uvalue) +printf_ulong: { + .label uvalue = $b + // printf_buffer.sign = format.sign_always?'+':0 + // Handle any sign + lda #0 + sta printf_buffer + // ultoa(uvalue, printf_buffer.digits, format.radix) + // Format number into buffer + jsr ultoa + // printf_number_buffer(printf_buffer, format) + lda printf_buffer + // Print using format + jsr printf_number_buffer + // } + rts +} +// Print an unsigned char using a specific format +// printf_uchar(byte register(X) uvalue) +printf_uchar: { + // printf_buffer.sign = format.sign_always?'+':0 + // Handle any sign + lda #0 + sta printf_buffer + // uctoa(uvalue, printf_buffer.digits, format.radix) + // Format number into buffer + jsr uctoa + // printf_number_buffer(printf_buffer, format) + lda printf_buffer + // Print using format + jsr printf_number_buffer + // } + rts +} +// Print an unsigned int using a specific format +// printf_uint(word zp($f) uvalue) +printf_uint: { + .label uvalue = $f + // printf_buffer.sign = format.sign_always?'+':0 + // Handle any sign + lda #0 + sta printf_buffer + // utoa(uvalue, printf_buffer.digits, format.radix) + // Format number into buffer + jsr utoa + // printf_number_buffer(printf_buffer, format) + lda printf_buffer + // Print using format + jsr printf_number_buffer + // } + rts +} +// Set a vera layer in tile mode and configure the: +// - layer: Value of 0 or 1. +// - mapbase_address: A dword typed address (4 bytes), that specifies the full address of the map base. +// The function does the translation from the dword that contains the 17 bit address, +// to the respective mapbase vera register. +// Note that the register only specifies bits 16:9 of the address, +// so the resulting address in the VERA VRAM is always aligned to a multiple of 512 bytes. +// - tilebase_address: A dword typed address (4 bytes), that specifies the base address of the tile map. +// The function does the translation from the dword that contains the 17 bit address, +// to the respective tilebase vera register. +// Note that the resulting vera register holds only specifies bits 16:11 of the address, +// so the resulting address in the VERA VRAM is always aligned to a multiple of 2048 bytes! +// - mapwidth: The width of the map in number of tiles. +// - mapheight: The height of the map in number of tiles. +// - tilewidth: The width of a tile, which can be 8 or 16 pixels. +// - tileheight: The height of a tile, which can be 8 or 16 pixels. +// - color_depth: The color depth in bits per pixel (BPP), which can be 1, 2, 4 or 8. +vera_layer_mode_tile: { + .const mapbase = 0 + .label tilebase_address = vera_layer_mode_text.tilebase_address>>1 + // config + .label config = VERA_LAYER_WIDTH_128|VERA_LAYER_HEIGHT_64 + // vera_layer_rowshift[layer] = 8 + lda #8 + sta vera_layer_rowshift+vera_layer_mode_text.layer + // vera_layer_rowskip[layer] = 256 + lda #<$100 + sta vera_layer_rowskip+vera_layer_mode_text.layer*SIZEOF_WORD + lda #>$100 + sta vera_layer_rowskip+vera_layer_mode_text.layer*SIZEOF_WORD+1 + // vera_layer_set_config(layer, config) + jsr vera_layer_set_config + // vera_mapbase_offset[layer] = mapbase_address) + sta vera_mapbase_bank+vera_layer_mode_text.layer + // vera_mapbase_address[layer] = mapbase_address + lda #vera_layer_mode_text.mapbase_address + sta vera_mapbase_address+vera_layer_mode_text.layer*SIZEOF_DWORD+1 + lda #>$10 + sta vera_mapbase_address+vera_layer_mode_text.layer*SIZEOF_DWORD+2 + lda #>vera_layer_mode_text.mapbase_address>>$10 + sta vera_mapbase_address+vera_layer_mode_text.layer*SIZEOF_DWORD+3 + // vera_layer_set_mapbase(layer,mapbase) + ldx #mapbase + lda #vera_layer_mode_text.layer + jsr vera_layer_set_mapbase + // vera_tilebase_offset[layer] = vera_layer_mode_text.tilebase_address&$ffff + sta vera_tilebase_offset+vera_layer_mode_text.layer*SIZEOF_WORD+1 + // vera_tilebase_bank[layer] = (byte)>tilebase_address + lda #0 + sta vera_tilebase_bank+vera_layer_mode_text.layer + // vera_tilebase_address[layer] = tilebase_address + lda #vera_layer_mode_text.tilebase_address + sta vera_tilebase_address+vera_layer_mode_text.layer*SIZEOF_DWORD+1 + lda #>$10 + sta vera_tilebase_address+vera_layer_mode_text.layer*SIZEOF_DWORD+2 + lda #>vera_layer_mode_text.tilebase_address>>$10 + sta vera_tilebase_address+vera_layer_mode_text.layer*SIZEOF_DWORD+3 + // vera_layer_set_tilebase(layer,tilebase) + jsr vera_layer_set_tilebase + // } + rts +} +// Set the configuration of the layer text color mode. +// - layer: Value of 0 or 1. +// - color_mode: Specifies the color mode to be VERA_LAYER_CONFIG_16 or VERA_LAYER_CONFIG_256 for text mode. +vera_layer_set_text_color_mode: { + .label addr = $3f + // addr = vera_layer_config[layer] + lda vera_layer_config+vera_layer_mode_text.layer*SIZEOF_POINTER + sta.z addr + lda vera_layer_config+vera_layer_mode_text.layer*SIZEOF_POINTER+1 + sta.z addr+1 + // *addr &= ~VERA_LAYER_CONFIG_256C + lda #VERA_LAYER_CONFIG_256C^$ff + ldy #0 + and (addr),y + sta (addr),y + // *addr |= color_mode + lda (addr),y + sta (addr),y + // } + rts +} +// Get the map base bank of the tiles for the layer. +// - layer: Value of 0 or 1. +// - return: Bank in vera vram. +// vera_layer_get_mapbase_bank(byte register(X) layer) +vera_layer_get_mapbase_bank: { + // return vera_mapbase_bank[layer]; + lda vera_mapbase_bank,x + // } + rts +} +// Get the map base lower 16-bit address (offset) of the tiles for the layer. +// - layer: Value of 0 or 1. +// - return: Offset in vera vram of the specified bank. +// vera_layer_get_mapbase_offset(byte register(A) layer) +vera_layer_get_mapbase_offset: { + .label return = $4b + // return vera_mapbase_offset[layer]; + asl + tay + lda vera_mapbase_offset,y + sta.z return + lda vera_mapbase_offset+1,y + sta.z return+1 + // } + rts +} +// Get the bit shift value required to skip a whole line fast. +// - layer: Value of 0 or 1. +// - return: Rowshift value to calculate fast from a y value to line offset in tile mode. +// vera_layer_get_rowshift(byte register(X) layer) +vera_layer_get_rowshift: { + // return vera_layer_rowshift[layer]; + lda vera_layer_rowshift,x + // } + rts +} +// Get the value required to skip a whole line fast. +// - layer: Value of 0 or 1. +// - return: Skip value to calculate fast from a y value to line offset in tile mode. +// vera_layer_get_rowskip(byte register(A) layer) +vera_layer_get_rowskip: { + .label return = $3d + // return vera_layer_rowskip[layer]; + asl + tay + lda vera_layer_rowskip,y + sta.z return + lda vera_layer_rowskip+1,y + sta.z return+1 + // } + rts +} +// Output one character at the current cursor position +// Moves the cursor forward. Scrolls the entire screen if needed +// cputc(byte zp($11) c) +cputc: { + .label __16 = $41 + .label conio_addr = $47 + .label c = $11 + // vera_layer_get_color( conio_screen_layer) + ldx.z conio_screen_layer + jsr vera_layer_get_color + // vera_layer_get_color( conio_screen_layer) + // color = vera_layer_get_color( conio_screen_layer) + tax + // CONIO_SCREEN_TEXT + conio_line_text[conio_screen_layer] + lda.z conio_screen_layer + asl + // conio_addr = CONIO_SCREEN_TEXT + conio_line_text[conio_screen_layer] + tay + clc + lda.z CONIO_SCREEN_TEXT + adc conio_line_text,y + sta.z conio_addr + lda.z CONIO_SCREEN_TEXT+1 + adc conio_line_text+1,y + sta.z conio_addr+1 + // conio_cursor_x[conio_screen_layer] << 1 + ldy.z conio_screen_layer + lda conio_cursor_x,y + asl + // conio_addr += conio_cursor_x[conio_screen_layer] << 1 + clc + adc.z conio_addr + sta.z conio_addr + bcc !+ + inc.z conio_addr+1 + !: + // if(c=='\n') + lda #'\n' + cmp.z c + beq __b1 + // *VERA_CTRL &= ~VERA_ADDRSEL + // Select DATA0 + lda #VERA_ADDRSEL^$ff + and VERA_CTRL + sta VERA_CTRL + // conio_addr + lda.z conio_addr+1 + // *VERA_ADDRX_M = >conio_addr + sta VERA_ADDRX_M + // CONIO_SCREEN_BANK | VERA_INC_1 + lda #VERA_INC_1 + ora.z CONIO_SCREEN_BANK + // *VERA_ADDRX_H = CONIO_SCREEN_BANK | VERA_INC_1 + sta VERA_ADDRX_H + // *VERA_DATA0 = c + lda.z c + sta VERA_DATA0 + // *VERA_DATA0 = color + stx VERA_DATA0 + // conio_cursor_x[conio_screen_layer]++; + ldx.z conio_screen_layer + inc conio_cursor_x,x + // scroll_enable = conio_scroll_enable[conio_screen_layer] + ldy.z conio_screen_layer + lda conio_scroll_enable,y + // if(scroll_enable) + cmp #0 + bne __b5 + // (unsigned int)conio_cursor_x[conio_screen_layer] == conio_width + lda conio_cursor_x,y + sta.z __16 + lda #0 + sta.z __16+1 + // if((unsigned int)conio_cursor_x[conio_screen_layer] == conio_width) + cmp.z conio_width+1 + bne __breturn + lda.z __16 + cmp.z conio_width + bne __breturn + // cputln() + jsr cputln + __breturn: + // } + rts + __b5: + // if(conio_cursor_x[conio_screen_layer] == CONIO_WIDTH) + lda.z conio_screen_width + ldy.z conio_screen_layer + cmp conio_cursor_x,y + bne __breturn + // cputln() + jsr cputln + rts + __b1: + // cputln() + jsr cputln + rts +} +// Converts unsigned number value to a string representing it in RADIX format. +// If the leading digits are zero they are not included in the string. +// - value : The number to be converted to RADIX +// - buffer : receives the string representing the number and zero-termination. +// - radix : The radix to convert the number to (from the enum RADIX) +// ultoa(dword zp($b) value, byte* zp($22) buffer) +ultoa: { + .label digit_value = $43 + .label buffer = $22 + .label digit = $11 + .label value = $b + lda #printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS + sta.z buffer+1 + ldx #0 + txa + sta.z digit + __b1: + // for( char digit=0; digit= digit_value) + cpx #0 + bne __b5 + lda.z value+3 + cmp.z digit_value+3 + bcc !+ + bne __b5 + lda.z value+2 + cmp.z digit_value+2 + bcc !+ + bne __b5 + lda.z value+1 + cmp.z digit_value+1 + bcc !+ + bne __b5 + lda.z value + cmp.z digit_value + bcs __b5 + !: + __b4: + // for( char digit=0; digitprintf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS + sta.z cputs.s+1 + jsr cputs + // } + rts +} +// Converts unsigned number value to a string representing it in RADIX format. +// If the leading digits are zero they are not included in the string. +// - value : The number to be converted to RADIX +// - buffer : receives the string representing the number and zero-termination. +// - radix : The radix to convert the number to (from the enum RADIX) +// uctoa(byte register(X) value, byte* zp($22) buffer) +uctoa: { + .label digit_value = $4f + .label buffer = $22 + .label digit = $11 + .label started = $2a + lda #printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS + sta.z buffer+1 + lda #0 + sta.z started + sta.z digit + __b1: + // for( char digit=0; digit= digit_value) + lda.z started + cmp #0 + bne __b5 + cpx.z digit_value + bcs __b5 + __b4: + // for( char digit=0; digitprintf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS + sta.z buffer+1 + ldx #0 + txa + sta.z digit + __b1: + // for( char digit=0; digit= digit_value) + cpx #0 + bne __b5 + cmp.z value+1 + bne !+ + lda.z digit_value + cmp.z value + beq __b5 + !: + bcc __b5 + __b4: + // for( char digit=0; digit(vera_layer_mode_tile.tilebase_address&$ffff))&VERA_LAYER_TILEBASE_MASK + ldy #0 + sta (addr),y + // } + rts +} +// Get the text and back color for text output in 16 color mode. +// - layer: Value of 0 or 1. +// - return: an 8 bit value with bit 7:4 containing the back color and bit 3:0 containing the front color. +// This will only work when the VERA is in 16 color mode! +// Note that on the VERA, the transparent color has value 0. +// vera_layer_get_color(byte register(X) layer) +vera_layer_get_color: { + .label addr = $4d + // addr = vera_layer_config[layer] + txa + asl + tay + lda vera_layer_config,y + sta.z addr + lda vera_layer_config+1,y + sta.z addr+1 + // *addr & VERA_LAYER_CONFIG_256C + lda #VERA_LAYER_CONFIG_256C + ldy #0 + and (addr),y + // if( *addr & VERA_LAYER_CONFIG_256C ) + cmp #0 + bne __b1 + // vera_layer_backcolor[layer] << 4 + lda vera_layer_backcolor,x + asl + asl + asl + asl + // return ((vera_layer_backcolor[layer] << 4) | vera_layer_textcolor[layer]); + ora vera_layer_textcolor,x + // } + rts + __b1: + // return (vera_layer_textcolor[layer]); + lda vera_layer_textcolor,x + rts +} +// Print a newline +cputln: { + .label temp = $4d + // temp = conio_line_text[conio_screen_layer] + lda.z conio_screen_layer + asl + // TODO: This needs to be optimized! other variations don't compile because of sections not available! + tay + lda conio_line_text,y + sta.z temp + lda conio_line_text+1,y + sta.z temp+1 + // temp += conio_rowskip + lda.z temp + clc + adc.z conio_rowskip + sta.z temp + lda.z temp+1 + adc.z conio_rowskip+1 + sta.z temp+1 + // conio_line_text[conio_screen_layer] = temp + lda.z conio_screen_layer + asl + tay + lda.z temp + sta conio_line_text,y + lda.z temp+1 + sta conio_line_text+1,y + // conio_cursor_x[conio_screen_layer] = 0 + lda #0 + ldy.z conio_screen_layer + sta conio_cursor_x,y + // conio_cursor_y[conio_screen_layer]++; + ldx.z conio_screen_layer + inc conio_cursor_y,x + // cscroll() + jsr cscroll + // } + rts +} +// Used to convert a single digit of an unsigned number value to a string representation +// Counts a single digit up from '0' as long as the value is larger than sub. +// Each time the digit is increased sub is subtracted from value. +// - buffer : pointer to the char that receives the digit +// - value : The value where the digit will be derived from +// - sub : the value of a '1' in the digit. Subtracted continually while the digit is increased. +// (For decimal the subs used are 10000, 1000, 100, 10, 1) +// returns : the value reduced by sub * digit so that it is less than sub. +// ultoa_append(byte* zp($22) buffer, dword zp($b) value, dword zp($43) sub) +ultoa_append: { + .label buffer = $22 + .label value = $b + .label sub = $43 + .label return = $b + ldx #0 + __b1: + // while (value >= sub) + lda.z value+3 + cmp.z sub+3 + bcc !+ + bne __b2 + lda.z value+2 + cmp.z sub+2 + bcc !+ + bne __b2 + lda.z value+1 + cmp.z sub+1 + bcc !+ + bne __b2 + lda.z value + cmp.z sub + bcs __b2 + !: + // *buffer = DIGITS[digit] + lda DIGITS,x + ldy #0 + sta (buffer),y + // } + rts + __b2: + // digit++; + inx + // value -= sub + lda.z value + sec + sbc.z sub + sta.z value + lda.z value+1 + sbc.z sub+1 + sta.z value+1 + lda.z value+2 + sbc.z sub+2 + sta.z value+2 + lda.z value+3 + sbc.z sub+3 + sta.z value+3 + jmp __b1 +} +// Used to convert a single digit of an unsigned number value to a string representation +// Counts a single digit up from '0' as long as the value is larger than sub. +// Each time the digit is increased sub is subtracted from value. +// - buffer : pointer to the char that receives the digit +// - value : The value where the digit will be derived from +// - sub : the value of a '1' in the digit. Subtracted continually while the digit is increased. +// (For decimal the subs used are 10000, 1000, 100, 10, 1) +// returns : the value reduced by sub * digit so that it is less than sub. +// uctoa_append(byte* zp($22) buffer, byte register(X) value, byte zp($4f) sub) +uctoa_append: { + .label buffer = $22 + .label sub = $4f + ldy #0 + __b1: + // while (value >= sub) + cpx.z sub + bcs __b2 + // *buffer = DIGITS[digit] + lda DIGITS,y + ldy #0 + sta (buffer),y + // } + rts + __b2: + // digit++; + iny + // value -= sub + txa + sec + sbc.z sub + tax + jmp __b1 +} +// Used to convert a single digit of an unsigned number value to a string representation +// Counts a single digit up from '0' as long as the value is larger than sub. +// Each time the digit is increased sub is subtracted from value. +// - buffer : pointer to the char that receives the digit +// - value : The value where the digit will be derived from +// - sub : the value of a '1' in the digit. Subtracted continually while the digit is increased. +// (For decimal the subs used are 10000, 1000, 100, 10, 1) +// returns : the value reduced by sub * digit so that it is less than sub. +// utoa_append(byte* zp($22) buffer, word zp($f) value, word zp($47) sub) +utoa_append: { + .label buffer = $22 + .label value = $f + .label sub = $47 + .label return = $f + ldx #0 + __b1: + // while (value >= sub) + lda.z sub+1 + cmp.z value+1 + bne !+ + lda.z sub + cmp.z value + beq __b2 + !: + bcc __b2 + // *buffer = DIGITS[digit] + lda DIGITS,x + ldy #0 + sta (buffer),y + // } + rts + __b2: + // digit++; + inx + // value -= sub + lda.z value + sec + sbc.z sub + sta.z value + lda.z value+1 + sbc.z sub+1 + sta.z value+1 + jmp __b1 +} +// Scroll the entire screen if the cursor is beyond the last line +cscroll: { + // if(conio_cursor_y[conio_screen_layer]>=CONIO_HEIGHT) + ldy.z conio_screen_layer + lda conio_cursor_y,y + cmp.z conio_screen_height + bcc __b3 + // if(conio_scroll_enable[conio_screen_layer]) + lda conio_scroll_enable,y + cmp #0 + bne __b4 + // if(conio_cursor_y[conio_screen_layer]>=conio_height) + lda conio_cursor_y,y + ldy.z conio_height+1 + bne __b3 + cmp.z conio_height + __b3: + // } + rts + __b4: + // insertup() + jsr insertup + // gotoxy( 0, CONIO_HEIGHT-1) + ldx.z conio_screen_height + dex + jsr gotoxy + rts +} +// Insert a new line, and scroll the upper part of the screen up. +insertup: { + .label cy = $4f + .label width = $50 + .label line = $51 + .label start = $51 + // cy = conio_cursor_y[conio_screen_layer] + ldy.z conio_screen_layer + lda conio_cursor_y,y + sta.z cy + // width = CONIO_WIDTH * 2 + lda.z conio_screen_width + asl + sta.z width + ldx #1 + __b1: + // for(unsigned byte i=1; i<=cy; i++) + lda.z cy + stx.z $ff + cmp.z $ff + bcs __b2 + // clearline() + jsr clearline + // } + rts + __b2: + // i-1 + txa + sec + sbc #1 + // line = (i-1) << conio_rowshift + ldy.z conio_rowshift + sta.z line + lda #0 + sta.z line+1 + cpy #0 + beq !e+ + !: + asl.z line + rol.z line+1 + dey + bne !- + !e: + // start = CONIO_SCREEN_TEXT + line + lda.z start + clc + adc.z CONIO_SCREEN_TEXT + sta.z start + lda.z start+1 + adc.z CONIO_SCREEN_TEXT+1 + sta.z start+1 + // start+conio_rowskip + lda.z start + clc + adc.z conio_rowskip + sta.z memcpy_in_vram.src + lda.z start+1 + adc.z conio_rowskip+1 + sta.z memcpy_in_vram.src+1 + // memcpy_in_vram(0, start, VERA_INC_1, 0, start+conio_rowskip, VERA_INC_1, width) + lda.z width + sta.z memcpy_in_vram.num + lda #0 + sta.z memcpy_in_vram.num+1 + jsr memcpy_in_vram + // for(unsigned byte i=1; i<=cy; i++) + inx + jmp __b1 +} +clearline: { + .label addr = $55 + .label c = $20 + // *VERA_CTRL &= ~VERA_ADDRSEL + // Select DATA0 + lda #VERA_ADDRSEL^$ff + and VERA_CTRL + sta VERA_CTRL + // CONIO_SCREEN_TEXT + conio_line_text[conio_screen_layer] + lda.z conio_screen_layer + asl + // addr = CONIO_SCREEN_TEXT + conio_line_text[conio_screen_layer] + tay + clc + lda.z CONIO_SCREEN_TEXT + adc conio_line_text,y + sta.z addr + lda.z CONIO_SCREEN_TEXT+1 + adc conio_line_text+1,y + sta.z addr+1 + // addr + lda.z addr+1 + // *VERA_ADDRX_M = >addr + sta VERA_ADDRX_M + // *VERA_ADDRX_H = VERA_INC_1 + lda #VERA_INC_1 + sta VERA_ADDRX_H + // vera_layer_get_color( conio_screen_layer) + ldx.z conio_screen_layer + jsr vera_layer_get_color + // vera_layer_get_color( conio_screen_layer) + // color = vera_layer_get_color( conio_screen_layer) + tax + lda #<0 + sta.z c + sta.z c+1 + __b1: + // for( unsigned int c=0;csrc + lda.z src+1 + // *VERA_ADDRX_M = >src + sta VERA_ADDRX_M + // *VERA_ADDRX_H = src_increment | src_bank + lda #VERA_INC_1 + sta VERA_ADDRX_H + // *VERA_CTRL |= VERA_ADDRSEL + // Select DATA1 + lda #VERA_ADDRSEL + ora VERA_CTRL + sta VERA_CTRL + // dest + lda.z dest+1 + // *VERA_ADDRX_M = >dest + sta VERA_ADDRX_M + // *VERA_ADDRX_H = dest_increment | dest_bank + lda #VERA_INC_1 + sta VERA_ADDRX_H + lda #<0 + sta.z i + sta.z i+1 + // Transfer the data + __b1: + // for(unsigned int i=0; i main::src1#10 + [39] main::$4 = main::$3 << 8 + [40] main::$5 = < main::$4 + [41] main::$6 = < main::src1#10 + [42] main::$7 = > main::$6 + [43] main::$30 = (word)main::$5 + [44] main::$8 = main::$30 | main::$7 + [45] main::$9 = main::$8 >> 5 + [46] main::$10 = > main::src1#10 + [47] main::$11 = main::$10 << 3 + [48] main::$12 = < main::$11 + [49] main::$31 = (word)main::$12 + [50] main::$13 = main::$9 + main::$31 + [51] main::bankbeg#0 = (byte)main::$13 + [52] main::$14 = > main::calcend#0 + [53] main::$15 = main::$14 << 8 + [54] main::$16 = < main::$15 + [55] main::$17 = < main::calcend#0 + [56] main::$18 = > main::$17 + [57] main::$32 = (word)main::$16 + [58] main::$19 = main::$32 | main::$18 + [59] main::$20 = main::$19 >> 5 + [60] main::$21 = > main::calcend#0 + [61] main::$22 = main::$21 << 3 + [62] main::$23 = < main::$22 + [63] main::$33 = (word)main::$23 + [64] main::$24 = main::$20 + main::$33 + [65] main::bankend#0 = (byte)main::$24 + [66] main::$25 = < main::src1#10 + [67] main::beg#0 = main::$25 & $1fff + [68] main::$27 = < main::calcend#0 + [69] main::end#0 = main::$27 & $1fff + [70] main::beg#1 = main::beg#0 + main::borderbeg + [71] main::end#1 = main::end#0 + main::borderbeg + [72] call cputs + to:main::@3 +main::@3: scope:[main] from main::@2 + [73] printf_ulong::uvalue#0 = main::src1#10 + [74] call printf_ulong + to:main::@4 +main::@4: scope:[main] from main::@3 + [75] phi() + [76] call cputs + to:main::@5 +main::@5: scope:[main] from main::@4 + [77] printf_ulong::uvalue#1 = main::num#10 + [78] call printf_ulong + to:main::@6 +main::@6: scope:[main] from main::@5 + [79] phi() + [80] call cputs + to:main::@7 +main::@7: scope:[main] from main::@6 + [81] printf_ulong::uvalue#2 = main::calcend#0 + [82] call printf_ulong + to:main::@8 +main::@8: scope:[main] from main::@7 + [83] phi() + [84] call cputs + to:main::@9 +main::@9: scope:[main] from main::@8 + [85] printf_uchar::uvalue#0 = main::bankbeg#0 + [86] call printf_uchar + to:main::@10 +main::@10: scope:[main] from main::@9 + [87] phi() + [88] call cputs + to:main::@11 +main::@11: scope:[main] from main::@10 + [89] printf_uchar::uvalue#1 = main::bankend#0 + [90] call printf_uchar + to:main::@12 +main::@12: scope:[main] from main::@11 + [91] phi() + [92] call cputs + to:main::@13 +main::@13: scope:[main] from main::@12 + [93] printf_uint::uvalue#0 = main::beg#1 + [94] call printf_uint + to:main::@14 +main::@14: scope:[main] from main::@13 + [95] phi() + [96] call cputs + to:main::@15 +main::@15: scope:[main] from main::@14 + [97] printf_uint::uvalue#1 = main::end#1 + [98] call printf_uint + to:main::@16 +main::@16: scope:[main] from main::@15 + [99] phi() + [100] call cputs + to:main::@17 +main::@17: scope:[main] from main::@16 + [101] main::num#1 = main::num#10 + main::inc + [102] main::src1#1 = main::src1#10 + main::num#1 + to:main::@1 + +void vera_layer_mode_text(byte vera_layer_mode_text::layer , dword vera_layer_mode_text::mapbase_address , dword vera_layer_mode_text::tilebase_address , word vera_layer_mode_text::mapwidth , word vera_layer_mode_text::mapheight , byte vera_layer_mode_text::tilewidth , byte vera_layer_mode_text::tileheight , word vera_layer_mode_text::color_mode) +vera_layer_mode_text: scope:[vera_layer_mode_text] from conio_x16_init + [103] phi() + [104] call vera_layer_mode_tile + to:vera_layer_mode_text::@1 +vera_layer_mode_text::@1: scope:[vera_layer_mode_text] from vera_layer_mode_text + [105] phi() + [106] call vera_layer_set_text_color_mode + to:vera_layer_mode_text::@return +vera_layer_mode_text::@return: scope:[vera_layer_mode_text] from vera_layer_mode_text::@1 + [107] return + to:@return + +void screensize(byte* screensize::x , byte* screensize::y) +screensize: scope:[screensize] from conio_x16_init::@3 + [108] screensize::hscale#0 = *VERA_DC_HSCALE >> 7 + [109] screensize::$1 = $28 << screensize::hscale#0 + [110] *screensize::x#0 = screensize::$1 + [111] screensize::vscale#0 = *VERA_DC_VSCALE >> 7 + [112] screensize::$3 = $1e << screensize::vscale#0 + [113] *screensize::y#0 = screensize::$3 + to:screensize::@return +screensize::@return: scope:[screensize] from screensize + [114] return + to:@return + +void screenlayer(byte screenlayer::layer) +screenlayer: scope:[screenlayer] from conio_x16_init::@4 + [115] conio_screen_layer = screenlayer::layer#0 + [116] vera_layer_get_mapbase_bank::layer#0 = conio_screen_layer + [117] call vera_layer_get_mapbase_bank + [118] vera_layer_get_mapbase_bank::return#2 = vera_layer_get_mapbase_bank::return#0 + to:screenlayer::@3 +screenlayer::@3: scope:[screenlayer] from screenlayer + [119] CONIO_SCREEN_BANK#10 = vera_layer_get_mapbase_bank::return#2 + [120] vera_layer_get_mapbase_offset::layer#0 = conio_screen_layer + [121] call vera_layer_get_mapbase_offset + [122] vera_layer_get_mapbase_offset::return#2 = vera_layer_get_mapbase_offset::return#0 + to:screenlayer::@4 +screenlayer::@4: scope:[screenlayer] from screenlayer::@3 + [123] CONIO_SCREEN_TEXT#101 = vera_layer_get_mapbase_offset::return#2 + [124] screenlayer::vera_layer_get_width1_layer#0 = conio_screen_layer + to:screenlayer::vera_layer_get_width1 +screenlayer::vera_layer_get_width1: scope:[screenlayer] from screenlayer::@4 + [125] screenlayer::vera_layer_get_width1_$2 = screenlayer::vera_layer_get_width1_layer#0 << 1 + [126] screenlayer::vera_layer_get_width1_config#0 = vera_layer_config[screenlayer::vera_layer_get_width1_$2] + [127] screenlayer::vera_layer_get_width1_$0 = *screenlayer::vera_layer_get_width1_config#0 & VERA_LAYER_WIDTH_MASK + [128] screenlayer::vera_layer_get_width1_$1 = screenlayer::vera_layer_get_width1_$0 >> 4 + [129] screenlayer::vera_layer_get_width1_$3 = screenlayer::vera_layer_get_width1_$1 << 1 + [130] screenlayer::vera_layer_get_width1_return#0 = VERA_LAYER_WIDTH[screenlayer::vera_layer_get_width1_$3] + to:screenlayer::vera_layer_get_width1_@return +screenlayer::vera_layer_get_width1_@return: scope:[screenlayer] from screenlayer::vera_layer_get_width1 + [131] screenlayer::vera_layer_get_width1_return#1 = screenlayer::vera_layer_get_width1_return#0 + to:screenlayer::@1 +screenlayer::@1: scope:[screenlayer] from screenlayer::vera_layer_get_width1_@return + [132] screenlayer::$2 = screenlayer::vera_layer_get_width1_return#1 + [133] conio_width = screenlayer::$2 + [134] vera_layer_get_rowshift::layer#0 = conio_screen_layer + [135] call vera_layer_get_rowshift + [136] vera_layer_get_rowshift::return#2 = vera_layer_get_rowshift::return#0 + to:screenlayer::@5 +screenlayer::@5: scope:[screenlayer] from screenlayer::@1 + [137] screenlayer::$3 = vera_layer_get_rowshift::return#2 + [138] conio_rowshift = screenlayer::$3 + [139] vera_layer_get_rowskip::layer#0 = conio_screen_layer + [140] call vera_layer_get_rowskip + [141] vera_layer_get_rowskip::return#2 = vera_layer_get_rowskip::return#0 + to:screenlayer::@6 +screenlayer::@6: scope:[screenlayer] from screenlayer::@5 + [142] screenlayer::$4 = vera_layer_get_rowskip::return#2 + [143] conio_rowskip = screenlayer::$4 + [144] screenlayer::vera_layer_get_height1_layer#0 = conio_screen_layer + to:screenlayer::vera_layer_get_height1 +screenlayer::vera_layer_get_height1: scope:[screenlayer] from screenlayer::@6 + [145] screenlayer::vera_layer_get_height1_$2 = screenlayer::vera_layer_get_height1_layer#0 << 1 + [146] screenlayer::vera_layer_get_height1_config#0 = vera_layer_config[screenlayer::vera_layer_get_height1_$2] + [147] screenlayer::vera_layer_get_height1_$0 = *screenlayer::vera_layer_get_height1_config#0 & VERA_LAYER_HEIGHT_MASK + [148] screenlayer::vera_layer_get_height1_$1 = screenlayer::vera_layer_get_height1_$0 >> 6 + [149] screenlayer::vera_layer_get_height1_$3 = screenlayer::vera_layer_get_height1_$1 << 1 + [150] screenlayer::vera_layer_get_height1_return#0 = VERA_LAYER_HEIGHT[screenlayer::vera_layer_get_height1_$3] + to:screenlayer::vera_layer_get_height1_@return +screenlayer::vera_layer_get_height1_@return: scope:[screenlayer] from screenlayer::vera_layer_get_height1 + [151] screenlayer::vera_layer_get_height1_return#1 = screenlayer::vera_layer_get_height1_return#0 + to:screenlayer::@2 +screenlayer::@2: scope:[screenlayer] from screenlayer::vera_layer_get_height1_@return + [152] screenlayer::$5 = screenlayer::vera_layer_get_height1_return#1 + [153] conio_height = screenlayer::$5 + to:screenlayer::@return +screenlayer::@return: scope:[screenlayer] from screenlayer::@2 + [154] return + to:@return + +byte vera_layer_set_textcolor(byte vera_layer_set_textcolor::layer , byte vera_layer_set_textcolor::color) +vera_layer_set_textcolor: scope:[vera_layer_set_textcolor] from conio_x16_init::@5 + [155] *(vera_layer_textcolor+vera_layer_set_textcolor::layer#0) = WHITE + to:vera_layer_set_textcolor::@return +vera_layer_set_textcolor::@return: scope:[vera_layer_set_textcolor] from vera_layer_set_textcolor + [156] return + to:@return + +byte vera_layer_set_backcolor(byte vera_layer_set_backcolor::layer , byte vera_layer_set_backcolor::color) +vera_layer_set_backcolor: scope:[vera_layer_set_backcolor] from conio_x16_init::@6 + [157] *(vera_layer_backcolor+vera_layer_set_backcolor::layer#0) = BLUE + to:vera_layer_set_backcolor::@return +vera_layer_set_backcolor::@return: scope:[vera_layer_set_backcolor] from vera_layer_set_backcolor + [158] return + to:@return + +void vera_layer_set_mapbase(byte vera_layer_set_mapbase::layer , byte vera_layer_set_mapbase::mapbase) +vera_layer_set_mapbase: scope:[vera_layer_set_mapbase] from conio_x16_init::@7 conio_x16_init::@8 vera_layer_mode_tile::@4 + [159] vera_layer_set_mapbase::mapbase#3 = phi( conio_x16_init::@7/$20, conio_x16_init::@8/0, vera_layer_mode_tile::@4/vera_layer_mode_tile::mapbase#0 ) + [159] vera_layer_set_mapbase::layer#3 = phi( conio_x16_init::@7/0, conio_x16_init::@8/1, vera_layer_mode_tile::@4/vera_layer_mode_text::layer#0 ) + [160] vera_layer_set_mapbase::$0 = vera_layer_set_mapbase::layer#3 << 1 + [161] vera_layer_set_mapbase::addr#0 = vera_layer_mapbase[vera_layer_set_mapbase::$0] + [162] *vera_layer_set_mapbase::addr#0 = vera_layer_set_mapbase::mapbase#3 + to:vera_layer_set_mapbase::@return +vera_layer_set_mapbase::@return: scope:[vera_layer_set_mapbase] from vera_layer_set_mapbase + [163] return + to:@return + +void gotoxy(byte gotoxy::x , byte gotoxy::y) +gotoxy: scope:[gotoxy] from conio_x16_init::@1 cscroll::@5 + [164] gotoxy::y#3 = phi( conio_x16_init::@1/gotoxy::y#0, cscroll::@5/gotoxy::y#2 ) + [165] if(gotoxy::y#3<=conio_screen_height) goto gotoxy::@4 + to:gotoxy::@1 +gotoxy::@4: scope:[gotoxy] from gotoxy + [166] phi() + to:gotoxy::@1 +gotoxy::@1: scope:[gotoxy] from gotoxy gotoxy::@4 + [167] gotoxy::y#4 = phi( gotoxy::@4/gotoxy::y#3, gotoxy/0 ) + [168] if(0 cputc::conio_addr#1 + [249] *VERA_ADDRX_M = cputc::$5 + [250] cputc::$6 = CONIO_SCREEN_BANK#10 | VERA_INC_1 + [251] *VERA_ADDRX_H = cputc::$6 + [252] *VERA_DATA0 = cputc::c#3 + [253] *VERA_DATA0 = cputc::color#0 + [254] conio_cursor_x[conio_screen_layer] = ++ conio_cursor_x[conio_screen_layer] + [255] cputc::scroll_enable#0 = conio_scroll_enable[conio_screen_layer] + [256] if(0!=cputc::scroll_enable#0) goto cputc::@5 + to:cputc::@3 +cputc::@3: scope:[cputc] from cputc::@2 + [257] cputc::$16 = (word)conio_cursor_x[conio_screen_layer] + [258] if(cputc::$16!=conio_width) goto cputc::@return + to:cputc::@4 +cputc::@4: scope:[cputc] from cputc::@3 + [259] phi() + [260] call cputln + to:cputc::@return +cputc::@return: scope:[cputc] from cputc::@1 cputc::@3 cputc::@4 cputc::@5 cputc::@6 + [261] return + to:@return +cputc::@5: scope:[cputc] from cputc::@2 + [262] if(conio_cursor_x[conio_screen_layer]!=conio_screen_width) goto cputc::@return + to:cputc::@6 +cputc::@6: scope:[cputc] from cputc::@5 + [263] phi() + [264] call cputln + to:cputc::@return +cputc::@1: scope:[cputc] from cputc::@7 + [265] phi() + [266] call cputln + to:cputc::@return + +void ultoa(dword ultoa::value , byte* ultoa::buffer , byte ultoa::radix) +ultoa: scope:[ultoa] from printf_ulong::@1 + [267] phi() + to:ultoa::@1 +ultoa::@1: scope:[ultoa] from ultoa ultoa::@4 + [268] ultoa::buffer#11 = phi( ultoa::@4/ultoa::buffer#14, ultoa/(byte*)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS ) + [268] ultoa::started#2 = phi( ultoa::@4/ultoa::started#4, ultoa/0 ) + [268] ultoa::value#2 = phi( ultoa::@4/ultoa::value#6, ultoa/ultoa::value#1 ) + [268] ultoa::digit#2 = phi( ultoa::@4/ultoa::digit#1, ultoa/0 ) + [269] if(ultoa::digit#2<8-1) goto ultoa::@2 + to:ultoa::@3 +ultoa::@3: scope:[ultoa] from ultoa::@1 + [270] ultoa::$11 = (byte)ultoa::value#2 + [271] *ultoa::buffer#11 = DIGITS[ultoa::$11] + [272] ultoa::buffer#3 = ++ ultoa::buffer#11 + [273] *ultoa::buffer#3 = 0 + to:ultoa::@return +ultoa::@return: scope:[ultoa] from ultoa::@3 + [274] return + to:@return +ultoa::@2: scope:[ultoa] from ultoa::@1 + [275] ultoa::$10 = ultoa::digit#2 << 2 + [276] ultoa::digit_value#0 = RADIX_HEXADECIMAL_VALUES_LONG[ultoa::$10] + [277] if(0!=ultoa::started#2) goto ultoa::@5 + to:ultoa::@7 +ultoa::@7: scope:[ultoa] from ultoa::@2 + [278] if(ultoa::value#2>=ultoa::digit_value#0) goto ultoa::@5 + to:ultoa::@4 +ultoa::@4: scope:[ultoa] from ultoa::@6 ultoa::@7 + [279] ultoa::buffer#14 = phi( ultoa::@7/ultoa::buffer#11, ultoa::@6/ultoa::buffer#4 ) + [279] ultoa::started#4 = phi( ultoa::@7/ultoa::started#2, ultoa::@6/1 ) + [279] ultoa::value#6 = phi( ultoa::@7/ultoa::value#2, ultoa::@6/ultoa::value#0 ) + [280] ultoa::digit#1 = ++ ultoa::digit#2 + to:ultoa::@1 +ultoa::@5: scope:[ultoa] from ultoa::@2 ultoa::@7 + [281] ultoa_append::buffer#0 = ultoa::buffer#11 + [282] ultoa_append::value#0 = ultoa::value#2 + [283] ultoa_append::sub#0 = ultoa::digit_value#0 + [284] call ultoa_append + [285] ultoa_append::return#0 = ultoa_append::value#2 + to:ultoa::@6 +ultoa::@6: scope:[ultoa] from ultoa::@5 + [286] ultoa::value#0 = ultoa_append::return#0 + [287] ultoa::buffer#4 = ++ ultoa::buffer#11 + to:ultoa::@4 + +void printf_number_buffer(byte printf_number_buffer::buffer_sign , byte* printf_number_buffer::buffer_digits , byte printf_number_buffer::format_min_length , byte printf_number_buffer::format_justify_left , byte printf_number_buffer::format_sign_always , byte printf_number_buffer::format_zero_padding , byte printf_number_buffer::format_upper_case , byte printf_number_buffer::format_radix) +printf_number_buffer: scope:[printf_number_buffer] from printf_uchar::@2 printf_uint::@2 printf_ulong::@2 + [288] printf_number_buffer::buffer_sign#10 = phi( printf_uchar::@2/printf_number_buffer::buffer_sign#2, printf_uint::@2/printf_number_buffer::buffer_sign#1, printf_ulong::@2/printf_number_buffer::buffer_sign#0 ) + to:printf_number_buffer::@1 +printf_number_buffer::@1: scope:[printf_number_buffer] from printf_number_buffer + [289] if(0==printf_number_buffer::buffer_sign#10) goto printf_number_buffer::@2 + to:printf_number_buffer::@3 +printf_number_buffer::@3: scope:[printf_number_buffer] from printf_number_buffer::@1 + [290] cputc::c#2 = printf_number_buffer::buffer_sign#10 + [291] call cputc + to:printf_number_buffer::@2 +printf_number_buffer::@2: scope:[printf_number_buffer] from printf_number_buffer::@1 printf_number_buffer::@3 + [292] phi() + [293] call cputs + to:printf_number_buffer::@return +printf_number_buffer::@return: scope:[printf_number_buffer] from printf_number_buffer::@2 + [294] return + to:@return + +void uctoa(byte uctoa::value , byte* uctoa::buffer , byte uctoa::radix) +uctoa: scope:[uctoa] from printf_uchar::@1 + [295] phi() + to:uctoa::@1 +uctoa::@1: scope:[uctoa] from uctoa uctoa::@4 + [296] uctoa::buffer#11 = phi( uctoa::@4/uctoa::buffer#14, uctoa/(byte*)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS ) + [296] uctoa::started#2 = phi( uctoa::@4/uctoa::started#4, uctoa/0 ) + [296] uctoa::value#2 = phi( uctoa::@4/uctoa::value#6, uctoa/uctoa::value#1 ) + [296] uctoa::digit#2 = phi( uctoa::@4/uctoa::digit#1, uctoa/0 ) + [297] if(uctoa::digit#2<2-1) goto uctoa::@2 + to:uctoa::@3 +uctoa::@3: scope:[uctoa] from uctoa::@1 + [298] *uctoa::buffer#11 = DIGITS[uctoa::value#2] + [299] uctoa::buffer#3 = ++ uctoa::buffer#11 + [300] *uctoa::buffer#3 = 0 + to:uctoa::@return +uctoa::@return: scope:[uctoa] from uctoa::@3 + [301] return + to:@return +uctoa::@2: scope:[uctoa] from uctoa::@1 + [302] uctoa::digit_value#0 = RADIX_HEXADECIMAL_VALUES_CHAR[uctoa::digit#2] + [303] if(0!=uctoa::started#2) goto uctoa::@5 + to:uctoa::@7 +uctoa::@7: scope:[uctoa] from uctoa::@2 + [304] if(uctoa::value#2>=uctoa::digit_value#0) goto uctoa::@5 + to:uctoa::@4 +uctoa::@4: scope:[uctoa] from uctoa::@6 uctoa::@7 + [305] uctoa::buffer#14 = phi( uctoa::@7/uctoa::buffer#11, uctoa::@6/uctoa::buffer#4 ) + [305] uctoa::started#4 = phi( uctoa::@7/uctoa::started#2, uctoa::@6/1 ) + [305] uctoa::value#6 = phi( uctoa::@7/uctoa::value#2, uctoa::@6/uctoa::value#0 ) + [306] uctoa::digit#1 = ++ uctoa::digit#2 + to:uctoa::@1 +uctoa::@5: scope:[uctoa] from uctoa::@2 uctoa::@7 + [307] uctoa_append::buffer#0 = uctoa::buffer#11 + [308] uctoa_append::value#0 = uctoa::value#2 + [309] uctoa_append::sub#0 = uctoa::digit_value#0 + [310] call uctoa_append + [311] uctoa_append::return#0 = uctoa_append::value#2 + to:uctoa::@6 +uctoa::@6: scope:[uctoa] from uctoa::@5 + [312] uctoa::value#0 = uctoa_append::return#0 + [313] uctoa::buffer#4 = ++ uctoa::buffer#11 + to:uctoa::@4 + +void utoa(word utoa::value , byte* utoa::buffer , byte utoa::radix) +utoa: scope:[utoa] from printf_uint::@1 + [314] phi() + to:utoa::@1 +utoa::@1: scope:[utoa] from utoa utoa::@4 + [315] utoa::buffer#11 = phi( utoa::@4/utoa::buffer#14, utoa/(byte*)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS ) + [315] utoa::started#2 = phi( utoa::@4/utoa::started#4, utoa/0 ) + [315] utoa::value#2 = phi( utoa::@4/utoa::value#6, utoa/utoa::value#1 ) + [315] utoa::digit#2 = phi( utoa::@4/utoa::digit#1, utoa/0 ) + [316] if(utoa::digit#2<4-1) goto utoa::@2 + to:utoa::@3 +utoa::@3: scope:[utoa] from utoa::@1 + [317] utoa::$11 = (byte)utoa::value#2 + [318] *utoa::buffer#11 = DIGITS[utoa::$11] + [319] utoa::buffer#3 = ++ utoa::buffer#11 + [320] *utoa::buffer#3 = 0 + to:utoa::@return +utoa::@return: scope:[utoa] from utoa::@3 + [321] return + to:@return +utoa::@2: scope:[utoa] from utoa::@1 + [322] utoa::$10 = utoa::digit#2 << 1 + [323] utoa::digit_value#0 = RADIX_HEXADECIMAL_VALUES[utoa::$10] + [324] if(0!=utoa::started#2) goto utoa::@5 + to:utoa::@7 +utoa::@7: scope:[utoa] from utoa::@2 + [325] if(utoa::value#2>=utoa::digit_value#0) goto utoa::@5 + to:utoa::@4 +utoa::@4: scope:[utoa] from utoa::@6 utoa::@7 + [326] utoa::buffer#14 = phi( utoa::@7/utoa::buffer#11, utoa::@6/utoa::buffer#4 ) + [326] utoa::started#4 = phi( utoa::@7/utoa::started#2, utoa::@6/1 ) + [326] utoa::value#6 = phi( utoa::@7/utoa::value#2, utoa::@6/utoa::value#0 ) + [327] utoa::digit#1 = ++ utoa::digit#2 + to:utoa::@1 +utoa::@5: scope:[utoa] from utoa::@2 utoa::@7 + [328] utoa_append::buffer#0 = utoa::buffer#11 + [329] utoa_append::value#0 = utoa::value#2 + [330] utoa_append::sub#0 = utoa::digit_value#0 + [331] call utoa_append + [332] utoa_append::return#0 = utoa_append::value#2 + to:utoa::@6 +utoa::@6: scope:[utoa] from utoa::@5 + [333] utoa::value#0 = utoa_append::return#0 + [334] utoa::buffer#4 = ++ utoa::buffer#11 + to:utoa::@4 + +void vera_layer_set_config(byte vera_layer_set_config::layer , byte vera_layer_set_config::config) +vera_layer_set_config: scope:[vera_layer_set_config] from vera_layer_mode_tile::@2 + [335] vera_layer_set_config::addr#0 = *(vera_layer_config+vera_layer_mode_text::layer#0*SIZEOF_POINTER) + [336] *vera_layer_set_config::addr#0 = vera_layer_mode_tile::config#10 + to:vera_layer_set_config::@return +vera_layer_set_config::@return: scope:[vera_layer_set_config] from vera_layer_set_config + [337] return + to:@return + +void vera_layer_set_tilebase(byte vera_layer_set_tilebase::layer , byte vera_layer_set_tilebase::tilebase) +vera_layer_set_tilebase: scope:[vera_layer_set_tilebase] from vera_layer_mode_tile::@3 + [338] vera_layer_set_tilebase::addr#0 = *(vera_layer_tilebase+vera_layer_mode_text::layer#0*SIZEOF_POINTER) + [339] *vera_layer_set_tilebase::addr#0 = >=ultoa_append::sub#0) goto ultoa_append::@2 + to:ultoa_append::@3 +ultoa_append::@3: scope:[ultoa_append] from ultoa_append::@1 + [363] *ultoa_append::buffer#0 = DIGITS[ultoa_append::digit#2] + to:ultoa_append::@return +ultoa_append::@return: scope:[ultoa_append] from ultoa_append::@3 + [364] return + to:@return +ultoa_append::@2: scope:[ultoa_append] from ultoa_append::@1 + [365] ultoa_append::digit#1 = ++ ultoa_append::digit#2 + [366] ultoa_append::value#1 = ultoa_append::value#2 - ultoa_append::sub#0 + to:ultoa_append::@1 + +byte uctoa_append(byte* uctoa_append::buffer , byte uctoa_append::value , byte uctoa_append::sub) +uctoa_append: scope:[uctoa_append] from uctoa::@5 + [367] phi() + to:uctoa_append::@1 +uctoa_append::@1: scope:[uctoa_append] from uctoa_append uctoa_append::@2 + [368] uctoa_append::digit#2 = phi( uctoa_append/0, uctoa_append::@2/uctoa_append::digit#1 ) + [368] uctoa_append::value#2 = phi( uctoa_append/uctoa_append::value#0, uctoa_append::@2/uctoa_append::value#1 ) + [369] if(uctoa_append::value#2>=uctoa_append::sub#0) goto uctoa_append::@2 + to:uctoa_append::@3 +uctoa_append::@3: scope:[uctoa_append] from uctoa_append::@1 + [370] *uctoa_append::buffer#0 = DIGITS[uctoa_append::digit#2] + to:uctoa_append::@return +uctoa_append::@return: scope:[uctoa_append] from uctoa_append::@3 + [371] return + to:@return +uctoa_append::@2: scope:[uctoa_append] from uctoa_append::@1 + [372] uctoa_append::digit#1 = ++ uctoa_append::digit#2 + [373] uctoa_append::value#1 = uctoa_append::value#2 - uctoa_append::sub#0 + to:uctoa_append::@1 + +word utoa_append(byte* utoa_append::buffer , word utoa_append::value , word utoa_append::sub) +utoa_append: scope:[utoa_append] from utoa::@5 + [374] phi() + to:utoa_append::@1 +utoa_append::@1: scope:[utoa_append] from utoa_append utoa_append::@2 + [375] utoa_append::digit#2 = phi( utoa_append/0, utoa_append::@2/utoa_append::digit#1 ) + [375] utoa_append::value#2 = phi( utoa_append/utoa_append::value#0, utoa_append::@2/utoa_append::value#1 ) + [376] if(utoa_append::value#2>=utoa_append::sub#0) goto utoa_append::@2 + to:utoa_append::@3 +utoa_append::@3: scope:[utoa_append] from utoa_append::@1 + [377] *utoa_append::buffer#0 = DIGITS[utoa_append::digit#2] + to:utoa_append::@return +utoa_append::@return: scope:[utoa_append] from utoa_append::@3 + [378] return + to:@return +utoa_append::@2: scope:[utoa_append] from utoa_append::@1 + [379] utoa_append::digit#1 = ++ utoa_append::digit#2 + [380] utoa_append::value#1 = utoa_append::value#2 - utoa_append::sub#0 + to:utoa_append::@1 + +void cscroll() +cscroll: scope:[cscroll] from cputln + [381] if(conio_cursor_y[conio_screen_layer] clearline::addr#0 + [411] *VERA_ADDRX_M = clearline::$2 + [412] *VERA_ADDRX_H = VERA_INC_1 + [413] vera_layer_get_color::layer#1 = conio_screen_layer + [414] call vera_layer_get_color + [415] vera_layer_get_color::return#4 = vera_layer_get_color::return#2 + to:clearline::@4 +clearline::@4: scope:[clearline] from clearline + [416] clearline::color#0 = vera_layer_get_color::return#4 + to:clearline::@1 +clearline::@1: scope:[clearline] from clearline::@2 clearline::@4 + [417] clearline::c#2 = phi( clearline::@2/clearline::c#1, clearline::@4/0 ) + [418] if(clearline::c#2 (void*)memcpy_in_vram::src#0 + [428] *VERA_ADDRX_M = memcpy_in_vram::$1 + [429] *VERA_ADDRX_H = VERA_INC_1 + [430] *VERA_CTRL = *VERA_CTRL | VERA_ADDRSEL + [431] memcpy_in_vram::$3 = < memcpy_in_vram::dest#0 + [432] *VERA_ADDRX_L = memcpy_in_vram::$3 + [433] memcpy_in_vram::$4 = > memcpy_in_vram::dest#0 + [434] *VERA_ADDRX_M = memcpy_in_vram::$4 + [435] *VERA_ADDRX_H = VERA_INC_1 + to:memcpy_in_vram::@1 +memcpy_in_vram::@1: scope:[memcpy_in_vram] from memcpy_in_vram memcpy_in_vram::@2 + [436] memcpy_in_vram::i#2 = phi( memcpy_in_vram/0, memcpy_in_vram::@2/memcpy_in_vram::i#1 ) + [437] if(memcpy_in_vram::i#2= 'a' + toupper::$1 = toupper::ch#1 <= 'z' + toupper::$2 = toupper::$0 && toupper::$1 + if(toupper::$2) goto toupper::@1 + to:toupper::@2 +toupper::@1: scope:[toupper] from toupper + toupper::ch#2 = phi( toupper/toupper::ch#1 ) + toupper::$3 = toupper::ch#2 + 'A'-'a' + toupper::return#0 = toupper::$3 + to:toupper::@return +toupper::@2: scope:[toupper] from toupper + toupper::ch#3 = phi( toupper/toupper::ch#1 ) + toupper::return#1 = toupper::ch#3 + to:toupper::@return +toupper::@return: scope:[toupper] from toupper::@1 toupper::@2 + toupper::return#4 = phi( toupper::@1/toupper::return#0, toupper::@2/toupper::return#1 ) + toupper::return#2 = toupper::return#4 + return + to:@return + +byte* strupr(byte* strupr::str) +strupr: scope:[strupr] from printf_number_buffer::@11 + strupr::str#1 = phi( printf_number_buffer::@11/strupr::str#0 ) + strupr::src#0 = strupr::str#1 + to:strupr::@1 +strupr::@1: scope:[strupr] from strupr strupr::@4 + strupr::str#3 = phi( strupr/strupr::str#1, strupr::@4/strupr::str#4 ) + strupr::src#2 = phi( strupr/strupr::src#0, strupr::@4/strupr::src#1 ) + strupr::$1 = 0 != *strupr::src#2 + if(strupr::$1) goto strupr::@2 + to:strupr::@3 +strupr::@2: scope:[strupr] from strupr::@1 + strupr::str#5 = phi( strupr::@1/strupr::str#3 ) + strupr::src#3 = phi( strupr::@1/strupr::src#2 ) + toupper::ch#0 = *strupr::src#3 + call toupper + toupper::return#3 = toupper::return#2 + to:strupr::@4 +strupr::@4: scope:[strupr] from strupr::@2 + strupr::str#4 = phi( strupr::@2/strupr::str#5 ) + strupr::src#4 = phi( strupr::@2/strupr::src#3 ) + toupper::return#5 = phi( strupr::@2/toupper::return#3 ) + strupr::$0 = toupper::return#5 + *strupr::src#4 = strupr::$0 + strupr::src#1 = ++ strupr::src#4 + to:strupr::@1 +strupr::@3: scope:[strupr] from strupr::@1 + strupr::str#2 = phi( strupr::@1/strupr::str#3 ) + strupr::return#0 = strupr::str#2 + to:strupr::@return +strupr::@return: scope:[strupr] from strupr::@3 + strupr::return#3 = phi( strupr::@3/strupr::return#0 ) + strupr::return#1 = strupr::return#3 + return + to:@return + +word strlen(byte* strlen::str) +strlen: scope:[strlen] from printf_number_buffer::@6 + strlen::str#4 = phi( printf_number_buffer::@6/strlen::str#1 ) + strlen::len#0 = 0 + to:strlen::@1 +strlen::@1: scope:[strlen] from strlen strlen::@2 + strlen::len#4 = phi( strlen/strlen::len#0, strlen::@2/strlen::len#1 ) + strlen::str#2 = phi( strlen/strlen::str#4, strlen::@2/strlen::str#0 ) + strlen::$0 = 0 != *strlen::str#2 + if(strlen::$0) goto strlen::@2 + to:strlen::@3 +strlen::@2: scope:[strlen] from strlen::@1 + strlen::str#3 = phi( strlen::@1/strlen::str#2 ) + strlen::len#2 = phi( strlen::@1/strlen::len#4 ) + strlen::len#1 = ++ strlen::len#2 + strlen::str#0 = ++ strlen::str#3 + to:strlen::@1 +strlen::@3: scope:[strlen] from strlen::@1 + strlen::len#3 = phi( strlen::@1/strlen::len#4 ) + strlen::return#0 = strlen::len#3 + to:strlen::@return +strlen::@return: scope:[strlen] from strlen::@3 + strlen::return#3 = phi( strlen::@3/strlen::return#0 ) + strlen::return#1 = strlen::return#3 + return + to:@return + +void memcpy_in_vram(byte memcpy_in_vram::dest_bank , void* memcpy_in_vram::dest , byte memcpy_in_vram::dest_increment , byte memcpy_in_vram::src_bank , void* memcpy_in_vram::src , byte memcpy_in_vram::src_increment , word memcpy_in_vram::num) +memcpy_in_vram: scope:[memcpy_in_vram] from insertup::@2 + memcpy_in_vram::num#2 = phi( insertup::@2/memcpy_in_vram::num#0 ) + memcpy_in_vram::dest_bank#1 = phi( insertup::@2/memcpy_in_vram::dest_bank#0 ) + memcpy_in_vram::dest_increment#1 = phi( insertup::@2/memcpy_in_vram::dest_increment#0 ) + memcpy_in_vram::dest#1 = phi( insertup::@2/memcpy_in_vram::dest#0 ) + memcpy_in_vram::src_bank#1 = phi( insertup::@2/memcpy_in_vram::src_bank#0 ) + memcpy_in_vram::src_increment#1 = phi( insertup::@2/memcpy_in_vram::src_increment#0 ) + memcpy_in_vram::src#1 = phi( insertup::@2/memcpy_in_vram::src#0 ) + *VERA_CTRL = *VERA_CTRL & ~VERA_ADDRSEL + memcpy_in_vram::$0 = < memcpy_in_vram::src#1 + *VERA_ADDRX_L = memcpy_in_vram::$0 + memcpy_in_vram::$1 = > memcpy_in_vram::src#1 + *VERA_ADDRX_M = memcpy_in_vram::$1 + memcpy_in_vram::$2 = memcpy_in_vram::src_increment#1 | memcpy_in_vram::src_bank#1 + *VERA_ADDRX_H = memcpy_in_vram::$2 + *VERA_CTRL = *VERA_CTRL | VERA_ADDRSEL + memcpy_in_vram::$3 = < memcpy_in_vram::dest#1 + *VERA_ADDRX_L = memcpy_in_vram::$3 + memcpy_in_vram::$4 = > memcpy_in_vram::dest#1 + *VERA_ADDRX_M = memcpy_in_vram::$4 + memcpy_in_vram::$5 = memcpy_in_vram::dest_increment#1 | memcpy_in_vram::dest_bank#1 + *VERA_ADDRX_H = memcpy_in_vram::$5 + memcpy_in_vram::i#0 = 0 + to:memcpy_in_vram::@1 +memcpy_in_vram::@1: scope:[memcpy_in_vram] from memcpy_in_vram memcpy_in_vram::@2 + memcpy_in_vram::num#1 = phi( memcpy_in_vram/memcpy_in_vram::num#2, memcpy_in_vram::@2/memcpy_in_vram::num#3 ) + memcpy_in_vram::i#2 = phi( memcpy_in_vram/memcpy_in_vram::i#0, memcpy_in_vram::@2/memcpy_in_vram::i#1 ) + memcpy_in_vram::$6 = memcpy_in_vram::i#2 < memcpy_in_vram::num#1 + if(memcpy_in_vram::$6) goto memcpy_in_vram::@2 + to:memcpy_in_vram::@return +memcpy_in_vram::@2: scope:[memcpy_in_vram] from memcpy_in_vram::@1 + memcpy_in_vram::num#3 = phi( memcpy_in_vram::@1/memcpy_in_vram::num#1 ) + memcpy_in_vram::i#3 = phi( memcpy_in_vram::@1/memcpy_in_vram::i#2 ) + *VERA_DATA1 = *VERA_DATA0 + memcpy_in_vram::i#1 = ++ memcpy_in_vram::i#3 + to:memcpy_in_vram::@1 +memcpy_in_vram::@return: scope:[memcpy_in_vram] from memcpy_in_vram::@1 + return + to:@return + +void vera_layer_set_config(byte vera_layer_set_config::layer , byte vera_layer_set_config::config) +vera_layer_set_config: scope:[vera_layer_set_config] from vera_layer_mode_tile::@24 + vera_layer_set_config::config#1 = phi( vera_layer_mode_tile::@24/vera_layer_set_config::config#0 ) + vera_layer_set_config::layer#1 = phi( vera_layer_mode_tile::@24/vera_layer_set_config::layer#0 ) + vera_layer_set_config::$0 = vera_layer_set_config::layer#1 * SIZEOF_POINTER + vera_layer_set_config::addr#0 = vera_layer_config[vera_layer_set_config::$0] + *vera_layer_set_config::addr#0 = vera_layer_set_config::config#1 + to:vera_layer_set_config::@return +vera_layer_set_config::@return: scope:[vera_layer_set_config] from vera_layer_set_config + return + to:@return + +void vera_layer_set_text_color_mode(byte vera_layer_set_text_color_mode::layer , byte vera_layer_set_text_color_mode::color_mode) +vera_layer_set_text_color_mode: scope:[vera_layer_set_text_color_mode] from vera_layer_mode_text::@2 vera_layer_mode_text::@3 + vera_layer_set_text_color_mode::color_mode#2 = phi( vera_layer_mode_text::@2/vera_layer_set_text_color_mode::color_mode#0, vera_layer_mode_text::@3/vera_layer_set_text_color_mode::color_mode#1 ) + vera_layer_set_text_color_mode::layer#2 = phi( vera_layer_mode_text::@2/vera_layer_set_text_color_mode::layer#0, vera_layer_mode_text::@3/vera_layer_set_text_color_mode::layer#1 ) + vera_layer_set_text_color_mode::$0 = vera_layer_set_text_color_mode::layer#2 * SIZEOF_POINTER + vera_layer_set_text_color_mode::addr#0 = vera_layer_config[vera_layer_set_text_color_mode::$0] + *vera_layer_set_text_color_mode::addr#0 = *vera_layer_set_text_color_mode::addr#0 & ~VERA_LAYER_CONFIG_256C + *vera_layer_set_text_color_mode::addr#0 = *vera_layer_set_text_color_mode::addr#0 | vera_layer_set_text_color_mode::color_mode#2 + to:vera_layer_set_text_color_mode::@return +vera_layer_set_text_color_mode::@return: scope:[vera_layer_set_text_color_mode] from vera_layer_set_text_color_mode + return + to:@return + +void vera_layer_set_mapbase(byte vera_layer_set_mapbase::layer , byte vera_layer_set_mapbase::mapbase) +vera_layer_set_mapbase: scope:[vera_layer_set_mapbase] from conio_x16_init::@7 conio_x16_init::@8 vera_layer_mode_tile::@33 + vera_layer_set_mapbase::mapbase#3 = phi( conio_x16_init::@7/vera_layer_set_mapbase::mapbase#1, conio_x16_init::@8/vera_layer_set_mapbase::mapbase#2, vera_layer_mode_tile::@33/vera_layer_set_mapbase::mapbase#0 ) + vera_layer_set_mapbase::layer#3 = phi( conio_x16_init::@7/vera_layer_set_mapbase::layer#1, conio_x16_init::@8/vera_layer_set_mapbase::layer#2, vera_layer_mode_tile::@33/vera_layer_set_mapbase::layer#0 ) + vera_layer_set_mapbase::$0 = vera_layer_set_mapbase::layer#3 * SIZEOF_POINTER + vera_layer_set_mapbase::addr#0 = vera_layer_mapbase[vera_layer_set_mapbase::$0] + *vera_layer_set_mapbase::addr#0 = vera_layer_set_mapbase::mapbase#3 + to:vera_layer_set_mapbase::@return +vera_layer_set_mapbase::@return: scope:[vera_layer_set_mapbase] from vera_layer_set_mapbase + return + to:@return + +byte vera_layer_get_mapbase_bank(byte vera_layer_get_mapbase_bank::layer) +vera_layer_get_mapbase_bank: scope:[vera_layer_get_mapbase_bank] from screenlayer + vera_layer_get_mapbase_bank::layer#1 = phi( screenlayer/vera_layer_get_mapbase_bank::layer#0 ) + vera_layer_get_mapbase_bank::return#0 = vera_mapbase_bank[vera_layer_get_mapbase_bank::layer#1] + to:vera_layer_get_mapbase_bank::@return +vera_layer_get_mapbase_bank::@return: scope:[vera_layer_get_mapbase_bank] from vera_layer_get_mapbase_bank + vera_layer_get_mapbase_bank::return#3 = phi( vera_layer_get_mapbase_bank/vera_layer_get_mapbase_bank::return#0 ) + vera_layer_get_mapbase_bank::return#1 = vera_layer_get_mapbase_bank::return#3 + return + to:@return + +word vera_layer_get_mapbase_offset(byte vera_layer_get_mapbase_offset::layer) +vera_layer_get_mapbase_offset: scope:[vera_layer_get_mapbase_offset] from screenlayer::@3 + vera_layer_get_mapbase_offset::layer#1 = phi( screenlayer::@3/vera_layer_get_mapbase_offset::layer#0 ) + vera_layer_get_mapbase_offset::$0 = vera_layer_get_mapbase_offset::layer#1 * SIZEOF_WORD + vera_layer_get_mapbase_offset::return#0 = vera_mapbase_offset[vera_layer_get_mapbase_offset::$0] + to:vera_layer_get_mapbase_offset::@return +vera_layer_get_mapbase_offset::@return: scope:[vera_layer_get_mapbase_offset] from vera_layer_get_mapbase_offset + vera_layer_get_mapbase_offset::return#3 = phi( vera_layer_get_mapbase_offset/vera_layer_get_mapbase_offset::return#0 ) + vera_layer_get_mapbase_offset::return#1 = vera_layer_get_mapbase_offset::return#3 + return + to:@return + +void vera_layer_set_tilebase(byte vera_layer_set_tilebase::layer , byte vera_layer_set_tilebase::tilebase) +vera_layer_set_tilebase: scope:[vera_layer_set_tilebase] from vera_layer_mode_tile::@32 + vera_layer_set_tilebase::tilebase#1 = phi( vera_layer_mode_tile::@32/vera_layer_set_tilebase::tilebase#0 ) + vera_layer_set_tilebase::layer#1 = phi( vera_layer_mode_tile::@32/vera_layer_set_tilebase::layer#0 ) + vera_layer_set_tilebase::$0 = vera_layer_set_tilebase::layer#1 * SIZEOF_POINTER + vera_layer_set_tilebase::addr#0 = vera_layer_tilebase[vera_layer_set_tilebase::$0] + *vera_layer_set_tilebase::addr#0 = vera_layer_set_tilebase::tilebase#1 + to:vera_layer_set_tilebase::@return +vera_layer_set_tilebase::@return: scope:[vera_layer_set_tilebase] from vera_layer_set_tilebase + return + to:@return + +byte vera_layer_set_textcolor(byte vera_layer_set_textcolor::layer , byte vera_layer_set_textcolor::color) +vera_layer_set_textcolor: scope:[vera_layer_set_textcolor] from conio_x16_init::@5 + vera_layer_set_textcolor::color#1 = phi( conio_x16_init::@5/vera_layer_set_textcolor::color#0 ) + vera_layer_set_textcolor::layer#1 = phi( conio_x16_init::@5/vera_layer_set_textcolor::layer#0 ) + vera_layer_set_textcolor::old#0 = vera_layer_textcolor[vera_layer_set_textcolor::layer#1] + vera_layer_textcolor[vera_layer_set_textcolor::layer#1] = vera_layer_set_textcolor::color#1 + vera_layer_set_textcolor::return#0 = vera_layer_set_textcolor::old#0 + to:vera_layer_set_textcolor::@return +vera_layer_set_textcolor::@return: scope:[vera_layer_set_textcolor] from vera_layer_set_textcolor + vera_layer_set_textcolor::return#3 = phi( vera_layer_set_textcolor/vera_layer_set_textcolor::return#0 ) + vera_layer_set_textcolor::return#1 = vera_layer_set_textcolor::return#3 + return + to:@return + +byte vera_layer_set_backcolor(byte vera_layer_set_backcolor::layer , byte vera_layer_set_backcolor::color) +vera_layer_set_backcolor: scope:[vera_layer_set_backcolor] from conio_x16_init::@6 + vera_layer_set_backcolor::color#1 = phi( conio_x16_init::@6/vera_layer_set_backcolor::color#0 ) + vera_layer_set_backcolor::layer#1 = phi( conio_x16_init::@6/vera_layer_set_backcolor::layer#0 ) + vera_layer_set_backcolor::old#0 = vera_layer_backcolor[vera_layer_set_backcolor::layer#1] + vera_layer_backcolor[vera_layer_set_backcolor::layer#1] = vera_layer_set_backcolor::color#1 + vera_layer_set_backcolor::return#0 = vera_layer_set_backcolor::old#0 + to:vera_layer_set_backcolor::@return +vera_layer_set_backcolor::@return: scope:[vera_layer_set_backcolor] from vera_layer_set_backcolor + vera_layer_set_backcolor::return#3 = phi( vera_layer_set_backcolor/vera_layer_set_backcolor::return#0 ) + vera_layer_set_backcolor::return#1 = vera_layer_set_backcolor::return#3 + return + to:@return + +byte vera_layer_get_color(byte vera_layer_get_color::layer) +vera_layer_get_color: scope:[vera_layer_get_color] from clearline cputc + vera_layer_get_color::layer#2 = phi( clearline/vera_layer_get_color::layer#1, cputc/vera_layer_get_color::layer#0 ) + vera_layer_get_color::$3 = vera_layer_get_color::layer#2 * SIZEOF_POINTER + vera_layer_get_color::addr#0 = vera_layer_config[vera_layer_get_color::$3] + vera_layer_get_color::$0 = *vera_layer_get_color::addr#0 & VERA_LAYER_CONFIG_256C + vera_layer_get_color::$4 = 0 != vera_layer_get_color::$0 + if(vera_layer_get_color::$4) goto vera_layer_get_color::@1 + to:vera_layer_get_color::@2 +vera_layer_get_color::@1: scope:[vera_layer_get_color] from vera_layer_get_color + vera_layer_get_color::layer#3 = phi( vera_layer_get_color/vera_layer_get_color::layer#2 ) + vera_layer_get_color::return#0 = vera_layer_textcolor[vera_layer_get_color::layer#3] + to:vera_layer_get_color::@return +vera_layer_get_color::@2: scope:[vera_layer_get_color] from vera_layer_get_color + vera_layer_get_color::layer#4 = phi( vera_layer_get_color/vera_layer_get_color::layer#2 ) + vera_layer_get_color::$1 = vera_layer_backcolor[vera_layer_get_color::layer#4] << 4 + vera_layer_get_color::$2 = vera_layer_get_color::$1 | vera_layer_textcolor[vera_layer_get_color::layer#4] + vera_layer_get_color::return#1 = vera_layer_get_color::$2 + to:vera_layer_get_color::@return +vera_layer_get_color::@return: scope:[vera_layer_get_color] from vera_layer_get_color::@1 vera_layer_get_color::@2 + vera_layer_get_color::return#5 = phi( vera_layer_get_color::@1/vera_layer_get_color::return#0, vera_layer_get_color::@2/vera_layer_get_color::return#1 ) + vera_layer_get_color::return#2 = vera_layer_get_color::return#5 + return + to:@return + +byte vera_layer_get_rowshift(byte vera_layer_get_rowshift::layer) +vera_layer_get_rowshift: scope:[vera_layer_get_rowshift] from screenlayer::@1 + vera_layer_get_rowshift::layer#1 = phi( screenlayer::@1/vera_layer_get_rowshift::layer#0 ) + vera_layer_get_rowshift::return#0 = vera_layer_rowshift[vera_layer_get_rowshift::layer#1] + to:vera_layer_get_rowshift::@return +vera_layer_get_rowshift::@return: scope:[vera_layer_get_rowshift] from vera_layer_get_rowshift + vera_layer_get_rowshift::return#3 = phi( vera_layer_get_rowshift/vera_layer_get_rowshift::return#0 ) + vera_layer_get_rowshift::return#1 = vera_layer_get_rowshift::return#3 + return + to:@return + +word vera_layer_get_rowskip(byte vera_layer_get_rowskip::layer) +vera_layer_get_rowskip: scope:[vera_layer_get_rowskip] from screenlayer::@5 + vera_layer_get_rowskip::layer#1 = phi( screenlayer::@5/vera_layer_get_rowskip::layer#0 ) + vera_layer_get_rowskip::$0 = vera_layer_get_rowskip::layer#1 * SIZEOF_WORD + vera_layer_get_rowskip::return#0 = vera_layer_rowskip[vera_layer_get_rowskip::$0] + to:vera_layer_get_rowskip::@return +vera_layer_get_rowskip::@return: scope:[vera_layer_get_rowskip] from vera_layer_get_rowskip + vera_layer_get_rowskip::return#3 = phi( vera_layer_get_rowskip/vera_layer_get_rowskip::return#0 ) + vera_layer_get_rowskip::return#1 = vera_layer_get_rowskip::return#3 + return + to:@return + +void vera_layer_mode_tile(byte vera_layer_mode_tile::layer , dword vera_layer_mode_tile::mapbase_address , dword vera_layer_mode_tile::tilebase_address , word vera_layer_mode_tile::mapwidth , word vera_layer_mode_tile::mapheight , byte vera_layer_mode_tile::tilewidth , byte vera_layer_mode_tile::tileheight , byte vera_layer_mode_tile::color_depth) +vera_layer_mode_tile: scope:[vera_layer_mode_tile] from vera_layer_mode_text + vera_layer_mode_tile::tileheight#30 = phi( vera_layer_mode_text/vera_layer_mode_tile::tileheight#0 ) + vera_layer_mode_tile::tilewidth#26 = phi( vera_layer_mode_text/vera_layer_mode_tile::tilewidth#0 ) + vera_layer_mode_tile::tilebase_address#26 = phi( vera_layer_mode_text/vera_layer_mode_tile::tilebase_address#1 ) + vera_layer_mode_tile::mapbase_address#25 = phi( vera_layer_mode_text/vera_layer_mode_tile::mapbase_address#1 ) + vera_layer_mode_tile::mapheight#18 = phi( vera_layer_mode_text/vera_layer_mode_tile::mapheight#0 ) + vera_layer_mode_tile::layer#30 = phi( vera_layer_mode_text/vera_layer_mode_tile::layer#0 ) + vera_layer_mode_tile::mapwidth#10 = phi( vera_layer_mode_text/vera_layer_mode_tile::mapwidth#0 ) + vera_layer_mode_tile::color_depth#1 = phi( vera_layer_mode_text/vera_layer_mode_tile::color_depth#0 ) + vera_layer_mode_tile::config#0 = 0 + if(vera_layer_mode_tile::color_depth#1==1) goto vera_layer_mode_tile::@4 + to:vera_layer_mode_tile::@1 +vera_layer_mode_tile::@4: scope:[vera_layer_mode_tile] from vera_layer_mode_tile + vera_layer_mode_tile::tileheight#26 = phi( vera_layer_mode_tile/vera_layer_mode_tile::tileheight#30 ) + vera_layer_mode_tile::tilewidth#22 = phi( vera_layer_mode_tile/vera_layer_mode_tile::tilewidth#26 ) + vera_layer_mode_tile::tilebase_address#22 = phi( vera_layer_mode_tile/vera_layer_mode_tile::tilebase_address#26 ) + vera_layer_mode_tile::mapbase_address#21 = phi( vera_layer_mode_tile/vera_layer_mode_tile::mapbase_address#25 ) + vera_layer_mode_tile::mapheight#14 = phi( vera_layer_mode_tile/vera_layer_mode_tile::mapheight#18 ) + vera_layer_mode_tile::layer#22 = phi( vera_layer_mode_tile/vera_layer_mode_tile::layer#30 ) + vera_layer_mode_tile::mapwidth#6 = phi( vera_layer_mode_tile/vera_layer_mode_tile::mapwidth#10 ) + vera_layer_mode_tile::config#13 = phi( vera_layer_mode_tile/vera_layer_mode_tile::config#0 ) + vera_layer_mode_tile::config#1 = vera_layer_mode_tile::config#13 | VERA_LAYER_COLOR_DEPTH_1BPP + to:vera_layer_mode_tile::@8 +vera_layer_mode_tile::@1: scope:[vera_layer_mode_tile] from vera_layer_mode_tile + vera_layer_mode_tile::tileheight#31 = phi( vera_layer_mode_tile/vera_layer_mode_tile::tileheight#30 ) + vera_layer_mode_tile::tilewidth#27 = phi( vera_layer_mode_tile/vera_layer_mode_tile::tilewidth#26 ) + vera_layer_mode_tile::tilebase_address#27 = phi( vera_layer_mode_tile/vera_layer_mode_tile::tilebase_address#26 ) + vera_layer_mode_tile::mapbase_address#26 = phi( vera_layer_mode_tile/vera_layer_mode_tile::mapbase_address#25 ) + vera_layer_mode_tile::mapheight#19 = phi( vera_layer_mode_tile/vera_layer_mode_tile::mapheight#18 ) + vera_layer_mode_tile::layer#31 = phi( vera_layer_mode_tile/vera_layer_mode_tile::layer#30 ) + vera_layer_mode_tile::mapwidth#11 = phi( vera_layer_mode_tile/vera_layer_mode_tile::mapwidth#10 ) + vera_layer_mode_tile::config#26 = phi( vera_layer_mode_tile/vera_layer_mode_tile::config#0 ) + vera_layer_mode_tile::color_depth#2 = phi( vera_layer_mode_tile/vera_layer_mode_tile::color_depth#1 ) + if(vera_layer_mode_tile::color_depth#2==2) goto vera_layer_mode_tile::@5 + to:vera_layer_mode_tile::@2 +vera_layer_mode_tile::@5: scope:[vera_layer_mode_tile] from vera_layer_mode_tile::@1 + vera_layer_mode_tile::tileheight#27 = phi( vera_layer_mode_tile::@1/vera_layer_mode_tile::tileheight#31 ) + vera_layer_mode_tile::tilewidth#23 = phi( vera_layer_mode_tile::@1/vera_layer_mode_tile::tilewidth#27 ) + vera_layer_mode_tile::tilebase_address#23 = phi( vera_layer_mode_tile::@1/vera_layer_mode_tile::tilebase_address#27 ) + vera_layer_mode_tile::mapbase_address#22 = phi( vera_layer_mode_tile::@1/vera_layer_mode_tile::mapbase_address#26 ) + vera_layer_mode_tile::mapheight#15 = phi( vera_layer_mode_tile::@1/vera_layer_mode_tile::mapheight#19 ) + vera_layer_mode_tile::layer#23 = phi( vera_layer_mode_tile::@1/vera_layer_mode_tile::layer#31 ) + vera_layer_mode_tile::mapwidth#7 = phi( vera_layer_mode_tile::@1/vera_layer_mode_tile::mapwidth#11 ) + vera_layer_mode_tile::config#14 = phi( vera_layer_mode_tile::@1/vera_layer_mode_tile::config#26 ) + vera_layer_mode_tile::config#2 = vera_layer_mode_tile::config#14 | VERA_LAYER_COLOR_DEPTH_2BPP + to:vera_layer_mode_tile::@8 +vera_layer_mode_tile::@2: scope:[vera_layer_mode_tile] from vera_layer_mode_tile::@1 + vera_layer_mode_tile::tileheight#32 = phi( vera_layer_mode_tile::@1/vera_layer_mode_tile::tileheight#31 ) + vera_layer_mode_tile::tilewidth#28 = phi( vera_layer_mode_tile::@1/vera_layer_mode_tile::tilewidth#27 ) + vera_layer_mode_tile::tilebase_address#28 = phi( vera_layer_mode_tile::@1/vera_layer_mode_tile::tilebase_address#27 ) + vera_layer_mode_tile::mapbase_address#27 = phi( vera_layer_mode_tile::@1/vera_layer_mode_tile::mapbase_address#26 ) + vera_layer_mode_tile::mapheight#20 = phi( vera_layer_mode_tile::@1/vera_layer_mode_tile::mapheight#19 ) + vera_layer_mode_tile::layer#32 = phi( vera_layer_mode_tile::@1/vera_layer_mode_tile::layer#31 ) + vera_layer_mode_tile::mapwidth#12 = phi( vera_layer_mode_tile::@1/vera_layer_mode_tile::mapwidth#11 ) + vera_layer_mode_tile::config#27 = phi( vera_layer_mode_tile::@1/vera_layer_mode_tile::config#26 ) + vera_layer_mode_tile::color_depth#3 = phi( vera_layer_mode_tile::@1/vera_layer_mode_tile::color_depth#2 ) + if(vera_layer_mode_tile::color_depth#3==4) goto vera_layer_mode_tile::@6 + to:vera_layer_mode_tile::@3 +vera_layer_mode_tile::@6: scope:[vera_layer_mode_tile] from vera_layer_mode_tile::@2 + vera_layer_mode_tile::tileheight#28 = phi( vera_layer_mode_tile::@2/vera_layer_mode_tile::tileheight#32 ) + vera_layer_mode_tile::tilewidth#24 = phi( vera_layer_mode_tile::@2/vera_layer_mode_tile::tilewidth#28 ) + vera_layer_mode_tile::tilebase_address#24 = phi( vera_layer_mode_tile::@2/vera_layer_mode_tile::tilebase_address#28 ) + vera_layer_mode_tile::mapbase_address#23 = phi( vera_layer_mode_tile::@2/vera_layer_mode_tile::mapbase_address#27 ) + vera_layer_mode_tile::mapheight#16 = phi( vera_layer_mode_tile::@2/vera_layer_mode_tile::mapheight#20 ) + vera_layer_mode_tile::layer#24 = phi( vera_layer_mode_tile::@2/vera_layer_mode_tile::layer#32 ) + vera_layer_mode_tile::mapwidth#8 = phi( vera_layer_mode_tile::@2/vera_layer_mode_tile::mapwidth#12 ) + vera_layer_mode_tile::config#15 = phi( vera_layer_mode_tile::@2/vera_layer_mode_tile::config#27 ) + vera_layer_mode_tile::config#3 = vera_layer_mode_tile::config#15 | VERA_LAYER_COLOR_DEPTH_4BPP + to:vera_layer_mode_tile::@8 +vera_layer_mode_tile::@3: scope:[vera_layer_mode_tile] from vera_layer_mode_tile::@2 + vera_layer_mode_tile::tileheight#25 = phi( vera_layer_mode_tile::@2/vera_layer_mode_tile::tileheight#32 ) + vera_layer_mode_tile::tilewidth#21 = phi( vera_layer_mode_tile::@2/vera_layer_mode_tile::tilewidth#28 ) + vera_layer_mode_tile::tilebase_address#21 = phi( vera_layer_mode_tile::@2/vera_layer_mode_tile::tilebase_address#28 ) + vera_layer_mode_tile::mapbase_address#20 = phi( vera_layer_mode_tile::@2/vera_layer_mode_tile::mapbase_address#27 ) + vera_layer_mode_tile::mapheight#13 = phi( vera_layer_mode_tile::@2/vera_layer_mode_tile::mapheight#20 ) + vera_layer_mode_tile::layer#21 = phi( vera_layer_mode_tile::@2/vera_layer_mode_tile::layer#32 ) + vera_layer_mode_tile::mapwidth#5 = phi( vera_layer_mode_tile::@2/vera_layer_mode_tile::mapwidth#12 ) + vera_layer_mode_tile::config#28 = phi( vera_layer_mode_tile::@2/vera_layer_mode_tile::config#27 ) + vera_layer_mode_tile::color_depth#4 = phi( vera_layer_mode_tile::@2/vera_layer_mode_tile::color_depth#3 ) + if(vera_layer_mode_tile::color_depth#4==8) goto vera_layer_mode_tile::@7 + to:vera_layer_mode_tile::@8 +vera_layer_mode_tile::@7: scope:[vera_layer_mode_tile] from vera_layer_mode_tile::@3 + vera_layer_mode_tile::tileheight#29 = phi( vera_layer_mode_tile::@3/vera_layer_mode_tile::tileheight#25 ) + vera_layer_mode_tile::tilewidth#25 = phi( vera_layer_mode_tile::@3/vera_layer_mode_tile::tilewidth#21 ) + vera_layer_mode_tile::tilebase_address#25 = phi( vera_layer_mode_tile::@3/vera_layer_mode_tile::tilebase_address#21 ) + vera_layer_mode_tile::mapbase_address#24 = phi( vera_layer_mode_tile::@3/vera_layer_mode_tile::mapbase_address#20 ) + vera_layer_mode_tile::mapheight#17 = phi( vera_layer_mode_tile::@3/vera_layer_mode_tile::mapheight#13 ) + vera_layer_mode_tile::layer#25 = phi( vera_layer_mode_tile::@3/vera_layer_mode_tile::layer#21 ) + vera_layer_mode_tile::mapwidth#9 = phi( vera_layer_mode_tile::@3/vera_layer_mode_tile::mapwidth#5 ) + vera_layer_mode_tile::config#16 = phi( vera_layer_mode_tile::@3/vera_layer_mode_tile::config#28 ) + vera_layer_mode_tile::config#4 = vera_layer_mode_tile::config#16 | VERA_LAYER_COLOR_DEPTH_8BPP + to:vera_layer_mode_tile::@8 +vera_layer_mode_tile::@8: scope:[vera_layer_mode_tile] from vera_layer_mode_tile::@3 vera_layer_mode_tile::@4 vera_layer_mode_tile::@5 vera_layer_mode_tile::@6 vera_layer_mode_tile::@7 + vera_layer_mode_tile::tileheight#22 = phi( vera_layer_mode_tile::@3/vera_layer_mode_tile::tileheight#25, vera_layer_mode_tile::@4/vera_layer_mode_tile::tileheight#26, vera_layer_mode_tile::@5/vera_layer_mode_tile::tileheight#27, vera_layer_mode_tile::@6/vera_layer_mode_tile::tileheight#28, vera_layer_mode_tile::@7/vera_layer_mode_tile::tileheight#29 ) + vera_layer_mode_tile::tilewidth#18 = phi( vera_layer_mode_tile::@3/vera_layer_mode_tile::tilewidth#21, vera_layer_mode_tile::@4/vera_layer_mode_tile::tilewidth#22, vera_layer_mode_tile::@5/vera_layer_mode_tile::tilewidth#23, vera_layer_mode_tile::@6/vera_layer_mode_tile::tilewidth#24, vera_layer_mode_tile::@7/vera_layer_mode_tile::tilewidth#25 ) + vera_layer_mode_tile::tilebase_address#18 = phi( vera_layer_mode_tile::@3/vera_layer_mode_tile::tilebase_address#21, vera_layer_mode_tile::@4/vera_layer_mode_tile::tilebase_address#22, vera_layer_mode_tile::@5/vera_layer_mode_tile::tilebase_address#23, vera_layer_mode_tile::@6/vera_layer_mode_tile::tilebase_address#24, vera_layer_mode_tile::@7/vera_layer_mode_tile::tilebase_address#25 ) + vera_layer_mode_tile::mapbase_address#17 = phi( vera_layer_mode_tile::@3/vera_layer_mode_tile::mapbase_address#20, vera_layer_mode_tile::@4/vera_layer_mode_tile::mapbase_address#21, vera_layer_mode_tile::@5/vera_layer_mode_tile::mapbase_address#22, vera_layer_mode_tile::@6/vera_layer_mode_tile::mapbase_address#23, vera_layer_mode_tile::@7/vera_layer_mode_tile::mapbase_address#24 ) + vera_layer_mode_tile::mapheight#10 = phi( vera_layer_mode_tile::@3/vera_layer_mode_tile::mapheight#13, vera_layer_mode_tile::@4/vera_layer_mode_tile::mapheight#14, vera_layer_mode_tile::@5/vera_layer_mode_tile::mapheight#15, vera_layer_mode_tile::@6/vera_layer_mode_tile::mapheight#16, vera_layer_mode_tile::@7/vera_layer_mode_tile::mapheight#17 ) + vera_layer_mode_tile::layer#9 = phi( vera_layer_mode_tile::@3/vera_layer_mode_tile::layer#21, vera_layer_mode_tile::@4/vera_layer_mode_tile::layer#22, vera_layer_mode_tile::@5/vera_layer_mode_tile::layer#23, vera_layer_mode_tile::@6/vera_layer_mode_tile::layer#24, vera_layer_mode_tile::@7/vera_layer_mode_tile::layer#25 ) + vera_layer_mode_tile::config#29 = phi( vera_layer_mode_tile::@3/vera_layer_mode_tile::config#28, vera_layer_mode_tile::@4/vera_layer_mode_tile::config#1, vera_layer_mode_tile::@5/vera_layer_mode_tile::config#2, vera_layer_mode_tile::@6/vera_layer_mode_tile::config#3, vera_layer_mode_tile::@7/vera_layer_mode_tile::config#4 ) + vera_layer_mode_tile::mapwidth#1 = phi( vera_layer_mode_tile::@3/vera_layer_mode_tile::mapwidth#5, vera_layer_mode_tile::@4/vera_layer_mode_tile::mapwidth#6, vera_layer_mode_tile::@5/vera_layer_mode_tile::mapwidth#7, vera_layer_mode_tile::@6/vera_layer_mode_tile::mapwidth#8, vera_layer_mode_tile::@7/vera_layer_mode_tile::mapwidth#9 ) + if(vera_layer_mode_tile::mapwidth#1==$20) goto vera_layer_mode_tile::@12 + to:vera_layer_mode_tile::@9 +vera_layer_mode_tile::@12: scope:[vera_layer_mode_tile] from vera_layer_mode_tile::@8 + vera_layer_mode_tile::tileheight#18 = phi( vera_layer_mode_tile::@8/vera_layer_mode_tile::tileheight#22 ) + vera_layer_mode_tile::tilewidth#14 = phi( vera_layer_mode_tile::@8/vera_layer_mode_tile::tilewidth#18 ) + vera_layer_mode_tile::tilebase_address#14 = phi( vera_layer_mode_tile::@8/vera_layer_mode_tile::tilebase_address#18 ) + vera_layer_mode_tile::mapbase_address#13 = phi( vera_layer_mode_tile::@8/vera_layer_mode_tile::mapbase_address#17 ) + vera_layer_mode_tile::mapheight#6 = phi( vera_layer_mode_tile::@8/vera_layer_mode_tile::mapheight#10 ) + vera_layer_mode_tile::layer#1 = phi( vera_layer_mode_tile::@8/vera_layer_mode_tile::layer#9 ) + vera_layer_mode_tile::config#17 = phi( vera_layer_mode_tile::@8/vera_layer_mode_tile::config#29 ) + vera_layer_mode_tile::config#5 = vera_layer_mode_tile::config#17 | VERA_LAYER_WIDTH_32 + vera_layer_rowshift[vera_layer_mode_tile::layer#1] = 6 + vera_layer_mode_tile::$13 = vera_layer_mode_tile::layer#1 * SIZEOF_WORD + vera_layer_rowskip[vera_layer_mode_tile::$13] = $40 + to:vera_layer_mode_tile::@16 +vera_layer_mode_tile::@9: scope:[vera_layer_mode_tile] from vera_layer_mode_tile::@8 + vera_layer_mode_tile::tileheight#23 = phi( vera_layer_mode_tile::@8/vera_layer_mode_tile::tileheight#22 ) + vera_layer_mode_tile::tilewidth#19 = phi( vera_layer_mode_tile::@8/vera_layer_mode_tile::tilewidth#18 ) + vera_layer_mode_tile::tilebase_address#19 = phi( vera_layer_mode_tile::@8/vera_layer_mode_tile::tilebase_address#18 ) + vera_layer_mode_tile::mapbase_address#18 = phi( vera_layer_mode_tile::@8/vera_layer_mode_tile::mapbase_address#17 ) + vera_layer_mode_tile::mapheight#11 = phi( vera_layer_mode_tile::@8/vera_layer_mode_tile::mapheight#10 ) + vera_layer_mode_tile::layer#10 = phi( vera_layer_mode_tile::@8/vera_layer_mode_tile::layer#9 ) + vera_layer_mode_tile::config#30 = phi( vera_layer_mode_tile::@8/vera_layer_mode_tile::config#29 ) + vera_layer_mode_tile::mapwidth#2 = phi( vera_layer_mode_tile::@8/vera_layer_mode_tile::mapwidth#1 ) + if(vera_layer_mode_tile::mapwidth#2==$40) goto vera_layer_mode_tile::@13 + to:vera_layer_mode_tile::@10 +vera_layer_mode_tile::@13: scope:[vera_layer_mode_tile] from vera_layer_mode_tile::@9 + vera_layer_mode_tile::tileheight#19 = phi( vera_layer_mode_tile::@9/vera_layer_mode_tile::tileheight#23 ) + vera_layer_mode_tile::tilewidth#15 = phi( vera_layer_mode_tile::@9/vera_layer_mode_tile::tilewidth#19 ) + vera_layer_mode_tile::tilebase_address#15 = phi( vera_layer_mode_tile::@9/vera_layer_mode_tile::tilebase_address#19 ) + vera_layer_mode_tile::mapbase_address#14 = phi( vera_layer_mode_tile::@9/vera_layer_mode_tile::mapbase_address#18 ) + vera_layer_mode_tile::mapheight#7 = phi( vera_layer_mode_tile::@9/vera_layer_mode_tile::mapheight#11 ) + vera_layer_mode_tile::layer#2 = phi( vera_layer_mode_tile::@9/vera_layer_mode_tile::layer#10 ) + vera_layer_mode_tile::config#18 = phi( vera_layer_mode_tile::@9/vera_layer_mode_tile::config#30 ) + vera_layer_mode_tile::config#6 = vera_layer_mode_tile::config#18 | VERA_LAYER_WIDTH_64 + vera_layer_rowshift[vera_layer_mode_tile::layer#2] = 7 + vera_layer_mode_tile::$14 = vera_layer_mode_tile::layer#2 * SIZEOF_WORD + vera_layer_rowskip[vera_layer_mode_tile::$14] = $80 + to:vera_layer_mode_tile::@16 +vera_layer_mode_tile::@10: scope:[vera_layer_mode_tile] from vera_layer_mode_tile::@9 + vera_layer_mode_tile::tileheight#24 = phi( vera_layer_mode_tile::@9/vera_layer_mode_tile::tileheight#23 ) + vera_layer_mode_tile::tilewidth#20 = phi( vera_layer_mode_tile::@9/vera_layer_mode_tile::tilewidth#19 ) + vera_layer_mode_tile::tilebase_address#20 = phi( vera_layer_mode_tile::@9/vera_layer_mode_tile::tilebase_address#19 ) + vera_layer_mode_tile::mapbase_address#19 = phi( vera_layer_mode_tile::@9/vera_layer_mode_tile::mapbase_address#18 ) + vera_layer_mode_tile::mapheight#12 = phi( vera_layer_mode_tile::@9/vera_layer_mode_tile::mapheight#11 ) + vera_layer_mode_tile::layer#11 = phi( vera_layer_mode_tile::@9/vera_layer_mode_tile::layer#10 ) + vera_layer_mode_tile::config#31 = phi( vera_layer_mode_tile::@9/vera_layer_mode_tile::config#30 ) + vera_layer_mode_tile::mapwidth#3 = phi( vera_layer_mode_tile::@9/vera_layer_mode_tile::mapwidth#2 ) + if(vera_layer_mode_tile::mapwidth#3==$80) goto vera_layer_mode_tile::@14 + to:vera_layer_mode_tile::@11 +vera_layer_mode_tile::@14: scope:[vera_layer_mode_tile] from vera_layer_mode_tile::@10 + vera_layer_mode_tile::tileheight#20 = phi( vera_layer_mode_tile::@10/vera_layer_mode_tile::tileheight#24 ) + vera_layer_mode_tile::tilewidth#16 = phi( vera_layer_mode_tile::@10/vera_layer_mode_tile::tilewidth#20 ) + vera_layer_mode_tile::tilebase_address#16 = phi( vera_layer_mode_tile::@10/vera_layer_mode_tile::tilebase_address#20 ) + vera_layer_mode_tile::mapbase_address#15 = phi( vera_layer_mode_tile::@10/vera_layer_mode_tile::mapbase_address#19 ) + vera_layer_mode_tile::mapheight#8 = phi( vera_layer_mode_tile::@10/vera_layer_mode_tile::mapheight#12 ) + vera_layer_mode_tile::layer#3 = phi( vera_layer_mode_tile::@10/vera_layer_mode_tile::layer#11 ) + vera_layer_mode_tile::config#19 = phi( vera_layer_mode_tile::@10/vera_layer_mode_tile::config#31 ) + vera_layer_mode_tile::config#7 = vera_layer_mode_tile::config#19 | VERA_LAYER_WIDTH_128 + vera_layer_rowshift[vera_layer_mode_tile::layer#3] = 8 + vera_layer_mode_tile::$15 = vera_layer_mode_tile::layer#3 * SIZEOF_WORD + vera_layer_rowskip[vera_layer_mode_tile::$15] = $100 + to:vera_layer_mode_tile::@16 +vera_layer_mode_tile::@11: scope:[vera_layer_mode_tile] from vera_layer_mode_tile::@10 + vera_layer_mode_tile::tileheight#17 = phi( vera_layer_mode_tile::@10/vera_layer_mode_tile::tileheight#24 ) + vera_layer_mode_tile::tilewidth#13 = phi( vera_layer_mode_tile::@10/vera_layer_mode_tile::tilewidth#20 ) + vera_layer_mode_tile::tilebase_address#13 = phi( vera_layer_mode_tile::@10/vera_layer_mode_tile::tilebase_address#20 ) + vera_layer_mode_tile::mapbase_address#12 = phi( vera_layer_mode_tile::@10/vera_layer_mode_tile::mapbase_address#19 ) + vera_layer_mode_tile::mapheight#5 = phi( vera_layer_mode_tile::@10/vera_layer_mode_tile::mapheight#12 ) + vera_layer_mode_tile::layer#12 = phi( vera_layer_mode_tile::@10/vera_layer_mode_tile::layer#11 ) + vera_layer_mode_tile::config#32 = phi( vera_layer_mode_tile::@10/vera_layer_mode_tile::config#31 ) + vera_layer_mode_tile::mapwidth#4 = phi( vera_layer_mode_tile::@10/vera_layer_mode_tile::mapwidth#3 ) + if(vera_layer_mode_tile::mapwidth#4==$100) goto vera_layer_mode_tile::@15 + to:vera_layer_mode_tile::@16 +vera_layer_mode_tile::@15: scope:[vera_layer_mode_tile] from vera_layer_mode_tile::@11 + vera_layer_mode_tile::tileheight#21 = phi( vera_layer_mode_tile::@11/vera_layer_mode_tile::tileheight#17 ) + vera_layer_mode_tile::tilewidth#17 = phi( vera_layer_mode_tile::@11/vera_layer_mode_tile::tilewidth#13 ) + vera_layer_mode_tile::tilebase_address#17 = phi( vera_layer_mode_tile::@11/vera_layer_mode_tile::tilebase_address#13 ) + vera_layer_mode_tile::mapbase_address#16 = phi( vera_layer_mode_tile::@11/vera_layer_mode_tile::mapbase_address#12 ) + vera_layer_mode_tile::mapheight#9 = phi( vera_layer_mode_tile::@11/vera_layer_mode_tile::mapheight#5 ) + vera_layer_mode_tile::layer#4 = phi( vera_layer_mode_tile::@11/vera_layer_mode_tile::layer#12 ) + vera_layer_mode_tile::config#20 = phi( vera_layer_mode_tile::@11/vera_layer_mode_tile::config#32 ) + vera_layer_mode_tile::config#8 = vera_layer_mode_tile::config#20 | VERA_LAYER_WIDTH_256 + vera_layer_rowshift[vera_layer_mode_tile::layer#4] = 9 + vera_layer_mode_tile::$16 = vera_layer_mode_tile::layer#4 * SIZEOF_WORD + vera_layer_rowskip[vera_layer_mode_tile::$16] = $200 + to:vera_layer_mode_tile::@16 +vera_layer_mode_tile::@16: scope:[vera_layer_mode_tile] from vera_layer_mode_tile::@11 vera_layer_mode_tile::@12 vera_layer_mode_tile::@13 vera_layer_mode_tile::@14 vera_layer_mode_tile::@15 + vera_layer_mode_tile::tileheight#14 = phi( vera_layer_mode_tile::@11/vera_layer_mode_tile::tileheight#17, vera_layer_mode_tile::@12/vera_layer_mode_tile::tileheight#18, vera_layer_mode_tile::@13/vera_layer_mode_tile::tileheight#19, vera_layer_mode_tile::@14/vera_layer_mode_tile::tileheight#20, vera_layer_mode_tile::@15/vera_layer_mode_tile::tileheight#21 ) + vera_layer_mode_tile::tilewidth#10 = phi( vera_layer_mode_tile::@11/vera_layer_mode_tile::tilewidth#13, vera_layer_mode_tile::@12/vera_layer_mode_tile::tilewidth#14, vera_layer_mode_tile::@13/vera_layer_mode_tile::tilewidth#15, vera_layer_mode_tile::@14/vera_layer_mode_tile::tilewidth#16, vera_layer_mode_tile::@15/vera_layer_mode_tile::tilewidth#17 ) + vera_layer_mode_tile::tilebase_address#10 = phi( vera_layer_mode_tile::@11/vera_layer_mode_tile::tilebase_address#13, vera_layer_mode_tile::@12/vera_layer_mode_tile::tilebase_address#14, vera_layer_mode_tile::@13/vera_layer_mode_tile::tilebase_address#15, vera_layer_mode_tile::@14/vera_layer_mode_tile::tilebase_address#16, vera_layer_mode_tile::@15/vera_layer_mode_tile::tilebase_address#17 ) + vera_layer_mode_tile::mapbase_address#9 = phi( vera_layer_mode_tile::@11/vera_layer_mode_tile::mapbase_address#12, vera_layer_mode_tile::@12/vera_layer_mode_tile::mapbase_address#13, vera_layer_mode_tile::@13/vera_layer_mode_tile::mapbase_address#14, vera_layer_mode_tile::@14/vera_layer_mode_tile::mapbase_address#15, vera_layer_mode_tile::@15/vera_layer_mode_tile::mapbase_address#16 ) + vera_layer_mode_tile::layer#26 = phi( vera_layer_mode_tile::@11/vera_layer_mode_tile::layer#12, vera_layer_mode_tile::@12/vera_layer_mode_tile::layer#1, vera_layer_mode_tile::@13/vera_layer_mode_tile::layer#2, vera_layer_mode_tile::@14/vera_layer_mode_tile::layer#3, vera_layer_mode_tile::@15/vera_layer_mode_tile::layer#4 ) + vera_layer_mode_tile::config#33 = phi( vera_layer_mode_tile::@11/vera_layer_mode_tile::config#32, vera_layer_mode_tile::@12/vera_layer_mode_tile::config#5, vera_layer_mode_tile::@13/vera_layer_mode_tile::config#6, vera_layer_mode_tile::@14/vera_layer_mode_tile::config#7, vera_layer_mode_tile::@15/vera_layer_mode_tile::config#8 ) + vera_layer_mode_tile::mapheight#1 = phi( vera_layer_mode_tile::@11/vera_layer_mode_tile::mapheight#5, vera_layer_mode_tile::@12/vera_layer_mode_tile::mapheight#6, vera_layer_mode_tile::@13/vera_layer_mode_tile::mapheight#7, vera_layer_mode_tile::@14/vera_layer_mode_tile::mapheight#8, vera_layer_mode_tile::@15/vera_layer_mode_tile::mapheight#9 ) + if(vera_layer_mode_tile::mapheight#1==$20) goto vera_layer_mode_tile::@20 + to:vera_layer_mode_tile::@17 +vera_layer_mode_tile::@20: scope:[vera_layer_mode_tile] from vera_layer_mode_tile::@16 + vera_layer_mode_tile::tileheight#10 = phi( vera_layer_mode_tile::@16/vera_layer_mode_tile::tileheight#14 ) + vera_layer_mode_tile::tilewidth#6 = phi( vera_layer_mode_tile::@16/vera_layer_mode_tile::tilewidth#10 ) + vera_layer_mode_tile::tilebase_address#6 = phi( vera_layer_mode_tile::@16/vera_layer_mode_tile::tilebase_address#10 ) + vera_layer_mode_tile::mapbase_address#5 = phi( vera_layer_mode_tile::@16/vera_layer_mode_tile::mapbase_address#9 ) + vera_layer_mode_tile::layer#14 = phi( vera_layer_mode_tile::@16/vera_layer_mode_tile::layer#26 ) + vera_layer_mode_tile::config#21 = phi( vera_layer_mode_tile::@16/vera_layer_mode_tile::config#33 ) + vera_layer_mode_tile::config#9 = vera_layer_mode_tile::config#21 | VERA_LAYER_HEIGHT_32 + to:vera_layer_mode_tile::@24 +vera_layer_mode_tile::@17: scope:[vera_layer_mode_tile] from vera_layer_mode_tile::@16 + vera_layer_mode_tile::tileheight#15 = phi( vera_layer_mode_tile::@16/vera_layer_mode_tile::tileheight#14 ) + vera_layer_mode_tile::tilewidth#11 = phi( vera_layer_mode_tile::@16/vera_layer_mode_tile::tilewidth#10 ) + vera_layer_mode_tile::tilebase_address#11 = phi( vera_layer_mode_tile::@16/vera_layer_mode_tile::tilebase_address#10 ) + vera_layer_mode_tile::mapbase_address#10 = phi( vera_layer_mode_tile::@16/vera_layer_mode_tile::mapbase_address#9 ) + vera_layer_mode_tile::layer#27 = phi( vera_layer_mode_tile::@16/vera_layer_mode_tile::layer#26 ) + vera_layer_mode_tile::config#34 = phi( vera_layer_mode_tile::@16/vera_layer_mode_tile::config#33 ) + vera_layer_mode_tile::mapheight#2 = phi( vera_layer_mode_tile::@16/vera_layer_mode_tile::mapheight#1 ) + if(vera_layer_mode_tile::mapheight#2==$40) goto vera_layer_mode_tile::@21 + to:vera_layer_mode_tile::@18 +vera_layer_mode_tile::@21: scope:[vera_layer_mode_tile] from vera_layer_mode_tile::@17 + vera_layer_mode_tile::tileheight#11 = phi( vera_layer_mode_tile::@17/vera_layer_mode_tile::tileheight#15 ) + vera_layer_mode_tile::tilewidth#7 = phi( vera_layer_mode_tile::@17/vera_layer_mode_tile::tilewidth#11 ) + vera_layer_mode_tile::tilebase_address#7 = phi( vera_layer_mode_tile::@17/vera_layer_mode_tile::tilebase_address#11 ) + vera_layer_mode_tile::mapbase_address#6 = phi( vera_layer_mode_tile::@17/vera_layer_mode_tile::mapbase_address#10 ) + vera_layer_mode_tile::layer#15 = phi( vera_layer_mode_tile::@17/vera_layer_mode_tile::layer#27 ) + vera_layer_mode_tile::config#22 = phi( vera_layer_mode_tile::@17/vera_layer_mode_tile::config#34 ) + vera_layer_mode_tile::config#10 = vera_layer_mode_tile::config#22 | VERA_LAYER_HEIGHT_64 + to:vera_layer_mode_tile::@24 +vera_layer_mode_tile::@18: scope:[vera_layer_mode_tile] from vera_layer_mode_tile::@17 + vera_layer_mode_tile::tileheight#16 = phi( vera_layer_mode_tile::@17/vera_layer_mode_tile::tileheight#15 ) + vera_layer_mode_tile::tilewidth#12 = phi( vera_layer_mode_tile::@17/vera_layer_mode_tile::tilewidth#11 ) + vera_layer_mode_tile::tilebase_address#12 = phi( vera_layer_mode_tile::@17/vera_layer_mode_tile::tilebase_address#11 ) + vera_layer_mode_tile::mapbase_address#11 = phi( vera_layer_mode_tile::@17/vera_layer_mode_tile::mapbase_address#10 ) + vera_layer_mode_tile::layer#28 = phi( vera_layer_mode_tile::@17/vera_layer_mode_tile::layer#27 ) + vera_layer_mode_tile::config#35 = phi( vera_layer_mode_tile::@17/vera_layer_mode_tile::config#34 ) + vera_layer_mode_tile::mapheight#3 = phi( vera_layer_mode_tile::@17/vera_layer_mode_tile::mapheight#2 ) + if(vera_layer_mode_tile::mapheight#3==$80) goto vera_layer_mode_tile::@22 + to:vera_layer_mode_tile::@19 +vera_layer_mode_tile::@22: scope:[vera_layer_mode_tile] from vera_layer_mode_tile::@18 + vera_layer_mode_tile::tileheight#12 = phi( vera_layer_mode_tile::@18/vera_layer_mode_tile::tileheight#16 ) + vera_layer_mode_tile::tilewidth#8 = phi( vera_layer_mode_tile::@18/vera_layer_mode_tile::tilewidth#12 ) + vera_layer_mode_tile::tilebase_address#8 = phi( vera_layer_mode_tile::@18/vera_layer_mode_tile::tilebase_address#12 ) + vera_layer_mode_tile::mapbase_address#7 = phi( vera_layer_mode_tile::@18/vera_layer_mode_tile::mapbase_address#11 ) + vera_layer_mode_tile::layer#16 = phi( vera_layer_mode_tile::@18/vera_layer_mode_tile::layer#28 ) + vera_layer_mode_tile::config#23 = phi( vera_layer_mode_tile::@18/vera_layer_mode_tile::config#35 ) + vera_layer_mode_tile::config#11 = vera_layer_mode_tile::config#23 | VERA_LAYER_HEIGHT_128 + to:vera_layer_mode_tile::@24 +vera_layer_mode_tile::@19: scope:[vera_layer_mode_tile] from vera_layer_mode_tile::@18 + vera_layer_mode_tile::tileheight#9 = phi( vera_layer_mode_tile::@18/vera_layer_mode_tile::tileheight#16 ) + vera_layer_mode_tile::tilewidth#5 = phi( vera_layer_mode_tile::@18/vera_layer_mode_tile::tilewidth#12 ) + vera_layer_mode_tile::tilebase_address#5 = phi( vera_layer_mode_tile::@18/vera_layer_mode_tile::tilebase_address#12 ) + vera_layer_mode_tile::mapbase_address#4 = phi( vera_layer_mode_tile::@18/vera_layer_mode_tile::mapbase_address#11 ) + vera_layer_mode_tile::layer#13 = phi( vera_layer_mode_tile::@18/vera_layer_mode_tile::layer#28 ) + vera_layer_mode_tile::config#36 = phi( vera_layer_mode_tile::@18/vera_layer_mode_tile::config#35 ) + vera_layer_mode_tile::mapheight#4 = phi( vera_layer_mode_tile::@18/vera_layer_mode_tile::mapheight#3 ) + if(vera_layer_mode_tile::mapheight#4==$100) goto vera_layer_mode_tile::@23 + to:vera_layer_mode_tile::@24 +vera_layer_mode_tile::@23: scope:[vera_layer_mode_tile] from vera_layer_mode_tile::@19 + vera_layer_mode_tile::tileheight#13 = phi( vera_layer_mode_tile::@19/vera_layer_mode_tile::tileheight#9 ) + vera_layer_mode_tile::tilewidth#9 = phi( vera_layer_mode_tile::@19/vera_layer_mode_tile::tilewidth#5 ) + vera_layer_mode_tile::tilebase_address#9 = phi( vera_layer_mode_tile::@19/vera_layer_mode_tile::tilebase_address#5 ) + vera_layer_mode_tile::mapbase_address#8 = phi( vera_layer_mode_tile::@19/vera_layer_mode_tile::mapbase_address#4 ) + vera_layer_mode_tile::layer#17 = phi( vera_layer_mode_tile::@19/vera_layer_mode_tile::layer#13 ) + vera_layer_mode_tile::config#24 = phi( vera_layer_mode_tile::@19/vera_layer_mode_tile::config#36 ) + vera_layer_mode_tile::config#12 = vera_layer_mode_tile::config#24 | VERA_LAYER_HEIGHT_256 + to:vera_layer_mode_tile::@24 +vera_layer_mode_tile::@24: scope:[vera_layer_mode_tile] from vera_layer_mode_tile::@19 vera_layer_mode_tile::@20 vera_layer_mode_tile::@21 vera_layer_mode_tile::@22 vera_layer_mode_tile::@23 + vera_layer_mode_tile::tileheight#8 = phi( vera_layer_mode_tile::@19/vera_layer_mode_tile::tileheight#9, vera_layer_mode_tile::@20/vera_layer_mode_tile::tileheight#10, vera_layer_mode_tile::@21/vera_layer_mode_tile::tileheight#11, vera_layer_mode_tile::@22/vera_layer_mode_tile::tileheight#12, vera_layer_mode_tile::@23/vera_layer_mode_tile::tileheight#13 ) + vera_layer_mode_tile::tilewidth#4 = phi( vera_layer_mode_tile::@19/vera_layer_mode_tile::tilewidth#5, vera_layer_mode_tile::@20/vera_layer_mode_tile::tilewidth#6, vera_layer_mode_tile::@21/vera_layer_mode_tile::tilewidth#7, vera_layer_mode_tile::@22/vera_layer_mode_tile::tilewidth#8, vera_layer_mode_tile::@23/vera_layer_mode_tile::tilewidth#9 ) + vera_layer_mode_tile::tilebase_address#4 = phi( vera_layer_mode_tile::@19/vera_layer_mode_tile::tilebase_address#5, vera_layer_mode_tile::@20/vera_layer_mode_tile::tilebase_address#6, vera_layer_mode_tile::@21/vera_layer_mode_tile::tilebase_address#7, vera_layer_mode_tile::@22/vera_layer_mode_tile::tilebase_address#8, vera_layer_mode_tile::@23/vera_layer_mode_tile::tilebase_address#9 ) + vera_layer_mode_tile::mapbase_address#3 = phi( vera_layer_mode_tile::@19/vera_layer_mode_tile::mapbase_address#4, vera_layer_mode_tile::@20/vera_layer_mode_tile::mapbase_address#5, vera_layer_mode_tile::@21/vera_layer_mode_tile::mapbase_address#6, vera_layer_mode_tile::@22/vera_layer_mode_tile::mapbase_address#7, vera_layer_mode_tile::@23/vera_layer_mode_tile::mapbase_address#8 ) + vera_layer_mode_tile::config#25 = phi( vera_layer_mode_tile::@19/vera_layer_mode_tile::config#36, vera_layer_mode_tile::@20/vera_layer_mode_tile::config#9, vera_layer_mode_tile::@21/vera_layer_mode_tile::config#10, vera_layer_mode_tile::@22/vera_layer_mode_tile::config#11, vera_layer_mode_tile::@23/vera_layer_mode_tile::config#12 ) + vera_layer_mode_tile::layer#5 = phi( vera_layer_mode_tile::@19/vera_layer_mode_tile::layer#13, vera_layer_mode_tile::@20/vera_layer_mode_tile::layer#14, vera_layer_mode_tile::@21/vera_layer_mode_tile::layer#15, vera_layer_mode_tile::@22/vera_layer_mode_tile::layer#16, vera_layer_mode_tile::@23/vera_layer_mode_tile::layer#17 ) + vera_layer_set_config::layer#0 = vera_layer_mode_tile::layer#5 + vera_layer_set_config::config#0 = vera_layer_mode_tile::config#25 + call vera_layer_set_config + to:vera_layer_mode_tile::@33 +vera_layer_mode_tile::@33: scope:[vera_layer_mode_tile] from vera_layer_mode_tile::@24 + vera_layer_mode_tile::tileheight#7 = phi( vera_layer_mode_tile::@24/vera_layer_mode_tile::tileheight#8 ) + vera_layer_mode_tile::tilewidth#3 = phi( vera_layer_mode_tile::@24/vera_layer_mode_tile::tilewidth#4 ) + vera_layer_mode_tile::tilebase_address#3 = phi( vera_layer_mode_tile::@24/vera_layer_mode_tile::tilebase_address#4 ) + vera_layer_mode_tile::layer#6 = phi( vera_layer_mode_tile::@24/vera_layer_mode_tile::layer#5 ) + vera_layer_mode_tile::mapbase_address#2 = phi( vera_layer_mode_tile::@24/vera_layer_mode_tile::mapbase_address#3 ) + vera_layer_mode_tile::$1 = < vera_layer_mode_tile::mapbase_address#2 + vera_layer_mode_tile::$17 = vera_layer_mode_tile::layer#6 * SIZEOF_WORD + vera_mapbase_offset[vera_layer_mode_tile::$17] = vera_layer_mode_tile::$1 + vera_layer_mode_tile::$2 = > vera_layer_mode_tile::mapbase_address#2 + vera_mapbase_bank[vera_layer_mode_tile::layer#6] = (byte)vera_layer_mode_tile::$2 + vera_layer_mode_tile::$18 = vera_layer_mode_tile::layer#6 * SIZEOF_DWORD + vera_mapbase_address[vera_layer_mode_tile::$18] = vera_layer_mode_tile::mapbase_address#2 + vera_layer_mode_tile::$3 = vera_layer_mode_tile::mapbase_address#2 >> 1 + vera_layer_mode_tile::mapbase_address#0 = vera_layer_mode_tile::$3 + vera_layer_mode_tile::$4 = < vera_layer_mode_tile::mapbase_address#0 + vera_layer_mode_tile::$5 = > vera_layer_mode_tile::$4 + vera_layer_mode_tile::mapbase#0 = vera_layer_mode_tile::$5 + vera_layer_set_mapbase::layer#0 = vera_layer_mode_tile::layer#6 + vera_layer_set_mapbase::mapbase#0 = vera_layer_mode_tile::mapbase#0 + call vera_layer_set_mapbase + to:vera_layer_mode_tile::@34 +vera_layer_mode_tile::@34: scope:[vera_layer_mode_tile] from vera_layer_mode_tile::@33 + vera_layer_mode_tile::tileheight#6 = phi( vera_layer_mode_tile::@33/vera_layer_mode_tile::tileheight#7 ) + vera_layer_mode_tile::tilewidth#1 = phi( vera_layer_mode_tile::@33/vera_layer_mode_tile::tilewidth#3 ) + vera_layer_mode_tile::layer#7 = phi( vera_layer_mode_tile::@33/vera_layer_mode_tile::layer#6 ) + vera_layer_mode_tile::tilebase_address#2 = phi( vera_layer_mode_tile::@33/vera_layer_mode_tile::tilebase_address#3 ) + vera_layer_mode_tile::$7 = < vera_layer_mode_tile::tilebase_address#2 + vera_layer_mode_tile::$19 = vera_layer_mode_tile::layer#7 * SIZEOF_WORD + vera_tilebase_offset[vera_layer_mode_tile::$19] = vera_layer_mode_tile::$7 + vera_layer_mode_tile::$8 = > vera_layer_mode_tile::tilebase_address#2 + vera_tilebase_bank[vera_layer_mode_tile::layer#7] = (byte)vera_layer_mode_tile::$8 + vera_layer_mode_tile::$20 = vera_layer_mode_tile::layer#7 * SIZEOF_DWORD + vera_tilebase_address[vera_layer_mode_tile::$20] = vera_layer_mode_tile::tilebase_address#2 + vera_layer_mode_tile::$9 = vera_layer_mode_tile::tilebase_address#2 >> 1 + vera_layer_mode_tile::tilebase_address#0 = vera_layer_mode_tile::$9 + vera_layer_mode_tile::$10 = < vera_layer_mode_tile::tilebase_address#0 + vera_layer_mode_tile::$11 = > vera_layer_mode_tile::$10 + vera_layer_mode_tile::tilebase#0 = vera_layer_mode_tile::$11 + vera_layer_mode_tile::tilebase#1 = vera_layer_mode_tile::tilebase#0 & VERA_LAYER_TILEBASE_MASK + if(vera_layer_mode_tile::tilewidth#1==8) goto vera_layer_mode_tile::@26 + to:vera_layer_mode_tile::@25 +vera_layer_mode_tile::@26: scope:[vera_layer_mode_tile] from vera_layer_mode_tile::@34 + vera_layer_mode_tile::layer#34 = phi( vera_layer_mode_tile::@34/vera_layer_mode_tile::layer#7 ) + vera_layer_mode_tile::tileheight#4 = phi( vera_layer_mode_tile::@34/vera_layer_mode_tile::tileheight#6 ) + vera_layer_mode_tile::tilebase#6 = phi( vera_layer_mode_tile::@34/vera_layer_mode_tile::tilebase#1 ) + vera_layer_mode_tile::tilebase#2 = vera_layer_mode_tile::tilebase#6 | VERA_TILEBASE_WIDTH_8 + to:vera_layer_mode_tile::@28 +vera_layer_mode_tile::@25: scope:[vera_layer_mode_tile] from vera_layer_mode_tile::@34 + vera_layer_mode_tile::layer#33 = phi( vera_layer_mode_tile::@34/vera_layer_mode_tile::layer#7 ) + vera_layer_mode_tile::tileheight#3 = phi( vera_layer_mode_tile::@34/vera_layer_mode_tile::tileheight#6 ) + vera_layer_mode_tile::tilebase#11 = phi( vera_layer_mode_tile::@34/vera_layer_mode_tile::tilebase#1 ) + vera_layer_mode_tile::tilewidth#2 = phi( vera_layer_mode_tile::@34/vera_layer_mode_tile::tilewidth#1 ) + if(vera_layer_mode_tile::tilewidth#2==$10) goto vera_layer_mode_tile::@27 + to:vera_layer_mode_tile::@28 +vera_layer_mode_tile::@27: scope:[vera_layer_mode_tile] from vera_layer_mode_tile::@25 + vera_layer_mode_tile::layer#35 = phi( vera_layer_mode_tile::@25/vera_layer_mode_tile::layer#33 ) + vera_layer_mode_tile::tileheight#5 = phi( vera_layer_mode_tile::@25/vera_layer_mode_tile::tileheight#3 ) + vera_layer_mode_tile::tilebase#7 = phi( vera_layer_mode_tile::@25/vera_layer_mode_tile::tilebase#11 ) + vera_layer_mode_tile::tilebase#3 = vera_layer_mode_tile::tilebase#7 | VERA_TILEBASE_WIDTH_16 + to:vera_layer_mode_tile::@28 +vera_layer_mode_tile::@28: scope:[vera_layer_mode_tile] from vera_layer_mode_tile::@25 vera_layer_mode_tile::@26 vera_layer_mode_tile::@27 + vera_layer_mode_tile::layer#29 = phi( vera_layer_mode_tile::@25/vera_layer_mode_tile::layer#33, vera_layer_mode_tile::@26/vera_layer_mode_tile::layer#34, vera_layer_mode_tile::@27/vera_layer_mode_tile::layer#35 ) + vera_layer_mode_tile::tilebase#12 = phi( vera_layer_mode_tile::@25/vera_layer_mode_tile::tilebase#11, vera_layer_mode_tile::@26/vera_layer_mode_tile::tilebase#2, vera_layer_mode_tile::@27/vera_layer_mode_tile::tilebase#3 ) + vera_layer_mode_tile::tileheight#1 = phi( vera_layer_mode_tile::@25/vera_layer_mode_tile::tileheight#3, vera_layer_mode_tile::@26/vera_layer_mode_tile::tileheight#4, vera_layer_mode_tile::@27/vera_layer_mode_tile::tileheight#5 ) + if(vera_layer_mode_tile::tileheight#1==8) goto vera_layer_mode_tile::@30 + to:vera_layer_mode_tile::@29 +vera_layer_mode_tile::@30: scope:[vera_layer_mode_tile] from vera_layer_mode_tile::@28 + vera_layer_mode_tile::layer#19 = phi( vera_layer_mode_tile::@28/vera_layer_mode_tile::layer#29 ) + vera_layer_mode_tile::tilebase#8 = phi( vera_layer_mode_tile::@28/vera_layer_mode_tile::tilebase#12 ) + vera_layer_mode_tile::tilebase#4 = vera_layer_mode_tile::tilebase#8 | VERA_TILEBASE_HEIGHT_8 + to:vera_layer_mode_tile::@32 +vera_layer_mode_tile::@29: scope:[vera_layer_mode_tile] from vera_layer_mode_tile::@28 + vera_layer_mode_tile::layer#18 = phi( vera_layer_mode_tile::@28/vera_layer_mode_tile::layer#29 ) + vera_layer_mode_tile::tilebase#13 = phi( vera_layer_mode_tile::@28/vera_layer_mode_tile::tilebase#12 ) + vera_layer_mode_tile::tileheight#2 = phi( vera_layer_mode_tile::@28/vera_layer_mode_tile::tileheight#1 ) + if(vera_layer_mode_tile::tileheight#2==$10) goto vera_layer_mode_tile::@31 + to:vera_layer_mode_tile::@32 +vera_layer_mode_tile::@31: scope:[vera_layer_mode_tile] from vera_layer_mode_tile::@29 + vera_layer_mode_tile::layer#20 = phi( vera_layer_mode_tile::@29/vera_layer_mode_tile::layer#18 ) + vera_layer_mode_tile::tilebase#9 = phi( vera_layer_mode_tile::@29/vera_layer_mode_tile::tilebase#13 ) + vera_layer_mode_tile::tilebase#5 = vera_layer_mode_tile::tilebase#9 | VERA_TILEBASE_HEIGHT_16 + to:vera_layer_mode_tile::@32 +vera_layer_mode_tile::@32: scope:[vera_layer_mode_tile] from vera_layer_mode_tile::@29 vera_layer_mode_tile::@30 vera_layer_mode_tile::@31 + vera_layer_mode_tile::tilebase#10 = phi( vera_layer_mode_tile::@29/vera_layer_mode_tile::tilebase#13, vera_layer_mode_tile::@30/vera_layer_mode_tile::tilebase#4, vera_layer_mode_tile::@31/vera_layer_mode_tile::tilebase#5 ) + vera_layer_mode_tile::layer#8 = phi( vera_layer_mode_tile::@29/vera_layer_mode_tile::layer#18, vera_layer_mode_tile::@30/vera_layer_mode_tile::layer#19, vera_layer_mode_tile::@31/vera_layer_mode_tile::layer#20 ) + vera_layer_set_tilebase::layer#0 = vera_layer_mode_tile::layer#8 + vera_layer_set_tilebase::tilebase#0 = vera_layer_mode_tile::tilebase#10 + call vera_layer_set_tilebase + to:vera_layer_mode_tile::@35 +vera_layer_mode_tile::@35: scope:[vera_layer_mode_tile] from vera_layer_mode_tile::@32 + to:vera_layer_mode_tile::@return +vera_layer_mode_tile::@return: scope:[vera_layer_mode_tile] from vera_layer_mode_tile::@35 + return + to:@return + +void vera_layer_mode_text(byte vera_layer_mode_text::layer , dword vera_layer_mode_text::mapbase_address , dword vera_layer_mode_text::tilebase_address , word vera_layer_mode_text::mapwidth , word vera_layer_mode_text::mapheight , byte vera_layer_mode_text::tilewidth , byte vera_layer_mode_text::tileheight , word vera_layer_mode_text::color_mode) +vera_layer_mode_text: scope:[vera_layer_mode_text] from conio_x16_init + vera_layer_mode_text::color_mode#3 = phi( conio_x16_init/vera_layer_mode_text::color_mode#0 ) + vera_layer_mode_text::tileheight#1 = phi( conio_x16_init/vera_layer_mode_text::tileheight#0 ) + vera_layer_mode_text::tilewidth#1 = phi( conio_x16_init/vera_layer_mode_text::tilewidth#0 ) + vera_layer_mode_text::mapheight#1 = phi( conio_x16_init/vera_layer_mode_text::mapheight#0 ) + vera_layer_mode_text::mapwidth#1 = phi( conio_x16_init/vera_layer_mode_text::mapwidth#0 ) + vera_layer_mode_text::tilebase_address#1 = phi( conio_x16_init/vera_layer_mode_text::tilebase_address#0 ) + vera_layer_mode_text::mapbase_address#1 = phi( conio_x16_init/vera_layer_mode_text::mapbase_address#0 ) + vera_layer_mode_text::layer#1 = phi( conio_x16_init/vera_layer_mode_text::layer#0 ) + vera_layer_mode_tile::layer#0 = vera_layer_mode_text::layer#1 + vera_layer_mode_tile::mapbase_address#1 = vera_layer_mode_text::mapbase_address#1 + vera_layer_mode_tile::tilebase_address#1 = vera_layer_mode_text::tilebase_address#1 + vera_layer_mode_tile::mapwidth#0 = vera_layer_mode_text::mapwidth#1 + vera_layer_mode_tile::mapheight#0 = vera_layer_mode_text::mapheight#1 + vera_layer_mode_tile::tilewidth#0 = vera_layer_mode_text::tilewidth#1 + vera_layer_mode_tile::tileheight#0 = vera_layer_mode_text::tileheight#1 + vera_layer_mode_tile::color_depth#0 = 1 + call vera_layer_mode_tile + to:vera_layer_mode_text::@4 +vera_layer_mode_text::@4: scope:[vera_layer_mode_text] from vera_layer_mode_text + vera_layer_mode_text::layer#4 = phi( vera_layer_mode_text/vera_layer_mode_text::layer#1 ) + vera_layer_mode_text::color_mode#1 = phi( vera_layer_mode_text/vera_layer_mode_text::color_mode#3 ) + if(vera_layer_mode_text::color_mode#1==$10) goto vera_layer_mode_text::@2 + to:vera_layer_mode_text::@1 +vera_layer_mode_text::@2: scope:[vera_layer_mode_text] from vera_layer_mode_text::@4 + vera_layer_mode_text::layer#2 = phi( vera_layer_mode_text::@4/vera_layer_mode_text::layer#4 ) + vera_layer_set_text_color_mode::layer#0 = vera_layer_mode_text::layer#2 + vera_layer_set_text_color_mode::color_mode#0 = VERA_LAYER_CONFIG_16C + call vera_layer_set_text_color_mode + to:vera_layer_mode_text::@5 +vera_layer_mode_text::@5: scope:[vera_layer_mode_text] from vera_layer_mode_text::@2 + to:vera_layer_mode_text::@return +vera_layer_mode_text::@1: scope:[vera_layer_mode_text] from vera_layer_mode_text::@4 + vera_layer_mode_text::layer#5 = phi( vera_layer_mode_text::@4/vera_layer_mode_text::layer#4 ) + vera_layer_mode_text::color_mode#2 = phi( vera_layer_mode_text::@4/vera_layer_mode_text::color_mode#1 ) + if(vera_layer_mode_text::color_mode#2==$100) goto vera_layer_mode_text::@3 + to:vera_layer_mode_text::@return +vera_layer_mode_text::@3: scope:[vera_layer_mode_text] from vera_layer_mode_text::@1 + vera_layer_mode_text::layer#3 = phi( vera_layer_mode_text::@1/vera_layer_mode_text::layer#5 ) + vera_layer_set_text_color_mode::layer#1 = vera_layer_mode_text::layer#3 + vera_layer_set_text_color_mode::color_mode#1 = VERA_LAYER_CONFIG_256C + call vera_layer_set_text_color_mode + to:vera_layer_mode_text::@6 +vera_layer_mode_text::@6: scope:[vera_layer_mode_text] from vera_layer_mode_text::@3 + to:vera_layer_mode_text::@return +vera_layer_mode_text::@return: scope:[vera_layer_mode_text] from vera_layer_mode_text::@1 vera_layer_mode_text::@5 vera_layer_mode_text::@6 + return + to:@return + +void conio_x16_init() +conio_x16_init: scope:[conio_x16_init] from __start::__init1 + CONIO_SCREEN_TEXT#31 = phi( __start::__init1/CONIO_SCREEN_TEXT#4 ) + CONIO_SCREEN_BANK#23 = phi( __start::__init1/CONIO_SCREEN_BANK#4 ) + conio_x16_init::line#0 = *conio_x16_init::BASIC_CURSOR_LINE + vera_layer_mode_text::layer#0 = 1 + vera_layer_mode_text::mapbase_address#0 = (dword)0 + vera_layer_mode_text::tilebase_address#0 = (dword)$f800 + vera_layer_mode_text::mapwidth#0 = $80 + vera_layer_mode_text::mapheight#0 = $40 + vera_layer_mode_text::tilewidth#0 = 8 + vera_layer_mode_text::tileheight#0 = 8 + vera_layer_mode_text::color_mode#0 = $10 + call vera_layer_mode_text + to:conio_x16_init::@3 +conio_x16_init::@3: scope:[conio_x16_init] from conio_x16_init + conio_x16_init::line#9 = phi( conio_x16_init/conio_x16_init::line#0 ) + CONIO_SCREEN_TEXT#22 = phi( conio_x16_init/CONIO_SCREEN_TEXT#31 ) + CONIO_SCREEN_BANK#18 = phi( conio_x16_init/CONIO_SCREEN_BANK#23 ) + screensize::x#0 = &conio_screen_width + screensize::y#0 = &conio_screen_height + call screensize + to:conio_x16_init::@4 +conio_x16_init::@4: scope:[conio_x16_init] from conio_x16_init::@3 + conio_x16_init::line#8 = phi( conio_x16_init::@3/conio_x16_init::line#9 ) + CONIO_SCREEN_TEXT#15 = phi( conio_x16_init::@3/CONIO_SCREEN_TEXT#22 ) + CONIO_SCREEN_BANK#13 = phi( conio_x16_init::@3/CONIO_SCREEN_BANK#18 ) + screenlayer::layer#0 = 1 + call screenlayer + to:conio_x16_init::@5 +conio_x16_init::@5: scope:[conio_x16_init] from conio_x16_init::@4 + conio_x16_init::line#7 = phi( conio_x16_init::@4/conio_x16_init::line#8 ) + CONIO_SCREEN_TEXT#7 = phi( conio_x16_init::@4/CONIO_SCREEN_TEXT#3 ) + CONIO_SCREEN_BANK#7 = phi( conio_x16_init::@4/CONIO_SCREEN_BANK#3 ) + CONIO_SCREEN_BANK#0 = CONIO_SCREEN_BANK#7 + CONIO_SCREEN_TEXT#0 = CONIO_SCREEN_TEXT#7 + vera_layer_set_textcolor::layer#0 = 1 + vera_layer_set_textcolor::color#0 = WHITE + call vera_layer_set_textcolor + vera_layer_set_textcolor::return#2 = vera_layer_set_textcolor::return#1 + to:conio_x16_init::@6 +conio_x16_init::@6: scope:[conio_x16_init] from conio_x16_init::@5 + CONIO_SCREEN_TEXT#66 = phi( conio_x16_init::@5/CONIO_SCREEN_TEXT#0 ) + CONIO_SCREEN_BANK#43 = phi( conio_x16_init::@5/CONIO_SCREEN_BANK#0 ) + conio_x16_init::line#6 = phi( conio_x16_init::@5/conio_x16_init::line#7 ) + vera_layer_set_backcolor::layer#0 = 1 + vera_layer_set_backcolor::color#0 = BLUE + call vera_layer_set_backcolor + vera_layer_set_backcolor::return#2 = vera_layer_set_backcolor::return#1 + to:conio_x16_init::@7 +conio_x16_init::@7: scope:[conio_x16_init] from conio_x16_init::@6 + CONIO_SCREEN_TEXT#48 = phi( conio_x16_init::@6/CONIO_SCREEN_TEXT#66 ) + CONIO_SCREEN_BANK#35 = phi( conio_x16_init::@6/CONIO_SCREEN_BANK#43 ) + conio_x16_init::line#5 = phi( conio_x16_init::@6/conio_x16_init::line#6 ) + vera_layer_set_mapbase::layer#1 = 0 + vera_layer_set_mapbase::mapbase#1 = $20 + call vera_layer_set_mapbase + to:conio_x16_init::@8 +conio_x16_init::@8: scope:[conio_x16_init] from conio_x16_init::@7 + CONIO_SCREEN_TEXT#39 = phi( conio_x16_init::@7/CONIO_SCREEN_TEXT#48 ) + CONIO_SCREEN_BANK#30 = phi( conio_x16_init::@7/CONIO_SCREEN_BANK#35 ) + conio_x16_init::line#4 = phi( conio_x16_init::@7/conio_x16_init::line#5 ) + vera_layer_set_mapbase::layer#2 = 1 + vera_layer_set_mapbase::mapbase#2 = 0 + call vera_layer_set_mapbase + to:conio_x16_init::@9 +conio_x16_init::@9: scope:[conio_x16_init] from conio_x16_init::@8 + CONIO_SCREEN_TEXT#33 = phi( conio_x16_init::@8/CONIO_SCREEN_TEXT#39 ) + CONIO_SCREEN_BANK#25 = phi( conio_x16_init::@8/CONIO_SCREEN_BANK#30 ) + conio_x16_init::line#2 = phi( conio_x16_init::@8/conio_x16_init::line#4 ) + conio_x16_init::$7 = conio_x16_init::line#2 >= conio_screen_height + conio_x16_init::$8 = ! conio_x16_init::$7 + if(conio_x16_init::$8) goto conio_x16_init::@1 + to:conio_x16_init::@2 +conio_x16_init::@1: scope:[conio_x16_init] from conio_x16_init::@2 conio_x16_init::@9 + CONIO_SCREEN_TEXT#23 = phi( conio_x16_init::@2/CONIO_SCREEN_TEXT#32, conio_x16_init::@9/CONIO_SCREEN_TEXT#33 ) + CONIO_SCREEN_BANK#19 = phi( conio_x16_init::@2/CONIO_SCREEN_BANK#24, conio_x16_init::@9/CONIO_SCREEN_BANK#25 ) + conio_x16_init::line#3 = phi( conio_x16_init::@2/conio_x16_init::line#1, conio_x16_init::@9/conio_x16_init::line#2 ) + gotoxy::x#0 = 0 + gotoxy::y#0 = conio_x16_init::line#3 + call gotoxy + to:conio_x16_init::@10 +conio_x16_init::@10: scope:[conio_x16_init] from conio_x16_init::@1 + CONIO_SCREEN_TEXT#16 = phi( conio_x16_init::@1/CONIO_SCREEN_TEXT#23 ) + CONIO_SCREEN_BANK#14 = phi( conio_x16_init::@1/CONIO_SCREEN_BANK#19 ) + to:conio_x16_init::@return +conio_x16_init::@2: scope:[conio_x16_init] from conio_x16_init::@9 + CONIO_SCREEN_TEXT#32 = phi( conio_x16_init::@9/CONIO_SCREEN_TEXT#33 ) + CONIO_SCREEN_BANK#24 = phi( conio_x16_init::@9/CONIO_SCREEN_BANK#25 ) + conio_x16_init::$9 = conio_screen_height - 1 + conio_x16_init::line#1 = conio_x16_init::$9 + to:conio_x16_init::@1 +conio_x16_init::@return: scope:[conio_x16_init] from conio_x16_init::@10 + CONIO_SCREEN_TEXT#8 = phi( conio_x16_init::@10/CONIO_SCREEN_TEXT#16 ) + CONIO_SCREEN_BANK#8 = phi( conio_x16_init::@10/CONIO_SCREEN_BANK#14 ) + CONIO_SCREEN_BANK#1 = CONIO_SCREEN_BANK#8 + CONIO_SCREEN_TEXT#1 = CONIO_SCREEN_TEXT#8 + return + to:@return + +void gotoxy(byte gotoxy::x , byte gotoxy::y) +gotoxy: scope:[gotoxy] from conio_x16_init::@1 cscroll::@5 + gotoxy::x#5 = phi( conio_x16_init::@1/gotoxy::x#0, cscroll::@5/gotoxy::x#2 ) + gotoxy::y#3 = phi( conio_x16_init::@1/gotoxy::y#0, cscroll::@5/gotoxy::y#2 ) + gotoxy::$0 = gotoxy::y#3 > conio_screen_height + gotoxy::$1 = ! gotoxy::$0 + if(gotoxy::$1) goto gotoxy::@1 + to:gotoxy::@3 +gotoxy::@1: scope:[gotoxy] from gotoxy gotoxy::@3 + gotoxy::y#5 = phi( gotoxy/gotoxy::y#3, gotoxy::@3/gotoxy::y#1 ) + gotoxy::x#3 = phi( gotoxy/gotoxy::x#5, gotoxy::@3/gotoxy::x#6 ) + gotoxy::$2 = gotoxy::x#3 >= conio_screen_width + gotoxy::$3 = ! gotoxy::$2 + if(gotoxy::$3) goto gotoxy::@2 + to:gotoxy::@4 +gotoxy::@3: scope:[gotoxy] from gotoxy + gotoxy::x#6 = phi( gotoxy/gotoxy::x#5 ) + gotoxy::y#1 = 0 + to:gotoxy::@1 +gotoxy::@2: scope:[gotoxy] from gotoxy::@1 gotoxy::@4 + gotoxy::y#4 = phi( gotoxy::@1/gotoxy::y#5, gotoxy::@4/gotoxy::y#6 ) + gotoxy::x#4 = phi( gotoxy::@1/gotoxy::x#3, gotoxy::@4/gotoxy::x#1 ) + conio_cursor_x[conio_screen_layer] = gotoxy::x#4 + conio_cursor_y[conio_screen_layer] = gotoxy::y#4 + gotoxy::$6 = (word)gotoxy::y#4 + gotoxy::$4 = gotoxy::$6 << conio_rowshift + gotoxy::line_offset#0 = gotoxy::$4 + gotoxy::$5 = conio_screen_layer * SIZEOF_WORD + conio_line_text[gotoxy::$5] = gotoxy::line_offset#0 + to:gotoxy::@return +gotoxy::@4: scope:[gotoxy] from gotoxy::@1 + gotoxy::y#6 = phi( gotoxy::@1/gotoxy::y#5 ) + gotoxy::x#1 = 0 + to:gotoxy::@2 +gotoxy::@return: scope:[gotoxy] from gotoxy::@2 + return + to:@return + +void screensize(byte* screensize::x , byte* screensize::y) +screensize: scope:[screensize] from conio_x16_init::@3 + screensize::y#1 = phi( conio_x16_init::@3/screensize::y#0 ) + screensize::x#1 = phi( conio_x16_init::@3/screensize::x#0 ) + screensize::$0 = *VERA_DC_HSCALE >> 7 + screensize::hscale#0 = screensize::$0 + screensize::$1 = $28 << screensize::hscale#0 + *screensize::x#1 = screensize::$1 + screensize::$2 = *VERA_DC_VSCALE >> 7 + screensize::vscale#0 = screensize::$2 + screensize::$3 = $1e << screensize::vscale#0 + *screensize::y#1 = screensize::$3 + to:screensize::@return +screensize::@return: scope:[screensize] from screensize + return + to:@return + +void cputc(byte cputc::c) +cputc: scope:[cputc] from cputs::@2 printf_number_buffer::@9 printf_padding::@2 + CONIO_SCREEN_BANK#20 = phi( cputs::@2/CONIO_SCREEN_BANK#26, printf_number_buffer::@9/CONIO_SCREEN_BANK#27, printf_padding::@2/CONIO_SCREEN_BANK#28 ) + cputc::c#5 = phi( cputs::@2/cputc::c#0, printf_number_buffer::@9/cputc::c#2, printf_padding::@2/cputc::c#1 ) + CONIO_SCREEN_TEXT#17 = phi( cputs::@2/CONIO_SCREEN_TEXT#24, printf_number_buffer::@9/CONIO_SCREEN_TEXT#25, printf_padding::@2/CONIO_SCREEN_TEXT#26 ) + vera_layer_get_color::layer#0 = conio_screen_layer + call vera_layer_get_color + vera_layer_get_color::return#3 = vera_layer_get_color::return#2 + to:cputc::@7 +cputc::@7: scope:[cputc] from cputc + CONIO_SCREEN_BANK#15 = phi( cputc/CONIO_SCREEN_BANK#20 ) + cputc::c#3 = phi( cputc/cputc::c#5 ) + CONIO_SCREEN_TEXT#9 = phi( cputc/CONIO_SCREEN_TEXT#17 ) + vera_layer_get_color::return#6 = phi( cputc/vera_layer_get_color::return#3 ) + cputc::$0 = vera_layer_get_color::return#6 + cputc::color#0 = cputc::$0 + cputc::$15 = conio_screen_layer * SIZEOF_WORD + cputc::$1 = CONIO_SCREEN_TEXT#9 + conio_line_text[cputc::$15] + cputc::conio_addr#0 = cputc::$1 + cputc::$2 = conio_cursor_x[conio_screen_layer] << 1 + cputc::conio_addr#1 = cputc::conio_addr#0 + cputc::$2 + cputc::$3 = cputc::c#3 == ' +' + if(cputc::$3) goto cputc::@1 + to:cputc::@2 +cputc::@1: scope:[cputc] from cputc::@7 + CONIO_SCREEN_TEXT#86 = phi( cputc::@7/CONIO_SCREEN_TEXT#9 ) + call cputln + to:cputc::@8 +cputc::@8: scope:[cputc] from cputc::@1 + to:cputc::@return +cputc::@2: scope:[cputc] from cputc::@7 + CONIO_SCREEN_TEXT#108 = phi( cputc::@7/CONIO_SCREEN_TEXT#9 ) + cputc::color#1 = phi( cputc::@7/cputc::color#0 ) + cputc::c#4 = phi( cputc::@7/cputc::c#3 ) + CONIO_SCREEN_BANK#9 = phi( cputc::@7/CONIO_SCREEN_BANK#15 ) + cputc::conio_addr#2 = phi( cputc::@7/cputc::conio_addr#1 ) + *VERA_CTRL = *VERA_CTRL & ~VERA_ADDRSEL + cputc::$4 = < cputc::conio_addr#2 + *VERA_ADDRX_L = cputc::$4 + cputc::$5 = > cputc::conio_addr#2 + *VERA_ADDRX_M = cputc::$5 + cputc::$6 = CONIO_SCREEN_BANK#9 | VERA_INC_1 + *VERA_ADDRX_H = cputc::$6 + *VERA_DATA0 = cputc::c#4 + *VERA_DATA0 = cputc::color#1 + conio_cursor_x[conio_screen_layer] = ++ conio_cursor_x[conio_screen_layer] + cputc::scroll_enable#0 = conio_scroll_enable[conio_screen_layer] + cputc::$17 = 0 != cputc::scroll_enable#0 + if(cputc::$17) goto cputc::@5 + to:cputc::@3 +cputc::@5: scope:[cputc] from cputc::@2 + CONIO_SCREEN_TEXT#100 = phi( cputc::@2/CONIO_SCREEN_TEXT#108 ) + cputc::$11 = conio_cursor_x[conio_screen_layer] == conio_screen_width + cputc::$12 = ! cputc::$11 + if(cputc::$12) goto cputc::@return + to:cputc::@6 +cputc::@3: scope:[cputc] from cputc::@2 + CONIO_SCREEN_TEXT#99 = phi( cputc::@2/CONIO_SCREEN_TEXT#108 ) + cputc::$16 = (word)conio_cursor_x[conio_screen_layer] + cputc::$8 = cputc::$16 == conio_width + cputc::$9 = ! cputc::$8 + if(cputc::$9) goto cputc::@return + to:cputc::@4 +cputc::@4: scope:[cputc] from cputc::@3 + CONIO_SCREEN_TEXT#87 = phi( cputc::@3/CONIO_SCREEN_TEXT#99 ) + call cputln + to:cputc::@9 +cputc::@9: scope:[cputc] from cputc::@4 + to:cputc::@return +cputc::@6: scope:[cputc] from cputc::@5 + CONIO_SCREEN_TEXT#88 = phi( cputc::@5/CONIO_SCREEN_TEXT#100 ) + call cputln + to:cputc::@10 +cputc::@10: scope:[cputc] from cputc::@6 + to:cputc::@return +cputc::@return: scope:[cputc] from cputc::@10 cputc::@3 cputc::@5 cputc::@8 cputc::@9 + return + to:@return + +void cputln() +cputln: scope:[cputln] from cputc::@1 cputc::@4 cputc::@6 + CONIO_SCREEN_TEXT#67 = phi( cputc::@1/CONIO_SCREEN_TEXT#86, cputc::@4/CONIO_SCREEN_TEXT#87, cputc::@6/CONIO_SCREEN_TEXT#88 ) + cputln::$2 = conio_screen_layer * SIZEOF_WORD + cputln::temp#0 = conio_line_text[cputln::$2] + cputln::temp#1 = cputln::temp#0 + conio_rowskip + cputln::$3 = conio_screen_layer * SIZEOF_WORD + conio_line_text[cputln::$3] = cputln::temp#1 + conio_cursor_x[conio_screen_layer] = 0 + conio_cursor_y[conio_screen_layer] = ++ conio_cursor_y[conio_screen_layer] + call cscroll + to:cputln::@1 +cputln::@1: scope:[cputln] from cputln + to:cputln::@return +cputln::@return: scope:[cputln] from cputln::@1 + return + to:@return + +void clearline() +clearline: scope:[clearline] from insertup::@3 + CONIO_SCREEN_TEXT#10 = phi( insertup::@3/CONIO_SCREEN_TEXT#18 ) + *VERA_CTRL = *VERA_CTRL & ~VERA_ADDRSEL + clearline::$5 = conio_screen_layer * SIZEOF_WORD + clearline::$0 = CONIO_SCREEN_TEXT#10 + conio_line_text[clearline::$5] + clearline::addr#0 = clearline::$0 + clearline::$1 = < clearline::addr#0 + *VERA_ADDRX_L = clearline::$1 + clearline::$2 = > clearline::addr#0 + *VERA_ADDRX_M = clearline::$2 + *VERA_ADDRX_H = VERA_INC_1 + vera_layer_get_color::layer#1 = conio_screen_layer + call vera_layer_get_color + vera_layer_get_color::return#4 = vera_layer_get_color::return#2 + to:clearline::@4 +clearline::@4: scope:[clearline] from clearline + vera_layer_get_color::return#7 = phi( clearline/vera_layer_get_color::return#4 ) + clearline::$3 = vera_layer_get_color::return#7 + clearline::color#0 = clearline::$3 + clearline::c#0 = 0 + to:clearline::@1 +clearline::@1: scope:[clearline] from clearline::@2 clearline::@4 + clearline::color#2 = phi( clearline::@2/clearline::color#1, clearline::@4/clearline::color#0 ) + clearline::c#2 = phi( clearline::@2/clearline::c#1, clearline::@4/clearline::c#0 ) + clearline::$4 = clearline::c#2 < conio_screen_width + if(clearline::$4) goto clearline::@2 + to:clearline::@3 +clearline::@2: scope:[clearline] from clearline::@1 + clearline::c#3 = phi( clearline::@1/clearline::c#2 ) + clearline::color#1 = phi( clearline::@1/clearline::color#2 ) + *VERA_DATA0 = ' ' + *VERA_DATA0 = clearline::color#1 + clearline::c#1 = ++ clearline::c#3 + to:clearline::@1 +clearline::@3: scope:[clearline] from clearline::@1 + conio_cursor_x[conio_screen_layer] = 0 + to:clearline::@return +clearline::@return: scope:[clearline] from clearline::@3 + return + to:@return + +void insertup() +insertup: scope:[insertup] from cscroll::@4 + CONIO_SCREEN_TEXT#27 = phi( cscroll::@4/CONIO_SCREEN_TEXT#34 ) + insertup::cy#0 = conio_cursor_y[conio_screen_layer] + insertup::$0 = conio_screen_width * 2 + insertup::width#0 = insertup::$0 + insertup::i#0 = 1 + to:insertup::@1 +insertup::@1: scope:[insertup] from insertup insertup::@4 + insertup::width#2 = phi( insertup/insertup::width#0, insertup::@4/insertup::width#3 ) + CONIO_SCREEN_TEXT#19 = phi( insertup/CONIO_SCREEN_TEXT#27, insertup::@4/CONIO_SCREEN_TEXT#28 ) + insertup::cy#1 = phi( insertup/insertup::cy#0, insertup::@4/insertup::cy#2 ) + insertup::i#2 = phi( insertup/insertup::i#0, insertup::@4/insertup::i#1 ) + insertup::$2 = insertup::i#2 <= insertup::cy#1 + if(insertup::$2) goto insertup::@2 + to:insertup::@3 +insertup::@2: scope:[insertup] from insertup::@1 + insertup::cy#3 = phi( insertup::@1/insertup::cy#1 ) + insertup::width#1 = phi( insertup::@1/insertup::width#2 ) + CONIO_SCREEN_TEXT#11 = phi( insertup::@1/CONIO_SCREEN_TEXT#19 ) + insertup::i#3 = phi( insertup::@1/insertup::i#2 ) + insertup::$3 = insertup::i#3 - 1 + insertup::$4 = insertup::$3 << conio_rowshift + insertup::line#0 = insertup::$4 + insertup::$5 = CONIO_SCREEN_TEXT#11 + insertup::line#0 + insertup::start#0 = insertup::$5 + insertup::$6 = insertup::start#0 + conio_rowskip + memcpy_in_vram::dest_bank#0 = 0 + memcpy_in_vram::dest#0 = (void*)insertup::start#0 + memcpy_in_vram::dest_increment#0 = VERA_INC_1 + memcpy_in_vram::src_bank#0 = 0 + memcpy_in_vram::src#0 = (void*)insertup::$6 + memcpy_in_vram::src_increment#0 = VERA_INC_1 + memcpy_in_vram::num#0 = insertup::width#1 + call memcpy_in_vram + to:insertup::@4 +insertup::@4: scope:[insertup] from insertup::@2 + insertup::width#3 = phi( insertup::@2/insertup::width#1 ) + CONIO_SCREEN_TEXT#28 = phi( insertup::@2/CONIO_SCREEN_TEXT#11 ) + insertup::cy#2 = phi( insertup::@2/insertup::cy#3 ) + insertup::i#4 = phi( insertup::@2/insertup::i#3 ) + insertup::i#1 = ++ insertup::i#4 + to:insertup::@1 +insertup::@3: scope:[insertup] from insertup::@1 + CONIO_SCREEN_TEXT#18 = phi( insertup::@1/CONIO_SCREEN_TEXT#19 ) + call clearline + to:insertup::@5 +insertup::@5: scope:[insertup] from insertup::@3 + to:insertup::@return +insertup::@return: scope:[insertup] from insertup::@5 + return + to:@return + +void cscroll() +cscroll: scope:[cscroll] from cputln + CONIO_SCREEN_TEXT#49 = phi( cputln/CONIO_SCREEN_TEXT#67 ) + cscroll::$0 = conio_cursor_y[conio_screen_layer] >= conio_screen_height + cscroll::$1 = ! cscroll::$0 + if(cscroll::$1) goto cscroll::@return + to:cscroll::@1 +cscroll::@1: scope:[cscroll] from cscroll + CONIO_SCREEN_TEXT#40 = phi( cscroll/CONIO_SCREEN_TEXT#49 ) + cscroll::$7 = 0 != conio_scroll_enable[conio_screen_layer] + if(cscroll::$7) goto cscroll::@4 + to:cscroll::@2 +cscroll::@4: scope:[cscroll] from cscroll::@1 + CONIO_SCREEN_TEXT#34 = phi( cscroll::@1/CONIO_SCREEN_TEXT#40 ) + call insertup + to:cscroll::@5 +cscroll::@5: scope:[cscroll] from cscroll::@4 + cscroll::$5 = conio_screen_height - 1 + gotoxy::x#2 = 0 + gotoxy::y#2 = cscroll::$5 + call gotoxy + to:cscroll::@6 +cscroll::@6: scope:[cscroll] from cscroll::@5 + to:cscroll::@return +cscroll::@2: scope:[cscroll] from cscroll::@1 + cscroll::$2 = conio_cursor_y[conio_screen_layer] >= conio_height + cscroll::$3 = ! cscroll::$2 + if(cscroll::$3) goto cscroll::@return + to:cscroll::@3 +cscroll::@3: scope:[cscroll] from cscroll::@2 + to:cscroll::@return +cscroll::@return: scope:[cscroll] from cscroll cscroll::@2 cscroll::@3 cscroll::@6 + return + to:@return + +void cputs(to_nomodify byte* cputs::s) +cputs: scope:[cputs] from main::@10 main::@12 main::@14 main::@16 main::@2 main::@4 main::@6 main::@8 printf_number_buffer::@5 + CONIO_SCREEN_BANK#36 = phi( main::@10/CONIO_SCREEN_BANK#44, main::@12/CONIO_SCREEN_BANK#45, main::@14/CONIO_SCREEN_BANK#46, main::@16/CONIO_SCREEN_BANK#47, main::@2/CONIO_SCREEN_BANK#48, main::@4/CONIO_SCREEN_BANK#49, main::@6/CONIO_SCREEN_BANK#50, main::@8/CONIO_SCREEN_BANK#51, printf_number_buffer::@5/CONIO_SCREEN_BANK#52 ) + CONIO_SCREEN_TEXT#41 = phi( main::@10/CONIO_SCREEN_TEXT#50, main::@12/CONIO_SCREEN_TEXT#51, main::@14/CONIO_SCREEN_TEXT#52, main::@16/CONIO_SCREEN_TEXT#53, main::@2/CONIO_SCREEN_TEXT#54, main::@4/CONIO_SCREEN_TEXT#55, main::@6/CONIO_SCREEN_TEXT#56, main::@8/CONIO_SCREEN_TEXT#57, printf_number_buffer::@5/CONIO_SCREEN_TEXT#58 ) + cputs::s#11 = phi( main::@10/cputs::s#6, main::@12/cputs::s#7, main::@14/cputs::s#8, main::@16/cputs::s#9, main::@2/cputs::s#2, main::@4/cputs::s#3, main::@6/cputs::s#4, main::@8/cputs::s#5, printf_number_buffer::@5/cputs::s#1 ) + cputs::c#0 = 0 + to:cputs::@1 +cputs::@1: scope:[cputs] from cputs cputs::@3 + CONIO_SCREEN_BANK#31 = phi( cputs/CONIO_SCREEN_BANK#36, cputs::@3/CONIO_SCREEN_BANK#37 ) + CONIO_SCREEN_TEXT#35 = phi( cputs/CONIO_SCREEN_TEXT#41, cputs::@3/CONIO_SCREEN_TEXT#42 ) + cputs::s#10 = phi( cputs/cputs::s#11, cputs::@3/cputs::s#12 ) + cputs::c#1 = *cputs::s#10 + cputs::$0 = cputs::c#1 + cputs::s#0 = ++ cputs::s#10 + cputs::$2 = 0 != cputs::$0 + if(cputs::$2) goto cputs::@2 + to:cputs::@return +cputs::@2: scope:[cputs] from cputs::@1 + CONIO_SCREEN_BANK#26 = phi( cputs::@1/CONIO_SCREEN_BANK#31 ) + cputs::s#13 = phi( cputs::@1/cputs::s#0 ) + CONIO_SCREEN_TEXT#24 = phi( cputs::@1/CONIO_SCREEN_TEXT#35 ) + cputs::c#2 = phi( cputs::@1/cputs::c#1 ) + cputc::c#0 = cputs::c#2 + call cputc + to:cputs::@3 +cputs::@3: scope:[cputs] from cputs::@2 + CONIO_SCREEN_BANK#37 = phi( cputs::@2/CONIO_SCREEN_BANK#26 ) + CONIO_SCREEN_TEXT#42 = phi( cputs::@2/CONIO_SCREEN_TEXT#24 ) + cputs::s#12 = phi( cputs::@2/cputs::s#13 ) + to:cputs::@1 +cputs::@return: scope:[cputs] from cputs::@1 + return + to:@return + +void screenlayer(byte screenlayer::layer) +screenlayer: scope:[screenlayer] from conio_x16_init::@4 + screenlayer::layer#1 = phi( conio_x16_init::@4/screenlayer::layer#0 ) + conio_screen_layer = screenlayer::layer#1 + vera_layer_get_mapbase_bank::layer#0 = conio_screen_layer + call vera_layer_get_mapbase_bank + vera_layer_get_mapbase_bank::return#2 = vera_layer_get_mapbase_bank::return#1 + to:screenlayer::@3 +screenlayer::@3: scope:[screenlayer] from screenlayer + vera_layer_get_mapbase_bank::return#4 = phi( screenlayer/vera_layer_get_mapbase_bank::return#2 ) + screenlayer::$0 = vera_layer_get_mapbase_bank::return#4 + CONIO_SCREEN_BANK#2 = screenlayer::$0 + vera_layer_get_mapbase_offset::layer#0 = conio_screen_layer + call vera_layer_get_mapbase_offset + vera_layer_get_mapbase_offset::return#2 = vera_layer_get_mapbase_offset::return#1 + to:screenlayer::@4 +screenlayer::@4: scope:[screenlayer] from screenlayer::@3 + CONIO_SCREEN_BANK#88 = phi( screenlayer::@3/CONIO_SCREEN_BANK#2 ) + vera_layer_get_mapbase_offset::return#4 = phi( screenlayer::@3/vera_layer_get_mapbase_offset::return#2 ) + screenlayer::$1 = vera_layer_get_mapbase_offset::return#4 + CONIO_SCREEN_TEXT#2 = ((byte*)) screenlayer::$1 + screenlayer::vera_layer_get_width1_layer#0 = conio_screen_layer + to:screenlayer::vera_layer_get_width1 +screenlayer::vera_layer_get_width1: scope:[screenlayer] from screenlayer::@4 + CONIO_SCREEN_TEXT#101 = phi( screenlayer::@4/CONIO_SCREEN_TEXT#2 ) + CONIO_SCREEN_BANK#78 = phi( screenlayer::@4/CONIO_SCREEN_BANK#88 ) + screenlayer::vera_layer_get_width1_layer#1 = phi( screenlayer::@4/screenlayer::vera_layer_get_width1_layer#0 ) + screenlayer::vera_layer_get_width1_$2 = screenlayer::vera_layer_get_width1_layer#1 * SIZEOF_POINTER + screenlayer::vera_layer_get_width1_config#0 = vera_layer_config[screenlayer::vera_layer_get_width1_$2] + screenlayer::vera_layer_get_width1_$0 = *screenlayer::vera_layer_get_width1_config#0 & VERA_LAYER_WIDTH_MASK + screenlayer::vera_layer_get_width1_$1 = screenlayer::vera_layer_get_width1_$0 >> 4 + screenlayer::vera_layer_get_width1_$3 = screenlayer::vera_layer_get_width1_$1 * SIZEOF_WORD + screenlayer::vera_layer_get_width1_return#0 = VERA_LAYER_WIDTH[screenlayer::vera_layer_get_width1_$3] + to:screenlayer::vera_layer_get_width1_@return +screenlayer::vera_layer_get_width1_@return: scope:[screenlayer] from screenlayer::vera_layer_get_width1 + CONIO_SCREEN_TEXT#89 = phi( screenlayer::vera_layer_get_width1/CONIO_SCREEN_TEXT#101 ) + CONIO_SCREEN_BANK#60 = phi( screenlayer::vera_layer_get_width1/CONIO_SCREEN_BANK#78 ) + screenlayer::vera_layer_get_width1_return#2 = phi( screenlayer::vera_layer_get_width1/screenlayer::vera_layer_get_width1_return#0 ) + screenlayer::vera_layer_get_width1_return#1 = screenlayer::vera_layer_get_width1_return#2 + to:screenlayer::@1 +screenlayer::@1: scope:[screenlayer] from screenlayer::vera_layer_get_width1_@return + CONIO_SCREEN_TEXT#68 = phi( screenlayer::vera_layer_get_width1_@return/CONIO_SCREEN_TEXT#89 ) + CONIO_SCREEN_BANK#53 = phi( screenlayer::vera_layer_get_width1_@return/CONIO_SCREEN_BANK#60 ) + screenlayer::vera_layer_get_width1_return#3 = phi( screenlayer::vera_layer_get_width1_@return/screenlayer::vera_layer_get_width1_return#1 ) + screenlayer::$2 = screenlayer::vera_layer_get_width1_return#3 + conio_width = screenlayer::$2 + vera_layer_get_rowshift::layer#0 = conio_screen_layer + call vera_layer_get_rowshift + vera_layer_get_rowshift::return#2 = vera_layer_get_rowshift::return#1 + to:screenlayer::@5 +screenlayer::@5: scope:[screenlayer] from screenlayer::@1 + CONIO_SCREEN_TEXT#59 = phi( screenlayer::@1/CONIO_SCREEN_TEXT#68 ) + CONIO_SCREEN_BANK#38 = phi( screenlayer::@1/CONIO_SCREEN_BANK#53 ) + vera_layer_get_rowshift::return#4 = phi( screenlayer::@1/vera_layer_get_rowshift::return#2 ) + screenlayer::$3 = vera_layer_get_rowshift::return#4 + conio_rowshift = screenlayer::$3 + vera_layer_get_rowskip::layer#0 = conio_screen_layer + call vera_layer_get_rowskip + vera_layer_get_rowskip::return#2 = vera_layer_get_rowskip::return#1 + to:screenlayer::@6 +screenlayer::@6: scope:[screenlayer] from screenlayer::@5 + CONIO_SCREEN_TEXT#43 = phi( screenlayer::@5/CONIO_SCREEN_TEXT#59 ) + CONIO_SCREEN_BANK#32 = phi( screenlayer::@5/CONIO_SCREEN_BANK#38 ) + vera_layer_get_rowskip::return#4 = phi( screenlayer::@5/vera_layer_get_rowskip::return#2 ) + screenlayer::$4 = vera_layer_get_rowskip::return#4 + conio_rowskip = screenlayer::$4 + screenlayer::vera_layer_get_height1_layer#0 = conio_screen_layer + to:screenlayer::vera_layer_get_height1 +screenlayer::vera_layer_get_height1: scope:[screenlayer] from screenlayer::@6 + CONIO_SCREEN_TEXT#36 = phi( screenlayer::@6/CONIO_SCREEN_TEXT#43 ) + CONIO_SCREEN_BANK#29 = phi( screenlayer::@6/CONIO_SCREEN_BANK#32 ) + screenlayer::vera_layer_get_height1_layer#1 = phi( screenlayer::@6/screenlayer::vera_layer_get_height1_layer#0 ) + screenlayer::vera_layer_get_height1_$2 = screenlayer::vera_layer_get_height1_layer#1 * SIZEOF_POINTER + screenlayer::vera_layer_get_height1_config#0 = vera_layer_config[screenlayer::vera_layer_get_height1_$2] + screenlayer::vera_layer_get_height1_$0 = *screenlayer::vera_layer_get_height1_config#0 & VERA_LAYER_HEIGHT_MASK + screenlayer::vera_layer_get_height1_$1 = screenlayer::vera_layer_get_height1_$0 >> 6 + screenlayer::vera_layer_get_height1_$3 = screenlayer::vera_layer_get_height1_$1 * SIZEOF_WORD + screenlayer::vera_layer_get_height1_return#0 = VERA_LAYER_HEIGHT[screenlayer::vera_layer_get_height1_$3] + to:screenlayer::vera_layer_get_height1_@return +screenlayer::vera_layer_get_height1_@return: scope:[screenlayer] from screenlayer::vera_layer_get_height1 + CONIO_SCREEN_TEXT#29 = phi( screenlayer::vera_layer_get_height1/CONIO_SCREEN_TEXT#36 ) + CONIO_SCREEN_BANK#21 = phi( screenlayer::vera_layer_get_height1/CONIO_SCREEN_BANK#29 ) + screenlayer::vera_layer_get_height1_return#2 = phi( screenlayer::vera_layer_get_height1/screenlayer::vera_layer_get_height1_return#0 ) + screenlayer::vera_layer_get_height1_return#1 = screenlayer::vera_layer_get_height1_return#2 + to:screenlayer::@2 +screenlayer::@2: scope:[screenlayer] from screenlayer::vera_layer_get_height1_@return + CONIO_SCREEN_TEXT#20 = phi( screenlayer::vera_layer_get_height1_@return/CONIO_SCREEN_TEXT#29 ) + CONIO_SCREEN_BANK#16 = phi( screenlayer::vera_layer_get_height1_@return/CONIO_SCREEN_BANK#21 ) + screenlayer::vera_layer_get_height1_return#3 = phi( screenlayer::vera_layer_get_height1_@return/screenlayer::vera_layer_get_height1_return#1 ) + screenlayer::$5 = screenlayer::vera_layer_get_height1_return#3 + conio_height = screenlayer::$5 + to:screenlayer::@return +screenlayer::@return: scope:[screenlayer] from screenlayer::@2 + CONIO_SCREEN_TEXT#12 = phi( screenlayer::@2/CONIO_SCREEN_TEXT#20 ) + CONIO_SCREEN_BANK#10 = phi( screenlayer::@2/CONIO_SCREEN_BANK#16 ) + CONIO_SCREEN_BANK#3 = CONIO_SCREEN_BANK#10 + CONIO_SCREEN_TEXT#3 = CONIO_SCREEN_TEXT#12 + return + to:@return + +void uctoa(byte uctoa::value , byte* uctoa::buffer , byte uctoa::radix) +uctoa: scope:[uctoa] from printf_uchar::@3 + uctoa::buffer#21 = phi( printf_uchar::@3/uctoa::buffer#5 ) + uctoa::value#12 = phi( printf_uchar::@3/uctoa::value#1 ) + uctoa::radix#1 = phi( printf_uchar::@3/uctoa::radix#0 ) + uctoa::max_digits#0 = 0 + uctoa::digit_values#0 = (byte*) 0 + uctoa::$0 = uctoa::radix#1 == DECIMAL + if(uctoa::$0) goto uctoa::@1 + to:uctoa::@6 +uctoa::@1: scope:[uctoa] from uctoa + uctoa::buffer#17 = phi( uctoa/uctoa::buffer#21 ) + uctoa::value#8 = phi( uctoa/uctoa::value#12 ) + uctoa::max_digits#1 = 3 + uctoa::digit_values#1 = RADIX_DECIMAL_VALUES_CHAR + to:uctoa::@5 +uctoa::@6: scope:[uctoa] from uctoa + uctoa::value#13 = phi( uctoa/uctoa::value#12 ) + uctoa::buffer#16 = phi( uctoa/uctoa::buffer#21 ) + uctoa::radix#2 = phi( uctoa/uctoa::radix#1 ) + uctoa::$1 = uctoa::radix#2 == HEXADECIMAL + if(uctoa::$1) goto uctoa::@2 + to:uctoa::@7 +uctoa::@2: scope:[uctoa] from uctoa::@6 + uctoa::buffer#18 = phi( uctoa::@6/uctoa::buffer#16 ) + uctoa::value#9 = phi( uctoa::@6/uctoa::value#13 ) + uctoa::max_digits#2 = 2 + uctoa::digit_values#2 = RADIX_HEXADECIMAL_VALUES_CHAR + to:uctoa::@5 +uctoa::@7: scope:[uctoa] from uctoa::@6 + uctoa::value#14 = phi( uctoa::@6/uctoa::value#13 ) + uctoa::buffer#13 = phi( uctoa::@6/uctoa::buffer#16 ) + uctoa::radix#3 = phi( uctoa::@6/uctoa::radix#2 ) + uctoa::$2 = uctoa::radix#3 == OCTAL + if(uctoa::$2) goto uctoa::@3 + to:uctoa::@8 +uctoa::@3: scope:[uctoa] from uctoa::@7 + uctoa::buffer#19 = phi( uctoa::@7/uctoa::buffer#13 ) + uctoa::value#10 = phi( uctoa::@7/uctoa::value#14 ) + uctoa::max_digits#3 = 3 + uctoa::digit_values#3 = RADIX_OCTAL_VALUES_CHAR + to:uctoa::@5 +uctoa::@8: scope:[uctoa] from uctoa::@7 + uctoa::value#15 = phi( uctoa::@7/uctoa::value#14 ) + uctoa::buffer#10 = phi( uctoa::@7/uctoa::buffer#13 ) + uctoa::radix#4 = phi( uctoa::@7/uctoa::radix#3 ) + uctoa::$3 = uctoa::radix#4 == BINARY + if(uctoa::$3) goto uctoa::@4 + to:uctoa::@9 +uctoa::@4: scope:[uctoa] from uctoa::@8 + uctoa::buffer#20 = phi( uctoa::@8/uctoa::buffer#10 ) + uctoa::value#11 = phi( uctoa::@8/uctoa::value#15 ) + uctoa::max_digits#4 = 8 + uctoa::digit_values#4 = RADIX_BINARY_VALUES_CHAR + to:uctoa::@5 +uctoa::@9: scope:[uctoa] from uctoa::@8 + uctoa::buffer#6 = phi( uctoa::@8/uctoa::buffer#10 ) + *uctoa::buffer#6 = 'e' + uctoa::buffer#0 = ++ uctoa::buffer#6 + *uctoa::buffer#0 = 'r' + uctoa::buffer#1 = ++ uctoa::buffer#0 + *uctoa::buffer#1 = 'r' + uctoa::buffer#2 = ++ uctoa::buffer#1 + *uctoa::buffer#2 = 0 + to:uctoa::@return +uctoa::@return: scope:[uctoa] from uctoa::@12 uctoa::@9 + return + to:@return +uctoa::@5: scope:[uctoa] from uctoa::@1 uctoa::@2 uctoa::@3 uctoa::@4 + uctoa::buffer#15 = phi( uctoa::@1/uctoa::buffer#17, uctoa::@2/uctoa::buffer#18, uctoa::@3/uctoa::buffer#19, uctoa::@4/uctoa::buffer#20 ) + uctoa::value#7 = phi( uctoa::@1/uctoa::value#8, uctoa::@2/uctoa::value#9, uctoa::@3/uctoa::value#10, uctoa::@4/uctoa::value#11 ) + uctoa::digit_values#8 = phi( uctoa::@1/uctoa::digit_values#1, uctoa::@2/uctoa::digit_values#2, uctoa::@3/uctoa::digit_values#3, uctoa::@4/uctoa::digit_values#4 ) + uctoa::max_digits#7 = phi( uctoa::@1/uctoa::max_digits#1, uctoa::@2/uctoa::max_digits#2, uctoa::@3/uctoa::max_digits#3, uctoa::@4/uctoa::max_digits#4 ) + uctoa::started#0 = 0 + uctoa::digit#0 = 0 + to:uctoa::@10 +uctoa::@10: scope:[uctoa] from uctoa::@13 uctoa::@5 + uctoa::buffer#11 = phi( uctoa::@13/uctoa::buffer#14, uctoa::@5/uctoa::buffer#15 ) + uctoa::started#3 = phi( uctoa::@13/uctoa::started#4, uctoa::@5/uctoa::started#0 ) + uctoa::value#5 = phi( uctoa::@13/uctoa::value#6, uctoa::@5/uctoa::value#7 ) + uctoa::digit_values#6 = phi( uctoa::@13/uctoa::digit_values#7, uctoa::@5/uctoa::digit_values#8 ) + uctoa::digit#2 = phi( uctoa::@13/uctoa::digit#1, uctoa::@5/uctoa::digit#0 ) + uctoa::max_digits#5 = phi( uctoa::@13/uctoa::max_digits#6, uctoa::@5/uctoa::max_digits#7 ) + uctoa::$4 = uctoa::max_digits#5 - 1 + uctoa::$5 = uctoa::digit#2 < uctoa::$4 + if(uctoa::$5) goto uctoa::@11 + to:uctoa::@12 +uctoa::@11: scope:[uctoa] from uctoa::@10 + uctoa::max_digits#8 = phi( uctoa::@10/uctoa::max_digits#5 ) + uctoa::buffer#12 = phi( uctoa::@10/uctoa::buffer#11 ) + uctoa::started#2 = phi( uctoa::@10/uctoa::started#3 ) + uctoa::value#2 = phi( uctoa::@10/uctoa::value#5 ) + uctoa::digit#3 = phi( uctoa::@10/uctoa::digit#2 ) + uctoa::digit_values#5 = phi( uctoa::@10/uctoa::digit_values#6 ) + uctoa::digit_value#0 = uctoa::digit_values#5[uctoa::digit#3] + uctoa::$6 = uctoa::value#2 >= uctoa::digit_value#0 + uctoa::$7 = uctoa::started#2 || uctoa::$6 + uctoa::$8 = ! uctoa::$7 + if(uctoa::$8) goto uctoa::@13 + to:uctoa::@14 +uctoa::@12: scope:[uctoa] from uctoa::@10 + uctoa::buffer#7 = phi( uctoa::@10/uctoa::buffer#11 ) + uctoa::value#3 = phi( uctoa::@10/uctoa::value#5 ) + uctoa::$10 = (byte)uctoa::value#3 + *uctoa::buffer#7 = DIGITS[uctoa::$10] + uctoa::buffer#3 = ++ uctoa::buffer#7 + *uctoa::buffer#3 = 0 + to:uctoa::@return +uctoa::@13: scope:[uctoa] from uctoa::@11 uctoa::@15 + uctoa::buffer#14 = phi( uctoa::@11/uctoa::buffer#12, uctoa::@15/uctoa::buffer#4 ) + uctoa::started#4 = phi( uctoa::@11/uctoa::started#2, uctoa::@15/uctoa::started#1 ) + uctoa::value#6 = phi( uctoa::@11/uctoa::value#2, uctoa::@15/uctoa::value#0 ) + uctoa::digit_values#7 = phi( uctoa::@11/uctoa::digit_values#5, uctoa::@15/uctoa::digit_values#9 ) + uctoa::max_digits#6 = phi( uctoa::@11/uctoa::max_digits#8, uctoa::@15/uctoa::max_digits#9 ) + uctoa::digit#4 = phi( uctoa::@11/uctoa::digit#3, uctoa::@15/uctoa::digit#5 ) + uctoa::digit#1 = ++ uctoa::digit#4 + to:uctoa::@10 +uctoa::@14: scope:[uctoa] from uctoa::@11 + uctoa::digit_values#10 = phi( uctoa::@11/uctoa::digit_values#5 ) + uctoa::max_digits#10 = phi( uctoa::@11/uctoa::max_digits#8 ) + uctoa::digit#6 = phi( uctoa::@11/uctoa::digit#3 ) + uctoa::digit_value#1 = phi( uctoa::@11/uctoa::digit_value#0 ) + uctoa::value#4 = phi( uctoa::@11/uctoa::value#2 ) + uctoa::buffer#8 = phi( uctoa::@11/uctoa::buffer#12 ) + uctoa_append::buffer#0 = uctoa::buffer#8 + uctoa_append::value#0 = uctoa::value#4 + uctoa_append::sub#0 = uctoa::digit_value#1 + call uctoa_append + uctoa_append::return#0 = uctoa_append::return#2 + to:uctoa::@15 +uctoa::@15: scope:[uctoa] from uctoa::@14 + uctoa::digit_values#9 = phi( uctoa::@14/uctoa::digit_values#10 ) + uctoa::max_digits#9 = phi( uctoa::@14/uctoa::max_digits#10 ) + uctoa::digit#5 = phi( uctoa::@14/uctoa::digit#6 ) + uctoa::buffer#9 = phi( uctoa::@14/uctoa::buffer#8 ) + uctoa_append::return#3 = phi( uctoa::@14/uctoa_append::return#0 ) + uctoa::$9 = uctoa_append::return#3 + uctoa::value#0 = uctoa::$9 + uctoa::buffer#4 = ++ uctoa::buffer#9 + uctoa::started#1 = 1 + to:uctoa::@13 + +byte uctoa_append(byte* uctoa_append::buffer , byte uctoa_append::value , byte uctoa_append::sub) +uctoa_append: scope:[uctoa_append] from uctoa::@14 + uctoa_append::buffer#3 = phi( uctoa::@14/uctoa_append::buffer#0 ) + uctoa_append::sub#3 = phi( uctoa::@14/uctoa_append::sub#0 ) + uctoa_append::value#5 = phi( uctoa::@14/uctoa_append::value#0 ) + uctoa_append::digit#0 = 0 + to:uctoa_append::@1 +uctoa_append::@1: scope:[uctoa_append] from uctoa_append uctoa_append::@2 + uctoa_append::buffer#2 = phi( uctoa_append/uctoa_append::buffer#3, uctoa_append::@2/uctoa_append::buffer#4 ) + uctoa_append::digit#4 = phi( uctoa_append/uctoa_append::digit#0, uctoa_append::@2/uctoa_append::digit#1 ) + uctoa_append::sub#1 = phi( uctoa_append/uctoa_append::sub#3, uctoa_append::@2/uctoa_append::sub#2 ) + uctoa_append::value#2 = phi( uctoa_append/uctoa_append::value#5, uctoa_append::@2/uctoa_append::value#1 ) + uctoa_append::$0 = uctoa_append::value#2 >= uctoa_append::sub#1 + if(uctoa_append::$0) goto uctoa_append::@2 + to:uctoa_append::@3 +uctoa_append::@2: scope:[uctoa_append] from uctoa_append::@1 + uctoa_append::buffer#4 = phi( uctoa_append::@1/uctoa_append::buffer#2 ) + uctoa_append::sub#2 = phi( uctoa_append::@1/uctoa_append::sub#1 ) + uctoa_append::value#3 = phi( uctoa_append::@1/uctoa_append::value#2 ) + uctoa_append::digit#2 = phi( uctoa_append::@1/uctoa_append::digit#4 ) + uctoa_append::digit#1 = ++ uctoa_append::digit#2 + uctoa_append::value#1 = uctoa_append::value#3 - uctoa_append::sub#2 + to:uctoa_append::@1 +uctoa_append::@3: scope:[uctoa_append] from uctoa_append::@1 + uctoa_append::value#4 = phi( uctoa_append::@1/uctoa_append::value#2 ) + uctoa_append::buffer#1 = phi( uctoa_append::@1/uctoa_append::buffer#2 ) + uctoa_append::digit#3 = phi( uctoa_append::@1/uctoa_append::digit#4 ) + *uctoa_append::buffer#1 = DIGITS[uctoa_append::digit#3] + uctoa_append::return#1 = uctoa_append::value#4 + to:uctoa_append::@return +uctoa_append::@return: scope:[uctoa_append] from uctoa_append::@3 + uctoa_append::return#4 = phi( uctoa_append::@3/uctoa_append::return#1 ) + uctoa_append::return#2 = uctoa_append::return#4 + return + to:@return + +void utoa(word utoa::value , byte* utoa::buffer , byte utoa::radix) +utoa: scope:[utoa] from printf_uint::@3 + utoa::buffer#21 = phi( printf_uint::@3/utoa::buffer#5 ) + utoa::value#12 = phi( printf_uint::@3/utoa::value#1 ) + utoa::radix#1 = phi( printf_uint::@3/utoa::radix#0 ) + utoa::max_digits#0 = 0 + utoa::digit_values#0 = (word*) 0 + utoa::$0 = utoa::radix#1 == DECIMAL + if(utoa::$0) goto utoa::@1 + to:utoa::@6 +utoa::@1: scope:[utoa] from utoa + utoa::buffer#17 = phi( utoa/utoa::buffer#21 ) + utoa::value#8 = phi( utoa/utoa::value#12 ) + utoa::max_digits#1 = 5 + utoa::digit_values#1 = RADIX_DECIMAL_VALUES + to:utoa::@5 +utoa::@6: scope:[utoa] from utoa + utoa::value#13 = phi( utoa/utoa::value#12 ) + utoa::buffer#16 = phi( utoa/utoa::buffer#21 ) + utoa::radix#2 = phi( utoa/utoa::radix#1 ) + utoa::$1 = utoa::radix#2 == HEXADECIMAL + if(utoa::$1) goto utoa::@2 + to:utoa::@7 +utoa::@2: scope:[utoa] from utoa::@6 + utoa::buffer#18 = phi( utoa::@6/utoa::buffer#16 ) + utoa::value#9 = phi( utoa::@6/utoa::value#13 ) + utoa::max_digits#2 = 4 + utoa::digit_values#2 = RADIX_HEXADECIMAL_VALUES + to:utoa::@5 +utoa::@7: scope:[utoa] from utoa::@6 + utoa::value#14 = phi( utoa::@6/utoa::value#13 ) + utoa::buffer#13 = phi( utoa::@6/utoa::buffer#16 ) + utoa::radix#3 = phi( utoa::@6/utoa::radix#2 ) + utoa::$2 = utoa::radix#3 == OCTAL + if(utoa::$2) goto utoa::@3 + to:utoa::@8 +utoa::@3: scope:[utoa] from utoa::@7 + utoa::buffer#19 = phi( utoa::@7/utoa::buffer#13 ) + utoa::value#10 = phi( utoa::@7/utoa::value#14 ) + utoa::max_digits#3 = 6 + utoa::digit_values#3 = RADIX_OCTAL_VALUES + to:utoa::@5 +utoa::@8: scope:[utoa] from utoa::@7 + utoa::value#15 = phi( utoa::@7/utoa::value#14 ) + utoa::buffer#10 = phi( utoa::@7/utoa::buffer#13 ) + utoa::radix#4 = phi( utoa::@7/utoa::radix#3 ) + utoa::$3 = utoa::radix#4 == BINARY + if(utoa::$3) goto utoa::@4 + to:utoa::@9 +utoa::@4: scope:[utoa] from utoa::@8 + utoa::buffer#20 = phi( utoa::@8/utoa::buffer#10 ) + utoa::value#11 = phi( utoa::@8/utoa::value#15 ) + utoa::max_digits#4 = $10 + utoa::digit_values#4 = RADIX_BINARY_VALUES + to:utoa::@5 +utoa::@9: scope:[utoa] from utoa::@8 + utoa::buffer#6 = phi( utoa::@8/utoa::buffer#10 ) + *utoa::buffer#6 = 'e' + utoa::buffer#0 = ++ utoa::buffer#6 + *utoa::buffer#0 = 'r' + utoa::buffer#1 = ++ utoa::buffer#0 + *utoa::buffer#1 = 'r' + utoa::buffer#2 = ++ utoa::buffer#1 + *utoa::buffer#2 = 0 + to:utoa::@return +utoa::@return: scope:[utoa] from utoa::@12 utoa::@9 + return + to:@return +utoa::@5: scope:[utoa] from utoa::@1 utoa::@2 utoa::@3 utoa::@4 + utoa::buffer#15 = phi( utoa::@1/utoa::buffer#17, utoa::@2/utoa::buffer#18, utoa::@3/utoa::buffer#19, utoa::@4/utoa::buffer#20 ) + utoa::value#7 = phi( utoa::@1/utoa::value#8, utoa::@2/utoa::value#9, utoa::@3/utoa::value#10, utoa::@4/utoa::value#11 ) + utoa::digit_values#8 = phi( utoa::@1/utoa::digit_values#1, utoa::@2/utoa::digit_values#2, utoa::@3/utoa::digit_values#3, utoa::@4/utoa::digit_values#4 ) + utoa::max_digits#7 = phi( utoa::@1/utoa::max_digits#1, utoa::@2/utoa::max_digits#2, utoa::@3/utoa::max_digits#3, utoa::@4/utoa::max_digits#4 ) + utoa::started#0 = 0 + utoa::digit#0 = 0 + to:utoa::@10 +utoa::@10: scope:[utoa] from utoa::@13 utoa::@5 + utoa::buffer#11 = phi( utoa::@13/utoa::buffer#14, utoa::@5/utoa::buffer#15 ) + utoa::started#3 = phi( utoa::@13/utoa::started#4, utoa::@5/utoa::started#0 ) + utoa::value#5 = phi( utoa::@13/utoa::value#6, utoa::@5/utoa::value#7 ) + utoa::digit_values#6 = phi( utoa::@13/utoa::digit_values#7, utoa::@5/utoa::digit_values#8 ) + utoa::digit#2 = phi( utoa::@13/utoa::digit#1, utoa::@5/utoa::digit#0 ) + utoa::max_digits#5 = phi( utoa::@13/utoa::max_digits#6, utoa::@5/utoa::max_digits#7 ) + utoa::$4 = utoa::max_digits#5 - 1 + utoa::$5 = utoa::digit#2 < utoa::$4 + if(utoa::$5) goto utoa::@11 + to:utoa::@12 +utoa::@11: scope:[utoa] from utoa::@10 + utoa::max_digits#8 = phi( utoa::@10/utoa::max_digits#5 ) + utoa::buffer#12 = phi( utoa::@10/utoa::buffer#11 ) + utoa::started#2 = phi( utoa::@10/utoa::started#3 ) + utoa::value#2 = phi( utoa::@10/utoa::value#5 ) + utoa::digit_values#5 = phi( utoa::@10/utoa::digit_values#6 ) + utoa::digit#3 = phi( utoa::@10/utoa::digit#2 ) + utoa::$10 = utoa::digit#3 * SIZEOF_WORD + utoa::digit_value#0 = utoa::digit_values#5[utoa::$10] + utoa::$6 = utoa::value#2 >= utoa::digit_value#0 + utoa::$7 = utoa::started#2 || utoa::$6 + utoa::$8 = ! utoa::$7 + if(utoa::$8) goto utoa::@13 + to:utoa::@14 +utoa::@12: scope:[utoa] from utoa::@10 + utoa::buffer#7 = phi( utoa::@10/utoa::buffer#11 ) + utoa::value#3 = phi( utoa::@10/utoa::value#5 ) + utoa::$11 = (byte)utoa::value#3 + *utoa::buffer#7 = DIGITS[utoa::$11] + utoa::buffer#3 = ++ utoa::buffer#7 + *utoa::buffer#3 = 0 + to:utoa::@return +utoa::@13: scope:[utoa] from utoa::@11 utoa::@15 + utoa::buffer#14 = phi( utoa::@11/utoa::buffer#12, utoa::@15/utoa::buffer#4 ) + utoa::started#4 = phi( utoa::@11/utoa::started#2, utoa::@15/utoa::started#1 ) + utoa::value#6 = phi( utoa::@11/utoa::value#2, utoa::@15/utoa::value#0 ) + utoa::digit_values#7 = phi( utoa::@11/utoa::digit_values#5, utoa::@15/utoa::digit_values#9 ) + utoa::max_digits#6 = phi( utoa::@11/utoa::max_digits#8, utoa::@15/utoa::max_digits#9 ) + utoa::digit#4 = phi( utoa::@11/utoa::digit#3, utoa::@15/utoa::digit#5 ) + utoa::digit#1 = ++ utoa::digit#4 + to:utoa::@10 +utoa::@14: scope:[utoa] from utoa::@11 + utoa::digit_values#10 = phi( utoa::@11/utoa::digit_values#5 ) + utoa::max_digits#10 = phi( utoa::@11/utoa::max_digits#8 ) + utoa::digit#6 = phi( utoa::@11/utoa::digit#3 ) + utoa::digit_value#1 = phi( utoa::@11/utoa::digit_value#0 ) + utoa::value#4 = phi( utoa::@11/utoa::value#2 ) + utoa::buffer#8 = phi( utoa::@11/utoa::buffer#12 ) + utoa_append::buffer#0 = utoa::buffer#8 + utoa_append::value#0 = utoa::value#4 + utoa_append::sub#0 = utoa::digit_value#1 + call utoa_append + utoa_append::return#0 = utoa_append::return#2 + to:utoa::@15 +utoa::@15: scope:[utoa] from utoa::@14 + utoa::digit_values#9 = phi( utoa::@14/utoa::digit_values#10 ) + utoa::max_digits#9 = phi( utoa::@14/utoa::max_digits#10 ) + utoa::digit#5 = phi( utoa::@14/utoa::digit#6 ) + utoa::buffer#9 = phi( utoa::@14/utoa::buffer#8 ) + utoa_append::return#3 = phi( utoa::@14/utoa_append::return#0 ) + utoa::$9 = utoa_append::return#3 + utoa::value#0 = utoa::$9 + utoa::buffer#4 = ++ utoa::buffer#9 + utoa::started#1 = 1 + to:utoa::@13 + +word utoa_append(byte* utoa_append::buffer , word utoa_append::value , word utoa_append::sub) +utoa_append: scope:[utoa_append] from utoa::@14 + utoa_append::buffer#3 = phi( utoa::@14/utoa_append::buffer#0 ) + utoa_append::sub#3 = phi( utoa::@14/utoa_append::sub#0 ) + utoa_append::value#5 = phi( utoa::@14/utoa_append::value#0 ) + utoa_append::digit#0 = 0 + to:utoa_append::@1 +utoa_append::@1: scope:[utoa_append] from utoa_append utoa_append::@2 + utoa_append::buffer#2 = phi( utoa_append/utoa_append::buffer#3, utoa_append::@2/utoa_append::buffer#4 ) + utoa_append::digit#4 = phi( utoa_append/utoa_append::digit#0, utoa_append::@2/utoa_append::digit#1 ) + utoa_append::sub#1 = phi( utoa_append/utoa_append::sub#3, utoa_append::@2/utoa_append::sub#2 ) + utoa_append::value#2 = phi( utoa_append/utoa_append::value#5, utoa_append::@2/utoa_append::value#1 ) + utoa_append::$0 = utoa_append::value#2 >= utoa_append::sub#1 + if(utoa_append::$0) goto utoa_append::@2 + to:utoa_append::@3 +utoa_append::@2: scope:[utoa_append] from utoa_append::@1 + utoa_append::buffer#4 = phi( utoa_append::@1/utoa_append::buffer#2 ) + utoa_append::sub#2 = phi( utoa_append::@1/utoa_append::sub#1 ) + utoa_append::value#3 = phi( utoa_append::@1/utoa_append::value#2 ) + utoa_append::digit#2 = phi( utoa_append::@1/utoa_append::digit#4 ) + utoa_append::digit#1 = ++ utoa_append::digit#2 + utoa_append::value#1 = utoa_append::value#3 - utoa_append::sub#2 + to:utoa_append::@1 +utoa_append::@3: scope:[utoa_append] from utoa_append::@1 + utoa_append::value#4 = phi( utoa_append::@1/utoa_append::value#2 ) + utoa_append::buffer#1 = phi( utoa_append::@1/utoa_append::buffer#2 ) + utoa_append::digit#3 = phi( utoa_append::@1/utoa_append::digit#4 ) + *utoa_append::buffer#1 = DIGITS[utoa_append::digit#3] + utoa_append::return#1 = utoa_append::value#4 + to:utoa_append::@return +utoa_append::@return: scope:[utoa_append] from utoa_append::@3 + utoa_append::return#4 = phi( utoa_append::@3/utoa_append::return#1 ) + utoa_append::return#2 = utoa_append::return#4 + return + to:@return + +void ultoa(dword ultoa::value , byte* ultoa::buffer , byte ultoa::radix) +ultoa: scope:[ultoa] from printf_ulong::@3 + ultoa::buffer#21 = phi( printf_ulong::@3/ultoa::buffer#5 ) + ultoa::value#12 = phi( printf_ulong::@3/ultoa::value#1 ) + ultoa::radix#1 = phi( printf_ulong::@3/ultoa::radix#0 ) + ultoa::max_digits#0 = 0 + ultoa::digit_values#0 = (dword*) 0 + ultoa::$0 = ultoa::radix#1 == DECIMAL + if(ultoa::$0) goto ultoa::@1 + to:ultoa::@6 +ultoa::@1: scope:[ultoa] from ultoa + ultoa::buffer#17 = phi( ultoa/ultoa::buffer#21 ) + ultoa::value#8 = phi( ultoa/ultoa::value#12 ) + ultoa::max_digits#1 = $a + ultoa::digit_values#1 = RADIX_DECIMAL_VALUES_LONG + to:ultoa::@5 +ultoa::@6: scope:[ultoa] from ultoa + ultoa::value#13 = phi( ultoa/ultoa::value#12 ) + ultoa::buffer#16 = phi( ultoa/ultoa::buffer#21 ) + ultoa::radix#2 = phi( ultoa/ultoa::radix#1 ) + ultoa::$1 = ultoa::radix#2 == HEXADECIMAL + if(ultoa::$1) goto ultoa::@2 + to:ultoa::@7 +ultoa::@2: scope:[ultoa] from ultoa::@6 + ultoa::buffer#18 = phi( ultoa::@6/ultoa::buffer#16 ) + ultoa::value#9 = phi( ultoa::@6/ultoa::value#13 ) + ultoa::max_digits#2 = 8 + ultoa::digit_values#2 = RADIX_HEXADECIMAL_VALUES_LONG + to:ultoa::@5 +ultoa::@7: scope:[ultoa] from ultoa::@6 + ultoa::value#14 = phi( ultoa::@6/ultoa::value#13 ) + ultoa::buffer#13 = phi( ultoa::@6/ultoa::buffer#16 ) + ultoa::radix#3 = phi( ultoa::@6/ultoa::radix#2 ) + ultoa::$2 = ultoa::radix#3 == OCTAL + if(ultoa::$2) goto ultoa::@3 + to:ultoa::@8 +ultoa::@3: scope:[ultoa] from ultoa::@7 + ultoa::buffer#19 = phi( ultoa::@7/ultoa::buffer#13 ) + ultoa::value#10 = phi( ultoa::@7/ultoa::value#14 ) + ultoa::max_digits#3 = $b + ultoa::digit_values#3 = RADIX_OCTAL_VALUES_LONG + to:ultoa::@5 +ultoa::@8: scope:[ultoa] from ultoa::@7 + ultoa::value#15 = phi( ultoa::@7/ultoa::value#14 ) + ultoa::buffer#10 = phi( ultoa::@7/ultoa::buffer#13 ) + ultoa::radix#4 = phi( ultoa::@7/ultoa::radix#3 ) + ultoa::$3 = ultoa::radix#4 == BINARY + if(ultoa::$3) goto ultoa::@4 + to:ultoa::@9 +ultoa::@4: scope:[ultoa] from ultoa::@8 + ultoa::buffer#20 = phi( ultoa::@8/ultoa::buffer#10 ) + ultoa::value#11 = phi( ultoa::@8/ultoa::value#15 ) + ultoa::max_digits#4 = $20 + ultoa::digit_values#4 = RADIX_BINARY_VALUES_LONG + to:ultoa::@5 +ultoa::@9: scope:[ultoa] from ultoa::@8 + ultoa::buffer#6 = phi( ultoa::@8/ultoa::buffer#10 ) + *ultoa::buffer#6 = 'e' + ultoa::buffer#0 = ++ ultoa::buffer#6 + *ultoa::buffer#0 = 'r' + ultoa::buffer#1 = ++ ultoa::buffer#0 + *ultoa::buffer#1 = 'r' + ultoa::buffer#2 = ++ ultoa::buffer#1 + *ultoa::buffer#2 = 0 + to:ultoa::@return +ultoa::@return: scope:[ultoa] from ultoa::@12 ultoa::@9 + return + to:@return +ultoa::@5: scope:[ultoa] from ultoa::@1 ultoa::@2 ultoa::@3 ultoa::@4 + ultoa::buffer#15 = phi( ultoa::@1/ultoa::buffer#17, ultoa::@2/ultoa::buffer#18, ultoa::@3/ultoa::buffer#19, ultoa::@4/ultoa::buffer#20 ) + ultoa::value#7 = phi( ultoa::@1/ultoa::value#8, ultoa::@2/ultoa::value#9, ultoa::@3/ultoa::value#10, ultoa::@4/ultoa::value#11 ) + ultoa::digit_values#8 = phi( ultoa::@1/ultoa::digit_values#1, ultoa::@2/ultoa::digit_values#2, ultoa::@3/ultoa::digit_values#3, ultoa::@4/ultoa::digit_values#4 ) + ultoa::max_digits#7 = phi( ultoa::@1/ultoa::max_digits#1, ultoa::@2/ultoa::max_digits#2, ultoa::@3/ultoa::max_digits#3, ultoa::@4/ultoa::max_digits#4 ) + ultoa::started#0 = 0 + ultoa::digit#0 = 0 + to:ultoa::@10 +ultoa::@10: scope:[ultoa] from ultoa::@13 ultoa::@5 + ultoa::buffer#11 = phi( ultoa::@13/ultoa::buffer#14, ultoa::@5/ultoa::buffer#15 ) + ultoa::started#3 = phi( ultoa::@13/ultoa::started#4, ultoa::@5/ultoa::started#0 ) + ultoa::value#5 = phi( ultoa::@13/ultoa::value#6, ultoa::@5/ultoa::value#7 ) + ultoa::digit_values#6 = phi( ultoa::@13/ultoa::digit_values#7, ultoa::@5/ultoa::digit_values#8 ) + ultoa::digit#2 = phi( ultoa::@13/ultoa::digit#1, ultoa::@5/ultoa::digit#0 ) + ultoa::max_digits#5 = phi( ultoa::@13/ultoa::max_digits#6, ultoa::@5/ultoa::max_digits#7 ) + ultoa::$4 = ultoa::max_digits#5 - 1 + ultoa::$5 = ultoa::digit#2 < ultoa::$4 + if(ultoa::$5) goto ultoa::@11 + to:ultoa::@12 +ultoa::@11: scope:[ultoa] from ultoa::@10 + ultoa::max_digits#8 = phi( ultoa::@10/ultoa::max_digits#5 ) + ultoa::buffer#12 = phi( ultoa::@10/ultoa::buffer#11 ) + ultoa::started#2 = phi( ultoa::@10/ultoa::started#3 ) + ultoa::value#2 = phi( ultoa::@10/ultoa::value#5 ) + ultoa::digit_values#5 = phi( ultoa::@10/ultoa::digit_values#6 ) + ultoa::digit#3 = phi( ultoa::@10/ultoa::digit#2 ) + ultoa::$10 = ultoa::digit#3 * SIZEOF_DWORD + ultoa::digit_value#0 = ultoa::digit_values#5[ultoa::$10] + ultoa::$6 = ultoa::value#2 >= ultoa::digit_value#0 + ultoa::$7 = ultoa::started#2 || ultoa::$6 + ultoa::$8 = ! ultoa::$7 + if(ultoa::$8) goto ultoa::@13 + to:ultoa::@14 +ultoa::@12: scope:[ultoa] from ultoa::@10 + ultoa::buffer#7 = phi( ultoa::@10/ultoa::buffer#11 ) + ultoa::value#3 = phi( ultoa::@10/ultoa::value#5 ) + ultoa::$11 = (byte)ultoa::value#3 + *ultoa::buffer#7 = DIGITS[ultoa::$11] + ultoa::buffer#3 = ++ ultoa::buffer#7 + *ultoa::buffer#3 = 0 + to:ultoa::@return +ultoa::@13: scope:[ultoa] from ultoa::@11 ultoa::@15 + ultoa::buffer#14 = phi( ultoa::@11/ultoa::buffer#12, ultoa::@15/ultoa::buffer#4 ) + ultoa::started#4 = phi( ultoa::@11/ultoa::started#2, ultoa::@15/ultoa::started#1 ) + ultoa::value#6 = phi( ultoa::@11/ultoa::value#2, ultoa::@15/ultoa::value#0 ) + ultoa::digit_values#7 = phi( ultoa::@11/ultoa::digit_values#5, ultoa::@15/ultoa::digit_values#9 ) + ultoa::max_digits#6 = phi( ultoa::@11/ultoa::max_digits#8, ultoa::@15/ultoa::max_digits#9 ) + ultoa::digit#4 = phi( ultoa::@11/ultoa::digit#3, ultoa::@15/ultoa::digit#5 ) + ultoa::digit#1 = ++ ultoa::digit#4 + to:ultoa::@10 +ultoa::@14: scope:[ultoa] from ultoa::@11 + ultoa::digit_values#10 = phi( ultoa::@11/ultoa::digit_values#5 ) + ultoa::max_digits#10 = phi( ultoa::@11/ultoa::max_digits#8 ) + ultoa::digit#6 = phi( ultoa::@11/ultoa::digit#3 ) + ultoa::digit_value#1 = phi( ultoa::@11/ultoa::digit_value#0 ) + ultoa::value#4 = phi( ultoa::@11/ultoa::value#2 ) + ultoa::buffer#8 = phi( ultoa::@11/ultoa::buffer#12 ) + ultoa_append::buffer#0 = ultoa::buffer#8 + ultoa_append::value#0 = ultoa::value#4 + ultoa_append::sub#0 = ultoa::digit_value#1 + call ultoa_append + ultoa_append::return#0 = ultoa_append::return#2 + to:ultoa::@15 +ultoa::@15: scope:[ultoa] from ultoa::@14 + ultoa::digit_values#9 = phi( ultoa::@14/ultoa::digit_values#10 ) + ultoa::max_digits#9 = phi( ultoa::@14/ultoa::max_digits#10 ) + ultoa::digit#5 = phi( ultoa::@14/ultoa::digit#6 ) + ultoa::buffer#9 = phi( ultoa::@14/ultoa::buffer#8 ) + ultoa_append::return#3 = phi( ultoa::@14/ultoa_append::return#0 ) + ultoa::$9 = ultoa_append::return#3 + ultoa::value#0 = ultoa::$9 + ultoa::buffer#4 = ++ ultoa::buffer#9 + ultoa::started#1 = 1 + to:ultoa::@13 + +dword ultoa_append(byte* ultoa_append::buffer , dword ultoa_append::value , dword ultoa_append::sub) +ultoa_append: scope:[ultoa_append] from ultoa::@14 + ultoa_append::buffer#3 = phi( ultoa::@14/ultoa_append::buffer#0 ) + ultoa_append::sub#3 = phi( ultoa::@14/ultoa_append::sub#0 ) + ultoa_append::value#5 = phi( ultoa::@14/ultoa_append::value#0 ) + ultoa_append::digit#0 = 0 + to:ultoa_append::@1 +ultoa_append::@1: scope:[ultoa_append] from ultoa_append ultoa_append::@2 + ultoa_append::buffer#2 = phi( ultoa_append/ultoa_append::buffer#3, ultoa_append::@2/ultoa_append::buffer#4 ) + ultoa_append::digit#4 = phi( ultoa_append/ultoa_append::digit#0, ultoa_append::@2/ultoa_append::digit#1 ) + ultoa_append::sub#1 = phi( ultoa_append/ultoa_append::sub#3, ultoa_append::@2/ultoa_append::sub#2 ) + ultoa_append::value#2 = phi( ultoa_append/ultoa_append::value#5, ultoa_append::@2/ultoa_append::value#1 ) + ultoa_append::$0 = ultoa_append::value#2 >= ultoa_append::sub#1 + if(ultoa_append::$0) goto ultoa_append::@2 + to:ultoa_append::@3 +ultoa_append::@2: scope:[ultoa_append] from ultoa_append::@1 + ultoa_append::buffer#4 = phi( ultoa_append::@1/ultoa_append::buffer#2 ) + ultoa_append::sub#2 = phi( ultoa_append::@1/ultoa_append::sub#1 ) + ultoa_append::value#3 = phi( ultoa_append::@1/ultoa_append::value#2 ) + ultoa_append::digit#2 = phi( ultoa_append::@1/ultoa_append::digit#4 ) + ultoa_append::digit#1 = ++ ultoa_append::digit#2 + ultoa_append::value#1 = ultoa_append::value#3 - ultoa_append::sub#2 + to:ultoa_append::@1 +ultoa_append::@3: scope:[ultoa_append] from ultoa_append::@1 + ultoa_append::value#4 = phi( ultoa_append::@1/ultoa_append::value#2 ) + ultoa_append::buffer#1 = phi( ultoa_append::@1/ultoa_append::buffer#2 ) + ultoa_append::digit#3 = phi( ultoa_append::@1/ultoa_append::digit#4 ) + *ultoa_append::buffer#1 = DIGITS[ultoa_append::digit#3] + ultoa_append::return#1 = ultoa_append::value#4 + to:ultoa_append::@return +ultoa_append::@return: scope:[ultoa_append] from ultoa_append::@3 + ultoa_append::return#4 = phi( ultoa_append::@3/ultoa_append::return#1 ) + ultoa_append::return#2 = ultoa_append::return#4 + return + to:@return + +void printf_padding(byte printf_padding::pad , byte printf_padding::length) +printf_padding: scope:[printf_padding] from printf_number_buffer::@10 printf_number_buffer::@12 printf_number_buffer::@8 + CONIO_SCREEN_BANK#39 = phi( printf_number_buffer::@10/CONIO_SCREEN_BANK#54, printf_number_buffer::@12/CONIO_SCREEN_BANK#55, printf_number_buffer::@8/CONIO_SCREEN_BANK#56 ) + CONIO_SCREEN_TEXT#44 = phi( printf_number_buffer::@10/CONIO_SCREEN_TEXT#60, printf_number_buffer::@12/CONIO_SCREEN_TEXT#61, printf_number_buffer::@8/CONIO_SCREEN_TEXT#62 ) + printf_padding::pad#5 = phi( printf_number_buffer::@10/printf_padding::pad#1, printf_number_buffer::@12/printf_padding::pad#2, printf_number_buffer::@8/printf_padding::pad#0 ) + printf_padding::length#4 = phi( printf_number_buffer::@10/printf_padding::length#1, printf_number_buffer::@12/printf_padding::length#2, printf_number_buffer::@8/printf_padding::length#0 ) + printf_padding::i#0 = 0 + to:printf_padding::@1 +printf_padding::@1: scope:[printf_padding] from printf_padding printf_padding::@3 + CONIO_SCREEN_BANK#33 = phi( printf_padding/CONIO_SCREEN_BANK#39, printf_padding::@3/CONIO_SCREEN_BANK#40 ) + CONIO_SCREEN_TEXT#37 = phi( printf_padding/CONIO_SCREEN_TEXT#44, printf_padding::@3/CONIO_SCREEN_TEXT#45 ) + printf_padding::pad#4 = phi( printf_padding/printf_padding::pad#5, printf_padding::@3/printf_padding::pad#6 ) + printf_padding::length#3 = phi( printf_padding/printf_padding::length#4, printf_padding::@3/printf_padding::length#5 ) + printf_padding::i#2 = phi( printf_padding/printf_padding::i#0, printf_padding::@3/printf_padding::i#1 ) + printf_padding::$0 = printf_padding::i#2 < printf_padding::length#3 + if(printf_padding::$0) goto printf_padding::@2 + to:printf_padding::@return +printf_padding::@2: scope:[printf_padding] from printf_padding::@1 + CONIO_SCREEN_BANK#28 = phi( printf_padding::@1/CONIO_SCREEN_BANK#33 ) + printf_padding::length#6 = phi( printf_padding::@1/printf_padding::length#3 ) + CONIO_SCREEN_TEXT#26 = phi( printf_padding::@1/CONIO_SCREEN_TEXT#37 ) + printf_padding::i#4 = phi( printf_padding::@1/printf_padding::i#2 ) + printf_padding::pad#3 = phi( printf_padding::@1/printf_padding::pad#4 ) + cputc::c#1 = printf_padding::pad#3 + call cputc + to:printf_padding::@3 +printf_padding::@3: scope:[printf_padding] from printf_padding::@2 + CONIO_SCREEN_BANK#40 = phi( printf_padding::@2/CONIO_SCREEN_BANK#28 ) + CONIO_SCREEN_TEXT#45 = phi( printf_padding::@2/CONIO_SCREEN_TEXT#26 ) + printf_padding::pad#6 = phi( printf_padding::@2/printf_padding::pad#3 ) + printf_padding::length#5 = phi( printf_padding::@2/printf_padding::length#6 ) + printf_padding::i#3 = phi( printf_padding::@2/printf_padding::i#4 ) + printf_padding::i#1 = ++ printf_padding::i#3 + to:printf_padding::@1 +printf_padding::@return: scope:[printf_padding] from printf_padding::@1 + return + to:@return + +void printf_ulong(dword printf_ulong::uvalue , byte printf_ulong::format_min_length , byte printf_ulong::format_justify_left , byte printf_ulong::format_sign_always , byte printf_ulong::format_zero_padding , byte printf_ulong::format_upper_case , byte printf_ulong::format_radix) +printf_ulong: scope:[printf_ulong] from main::@3 main::@5 main::@7 + CONIO_SCREEN_BANK#95 = phi( main::@3/CONIO_SCREEN_BANK#71, main::@5/CONIO_SCREEN_BANK#72, main::@7/CONIO_SCREEN_BANK#73 ) + CONIO_SCREEN_TEXT#109 = phi( main::@3/CONIO_SCREEN_TEXT#79, main::@5/CONIO_SCREEN_TEXT#80, main::@7/CONIO_SCREEN_TEXT#81 ) + printf_ulong::format_upper_case#7 = phi( main::@3/printf_ulong::format_upper_case#0, main::@5/printf_ulong::format_upper_case#1, main::@7/printf_ulong::format_upper_case#2 ) + printf_ulong::format_zero_padding#7 = phi( main::@3/printf_ulong::format_zero_padding#0, main::@5/printf_ulong::format_zero_padding#1, main::@7/printf_ulong::format_zero_padding#2 ) + printf_ulong::format_justify_left#7 = phi( main::@3/printf_ulong::format_justify_left#0, main::@5/printf_ulong::format_justify_left#1, main::@7/printf_ulong::format_justify_left#2 ) + printf_ulong::format_min_length#7 = phi( main::@3/printf_ulong::format_min_length#0, main::@5/printf_ulong::format_min_length#1, main::@7/printf_ulong::format_min_length#2 ) + printf_ulong::format_radix#7 = phi( main::@3/printf_ulong::format_radix#0, main::@5/printf_ulong::format_radix#1, main::@7/printf_ulong::format_radix#2 ) + printf_ulong::uvalue#6 = phi( main::@3/printf_ulong::uvalue#0, main::@5/printf_ulong::uvalue#1, main::@7/printf_ulong::uvalue#2 ) + printf_ulong::format_sign_always#3 = phi( main::@3/printf_ulong::format_sign_always#0, main::@5/printf_ulong::format_sign_always#1, main::@7/printf_ulong::format_sign_always#2 ) + printf_ulong::$5 = 0 != printf_ulong::format_sign_always#3 + if(printf_ulong::$5) goto printf_ulong::@1 + to:printf_ulong::@2 +printf_ulong::@1: scope:[printf_ulong] from printf_ulong + CONIO_SCREEN_BANK#89 = phi( printf_ulong/CONIO_SCREEN_BANK#95 ) + CONIO_SCREEN_TEXT#102 = phi( printf_ulong/CONIO_SCREEN_TEXT#109 ) + printf_ulong::format_upper_case#5 = phi( printf_ulong/printf_ulong::format_upper_case#7 ) + printf_ulong::format_zero_padding#5 = phi( printf_ulong/printf_ulong::format_zero_padding#7 ) + printf_ulong::format_sign_always#6 = phi( printf_ulong/printf_ulong::format_sign_always#3 ) + printf_ulong::format_justify_left#5 = phi( printf_ulong/printf_ulong::format_justify_left#7 ) + printf_ulong::format_min_length#5 = phi( printf_ulong/printf_ulong::format_min_length#7 ) + printf_ulong::format_radix#5 = phi( printf_ulong/printf_ulong::format_radix#7 ) + printf_ulong::uvalue#4 = phi( printf_ulong/printf_ulong::uvalue#6 ) + printf_ulong::$1 = '+' + to:printf_ulong::@3 +printf_ulong::@2: scope:[printf_ulong] from printf_ulong + CONIO_SCREEN_BANK#90 = phi( printf_ulong/CONIO_SCREEN_BANK#95 ) + CONIO_SCREEN_TEXT#103 = phi( printf_ulong/CONIO_SCREEN_TEXT#109 ) + printf_ulong::format_upper_case#6 = phi( printf_ulong/printf_ulong::format_upper_case#7 ) + printf_ulong::format_zero_padding#6 = phi( printf_ulong/printf_ulong::format_zero_padding#7 ) + printf_ulong::format_sign_always#7 = phi( printf_ulong/printf_ulong::format_sign_always#3 ) + printf_ulong::format_justify_left#6 = phi( printf_ulong/printf_ulong::format_justify_left#7 ) + printf_ulong::format_min_length#6 = phi( printf_ulong/printf_ulong::format_min_length#7 ) + printf_ulong::format_radix#6 = phi( printf_ulong/printf_ulong::format_radix#7 ) + printf_ulong::uvalue#5 = phi( printf_ulong/printf_ulong::uvalue#6 ) + printf_ulong::$0 = 0 + to:printf_ulong::@3 +printf_ulong::@3: scope:[printf_ulong] from printf_ulong::@1 printf_ulong::@2 + CONIO_SCREEN_BANK#79 = phi( printf_ulong::@1/CONIO_SCREEN_BANK#89, printf_ulong::@2/CONIO_SCREEN_BANK#90 ) + CONIO_SCREEN_TEXT#90 = phi( printf_ulong::@1/CONIO_SCREEN_TEXT#102, printf_ulong::@2/CONIO_SCREEN_TEXT#103 ) + printf_ulong::format_upper_case#4 = phi( printf_ulong::@1/printf_ulong::format_upper_case#5, printf_ulong::@2/printf_ulong::format_upper_case#6 ) + printf_ulong::format_zero_padding#4 = phi( printf_ulong::@1/printf_ulong::format_zero_padding#5, printf_ulong::@2/printf_ulong::format_zero_padding#6 ) + printf_ulong::format_sign_always#5 = phi( printf_ulong::@1/printf_ulong::format_sign_always#6, printf_ulong::@2/printf_ulong::format_sign_always#7 ) + printf_ulong::format_justify_left#4 = phi( printf_ulong::@1/printf_ulong::format_justify_left#5, printf_ulong::@2/printf_ulong::format_justify_left#6 ) + printf_ulong::format_min_length#4 = phi( printf_ulong::@1/printf_ulong::format_min_length#5, printf_ulong::@2/printf_ulong::format_min_length#6 ) + printf_ulong::format_radix#3 = phi( printf_ulong::@1/printf_ulong::format_radix#5, printf_ulong::@2/printf_ulong::format_radix#6 ) + printf_ulong::uvalue#3 = phi( printf_ulong::@1/printf_ulong::uvalue#4, printf_ulong::@2/printf_ulong::uvalue#5 ) + printf_ulong::$2 = phi( printf_ulong::@1/printf_ulong::$1, printf_ulong::@2/printf_ulong::$0 ) + *((byte*)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_SIGN) = printf_ulong::$2 + ultoa::value#1 = printf_ulong::uvalue#3 + ultoa::buffer#5 = (byte*)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS + ultoa::radix#0 = printf_ulong::format_radix#3 + call ultoa + to:printf_ulong::@4 +printf_ulong::@4: scope:[printf_ulong] from printf_ulong::@3 + CONIO_SCREEN_BANK#63 = phi( printf_ulong::@3/CONIO_SCREEN_BANK#79 ) + CONIO_SCREEN_TEXT#71 = phi( printf_ulong::@3/CONIO_SCREEN_TEXT#90 ) + printf_ulong::format_radix#4 = phi( printf_ulong::@3/printf_ulong::format_radix#3 ) + printf_ulong::format_upper_case#3 = phi( printf_ulong::@3/printf_ulong::format_upper_case#4 ) + printf_ulong::format_zero_padding#3 = phi( printf_ulong::@3/printf_ulong::format_zero_padding#4 ) + printf_ulong::format_sign_always#4 = phi( printf_ulong::@3/printf_ulong::format_sign_always#5 ) + printf_ulong::format_justify_left#3 = phi( printf_ulong::@3/printf_ulong::format_justify_left#4 ) + printf_ulong::format_min_length#3 = phi( printf_ulong::@3/printf_ulong::format_min_length#4 ) + printf_number_buffer::buffer_sign#0 = *((byte*)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_SIGN) + printf_number_buffer::buffer_digits#0 = (byte*)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS + printf_number_buffer::format_min_length#0 = printf_ulong::format_min_length#3 + printf_number_buffer::format_justify_left#0 = printf_ulong::format_justify_left#3 + printf_number_buffer::format_sign_always#0 = printf_ulong::format_sign_always#4 + printf_number_buffer::format_zero_padding#0 = printf_ulong::format_zero_padding#3 + printf_number_buffer::format_upper_case#0 = printf_ulong::format_upper_case#3 + printf_number_buffer::format_radix#0 = printf_ulong::format_radix#4 + call printf_number_buffer + to:printf_ulong::@5 +printf_ulong::@5: scope:[printf_ulong] from printf_ulong::@4 + to:printf_ulong::@return +printf_ulong::@return: scope:[printf_ulong] from printf_ulong::@5 + return + to:@return + +void printf_uint(word printf_uint::uvalue , byte printf_uint::format_min_length , byte printf_uint::format_justify_left , byte printf_uint::format_sign_always , byte printf_uint::format_zero_padding , byte printf_uint::format_upper_case , byte printf_uint::format_radix) +printf_uint: scope:[printf_uint] from main::@13 main::@15 + CONIO_SCREEN_BANK#96 = phi( main::@13/CONIO_SCREEN_BANK#76, main::@15/CONIO_SCREEN_BANK#77 ) + CONIO_SCREEN_TEXT#110 = phi( main::@13/CONIO_SCREEN_TEXT#84, main::@15/CONIO_SCREEN_TEXT#85 ) + printf_uint::format_upper_case#6 = phi( main::@13/printf_uint::format_upper_case#0, main::@15/printf_uint::format_upper_case#1 ) + printf_uint::format_zero_padding#6 = phi( main::@13/printf_uint::format_zero_padding#0, main::@15/printf_uint::format_zero_padding#1 ) + printf_uint::format_justify_left#6 = phi( main::@13/printf_uint::format_justify_left#0, main::@15/printf_uint::format_justify_left#1 ) + printf_uint::format_min_length#6 = phi( main::@13/printf_uint::format_min_length#0, main::@15/printf_uint::format_min_length#1 ) + printf_uint::format_radix#6 = phi( main::@13/printf_uint::format_radix#0, main::@15/printf_uint::format_radix#1 ) + printf_uint::uvalue#5 = phi( main::@13/printf_uint::uvalue#0, main::@15/printf_uint::uvalue#1 ) + printf_uint::format_sign_always#2 = phi( main::@13/printf_uint::format_sign_always#0, main::@15/printf_uint::format_sign_always#1 ) + printf_uint::$5 = 0 != printf_uint::format_sign_always#2 + if(printf_uint::$5) goto printf_uint::@1 + to:printf_uint::@2 +printf_uint::@1: scope:[printf_uint] from printf_uint + CONIO_SCREEN_BANK#91 = phi( printf_uint/CONIO_SCREEN_BANK#96 ) + CONIO_SCREEN_TEXT#104 = phi( printf_uint/CONIO_SCREEN_TEXT#110 ) + printf_uint::format_upper_case#4 = phi( printf_uint/printf_uint::format_upper_case#6 ) + printf_uint::format_zero_padding#4 = phi( printf_uint/printf_uint::format_zero_padding#6 ) + printf_uint::format_sign_always#5 = phi( printf_uint/printf_uint::format_sign_always#2 ) + printf_uint::format_justify_left#4 = phi( printf_uint/printf_uint::format_justify_left#6 ) + printf_uint::format_min_length#4 = phi( printf_uint/printf_uint::format_min_length#6 ) + printf_uint::format_radix#4 = phi( printf_uint/printf_uint::format_radix#6 ) + printf_uint::uvalue#3 = phi( printf_uint/printf_uint::uvalue#5 ) + printf_uint::$1 = '+' + to:printf_uint::@3 +printf_uint::@2: scope:[printf_uint] from printf_uint + CONIO_SCREEN_BANK#92 = phi( printf_uint/CONIO_SCREEN_BANK#96 ) + CONIO_SCREEN_TEXT#105 = phi( printf_uint/CONIO_SCREEN_TEXT#110 ) + printf_uint::format_upper_case#5 = phi( printf_uint/printf_uint::format_upper_case#6 ) + printf_uint::format_zero_padding#5 = phi( printf_uint/printf_uint::format_zero_padding#6 ) + printf_uint::format_sign_always#6 = phi( printf_uint/printf_uint::format_sign_always#2 ) + printf_uint::format_justify_left#5 = phi( printf_uint/printf_uint::format_justify_left#6 ) + printf_uint::format_min_length#5 = phi( printf_uint/printf_uint::format_min_length#6 ) + printf_uint::format_radix#5 = phi( printf_uint/printf_uint::format_radix#6 ) + printf_uint::uvalue#4 = phi( printf_uint/printf_uint::uvalue#5 ) + printf_uint::$0 = 0 + to:printf_uint::@3 +printf_uint::@3: scope:[printf_uint] from printf_uint::@1 printf_uint::@2 + CONIO_SCREEN_BANK#80 = phi( printf_uint::@1/CONIO_SCREEN_BANK#91, printf_uint::@2/CONIO_SCREEN_BANK#92 ) + CONIO_SCREEN_TEXT#91 = phi( printf_uint::@1/CONIO_SCREEN_TEXT#104, printf_uint::@2/CONIO_SCREEN_TEXT#105 ) + printf_uint::format_upper_case#3 = phi( printf_uint::@1/printf_uint::format_upper_case#4, printf_uint::@2/printf_uint::format_upper_case#5 ) + printf_uint::format_zero_padding#3 = phi( printf_uint::@1/printf_uint::format_zero_padding#4, printf_uint::@2/printf_uint::format_zero_padding#5 ) + printf_uint::format_sign_always#4 = phi( printf_uint::@1/printf_uint::format_sign_always#5, printf_uint::@2/printf_uint::format_sign_always#6 ) + printf_uint::format_justify_left#3 = phi( printf_uint::@1/printf_uint::format_justify_left#4, printf_uint::@2/printf_uint::format_justify_left#5 ) + printf_uint::format_min_length#3 = phi( printf_uint::@1/printf_uint::format_min_length#4, printf_uint::@2/printf_uint::format_min_length#5 ) + printf_uint::format_radix#2 = phi( printf_uint::@1/printf_uint::format_radix#4, printf_uint::@2/printf_uint::format_radix#5 ) + printf_uint::uvalue#2 = phi( printf_uint::@1/printf_uint::uvalue#3, printf_uint::@2/printf_uint::uvalue#4 ) + printf_uint::$2 = phi( printf_uint::@1/printf_uint::$1, printf_uint::@2/printf_uint::$0 ) + *((byte*)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_SIGN) = printf_uint::$2 + utoa::value#1 = printf_uint::uvalue#2 + utoa::buffer#5 = (byte*)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS + utoa::radix#0 = printf_uint::format_radix#2 + call utoa + to:printf_uint::@4 +printf_uint::@4: scope:[printf_uint] from printf_uint::@3 + CONIO_SCREEN_BANK#62 = phi( printf_uint::@3/CONIO_SCREEN_BANK#80 ) + CONIO_SCREEN_TEXT#70 = phi( printf_uint::@3/CONIO_SCREEN_TEXT#91 ) + printf_uint::format_radix#3 = phi( printf_uint::@3/printf_uint::format_radix#2 ) + printf_uint::format_upper_case#2 = phi( printf_uint::@3/printf_uint::format_upper_case#3 ) + printf_uint::format_zero_padding#2 = phi( printf_uint::@3/printf_uint::format_zero_padding#3 ) + printf_uint::format_sign_always#3 = phi( printf_uint::@3/printf_uint::format_sign_always#4 ) + printf_uint::format_justify_left#2 = phi( printf_uint::@3/printf_uint::format_justify_left#3 ) + printf_uint::format_min_length#2 = phi( printf_uint::@3/printf_uint::format_min_length#3 ) + printf_number_buffer::buffer_sign#1 = *((byte*)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_SIGN) + printf_number_buffer::buffer_digits#1 = (byte*)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS + printf_number_buffer::format_min_length#1 = printf_uint::format_min_length#2 + printf_number_buffer::format_justify_left#1 = printf_uint::format_justify_left#2 + printf_number_buffer::format_sign_always#1 = printf_uint::format_sign_always#3 + printf_number_buffer::format_zero_padding#1 = printf_uint::format_zero_padding#2 + printf_number_buffer::format_upper_case#1 = printf_uint::format_upper_case#2 + printf_number_buffer::format_radix#1 = printf_uint::format_radix#3 + call printf_number_buffer + to:printf_uint::@5 +printf_uint::@5: scope:[printf_uint] from printf_uint::@4 + to:printf_uint::@return +printf_uint::@return: scope:[printf_uint] from printf_uint::@5 + return + to:@return + +void printf_uchar(byte printf_uchar::uvalue , byte printf_uchar::format_min_length , byte printf_uchar::format_justify_left , byte printf_uchar::format_sign_always , byte printf_uchar::format_zero_padding , byte printf_uchar::format_upper_case , byte printf_uchar::format_radix) +printf_uchar: scope:[printf_uchar] from main::@11 main::@9 + CONIO_SCREEN_BANK#97 = phi( main::@11/CONIO_SCREEN_BANK#75, main::@9/CONIO_SCREEN_BANK#74 ) + CONIO_SCREEN_TEXT#111 = phi( main::@11/CONIO_SCREEN_TEXT#83, main::@9/CONIO_SCREEN_TEXT#82 ) + printf_uchar::format_upper_case#6 = phi( main::@11/printf_uchar::format_upper_case#1, main::@9/printf_uchar::format_upper_case#0 ) + printf_uchar::format_zero_padding#6 = phi( main::@11/printf_uchar::format_zero_padding#1, main::@9/printf_uchar::format_zero_padding#0 ) + printf_uchar::format_justify_left#6 = phi( main::@11/printf_uchar::format_justify_left#1, main::@9/printf_uchar::format_justify_left#0 ) + printf_uchar::format_min_length#6 = phi( main::@11/printf_uchar::format_min_length#1, main::@9/printf_uchar::format_min_length#0 ) + printf_uchar::format_radix#6 = phi( main::@11/printf_uchar::format_radix#1, main::@9/printf_uchar::format_radix#0 ) + printf_uchar::uvalue#5 = phi( main::@11/printf_uchar::uvalue#1, main::@9/printf_uchar::uvalue#0 ) + printf_uchar::format_sign_always#2 = phi( main::@11/printf_uchar::format_sign_always#1, main::@9/printf_uchar::format_sign_always#0 ) + printf_uchar::$5 = 0 != printf_uchar::format_sign_always#2 + if(printf_uchar::$5) goto printf_uchar::@1 + to:printf_uchar::@2 +printf_uchar::@1: scope:[printf_uchar] from printf_uchar + CONIO_SCREEN_BANK#93 = phi( printf_uchar/CONIO_SCREEN_BANK#97 ) + CONIO_SCREEN_TEXT#106 = phi( printf_uchar/CONIO_SCREEN_TEXT#111 ) + printf_uchar::format_upper_case#4 = phi( printf_uchar/printf_uchar::format_upper_case#6 ) + printf_uchar::format_zero_padding#4 = phi( printf_uchar/printf_uchar::format_zero_padding#6 ) + printf_uchar::format_sign_always#5 = phi( printf_uchar/printf_uchar::format_sign_always#2 ) + printf_uchar::format_justify_left#4 = phi( printf_uchar/printf_uchar::format_justify_left#6 ) + printf_uchar::format_min_length#4 = phi( printf_uchar/printf_uchar::format_min_length#6 ) + printf_uchar::format_radix#4 = phi( printf_uchar/printf_uchar::format_radix#6 ) + printf_uchar::uvalue#3 = phi( printf_uchar/printf_uchar::uvalue#5 ) + printf_uchar::$1 = '+' + to:printf_uchar::@3 +printf_uchar::@2: scope:[printf_uchar] from printf_uchar + CONIO_SCREEN_BANK#94 = phi( printf_uchar/CONIO_SCREEN_BANK#97 ) + CONIO_SCREEN_TEXT#107 = phi( printf_uchar/CONIO_SCREEN_TEXT#111 ) + printf_uchar::format_upper_case#5 = phi( printf_uchar/printf_uchar::format_upper_case#6 ) + printf_uchar::format_zero_padding#5 = phi( printf_uchar/printf_uchar::format_zero_padding#6 ) + printf_uchar::format_sign_always#6 = phi( printf_uchar/printf_uchar::format_sign_always#2 ) + printf_uchar::format_justify_left#5 = phi( printf_uchar/printf_uchar::format_justify_left#6 ) + printf_uchar::format_min_length#5 = phi( printf_uchar/printf_uchar::format_min_length#6 ) + printf_uchar::format_radix#5 = phi( printf_uchar/printf_uchar::format_radix#6 ) + printf_uchar::uvalue#4 = phi( printf_uchar/printf_uchar::uvalue#5 ) + printf_uchar::$0 = 0 + to:printf_uchar::@3 +printf_uchar::@3: scope:[printf_uchar] from printf_uchar::@1 printf_uchar::@2 + CONIO_SCREEN_BANK#81 = phi( printf_uchar::@1/CONIO_SCREEN_BANK#93, printf_uchar::@2/CONIO_SCREEN_BANK#94 ) + CONIO_SCREEN_TEXT#92 = phi( printf_uchar::@1/CONIO_SCREEN_TEXT#106, printf_uchar::@2/CONIO_SCREEN_TEXT#107 ) + printf_uchar::format_upper_case#3 = phi( printf_uchar::@1/printf_uchar::format_upper_case#4, printf_uchar::@2/printf_uchar::format_upper_case#5 ) + printf_uchar::format_zero_padding#3 = phi( printf_uchar::@1/printf_uchar::format_zero_padding#4, printf_uchar::@2/printf_uchar::format_zero_padding#5 ) + printf_uchar::format_sign_always#4 = phi( printf_uchar::@1/printf_uchar::format_sign_always#5, printf_uchar::@2/printf_uchar::format_sign_always#6 ) + printf_uchar::format_justify_left#3 = phi( printf_uchar::@1/printf_uchar::format_justify_left#4, printf_uchar::@2/printf_uchar::format_justify_left#5 ) + printf_uchar::format_min_length#3 = phi( printf_uchar::@1/printf_uchar::format_min_length#4, printf_uchar::@2/printf_uchar::format_min_length#5 ) + printf_uchar::format_radix#2 = phi( printf_uchar::@1/printf_uchar::format_radix#4, printf_uchar::@2/printf_uchar::format_radix#5 ) + printf_uchar::uvalue#2 = phi( printf_uchar::@1/printf_uchar::uvalue#3, printf_uchar::@2/printf_uchar::uvalue#4 ) + printf_uchar::$2 = phi( printf_uchar::@1/printf_uchar::$1, printf_uchar::@2/printf_uchar::$0 ) + *((byte*)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_SIGN) = printf_uchar::$2 + uctoa::value#1 = printf_uchar::uvalue#2 + uctoa::buffer#5 = (byte*)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS + uctoa::radix#0 = printf_uchar::format_radix#2 + call uctoa + to:printf_uchar::@4 +printf_uchar::@4: scope:[printf_uchar] from printf_uchar::@3 + CONIO_SCREEN_BANK#61 = phi( printf_uchar::@3/CONIO_SCREEN_BANK#81 ) + CONIO_SCREEN_TEXT#69 = phi( printf_uchar::@3/CONIO_SCREEN_TEXT#92 ) + printf_uchar::format_radix#3 = phi( printf_uchar::@3/printf_uchar::format_radix#2 ) + printf_uchar::format_upper_case#2 = phi( printf_uchar::@3/printf_uchar::format_upper_case#3 ) + printf_uchar::format_zero_padding#2 = phi( printf_uchar::@3/printf_uchar::format_zero_padding#3 ) + printf_uchar::format_sign_always#3 = phi( printf_uchar::@3/printf_uchar::format_sign_always#4 ) + printf_uchar::format_justify_left#2 = phi( printf_uchar::@3/printf_uchar::format_justify_left#3 ) + printf_uchar::format_min_length#2 = phi( printf_uchar::@3/printf_uchar::format_min_length#3 ) + printf_number_buffer::buffer_sign#2 = *((byte*)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_SIGN) + printf_number_buffer::buffer_digits#2 = (byte*)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS + printf_number_buffer::format_min_length#2 = printf_uchar::format_min_length#2 + printf_number_buffer::format_justify_left#2 = printf_uchar::format_justify_left#2 + printf_number_buffer::format_sign_always#2 = printf_uchar::format_sign_always#3 + printf_number_buffer::format_zero_padding#2 = printf_uchar::format_zero_padding#2 + printf_number_buffer::format_upper_case#2 = printf_uchar::format_upper_case#2 + printf_number_buffer::format_radix#2 = printf_uchar::format_radix#3 + call printf_number_buffer + to:printf_uchar::@5 +printf_uchar::@5: scope:[printf_uchar] from printf_uchar::@4 + to:printf_uchar::@return +printf_uchar::@return: scope:[printf_uchar] from printf_uchar::@5 + return + to:@return + +void printf_number_buffer(byte printf_number_buffer::buffer_sign , byte* printf_number_buffer::buffer_digits , byte printf_number_buffer::format_min_length , byte printf_number_buffer::format_justify_left , byte printf_number_buffer::format_sign_always , byte printf_number_buffer::format_zero_padding , byte printf_number_buffer::format_upper_case , byte printf_number_buffer::format_radix) +printf_number_buffer: scope:[printf_number_buffer] from printf_uchar::@4 printf_uint::@4 printf_ulong::@4 + CONIO_SCREEN_BANK#57 = phi( printf_uchar::@4/CONIO_SCREEN_BANK#61, printf_uint::@4/CONIO_SCREEN_BANK#62, printf_ulong::@4/CONIO_SCREEN_BANK#63 ) + CONIO_SCREEN_TEXT#63 = phi( printf_uchar::@4/CONIO_SCREEN_TEXT#69, printf_uint::@4/CONIO_SCREEN_TEXT#70, printf_ulong::@4/CONIO_SCREEN_TEXT#71 ) + printf_number_buffer::format_upper_case#12 = phi( printf_uchar::@4/printf_number_buffer::format_upper_case#2, printf_uint::@4/printf_number_buffer::format_upper_case#1, printf_ulong::@4/printf_number_buffer::format_upper_case#0 ) + printf_number_buffer::buffer_sign#9 = phi( printf_uchar::@4/printf_number_buffer::buffer_sign#2, printf_uint::@4/printf_number_buffer::buffer_sign#1, printf_ulong::@4/printf_number_buffer::buffer_sign#0 ) + printf_number_buffer::buffer_digits#6 = phi( printf_uchar::@4/printf_number_buffer::buffer_digits#2, printf_uint::@4/printf_number_buffer::buffer_digits#1, printf_ulong::@4/printf_number_buffer::buffer_digits#0 ) + printf_number_buffer::format_zero_padding#6 = phi( printf_uchar::@4/printf_number_buffer::format_zero_padding#2, printf_uint::@4/printf_number_buffer::format_zero_padding#1, printf_ulong::@4/printf_number_buffer::format_zero_padding#0 ) + printf_number_buffer::format_justify_left#5 = phi( printf_uchar::@4/printf_number_buffer::format_justify_left#2, printf_uint::@4/printf_number_buffer::format_justify_left#1, printf_ulong::@4/printf_number_buffer::format_justify_left#0 ) + printf_number_buffer::format_min_length#3 = phi( printf_uchar::@4/printf_number_buffer::format_min_length#2, printf_uint::@4/printf_number_buffer::format_min_length#1, printf_ulong::@4/printf_number_buffer::format_min_length#0 ) + printf_number_buffer::padding#0 = 0 + printf_number_buffer::$26 = 0 != printf_number_buffer::format_min_length#3 + printf_number_buffer::$0 = ! printf_number_buffer::$26 + if(printf_number_buffer::$0) goto printf_number_buffer::@1 + to:printf_number_buffer::@6 +printf_number_buffer::@1: scope:[printf_number_buffer] from printf_number_buffer printf_number_buffer::@13 printf_number_buffer::@14 + CONIO_SCREEN_BANK#41 = phi( printf_number_buffer/CONIO_SCREEN_BANK#57, printf_number_buffer::@13/CONIO_SCREEN_BANK#58, printf_number_buffer::@14/CONIO_SCREEN_BANK#59 ) + CONIO_SCREEN_TEXT#46 = phi( printf_number_buffer/CONIO_SCREEN_TEXT#63, printf_number_buffer::@13/CONIO_SCREEN_TEXT#64, printf_number_buffer::@14/CONIO_SCREEN_TEXT#65 ) + printf_number_buffer::buffer_digits#14 = phi( printf_number_buffer/printf_number_buffer::buffer_digits#6, printf_number_buffer::@13/printf_number_buffer::buffer_digits#17, printf_number_buffer::@14/printf_number_buffer::buffer_digits#18 ) + printf_number_buffer::format_upper_case#9 = phi( printf_number_buffer/printf_number_buffer::format_upper_case#12, printf_number_buffer::@13/printf_number_buffer::format_upper_case#13, printf_number_buffer::@14/printf_number_buffer::format_upper_case#14 ) + printf_number_buffer::buffer_sign#7 = phi( printf_number_buffer/printf_number_buffer::buffer_sign#9, printf_number_buffer::@13/printf_number_buffer::buffer_sign#10, printf_number_buffer::@14/printf_number_buffer::buffer_sign#11 ) + printf_number_buffer::padding#3 = phi( printf_number_buffer/printf_number_buffer::padding#0, printf_number_buffer::@13/printf_number_buffer::padding#1, printf_number_buffer::@14/printf_number_buffer::padding#2 ) + printf_number_buffer::format_zero_padding#3 = phi( printf_number_buffer/printf_number_buffer::format_zero_padding#6, printf_number_buffer::@13/printf_number_buffer::format_zero_padding#7, printf_number_buffer::@14/printf_number_buffer::format_zero_padding#8 ) + printf_number_buffer::format_justify_left#3 = phi( printf_number_buffer/printf_number_buffer::format_justify_left#5, printf_number_buffer::@13/printf_number_buffer::format_justify_left#6, printf_number_buffer::@14/printf_number_buffer::format_justify_left#7 ) + printf_number_buffer::$27 = 0 != printf_number_buffer::format_justify_left#3 + printf_number_buffer::$1 = ! printf_number_buffer::$27 + printf_number_buffer::$28 = 0 != printf_number_buffer::format_zero_padding#3 + printf_number_buffer::$2 = ! printf_number_buffer::$28 + printf_number_buffer::$3 = printf_number_buffer::$1 && printf_number_buffer::$2 + printf_number_buffer::$4 = printf_number_buffer::$3 && printf_number_buffer::padding#3 + printf_number_buffer::$5 = ! printf_number_buffer::$4 + if(printf_number_buffer::$5) goto printf_number_buffer::@2 + to:printf_number_buffer::@8 +printf_number_buffer::@6: scope:[printf_number_buffer] from printf_number_buffer + CONIO_SCREEN_BANK#82 = phi( printf_number_buffer/CONIO_SCREEN_BANK#57 ) + CONIO_SCREEN_TEXT#93 = phi( printf_number_buffer/CONIO_SCREEN_TEXT#63 ) + printf_number_buffer::format_upper_case#18 = phi( printf_number_buffer/printf_number_buffer::format_upper_case#12 ) + printf_number_buffer::format_zero_padding#18 = phi( printf_number_buffer/printf_number_buffer::format_zero_padding#6 ) + printf_number_buffer::format_justify_left#13 = phi( printf_number_buffer/printf_number_buffer::format_justify_left#5 ) + printf_number_buffer::format_min_length#7 = phi( printf_number_buffer/printf_number_buffer::format_min_length#3 ) + printf_number_buffer::buffer_sign#6 = phi( printf_number_buffer/printf_number_buffer::buffer_sign#9 ) + printf_number_buffer::buffer_digits#3 = phi( printf_number_buffer/printf_number_buffer::buffer_digits#6 ) + strlen::str#1 = printf_number_buffer::buffer_digits#3 + call strlen + strlen::return#2 = strlen::return#1 + to:printf_number_buffer::@15 +printf_number_buffer::@15: scope:[printf_number_buffer] from printf_number_buffer::@6 + CONIO_SCREEN_BANK#64 = phi( printf_number_buffer::@6/CONIO_SCREEN_BANK#82 ) + CONIO_SCREEN_TEXT#72 = phi( printf_number_buffer::@6/CONIO_SCREEN_TEXT#93 ) + printf_number_buffer::buffer_digits#20 = phi( printf_number_buffer::@6/printf_number_buffer::buffer_digits#3 ) + printf_number_buffer::format_upper_case#16 = phi( printf_number_buffer::@6/printf_number_buffer::format_upper_case#18 ) + printf_number_buffer::format_zero_padding#12 = phi( printf_number_buffer::@6/printf_number_buffer::format_zero_padding#18 ) + printf_number_buffer::format_justify_left#9 = phi( printf_number_buffer::@6/printf_number_buffer::format_justify_left#13 ) + printf_number_buffer::format_min_length#5 = phi( printf_number_buffer::@6/printf_number_buffer::format_min_length#7 ) + printf_number_buffer::buffer_sign#3 = phi( printf_number_buffer::@6/printf_number_buffer::buffer_sign#6 ) + strlen::return#4 = phi( printf_number_buffer::@6/strlen::return#2 ) + printf_number_buffer::$19 = strlen::return#4 + printf_number_buffer::len#0 = (signed byte)printf_number_buffer::$19 + printf_number_buffer::$29 = 0 != printf_number_buffer::buffer_sign#3 + printf_number_buffer::$20 = ! printf_number_buffer::$29 + if(printf_number_buffer::$20) goto printf_number_buffer::@13 + to:printf_number_buffer::@7 +printf_number_buffer::@13: scope:[printf_number_buffer] from printf_number_buffer::@15 printf_number_buffer::@7 + CONIO_SCREEN_BANK#58 = phi( printf_number_buffer::@15/CONIO_SCREEN_BANK#64, printf_number_buffer::@7/CONIO_SCREEN_BANK#65 ) + CONIO_SCREEN_TEXT#64 = phi( printf_number_buffer::@15/CONIO_SCREEN_TEXT#72, printf_number_buffer::@7/CONIO_SCREEN_TEXT#73 ) + printf_number_buffer::buffer_digits#17 = phi( printf_number_buffer::@15/printf_number_buffer::buffer_digits#20, printf_number_buffer::@7/printf_number_buffer::buffer_digits#21 ) + printf_number_buffer::format_upper_case#13 = phi( printf_number_buffer::@15/printf_number_buffer::format_upper_case#16, printf_number_buffer::@7/printf_number_buffer::format_upper_case#17 ) + printf_number_buffer::buffer_sign#10 = phi( printf_number_buffer::@15/printf_number_buffer::buffer_sign#3, printf_number_buffer::@7/printf_number_buffer::buffer_sign#13 ) + printf_number_buffer::format_zero_padding#7 = phi( printf_number_buffer::@15/printf_number_buffer::format_zero_padding#12, printf_number_buffer::@7/printf_number_buffer::format_zero_padding#13 ) + printf_number_buffer::format_justify_left#6 = phi( printf_number_buffer::@15/printf_number_buffer::format_justify_left#9, printf_number_buffer::@7/printf_number_buffer::format_justify_left#10 ) + printf_number_buffer::len#2 = phi( printf_number_buffer::@15/printf_number_buffer::len#0, printf_number_buffer::@7/printf_number_buffer::len#1 ) + printf_number_buffer::format_min_length#4 = phi( printf_number_buffer::@15/printf_number_buffer::format_min_length#5, printf_number_buffer::@7/printf_number_buffer::format_min_length#6 ) + printf_number_buffer::$25 = (signed byte)printf_number_buffer::format_min_length#4 + printf_number_buffer::$21 = printf_number_buffer::$25 - printf_number_buffer::len#2 + printf_number_buffer::padding#1 = printf_number_buffer::$21 + printf_number_buffer::$22 = printf_number_buffer::padding#1 < 0 + printf_number_buffer::$23 = ! printf_number_buffer::$22 + if(printf_number_buffer::$23) goto printf_number_buffer::@1 + to:printf_number_buffer::@14 +printf_number_buffer::@7: scope:[printf_number_buffer] from printf_number_buffer::@15 + CONIO_SCREEN_BANK#65 = phi( printf_number_buffer::@15/CONIO_SCREEN_BANK#64 ) + CONIO_SCREEN_TEXT#73 = phi( printf_number_buffer::@15/CONIO_SCREEN_TEXT#72 ) + printf_number_buffer::buffer_digits#21 = phi( printf_number_buffer::@15/printf_number_buffer::buffer_digits#20 ) + printf_number_buffer::format_upper_case#17 = phi( printf_number_buffer::@15/printf_number_buffer::format_upper_case#16 ) + printf_number_buffer::buffer_sign#13 = phi( printf_number_buffer::@15/printf_number_buffer::buffer_sign#3 ) + printf_number_buffer::format_zero_padding#13 = phi( printf_number_buffer::@15/printf_number_buffer::format_zero_padding#12 ) + printf_number_buffer::format_justify_left#10 = phi( printf_number_buffer::@15/printf_number_buffer::format_justify_left#9 ) + printf_number_buffer::format_min_length#6 = phi( printf_number_buffer::@15/printf_number_buffer::format_min_length#5 ) + printf_number_buffer::len#3 = phi( printf_number_buffer::@15/printf_number_buffer::len#0 ) + printf_number_buffer::len#1 = ++ printf_number_buffer::len#3 + to:printf_number_buffer::@13 +printf_number_buffer::@14: scope:[printf_number_buffer] from printf_number_buffer::@13 + CONIO_SCREEN_BANK#59 = phi( printf_number_buffer::@13/CONIO_SCREEN_BANK#58 ) + CONIO_SCREEN_TEXT#65 = phi( printf_number_buffer::@13/CONIO_SCREEN_TEXT#64 ) + printf_number_buffer::buffer_digits#18 = phi( printf_number_buffer::@13/printf_number_buffer::buffer_digits#17 ) + printf_number_buffer::format_upper_case#14 = phi( printf_number_buffer::@13/printf_number_buffer::format_upper_case#13 ) + printf_number_buffer::buffer_sign#11 = phi( printf_number_buffer::@13/printf_number_buffer::buffer_sign#10 ) + printf_number_buffer::format_zero_padding#8 = phi( printf_number_buffer::@13/printf_number_buffer::format_zero_padding#7 ) + printf_number_buffer::format_justify_left#7 = phi( printf_number_buffer::@13/printf_number_buffer::format_justify_left#6 ) + printf_number_buffer::padding#2 = 0 + to:printf_number_buffer::@1 +printf_number_buffer::@2: scope:[printf_number_buffer] from printf_number_buffer::@1 printf_number_buffer::@16 + CONIO_SCREEN_BANK#34 = phi( printf_number_buffer::@1/CONIO_SCREEN_BANK#41, printf_number_buffer::@16/CONIO_SCREEN_BANK#42 ) + printf_number_buffer::format_justify_left#18 = phi( printf_number_buffer::@1/printf_number_buffer::format_justify_left#3, printf_number_buffer::@16/printf_number_buffer::format_justify_left#20 ) + CONIO_SCREEN_TEXT#38 = phi( printf_number_buffer::@1/CONIO_SCREEN_TEXT#46, printf_number_buffer::@16/CONIO_SCREEN_TEXT#47 ) + printf_number_buffer::buffer_digits#12 = phi( printf_number_buffer::@1/printf_number_buffer::buffer_digits#14, printf_number_buffer::@16/printf_number_buffer::buffer_digits#15 ) + printf_number_buffer::format_upper_case#7 = phi( printf_number_buffer::@1/printf_number_buffer::format_upper_case#9, printf_number_buffer::@16/printf_number_buffer::format_upper_case#10 ) + printf_number_buffer::padding#10 = phi( printf_number_buffer::@1/printf_number_buffer::padding#3, printf_number_buffer::@16/printf_number_buffer::padding#12 ) + printf_number_buffer::format_zero_padding#10 = phi( printf_number_buffer::@1/printf_number_buffer::format_zero_padding#3, printf_number_buffer::@16/printf_number_buffer::format_zero_padding#14 ) + printf_number_buffer::buffer_sign#4 = phi( printf_number_buffer::@1/printf_number_buffer::buffer_sign#7, printf_number_buffer::@16/printf_number_buffer::buffer_sign#8 ) + printf_number_buffer::$30 = 0 != printf_number_buffer::buffer_sign#4 + printf_number_buffer::$7 = ! printf_number_buffer::$30 + if(printf_number_buffer::$7) goto printf_number_buffer::@3 + to:printf_number_buffer::@9 +printf_number_buffer::@8: scope:[printf_number_buffer] from printf_number_buffer::@1 + printf_number_buffer::format_justify_left#22 = phi( printf_number_buffer::@1/printf_number_buffer::format_justify_left#3 ) + CONIO_SCREEN_BANK#56 = phi( printf_number_buffer::@1/CONIO_SCREEN_BANK#41 ) + printf_number_buffer::buffer_digits#19 = phi( printf_number_buffer::@1/printf_number_buffer::buffer_digits#14 ) + CONIO_SCREEN_TEXT#62 = phi( printf_number_buffer::@1/CONIO_SCREEN_TEXT#46 ) + printf_number_buffer::format_upper_case#15 = phi( printf_number_buffer::@1/printf_number_buffer::format_upper_case#9 ) + printf_number_buffer::format_zero_padding#19 = phi( printf_number_buffer::@1/printf_number_buffer::format_zero_padding#3 ) + printf_number_buffer::buffer_sign#12 = phi( printf_number_buffer::@1/printf_number_buffer::buffer_sign#7 ) + printf_number_buffer::padding#4 = phi( printf_number_buffer::@1/printf_number_buffer::padding#3 ) + printf_padding::pad#0 = ' ' + printf_padding::length#0 = (byte)printf_number_buffer::padding#4 + call printf_padding + to:printf_number_buffer::@16 +printf_number_buffer::@16: scope:[printf_number_buffer] from printf_number_buffer::@8 + CONIO_SCREEN_BANK#42 = phi( printf_number_buffer::@8/CONIO_SCREEN_BANK#56 ) + printf_number_buffer::format_justify_left#20 = phi( printf_number_buffer::@8/printf_number_buffer::format_justify_left#22 ) + CONIO_SCREEN_TEXT#47 = phi( printf_number_buffer::@8/CONIO_SCREEN_TEXT#62 ) + printf_number_buffer::buffer_digits#15 = phi( printf_number_buffer::@8/printf_number_buffer::buffer_digits#19 ) + printf_number_buffer::format_upper_case#10 = phi( printf_number_buffer::@8/printf_number_buffer::format_upper_case#15 ) + printf_number_buffer::padding#12 = phi( printf_number_buffer::@8/printf_number_buffer::padding#4 ) + printf_number_buffer::format_zero_padding#14 = phi( printf_number_buffer::@8/printf_number_buffer::format_zero_padding#19 ) + printf_number_buffer::buffer_sign#8 = phi( printf_number_buffer::@8/printf_number_buffer::buffer_sign#12 ) + to:printf_number_buffer::@2 +printf_number_buffer::@3: scope:[printf_number_buffer] from printf_number_buffer::@17 printf_number_buffer::@2 + CONIO_SCREEN_BANK#66 = phi( printf_number_buffer::@17/CONIO_SCREEN_BANK#83, printf_number_buffer::@2/CONIO_SCREEN_BANK#34 ) + CONIO_SCREEN_TEXT#74 = phi( printf_number_buffer::@17/CONIO_SCREEN_TEXT#94, printf_number_buffer::@2/CONIO_SCREEN_TEXT#38 ) + printf_number_buffer::format_justify_left#15 = phi( printf_number_buffer::@17/printf_number_buffer::format_justify_left#17, printf_number_buffer::@2/printf_number_buffer::format_justify_left#18 ) + printf_number_buffer::buffer_digits#10 = phi( printf_number_buffer::@17/printf_number_buffer::buffer_digits#11, printf_number_buffer::@2/printf_number_buffer::buffer_digits#12 ) + printf_number_buffer::format_upper_case#5 = phi( printf_number_buffer::@17/printf_number_buffer::format_upper_case#6, printf_number_buffer::@2/printf_number_buffer::format_upper_case#7 ) + printf_number_buffer::padding#5 = phi( printf_number_buffer::@17/printf_number_buffer::padding#9, printf_number_buffer::@2/printf_number_buffer::padding#10 ) + printf_number_buffer::format_zero_padding#4 = phi( printf_number_buffer::@17/printf_number_buffer::format_zero_padding#9, printf_number_buffer::@2/printf_number_buffer::format_zero_padding#10 ) + printf_number_buffer::$9 = printf_number_buffer::format_zero_padding#4 && printf_number_buffer::padding#5 + printf_number_buffer::$10 = ! printf_number_buffer::$9 + if(printf_number_buffer::$10) goto printf_number_buffer::@4 + to:printf_number_buffer::@10 +printf_number_buffer::@9: scope:[printf_number_buffer] from printf_number_buffer::@2 + printf_number_buffer::format_justify_left#21 = phi( printf_number_buffer::@2/printf_number_buffer::format_justify_left#18 ) + printf_number_buffer::buffer_digits#16 = phi( printf_number_buffer::@2/printf_number_buffer::buffer_digits#12 ) + printf_number_buffer::format_upper_case#11 = phi( printf_number_buffer::@2/printf_number_buffer::format_upper_case#7 ) + CONIO_SCREEN_BANK#27 = phi( printf_number_buffer::@2/CONIO_SCREEN_BANK#34 ) + printf_number_buffer::padding#13 = phi( printf_number_buffer::@2/printf_number_buffer::padding#10 ) + printf_number_buffer::format_zero_padding#15 = phi( printf_number_buffer::@2/printf_number_buffer::format_zero_padding#10 ) + CONIO_SCREEN_TEXT#25 = phi( printf_number_buffer::@2/CONIO_SCREEN_TEXT#38 ) + printf_number_buffer::buffer_sign#5 = phi( printf_number_buffer::@2/printf_number_buffer::buffer_sign#4 ) + cputc::c#2 = printf_number_buffer::buffer_sign#5 + call cputc + to:printf_number_buffer::@17 +printf_number_buffer::@17: scope:[printf_number_buffer] from printf_number_buffer::@9 + CONIO_SCREEN_BANK#83 = phi( printf_number_buffer::@9/CONIO_SCREEN_BANK#27 ) + CONIO_SCREEN_TEXT#94 = phi( printf_number_buffer::@9/CONIO_SCREEN_TEXT#25 ) + printf_number_buffer::format_justify_left#17 = phi( printf_number_buffer::@9/printf_number_buffer::format_justify_left#21 ) + printf_number_buffer::buffer_digits#11 = phi( printf_number_buffer::@9/printf_number_buffer::buffer_digits#16 ) + printf_number_buffer::format_upper_case#6 = phi( printf_number_buffer::@9/printf_number_buffer::format_upper_case#11 ) + printf_number_buffer::padding#9 = phi( printf_number_buffer::@9/printf_number_buffer::padding#13 ) + printf_number_buffer::format_zero_padding#9 = phi( printf_number_buffer::@9/printf_number_buffer::format_zero_padding#15 ) + to:printf_number_buffer::@3 +printf_number_buffer::@4: scope:[printf_number_buffer] from printf_number_buffer::@18 printf_number_buffer::@3 + CONIO_SCREEN_BANK#68 = phi( printf_number_buffer::@18/CONIO_SCREEN_BANK#84, printf_number_buffer::@3/CONIO_SCREEN_BANK#66 ) + CONIO_SCREEN_TEXT#76 = phi( printf_number_buffer::@18/CONIO_SCREEN_TEXT#95, printf_number_buffer::@3/CONIO_SCREEN_TEXT#74 ) + printf_number_buffer::padding#15 = phi( printf_number_buffer::@18/printf_number_buffer::padding#16, printf_number_buffer::@3/printf_number_buffer::padding#5 ) + printf_number_buffer::format_justify_left#12 = phi( printf_number_buffer::@18/printf_number_buffer::format_justify_left#14, printf_number_buffer::@3/printf_number_buffer::format_justify_left#15 ) + printf_number_buffer::format_zero_padding#17 = phi( printf_number_buffer::@18/printf_number_buffer::format_zero_padding#20, printf_number_buffer::@3/printf_number_buffer::format_zero_padding#4 ) + printf_number_buffer::buffer_digits#8 = phi( printf_number_buffer::@18/printf_number_buffer::buffer_digits#9, printf_number_buffer::@3/printf_number_buffer::buffer_digits#10 ) + printf_number_buffer::format_upper_case#3 = phi( printf_number_buffer::@18/printf_number_buffer::format_upper_case#4, printf_number_buffer::@3/printf_number_buffer::format_upper_case#5 ) + printf_number_buffer::$31 = 0 != printf_number_buffer::format_upper_case#3 + printf_number_buffer::$12 = ! printf_number_buffer::$31 + if(printf_number_buffer::$12) goto printf_number_buffer::@5 + to:printf_number_buffer::@11 +printf_number_buffer::@10: scope:[printf_number_buffer] from printf_number_buffer::@3 + CONIO_SCREEN_BANK#54 = phi( printf_number_buffer::@3/CONIO_SCREEN_BANK#66 ) + CONIO_SCREEN_TEXT#60 = phi( printf_number_buffer::@3/CONIO_SCREEN_TEXT#74 ) + printf_number_buffer::format_justify_left#19 = phi( printf_number_buffer::@3/printf_number_buffer::format_justify_left#15 ) + printf_number_buffer::format_zero_padding#22 = phi( printf_number_buffer::@3/printf_number_buffer::format_zero_padding#4 ) + printf_number_buffer::buffer_digits#13 = phi( printf_number_buffer::@3/printf_number_buffer::buffer_digits#10 ) + printf_number_buffer::format_upper_case#8 = phi( printf_number_buffer::@3/printf_number_buffer::format_upper_case#5 ) + printf_number_buffer::padding#6 = phi( printf_number_buffer::@3/printf_number_buffer::padding#5 ) + printf_padding::pad#1 = '0' + printf_padding::length#1 = (byte)printf_number_buffer::padding#6 + call printf_padding + to:printf_number_buffer::@18 +printf_number_buffer::@18: scope:[printf_number_buffer] from printf_number_buffer::@10 + CONIO_SCREEN_BANK#84 = phi( printf_number_buffer::@10/CONIO_SCREEN_BANK#54 ) + CONIO_SCREEN_TEXT#95 = phi( printf_number_buffer::@10/CONIO_SCREEN_TEXT#60 ) + printf_number_buffer::padding#16 = phi( printf_number_buffer::@10/printf_number_buffer::padding#6 ) + printf_number_buffer::format_justify_left#14 = phi( printf_number_buffer::@10/printf_number_buffer::format_justify_left#19 ) + printf_number_buffer::format_zero_padding#20 = phi( printf_number_buffer::@10/printf_number_buffer::format_zero_padding#22 ) + printf_number_buffer::buffer_digits#9 = phi( printf_number_buffer::@10/printf_number_buffer::buffer_digits#13 ) + printf_number_buffer::format_upper_case#4 = phi( printf_number_buffer::@10/printf_number_buffer::format_upper_case#8 ) + to:printf_number_buffer::@4 +printf_number_buffer::@5: scope:[printf_number_buffer] from printf_number_buffer::@20 printf_number_buffer::@4 + CONIO_SCREEN_BANK#52 = phi( printf_number_buffer::@20/CONIO_SCREEN_BANK#67, printf_number_buffer::@4/CONIO_SCREEN_BANK#68 ) + CONIO_SCREEN_TEXT#58 = phi( printf_number_buffer::@20/CONIO_SCREEN_TEXT#75, printf_number_buffer::@4/CONIO_SCREEN_TEXT#76 ) + printf_number_buffer::padding#11 = phi( printf_number_buffer::@20/printf_number_buffer::padding#14, printf_number_buffer::@4/printf_number_buffer::padding#15 ) + printf_number_buffer::format_justify_left#8 = phi( printf_number_buffer::@20/printf_number_buffer::format_justify_left#11, printf_number_buffer::@4/printf_number_buffer::format_justify_left#12 ) + printf_number_buffer::format_zero_padding#11 = phi( printf_number_buffer::@20/printf_number_buffer::format_zero_padding#16, printf_number_buffer::@4/printf_number_buffer::format_zero_padding#17 ) + printf_number_buffer::buffer_digits#4 = phi( printf_number_buffer::@20/printf_number_buffer::buffer_digits#7, printf_number_buffer::@4/printf_number_buffer::buffer_digits#8 ) + cputs::s#1 = printf_number_buffer::buffer_digits#4 + call cputs + to:printf_number_buffer::@19 +printf_number_buffer::@19: scope:[printf_number_buffer] from printf_number_buffer::@5 + CONIO_SCREEN_BANK#69 = phi( printf_number_buffer::@5/CONIO_SCREEN_BANK#52 ) + CONIO_SCREEN_TEXT#77 = phi( printf_number_buffer::@5/CONIO_SCREEN_TEXT#58 ) + printf_number_buffer::padding#7 = phi( printf_number_buffer::@5/printf_number_buffer::padding#11 ) + printf_number_buffer::format_justify_left#4 = phi( printf_number_buffer::@5/printf_number_buffer::format_justify_left#8 ) + printf_number_buffer::format_zero_padding#5 = phi( printf_number_buffer::@5/printf_number_buffer::format_zero_padding#11 ) + printf_number_buffer::$32 = 0 != printf_number_buffer::format_zero_padding#5 + printf_number_buffer::$14 = ! printf_number_buffer::$32 + printf_number_buffer::$15 = printf_number_buffer::format_justify_left#4 && printf_number_buffer::$14 + printf_number_buffer::$16 = printf_number_buffer::$15 && printf_number_buffer::padding#7 + printf_number_buffer::$17 = ! printf_number_buffer::$16 + if(printf_number_buffer::$17) goto printf_number_buffer::@return + to:printf_number_buffer::@12 +printf_number_buffer::@11: scope:[printf_number_buffer] from printf_number_buffer::@4 + CONIO_SCREEN_BANK#85 = phi( printf_number_buffer::@4/CONIO_SCREEN_BANK#68 ) + CONIO_SCREEN_TEXT#96 = phi( printf_number_buffer::@4/CONIO_SCREEN_TEXT#76 ) + printf_number_buffer::padding#17 = phi( printf_number_buffer::@4/printf_number_buffer::padding#15 ) + printf_number_buffer::format_justify_left#16 = phi( printf_number_buffer::@4/printf_number_buffer::format_justify_left#12 ) + printf_number_buffer::format_zero_padding#21 = phi( printf_number_buffer::@4/printf_number_buffer::format_zero_padding#17 ) + printf_number_buffer::buffer_digits#5 = phi( printf_number_buffer::@4/printf_number_buffer::buffer_digits#8 ) + strupr::str#0 = printf_number_buffer::buffer_digits#5 + call strupr + strupr::return#2 = strupr::return#1 + to:printf_number_buffer::@20 +printf_number_buffer::@20: scope:[printf_number_buffer] from printf_number_buffer::@11 + CONIO_SCREEN_BANK#67 = phi( printf_number_buffer::@11/CONIO_SCREEN_BANK#85 ) + CONIO_SCREEN_TEXT#75 = phi( printf_number_buffer::@11/CONIO_SCREEN_TEXT#96 ) + printf_number_buffer::padding#14 = phi( printf_number_buffer::@11/printf_number_buffer::padding#17 ) + printf_number_buffer::format_justify_left#11 = phi( printf_number_buffer::@11/printf_number_buffer::format_justify_left#16 ) + printf_number_buffer::format_zero_padding#16 = phi( printf_number_buffer::@11/printf_number_buffer::format_zero_padding#21 ) + printf_number_buffer::buffer_digits#7 = phi( printf_number_buffer::@11/printf_number_buffer::buffer_digits#5 ) + to:printf_number_buffer::@5 +printf_number_buffer::@12: scope:[printf_number_buffer] from printf_number_buffer::@19 + CONIO_SCREEN_BANK#55 = phi( printf_number_buffer::@19/CONIO_SCREEN_BANK#69 ) + CONIO_SCREEN_TEXT#61 = phi( printf_number_buffer::@19/CONIO_SCREEN_TEXT#77 ) + printf_number_buffer::padding#8 = phi( printf_number_buffer::@19/printf_number_buffer::padding#7 ) + printf_padding::pad#2 = ' ' + printf_padding::length#2 = (byte)printf_number_buffer::padding#8 + call printf_padding + to:printf_number_buffer::@21 +printf_number_buffer::@21: scope:[printf_number_buffer] from printf_number_buffer::@12 + to:printf_number_buffer::@return +printf_number_buffer::@return: scope:[printf_number_buffer] from printf_number_buffer::@19 printf_number_buffer::@21 + return + to:@return + +void main() +main: scope:[main] from __start::@1 + CONIO_SCREEN_BANK#86 = phi( __start::@1/CONIO_SCREEN_BANK#22 ) + CONIO_SCREEN_TEXT#97 = phi( __start::@1/CONIO_SCREEN_TEXT#30 ) + main::num#0 = (dword)$40*$40*2 + main::src1#0 = 0 + to:main::@1 +main::@1: scope:[main] from main main::@17 + CONIO_SCREEN_BANK#70 = phi( main/CONIO_SCREEN_BANK#86, main::@17/CONIO_SCREEN_BANK#87 ) + CONIO_SCREEN_TEXT#78 = phi( main/CONIO_SCREEN_TEXT#97, main::@17/CONIO_SCREEN_TEXT#98 ) + main::num#5 = phi( main/main::num#0, main::@17/main::num#1 ) + main::src1#2 = phi( main/main::src1#0, main::@17/main::src1#1 ) + main::$0 = main::src1#2 < $3f000 + if(main::$0) goto main::@2 + to:main::@return +main::@2: scope:[main] from main::@1 + CONIO_SCREEN_BANK#48 = phi( main::@1/CONIO_SCREEN_BANK#70 ) + CONIO_SCREEN_TEXT#54 = phi( main::@1/CONIO_SCREEN_TEXT#78 ) + main::num#2 = phi( main::@1/main::num#5 ) + main::src1#3 = phi( main::@1/main::src1#2 ) + main::calcbeg#0 = main::src1#3 + main::$1 = main::src1#3 + main::num#2 + main::$2 = main::$1 + -1 + main::calcend#0 = main::$2 + main::$3 = > main::calcbeg#0 + main::$4 = main::$3 << 8 + main::$5 = < main::$4 + main::$6 = < main::calcbeg#0 + main::$7 = > main::$6 + main::$30 = (word)main::$5 + main::$8 = main::$30 | main::$7 + main::$9 = main::$8 >> 5 + main::$10 = > main::calcbeg#0 + main::$11 = main::$10 << 3 + main::$12 = < main::$11 + main::$31 = (word)main::$12 + main::$13 = main::$9 + main::$31 + main::bankbeg#0 = (byte)main::$13 + main::$14 = > main::calcend#0 + main::$15 = main::$14 << 8 + main::$16 = < main::$15 + main::$17 = < main::calcend#0 + main::$18 = > main::$17 + main::$32 = (word)main::$16 + main::$19 = main::$32 | main::$18 + main::$20 = main::$19 >> 5 + main::$21 = > main::calcend#0 + main::$22 = main::$21 << 3 + main::$23 = < main::$22 + main::$33 = (word)main::$23 + main::$24 = main::$20 + main::$33 + main::bankend#0 = (byte)main::$24 + main::$25 = < main::calcbeg#0 + main::$26 = main::$25 & $1fff + main::beg#0 = main::$26 + main::$27 = < main::calcend#0 + main::$28 = main::$27 & $1fff + main::end#0 = main::$28 + main::beg#1 = main::beg#0 + main::borderbeg + main::end#1 = main::end#0 + main::borderbeg + cputs::s#2 = main::s + call cputs + to:main::@3 +main::@3: scope:[main] from main::@2 + main::src1#18 = phi( main::@2/main::src1#3 ) + main::end#14 = phi( main::@2/main::end#1 ) + main::beg#12 = phi( main::@2/main::beg#1 ) + main::bankend#9 = phi( main::@2/main::bankend#0 ) + CONIO_SCREEN_BANK#71 = phi( main::@2/CONIO_SCREEN_BANK#48 ) + main::bankbeg#7 = phi( main::@2/main::bankbeg#0 ) + CONIO_SCREEN_TEXT#79 = phi( main::@2/CONIO_SCREEN_TEXT#54 ) + main::calcend#5 = phi( main::@2/main::calcend#0 ) + main::num#8 = phi( main::@2/main::num#2 ) + main::calcbeg#1 = phi( main::@2/main::calcbeg#0 ) + printf_ulong::uvalue#0 = main::calcbeg#1 + printf_ulong::format_min_length#0 = 0 + printf_ulong::format_justify_left#0 = 0 + printf_ulong::format_sign_always#0 = 0 + printf_ulong::format_zero_padding#0 = 0 + printf_ulong::format_upper_case#0 = 0 + printf_ulong::format_radix#0 = HEXADECIMAL + call printf_ulong + to:main::@4 +main::@4: scope:[main] from main::@3 + main::src1#17 = phi( main::@3/main::src1#18 ) + main::end#13 = phi( main::@3/main::end#14 ) + main::beg#11 = phi( main::@3/main::beg#12 ) + main::bankend#8 = phi( main::@3/main::bankend#9 ) + CONIO_SCREEN_BANK#49 = phi( main::@3/CONIO_SCREEN_BANK#71 ) + main::bankbeg#6 = phi( main::@3/main::bankbeg#7 ) + CONIO_SCREEN_TEXT#55 = phi( main::@3/CONIO_SCREEN_TEXT#79 ) + main::calcend#4 = phi( main::@3/main::calcend#5 ) + main::num#6 = phi( main::@3/main::num#8 ) + cputs::s#3 = main::s1 + call cputs + to:main::@5 +main::@5: scope:[main] from main::@4 + main::src1#16 = phi( main::@4/main::src1#17 ) + main::end#12 = phi( main::@4/main::end#13 ) + main::beg#10 = phi( main::@4/main::beg#11 ) + CONIO_SCREEN_BANK#72 = phi( main::@4/CONIO_SCREEN_BANK#49 ) + main::bankend#7 = phi( main::@4/main::bankend#8 ) + CONIO_SCREEN_TEXT#80 = phi( main::@4/CONIO_SCREEN_TEXT#55 ) + main::bankbeg#5 = phi( main::@4/main::bankbeg#6 ) + main::calcend#3 = phi( main::@4/main::calcend#4 ) + main::num#3 = phi( main::@4/main::num#6 ) + printf_ulong::uvalue#1 = main::num#3 + printf_ulong::format_min_length#1 = 0 + printf_ulong::format_justify_left#1 = 0 + printf_ulong::format_sign_always#1 = 0 + printf_ulong::format_zero_padding#1 = 0 + printf_ulong::format_upper_case#1 = 0 + printf_ulong::format_radix#1 = HEXADECIMAL + call printf_ulong + to:main::@6 +main::@6: scope:[main] from main::@5 + main::src1#15 = phi( main::@5/main::src1#16 ) + main::num#18 = phi( main::@5/main::num#3 ) + main::end#11 = phi( main::@5/main::end#12 ) + main::beg#9 = phi( main::@5/main::beg#10 ) + CONIO_SCREEN_BANK#50 = phi( main::@5/CONIO_SCREEN_BANK#72 ) + main::bankend#6 = phi( main::@5/main::bankend#7 ) + CONIO_SCREEN_TEXT#56 = phi( main::@5/CONIO_SCREEN_TEXT#80 ) + main::bankbeg#4 = phi( main::@5/main::bankbeg#5 ) + main::calcend#2 = phi( main::@5/main::calcend#3 ) + cputs::s#4 = main::s2 + call cputs + to:main::@7 +main::@7: scope:[main] from main::@6 + main::src1#14 = phi( main::@6/main::src1#15 ) + main::num#17 = phi( main::@6/main::num#18 ) + main::end#10 = phi( main::@6/main::end#11 ) + CONIO_SCREEN_BANK#73 = phi( main::@6/CONIO_SCREEN_BANK#50 ) + main::beg#8 = phi( main::@6/main::beg#9 ) + CONIO_SCREEN_TEXT#81 = phi( main::@6/CONIO_SCREEN_TEXT#56 ) + main::bankend#5 = phi( main::@6/main::bankend#6 ) + main::bankbeg#3 = phi( main::@6/main::bankbeg#4 ) + main::calcend#1 = phi( main::@6/main::calcend#2 ) + printf_ulong::uvalue#2 = main::calcend#1 + printf_ulong::format_min_length#2 = 0 + printf_ulong::format_justify_left#2 = 0 + printf_ulong::format_sign_always#2 = 0 + printf_ulong::format_zero_padding#2 = 0 + printf_ulong::format_upper_case#2 = 0 + printf_ulong::format_radix#2 = HEXADECIMAL + call printf_ulong + to:main::@8 +main::@8: scope:[main] from main::@7 + main::src1#13 = phi( main::@7/main::src1#14 ) + main::num#16 = phi( main::@7/main::num#17 ) + main::end#9 = phi( main::@7/main::end#10 ) + CONIO_SCREEN_BANK#51 = phi( main::@7/CONIO_SCREEN_BANK#73 ) + main::beg#7 = phi( main::@7/main::beg#8 ) + CONIO_SCREEN_TEXT#57 = phi( main::@7/CONIO_SCREEN_TEXT#81 ) + main::bankend#4 = phi( main::@7/main::bankend#5 ) + main::bankbeg#2 = phi( main::@7/main::bankbeg#3 ) + cputs::s#5 = main::s3 + call cputs + to:main::@9 +main::@9: scope:[main] from main::@8 + main::src1#12 = phi( main::@8/main::src1#13 ) + main::num#15 = phi( main::@8/main::num#16 ) + CONIO_SCREEN_BANK#74 = phi( main::@8/CONIO_SCREEN_BANK#51 ) + main::end#8 = phi( main::@8/main::end#9 ) + CONIO_SCREEN_TEXT#82 = phi( main::@8/CONIO_SCREEN_TEXT#57 ) + main::beg#6 = phi( main::@8/main::beg#7 ) + main::bankend#3 = phi( main::@8/main::bankend#4 ) + main::bankbeg#1 = phi( main::@8/main::bankbeg#2 ) + printf_uchar::uvalue#0 = main::bankbeg#1 + printf_uchar::format_min_length#0 = 0 + printf_uchar::format_justify_left#0 = 0 + printf_uchar::format_sign_always#0 = 0 + printf_uchar::format_zero_padding#0 = 0 + printf_uchar::format_upper_case#0 = 0 + printf_uchar::format_radix#0 = HEXADECIMAL + call printf_uchar + to:main::@10 +main::@10: scope:[main] from main::@9 + main::src1#11 = phi( main::@9/main::src1#12 ) + main::num#14 = phi( main::@9/main::num#15 ) + CONIO_SCREEN_BANK#44 = phi( main::@9/CONIO_SCREEN_BANK#74 ) + main::end#7 = phi( main::@9/main::end#8 ) + CONIO_SCREEN_TEXT#50 = phi( main::@9/CONIO_SCREEN_TEXT#82 ) + main::beg#5 = phi( main::@9/main::beg#6 ) + main::bankend#2 = phi( main::@9/main::bankend#3 ) + cputs::s#6 = main::s4 + call cputs + to:main::@11 +main::@11: scope:[main] from main::@10 + CONIO_SCREEN_BANK#75 = phi( main::@10/CONIO_SCREEN_BANK#44 ) + main::src1#10 = phi( main::@10/main::src1#11 ) + main::num#13 = phi( main::@10/main::num#14 ) + CONIO_SCREEN_TEXT#83 = phi( main::@10/CONIO_SCREEN_TEXT#50 ) + main::end#6 = phi( main::@10/main::end#7 ) + main::beg#4 = phi( main::@10/main::beg#5 ) + main::bankend#1 = phi( main::@10/main::bankend#2 ) + printf_uchar::uvalue#1 = main::bankend#1 + printf_uchar::format_min_length#1 = 0 + printf_uchar::format_justify_left#1 = 0 + printf_uchar::format_sign_always#1 = 0 + printf_uchar::format_zero_padding#1 = 0 + printf_uchar::format_upper_case#1 = 0 + printf_uchar::format_radix#1 = HEXADECIMAL + call printf_uchar + to:main::@12 +main::@12: scope:[main] from main::@11 + CONIO_SCREEN_BANK#45 = phi( main::@11/CONIO_SCREEN_BANK#75 ) + main::src1#9 = phi( main::@11/main::src1#10 ) + main::num#12 = phi( main::@11/main::num#13 ) + CONIO_SCREEN_TEXT#51 = phi( main::@11/CONIO_SCREEN_TEXT#83 ) + main::end#5 = phi( main::@11/main::end#6 ) + main::beg#3 = phi( main::@11/main::beg#4 ) + cputs::s#7 = main::s5 + call cputs + to:main::@13 +main::@13: scope:[main] from main::@12 + CONIO_SCREEN_BANK#76 = phi( main::@12/CONIO_SCREEN_BANK#45 ) + CONIO_SCREEN_TEXT#84 = phi( main::@12/CONIO_SCREEN_TEXT#51 ) + main::src1#8 = phi( main::@12/main::src1#9 ) + main::num#11 = phi( main::@12/main::num#12 ) + main::end#4 = phi( main::@12/main::end#5 ) + main::beg#2 = phi( main::@12/main::beg#3 ) + printf_uint::uvalue#0 = main::beg#2 + printf_uint::format_min_length#0 = 0 + printf_uint::format_justify_left#0 = 0 + printf_uint::format_sign_always#0 = 0 + printf_uint::format_zero_padding#0 = 0 + printf_uint::format_upper_case#0 = 0 + printf_uint::format_radix#0 = HEXADECIMAL + call printf_uint + to:main::@14 +main::@14: scope:[main] from main::@13 + CONIO_SCREEN_BANK#46 = phi( main::@13/CONIO_SCREEN_BANK#76 ) + CONIO_SCREEN_TEXT#52 = phi( main::@13/CONIO_SCREEN_TEXT#84 ) + main::src1#7 = phi( main::@13/main::src1#8 ) + main::num#10 = phi( main::@13/main::num#11 ) + main::end#3 = phi( main::@13/main::end#4 ) + cputs::s#8 = main::s6 + call cputs + to:main::@15 +main::@15: scope:[main] from main::@14 + CONIO_SCREEN_BANK#77 = phi( main::@14/CONIO_SCREEN_BANK#46 ) + CONIO_SCREEN_TEXT#85 = phi( main::@14/CONIO_SCREEN_TEXT#52 ) + main::src1#6 = phi( main::@14/main::src1#7 ) + main::num#9 = phi( main::@14/main::num#10 ) + main::end#2 = phi( main::@14/main::end#3 ) + printf_uint::uvalue#1 = main::end#2 + printf_uint::format_min_length#1 = 0 + printf_uint::format_justify_left#1 = 0 + printf_uint::format_sign_always#1 = 0 + printf_uint::format_zero_padding#1 = 0 + printf_uint::format_upper_case#1 = 0 + printf_uint::format_radix#1 = HEXADECIMAL + call printf_uint + to:main::@16 +main::@16: scope:[main] from main::@15 + CONIO_SCREEN_BANK#47 = phi( main::@15/CONIO_SCREEN_BANK#77 ) + CONIO_SCREEN_TEXT#53 = phi( main::@15/CONIO_SCREEN_TEXT#85 ) + main::src1#5 = phi( main::@15/main::src1#6 ) + main::num#7 = phi( main::@15/main::num#9 ) + cputs::s#9 = main::s7 + call cputs + to:main::@17 +main::@17: scope:[main] from main::@16 + CONIO_SCREEN_BANK#87 = phi( main::@16/CONIO_SCREEN_BANK#47 ) + CONIO_SCREEN_TEXT#98 = phi( main::@16/CONIO_SCREEN_TEXT#53 ) + main::src1#4 = phi( main::@16/main::src1#5 ) + main::num#4 = phi( main::@16/main::num#7 ) + main::num#1 = main::num#4 + main::inc + main::src1#1 = main::src1#4 + main::num#1 + to:main::@1 +main::@return: scope:[main] from main::@1 + return + to:@return + +void __start() +__start: scope:[__start] from + to:__start::__init1 +__start::__init1: scope:[__start] from __start + CONIO_SCREEN_TEXT#4 = DEFAULT_SCREEN + CONIO_SCREEN_BANK#4 = 0 + conio_screen_width = 0 + conio_screen_height = 0 + conio_screen_layer = 1 + conio_width = 0 + conio_height = 0 + conio_rowshift = 0 + conio_rowskip = 0 + call conio_x16_init + to:__start::@2 +__start::@2: scope:[__start] from __start::__init1 + CONIO_SCREEN_TEXT#13 = phi( __start::__init1/CONIO_SCREEN_TEXT#1 ) + CONIO_SCREEN_BANK#11 = phi( __start::__init1/CONIO_SCREEN_BANK#1 ) + CONIO_SCREEN_BANK#5 = CONIO_SCREEN_BANK#11 + CONIO_SCREEN_TEXT#5 = CONIO_SCREEN_TEXT#13 + to:__start::@1 +__start::@1: scope:[__start] from __start::@2 + CONIO_SCREEN_BANK#22 = phi( __start::@2/CONIO_SCREEN_BANK#5 ) + CONIO_SCREEN_TEXT#30 = phi( __start::@2/CONIO_SCREEN_TEXT#5 ) + call main + to:__start::@3 +__start::@3: scope:[__start] from __start::@1 + CONIO_SCREEN_BANK#17 = phi( __start::@1/CONIO_SCREEN_BANK#22 ) + CONIO_SCREEN_TEXT#21 = phi( __start::@1/CONIO_SCREEN_TEXT#30 ) + to:__start::@return +__start::@return: scope:[__start] from __start::@3 + CONIO_SCREEN_BANK#12 = phi( __start::@3/CONIO_SCREEN_BANK#17 ) + CONIO_SCREEN_TEXT#14 = phi( __start::@3/CONIO_SCREEN_TEXT#21 ) + CONIO_SCREEN_TEXT#6 = CONIO_SCREEN_TEXT#14 + CONIO_SCREEN_BANK#6 = CONIO_SCREEN_BANK#12 + return + to:@return + +SYMBOL TABLE SSA +const byte BINARY = 2 +const nomodify byte BLUE = 6 +byte CONIO_SCREEN_BANK +byte CONIO_SCREEN_BANK#0 +byte CONIO_SCREEN_BANK#1 +byte CONIO_SCREEN_BANK#10 +byte CONIO_SCREEN_BANK#11 +byte CONIO_SCREEN_BANK#12 +byte CONIO_SCREEN_BANK#13 +byte CONIO_SCREEN_BANK#14 +byte CONIO_SCREEN_BANK#15 +byte CONIO_SCREEN_BANK#16 +byte CONIO_SCREEN_BANK#17 +byte CONIO_SCREEN_BANK#18 +byte CONIO_SCREEN_BANK#19 +byte CONIO_SCREEN_BANK#2 +byte CONIO_SCREEN_BANK#20 +byte CONIO_SCREEN_BANK#21 +byte CONIO_SCREEN_BANK#22 +byte CONIO_SCREEN_BANK#23 +byte CONIO_SCREEN_BANK#24 +byte CONIO_SCREEN_BANK#25 +byte CONIO_SCREEN_BANK#26 +byte CONIO_SCREEN_BANK#27 +byte CONIO_SCREEN_BANK#28 +byte CONIO_SCREEN_BANK#29 +byte CONIO_SCREEN_BANK#3 +byte CONIO_SCREEN_BANK#30 +byte CONIO_SCREEN_BANK#31 +byte CONIO_SCREEN_BANK#32 +byte CONIO_SCREEN_BANK#33 +byte CONIO_SCREEN_BANK#34 +byte CONIO_SCREEN_BANK#35 +byte CONIO_SCREEN_BANK#36 +byte CONIO_SCREEN_BANK#37 +byte CONIO_SCREEN_BANK#38 +byte CONIO_SCREEN_BANK#39 +byte CONIO_SCREEN_BANK#4 +byte CONIO_SCREEN_BANK#40 +byte CONIO_SCREEN_BANK#41 +byte CONIO_SCREEN_BANK#42 +byte CONIO_SCREEN_BANK#43 +byte CONIO_SCREEN_BANK#44 +byte CONIO_SCREEN_BANK#45 +byte CONIO_SCREEN_BANK#46 +byte CONIO_SCREEN_BANK#47 +byte CONIO_SCREEN_BANK#48 +byte CONIO_SCREEN_BANK#49 +byte CONIO_SCREEN_BANK#5 +byte CONIO_SCREEN_BANK#50 +byte CONIO_SCREEN_BANK#51 +byte CONIO_SCREEN_BANK#52 +byte CONIO_SCREEN_BANK#53 +byte CONIO_SCREEN_BANK#54 +byte CONIO_SCREEN_BANK#55 +byte CONIO_SCREEN_BANK#56 +byte CONIO_SCREEN_BANK#57 +byte CONIO_SCREEN_BANK#58 +byte CONIO_SCREEN_BANK#59 +byte CONIO_SCREEN_BANK#6 +byte CONIO_SCREEN_BANK#60 +byte CONIO_SCREEN_BANK#61 +byte CONIO_SCREEN_BANK#62 +byte CONIO_SCREEN_BANK#63 +byte CONIO_SCREEN_BANK#64 +byte CONIO_SCREEN_BANK#65 +byte CONIO_SCREEN_BANK#66 +byte CONIO_SCREEN_BANK#67 +byte CONIO_SCREEN_BANK#68 +byte CONIO_SCREEN_BANK#69 +byte CONIO_SCREEN_BANK#7 +byte CONIO_SCREEN_BANK#70 +byte CONIO_SCREEN_BANK#71 +byte CONIO_SCREEN_BANK#72 +byte CONIO_SCREEN_BANK#73 +byte CONIO_SCREEN_BANK#74 +byte CONIO_SCREEN_BANK#75 +byte CONIO_SCREEN_BANK#76 +byte CONIO_SCREEN_BANK#77 +byte CONIO_SCREEN_BANK#78 +byte CONIO_SCREEN_BANK#79 +byte CONIO_SCREEN_BANK#8 +byte CONIO_SCREEN_BANK#80 +byte CONIO_SCREEN_BANK#81 +byte CONIO_SCREEN_BANK#82 +byte CONIO_SCREEN_BANK#83 +byte CONIO_SCREEN_BANK#84 +byte CONIO_SCREEN_BANK#85 +byte CONIO_SCREEN_BANK#86 +byte CONIO_SCREEN_BANK#87 +byte CONIO_SCREEN_BANK#88 +byte CONIO_SCREEN_BANK#89 +byte CONIO_SCREEN_BANK#9 +byte CONIO_SCREEN_BANK#90 +byte CONIO_SCREEN_BANK#91 +byte CONIO_SCREEN_BANK#92 +byte CONIO_SCREEN_BANK#93 +byte CONIO_SCREEN_BANK#94 +byte CONIO_SCREEN_BANK#95 +byte CONIO_SCREEN_BANK#96 +byte CONIO_SCREEN_BANK#97 +byte* CONIO_SCREEN_TEXT +byte* CONIO_SCREEN_TEXT#0 +byte* CONIO_SCREEN_TEXT#1 +byte* CONIO_SCREEN_TEXT#10 +byte* CONIO_SCREEN_TEXT#100 +byte* CONIO_SCREEN_TEXT#101 +byte* CONIO_SCREEN_TEXT#102 +byte* CONIO_SCREEN_TEXT#103 +byte* CONIO_SCREEN_TEXT#104 +byte* CONIO_SCREEN_TEXT#105 +byte* CONIO_SCREEN_TEXT#106 +byte* CONIO_SCREEN_TEXT#107 +byte* CONIO_SCREEN_TEXT#108 +byte* CONIO_SCREEN_TEXT#109 +byte* CONIO_SCREEN_TEXT#11 +byte* CONIO_SCREEN_TEXT#110 +byte* CONIO_SCREEN_TEXT#111 +byte* CONIO_SCREEN_TEXT#12 +byte* CONIO_SCREEN_TEXT#13 +byte* CONIO_SCREEN_TEXT#14 +byte* CONIO_SCREEN_TEXT#15 +byte* CONIO_SCREEN_TEXT#16 +byte* CONIO_SCREEN_TEXT#17 +byte* CONIO_SCREEN_TEXT#18 +byte* CONIO_SCREEN_TEXT#19 +byte* CONIO_SCREEN_TEXT#2 +byte* CONIO_SCREEN_TEXT#20 +byte* CONIO_SCREEN_TEXT#21 +byte* CONIO_SCREEN_TEXT#22 +byte* CONIO_SCREEN_TEXT#23 +byte* CONIO_SCREEN_TEXT#24 +byte* CONIO_SCREEN_TEXT#25 +byte* CONIO_SCREEN_TEXT#26 +byte* CONIO_SCREEN_TEXT#27 +byte* CONIO_SCREEN_TEXT#28 +byte* CONIO_SCREEN_TEXT#29 +byte* CONIO_SCREEN_TEXT#3 +byte* CONIO_SCREEN_TEXT#30 +byte* CONIO_SCREEN_TEXT#31 +byte* CONIO_SCREEN_TEXT#32 +byte* CONIO_SCREEN_TEXT#33 +byte* CONIO_SCREEN_TEXT#34 +byte* CONIO_SCREEN_TEXT#35 +byte* CONIO_SCREEN_TEXT#36 +byte* CONIO_SCREEN_TEXT#37 +byte* CONIO_SCREEN_TEXT#38 +byte* CONIO_SCREEN_TEXT#39 +byte* CONIO_SCREEN_TEXT#4 +byte* CONIO_SCREEN_TEXT#40 +byte* CONIO_SCREEN_TEXT#41 +byte* CONIO_SCREEN_TEXT#42 +byte* CONIO_SCREEN_TEXT#43 +byte* CONIO_SCREEN_TEXT#44 +byte* CONIO_SCREEN_TEXT#45 +byte* CONIO_SCREEN_TEXT#46 +byte* CONIO_SCREEN_TEXT#47 +byte* CONIO_SCREEN_TEXT#48 +byte* CONIO_SCREEN_TEXT#49 +byte* CONIO_SCREEN_TEXT#5 +byte* CONIO_SCREEN_TEXT#50 +byte* CONIO_SCREEN_TEXT#51 +byte* CONIO_SCREEN_TEXT#52 +byte* CONIO_SCREEN_TEXT#53 +byte* CONIO_SCREEN_TEXT#54 +byte* CONIO_SCREEN_TEXT#55 +byte* CONIO_SCREEN_TEXT#56 +byte* CONIO_SCREEN_TEXT#57 +byte* CONIO_SCREEN_TEXT#58 +byte* CONIO_SCREEN_TEXT#59 +byte* CONIO_SCREEN_TEXT#6 +byte* CONIO_SCREEN_TEXT#60 +byte* CONIO_SCREEN_TEXT#61 +byte* CONIO_SCREEN_TEXT#62 +byte* CONIO_SCREEN_TEXT#63 +byte* CONIO_SCREEN_TEXT#64 +byte* CONIO_SCREEN_TEXT#65 +byte* CONIO_SCREEN_TEXT#66 +byte* CONIO_SCREEN_TEXT#67 +byte* CONIO_SCREEN_TEXT#68 +byte* CONIO_SCREEN_TEXT#69 +byte* CONIO_SCREEN_TEXT#7 +byte* CONIO_SCREEN_TEXT#70 +byte* CONIO_SCREEN_TEXT#71 +byte* CONIO_SCREEN_TEXT#72 +byte* CONIO_SCREEN_TEXT#73 +byte* CONIO_SCREEN_TEXT#74 +byte* CONIO_SCREEN_TEXT#75 +byte* CONIO_SCREEN_TEXT#76 +byte* CONIO_SCREEN_TEXT#77 +byte* CONIO_SCREEN_TEXT#78 +byte* CONIO_SCREEN_TEXT#79 +byte* CONIO_SCREEN_TEXT#8 +byte* CONIO_SCREEN_TEXT#80 +byte* CONIO_SCREEN_TEXT#81 +byte* CONIO_SCREEN_TEXT#82 +byte* CONIO_SCREEN_TEXT#83 +byte* CONIO_SCREEN_TEXT#84 +byte* CONIO_SCREEN_TEXT#85 +byte* CONIO_SCREEN_TEXT#86 +byte* CONIO_SCREEN_TEXT#87 +byte* CONIO_SCREEN_TEXT#88 +byte* CONIO_SCREEN_TEXT#89 +byte* CONIO_SCREEN_TEXT#9 +byte* CONIO_SCREEN_TEXT#90 +byte* CONIO_SCREEN_TEXT#91 +byte* CONIO_SCREEN_TEXT#92 +byte* CONIO_SCREEN_TEXT#93 +byte* CONIO_SCREEN_TEXT#94 +byte* CONIO_SCREEN_TEXT#95 +byte* CONIO_SCREEN_TEXT#96 +byte* CONIO_SCREEN_TEXT#97 +byte* CONIO_SCREEN_TEXT#98 +byte* CONIO_SCREEN_TEXT#99 +const byte DECIMAL = $a +const nomodify byte* DEFAULT_SCREEN = (byte*)0 +const byte* DIGITS[] = "0123456789abcdef"z +const byte HEXADECIMAL = $10 +const byte OCTAL = 8 +const byte OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS = 1 +const byte OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_SIGN = 0 +const byte RADIX::BINARY = 2 +const byte RADIX::DECIMAL = $a +const byte RADIX::HEXADECIMAL = $10 +const byte RADIX::OCTAL = 8 +const word* RADIX_BINARY_VALUES[] = { $8000, $4000, $2000, $1000, $800, $400, $200, $100, $80, $40, $20, $10, 8, 4, 2 } +const byte* RADIX_BINARY_VALUES_CHAR[] = { $80, $40, $20, $10, 8, 4, 2 } +const dword* RADIX_BINARY_VALUES_LONG[] = { $80000000, $40000000, $20000000, $10000000, $8000000, $4000000, $2000000, $1000000, $800000, $400000, $200000, $100000, $80000, $40000, $20000, $10000, $8000, $4000, $2000, $1000, $800, $400, $200, $100, $80, $40, $20, $10, 8, 4, 2 } +const word* RADIX_DECIMAL_VALUES[] = { $2710, $3e8, $64, $a } +const byte* RADIX_DECIMAL_VALUES_CHAR[] = { $64, $a } +const dword* RADIX_DECIMAL_VALUES_LONG[] = { $3b9aca00, $5f5e100, $989680, $f4240, $186a0, $2710, $3e8, $64, $a } +const word* RADIX_HEXADECIMAL_VALUES[] = { $1000, $100, $10 } +const byte* RADIX_HEXADECIMAL_VALUES_CHAR[] = { $10 } +const dword* RADIX_HEXADECIMAL_VALUES_LONG[] = { $10000000, $1000000, $100000, $10000, $1000, $100, $10 } +const word* RADIX_OCTAL_VALUES[] = { $8000, $1000, $200, $40, 8 } +const byte* RADIX_OCTAL_VALUES_CHAR[] = { $40, 8 } +const dword* RADIX_OCTAL_VALUES_LONG[] = { $40000000, $8000000, $1000000, $200000, $40000, $8000, $1000, $200, $40, 8 } +const byte SIZEOF_DWORD = 4 +const byte SIZEOF_POINTER = 2 +const byte SIZEOF_WORD = 2 +const nomodify byte VERA_ADDRSEL = 1 +const nomodify byte* VERA_ADDRX_H = (byte*)$9f22 +const nomodify byte* VERA_ADDRX_L = (byte*)$9f20 +const nomodify byte* VERA_ADDRX_M = (byte*)$9f21 +const nomodify byte* VERA_CTRL = (byte*)$9f25 +const nomodify byte* VERA_DATA0 = (byte*)$9f23 +const nomodify byte* VERA_DATA1 = (byte*)$9f24 +const nomodify byte* VERA_DC_HSCALE = (byte*)$9f2a +const nomodify byte* VERA_DC_VSCALE = (byte*)$9f2b +const nomodify byte VERA_INC_1 = $10 +const nomodify byte* VERA_L0_CONFIG = (byte*)$9f2d +const nomodify byte* VERA_L0_MAPBASE = (byte*)$9f2e +const nomodify byte* VERA_L0_TILEBASE = (byte*)$9f2f +const nomodify byte* VERA_L1_CONFIG = (byte*)$9f34 +const nomodify byte* VERA_L1_MAPBASE = (byte*)$9f35 +const nomodify byte* VERA_L1_TILEBASE = (byte*)$9f36 +const nomodify byte VERA_LAYER_COLOR_DEPTH_1BPP = 0 +const nomodify byte VERA_LAYER_COLOR_DEPTH_2BPP = 1 +const nomodify byte VERA_LAYER_COLOR_DEPTH_4BPP = 2 +const nomodify byte VERA_LAYER_COLOR_DEPTH_8BPP = 3 +const nomodify byte VERA_LAYER_CONFIG_16C = 0 +const nomodify byte VERA_LAYER_CONFIG_256C = 8 +const to_nomodify word* VERA_LAYER_HEIGHT[4] = { $20, $40, $80, $100 } +const nomodify byte VERA_LAYER_HEIGHT_128 = $80 +const nomodify byte VERA_LAYER_HEIGHT_256 = $c0 +const nomodify byte VERA_LAYER_HEIGHT_32 = 0 +const nomodify byte VERA_LAYER_HEIGHT_64 = $40 +const nomodify byte VERA_LAYER_HEIGHT_MASK = $c0 +const nomodify byte VERA_LAYER_TILEBASE_MASK = $fc +const to_nomodify word* VERA_LAYER_WIDTH[4] = { $20, $40, $80, $100 } +const nomodify byte VERA_LAYER_WIDTH_128 = $20 +const nomodify byte VERA_LAYER_WIDTH_256 = $30 +const nomodify byte VERA_LAYER_WIDTH_32 = 0 +const nomodify byte VERA_LAYER_WIDTH_64 = $10 +const nomodify byte VERA_LAYER_WIDTH_MASK = $30 +const nomodify byte VERA_TILEBASE_HEIGHT_16 = 2 +const nomodify byte VERA_TILEBASE_HEIGHT_8 = 0 +const nomodify byte VERA_TILEBASE_WIDTH_16 = 1 +const nomodify byte VERA_TILEBASE_WIDTH_8 = 0 +const nomodify byte WHITE = 1 +void __start() +void clearline() +byte*~ clearline::$0 +byte~ clearline::$1 +byte~ clearline::$2 +byte~ clearline::$3 +bool~ clearline::$4 +byte~ clearline::$5 +byte* clearline::addr +byte* clearline::addr#0 +word clearline::c +word clearline::c#0 +word clearline::c#1 +word clearline::c#2 +word clearline::c#3 +byte clearline::color +byte clearline::color#0 +byte clearline::color#1 +byte clearline::color#2 +const byte* conio_cursor_x[2] = { 0, 0 } +const byte* conio_cursor_y[2] = { 0, 0 } +word conio_height loadstore +const word* conio_line_text[2] = { 0, 0 } +byte conio_rowshift loadstore +word conio_rowskip loadstore +volatile byte conio_screen_height loadstore +byte conio_screen_layer loadstore +volatile byte conio_screen_width loadstore +const byte* conio_scroll_enable[2] = { 1, 1 } +word conio_width loadstore +void conio_x16_init() +bool~ conio_x16_init::$7 +bool~ conio_x16_init::$8 +number~ conio_x16_init::$9 +const nomodify byte* conio_x16_init::BASIC_CURSOR_LINE = (byte*)$d6 +byte conio_x16_init::line +byte conio_x16_init::line#0 +byte conio_x16_init::line#1 +byte conio_x16_init::line#2 +byte conio_x16_init::line#3 +byte conio_x16_init::line#4 +byte conio_x16_init::line#5 +byte conio_x16_init::line#6 +byte conio_x16_init::line#7 +byte conio_x16_init::line#8 +byte conio_x16_init::line#9 +void cputc(byte cputc::c) +byte~ cputc::$0 +byte*~ cputc::$1 +bool~ cputc::$11 +bool~ cputc::$12 +byte~ cputc::$15 +word~ cputc::$16 +bool~ cputc::$17 +byte~ cputc::$2 +bool~ cputc::$3 +byte~ cputc::$4 +byte~ cputc::$5 +byte~ cputc::$6 +bool~ cputc::$8 +bool~ cputc::$9 +byte cputc::c +byte cputc::c#0 +byte cputc::c#1 +byte cputc::c#2 +byte cputc::c#3 +byte cputc::c#4 +byte cputc::c#5 +byte cputc::color +byte cputc::color#0 +byte cputc::color#1 +byte* cputc::conio_addr +byte* cputc::conio_addr#0 +byte* cputc::conio_addr#1 +byte* cputc::conio_addr#2 +byte cputc::scroll_enable +byte cputc::scroll_enable#0 +void cputln() +byte~ cputln::$2 +byte~ cputln::$3 +word cputln::temp +word cputln::temp#0 +word cputln::temp#1 +void cputs(to_nomodify byte* cputs::s) +byte~ cputs::$0 +bool~ cputs::$2 +byte cputs::c +byte cputs::c#0 +byte cputs::c#1 +byte cputs::c#2 +to_nomodify byte* cputs::s +to_nomodify byte* cputs::s#0 +to_nomodify byte* cputs::s#1 +to_nomodify byte* cputs::s#10 +to_nomodify byte* cputs::s#11 +to_nomodify byte* cputs::s#12 +to_nomodify byte* cputs::s#13 +to_nomodify byte* cputs::s#2 +to_nomodify byte* cputs::s#3 +to_nomodify byte* cputs::s#4 +to_nomodify byte* cputs::s#5 +to_nomodify byte* cputs::s#6 +to_nomodify byte* cputs::s#7 +to_nomodify byte* cputs::s#8 +to_nomodify byte* cputs::s#9 +void cscroll() +bool~ cscroll::$0 +bool~ cscroll::$1 +bool~ cscroll::$2 +bool~ cscroll::$3 +number~ cscroll::$5 +bool~ cscroll::$7 +void gotoxy(byte gotoxy::x , byte gotoxy::y) +bool~ gotoxy::$0 +bool~ gotoxy::$1 +bool~ gotoxy::$2 +bool~ gotoxy::$3 +word~ gotoxy::$4 +byte~ gotoxy::$5 +word~ gotoxy::$6 +word gotoxy::line_offset +word gotoxy::line_offset#0 +byte gotoxy::x +byte gotoxy::x#0 +byte gotoxy::x#1 +byte gotoxy::x#2 +byte gotoxy::x#3 +byte gotoxy::x#4 +byte gotoxy::x#5 +byte gotoxy::x#6 +byte gotoxy::y +byte gotoxy::y#0 +byte gotoxy::y#1 +byte gotoxy::y#2 +byte gotoxy::y#3 +byte gotoxy::y#4 +byte gotoxy::y#5 +byte gotoxy::y#6 +void insertup() +number~ insertup::$0 +bool~ insertup::$2 +number~ insertup::$3 +number~ insertup::$4 +byte*~ insertup::$5 +byte*~ insertup::$6 +byte insertup::cy +byte insertup::cy#0 +byte insertup::cy#1 +byte insertup::cy#2 +byte insertup::cy#3 +byte insertup::i +byte insertup::i#0 +byte insertup::i#1 +byte insertup::i#2 +byte insertup::i#3 +byte insertup::i#4 +word insertup::line +word insertup::line#0 +byte* insertup::start +byte* insertup::start#0 +byte insertup::width +byte insertup::width#0 +byte insertup::width#1 +byte insertup::width#2 +byte insertup::width#3 +void main() +bool~ main::$0 +dword~ main::$1 +word~ main::$10 +word~ main::$11 +byte~ main::$12 +word~ main::$13 +word~ main::$14 +word~ main::$15 +byte~ main::$16 +word~ main::$17 +byte~ main::$18 +word~ main::$19 +number~ main::$2 +word~ main::$20 +word~ main::$21 +word~ main::$22 +byte~ main::$23 +word~ main::$24 +word~ main::$25 +number~ main::$26 +word~ main::$27 +number~ main::$28 +word~ main::$3 +word~ main::$30 +word~ main::$31 +word~ main::$32 +word~ main::$33 +word~ main::$4 +byte~ main::$5 +word~ main::$6 +byte~ main::$7 +word~ main::$8 +word~ main::$9 +byte main::bankbeg +byte main::bankbeg#0 +byte main::bankbeg#1 +byte main::bankbeg#2 +byte main::bankbeg#3 +byte main::bankbeg#4 +byte main::bankbeg#5 +byte main::bankbeg#6 +byte main::bankbeg#7 +byte main::bankend +byte main::bankend#0 +byte main::bankend#1 +byte main::bankend#2 +byte main::bankend#3 +byte main::bankend#4 +byte main::bankend#5 +byte main::bankend#6 +byte main::bankend#7 +byte main::bankend#8 +byte main::bankend#9 +word main::beg +word main::beg#0 +word main::beg#1 +word main::beg#10 +word main::beg#11 +word main::beg#12 +word main::beg#2 +word main::beg#3 +word main::beg#4 +word main::beg#5 +word main::beg#6 +word main::beg#7 +word main::beg#8 +word main::beg#9 +const nomodify word main::borderbeg = $a000 +dword main::calcbeg +dword main::calcbeg#0 +dword main::calcbeg#1 +dword main::calcend +dword main::calcend#0 +dword main::calcend#1 +dword main::calcend#2 +dword main::calcend#3 +dword main::calcend#4 +dword main::calcend#5 +word main::end +word main::end#0 +word main::end#1 +word main::end#10 +word main::end#11 +word main::end#12 +word main::end#13 +word main::end#14 +word main::end#2 +word main::end#3 +word main::end#4 +word main::end#5 +word main::end#6 +word main::end#7 +word main::end#8 +word main::end#9 +const word main::inc = $123 +dword main::num +dword main::num#0 +dword main::num#1 +dword main::num#10 +dword main::num#11 +dword main::num#12 +dword main::num#13 +dword main::num#14 +dword main::num#15 +dword main::num#16 +dword main::num#17 +dword main::num#18 +dword main::num#2 +dword main::num#3 +dword main::num#4 +dword main::num#5 +dword main::num#6 +dword main::num#7 +dword main::num#8 +dword main::num#9 +const byte* main::s[6] = "cbeg=" +const byte* main::s1[7] = ", add=" +const byte* main::s2[8] = ", cend=" +const byte* main::s3[8] = ", bbeg=" +const byte* main::s4[8] = ", bend=" +const byte* main::s5[7] = ", beg=" +const byte* main::s6[7] = ", end=" +const byte* main::s7[2] = " +" +dword main::src1 +dword main::src1#0 +dword main::src1#1 +dword main::src1#10 +dword main::src1#11 +dword main::src1#12 +dword main::src1#13 +dword main::src1#14 +dword main::src1#15 +dword main::src1#16 +dword main::src1#17 +dword main::src1#18 +dword main::src1#2 +dword main::src1#3 +dword main::src1#4 +dword main::src1#5 +dword main::src1#6 +dword main::src1#7 +dword main::src1#8 +dword main::src1#9 +void memcpy_in_vram(byte memcpy_in_vram::dest_bank , void* memcpy_in_vram::dest , byte memcpy_in_vram::dest_increment , byte memcpy_in_vram::src_bank , void* memcpy_in_vram::src , byte memcpy_in_vram::src_increment , word memcpy_in_vram::num) +byte~ memcpy_in_vram::$0 +byte~ memcpy_in_vram::$1 +byte~ memcpy_in_vram::$2 +byte~ memcpy_in_vram::$3 +byte~ memcpy_in_vram::$4 +byte~ memcpy_in_vram::$5 +bool~ memcpy_in_vram::$6 +void* memcpy_in_vram::dest +void* memcpy_in_vram::dest#0 +void* memcpy_in_vram::dest#1 +byte memcpy_in_vram::dest_bank +byte memcpy_in_vram::dest_bank#0 +byte memcpy_in_vram::dest_bank#1 +byte memcpy_in_vram::dest_increment +byte memcpy_in_vram::dest_increment#0 +byte memcpy_in_vram::dest_increment#1 +word memcpy_in_vram::i +word memcpy_in_vram::i#0 +word memcpy_in_vram::i#1 +word memcpy_in_vram::i#2 +word memcpy_in_vram::i#3 +word memcpy_in_vram::num +word memcpy_in_vram::num#0 +word memcpy_in_vram::num#1 +word memcpy_in_vram::num#2 +word memcpy_in_vram::num#3 +void* memcpy_in_vram::src +void* memcpy_in_vram::src#0 +void* memcpy_in_vram::src#1 +byte memcpy_in_vram::src_bank +byte memcpy_in_vram::src_bank#0 +byte memcpy_in_vram::src_bank#1 +byte memcpy_in_vram::src_increment +byte memcpy_in_vram::src_increment#0 +byte memcpy_in_vram::src_increment#1 +struct printf_buffer_number printf_buffer loadstore = {} +void printf_number_buffer(byte printf_number_buffer::buffer_sign , byte* printf_number_buffer::buffer_digits , byte printf_number_buffer::format_min_length , byte printf_number_buffer::format_justify_left , byte printf_number_buffer::format_sign_always , byte printf_number_buffer::format_zero_padding , byte printf_number_buffer::format_upper_case , byte printf_number_buffer::format_radix) +bool~ printf_number_buffer::$0 +bool~ printf_number_buffer::$1 +bool~ printf_number_buffer::$10 +bool~ printf_number_buffer::$12 +bool~ printf_number_buffer::$14 +bool~ printf_number_buffer::$15 +bool~ printf_number_buffer::$16 +bool~ printf_number_buffer::$17 +word~ printf_number_buffer::$19 +bool~ printf_number_buffer::$2 +bool~ printf_number_buffer::$20 +signed byte~ printf_number_buffer::$21 +bool~ printf_number_buffer::$22 +bool~ printf_number_buffer::$23 +signed byte~ printf_number_buffer::$25 +bool~ printf_number_buffer::$26 +bool~ printf_number_buffer::$27 +bool~ printf_number_buffer::$28 +bool~ printf_number_buffer::$29 +bool~ printf_number_buffer::$3 +bool~ printf_number_buffer::$30 +bool~ printf_number_buffer::$31 +bool~ printf_number_buffer::$32 +bool~ printf_number_buffer::$4 +bool~ printf_number_buffer::$5 +bool~ printf_number_buffer::$7 +bool~ printf_number_buffer::$9 +struct printf_buffer_number printf_number_buffer::buffer +byte* printf_number_buffer::buffer_digits +byte* printf_number_buffer::buffer_digits#0 +byte* printf_number_buffer::buffer_digits#1 +byte* printf_number_buffer::buffer_digits#10 +byte* printf_number_buffer::buffer_digits#11 +byte* printf_number_buffer::buffer_digits#12 +byte* printf_number_buffer::buffer_digits#13 +byte* printf_number_buffer::buffer_digits#14 +byte* printf_number_buffer::buffer_digits#15 +byte* printf_number_buffer::buffer_digits#16 +byte* printf_number_buffer::buffer_digits#17 +byte* printf_number_buffer::buffer_digits#18 +byte* printf_number_buffer::buffer_digits#19 +byte* printf_number_buffer::buffer_digits#2 +byte* printf_number_buffer::buffer_digits#20 +byte* printf_number_buffer::buffer_digits#21 +byte* printf_number_buffer::buffer_digits#3 +byte* printf_number_buffer::buffer_digits#4 +byte* printf_number_buffer::buffer_digits#5 +byte* printf_number_buffer::buffer_digits#6 +byte* printf_number_buffer::buffer_digits#7 +byte* printf_number_buffer::buffer_digits#8 +byte* printf_number_buffer::buffer_digits#9 +byte printf_number_buffer::buffer_sign +byte printf_number_buffer::buffer_sign#0 +byte printf_number_buffer::buffer_sign#1 +byte printf_number_buffer::buffer_sign#10 +byte printf_number_buffer::buffer_sign#11 +byte printf_number_buffer::buffer_sign#12 +byte printf_number_buffer::buffer_sign#13 +byte printf_number_buffer::buffer_sign#2 +byte printf_number_buffer::buffer_sign#3 +byte printf_number_buffer::buffer_sign#4 +byte printf_number_buffer::buffer_sign#5 +byte printf_number_buffer::buffer_sign#6 +byte printf_number_buffer::buffer_sign#7 +byte printf_number_buffer::buffer_sign#8 +byte printf_number_buffer::buffer_sign#9 +struct printf_format_number printf_number_buffer::format +byte printf_number_buffer::format_justify_left +byte printf_number_buffer::format_justify_left#0 +byte printf_number_buffer::format_justify_left#1 +byte printf_number_buffer::format_justify_left#10 +byte printf_number_buffer::format_justify_left#11 +byte printf_number_buffer::format_justify_left#12 +byte printf_number_buffer::format_justify_left#13 +byte printf_number_buffer::format_justify_left#14 +byte printf_number_buffer::format_justify_left#15 +byte printf_number_buffer::format_justify_left#16 +byte printf_number_buffer::format_justify_left#17 +byte printf_number_buffer::format_justify_left#18 +byte printf_number_buffer::format_justify_left#19 +byte printf_number_buffer::format_justify_left#2 +byte printf_number_buffer::format_justify_left#20 +byte printf_number_buffer::format_justify_left#21 +byte printf_number_buffer::format_justify_left#22 +byte printf_number_buffer::format_justify_left#3 +byte printf_number_buffer::format_justify_left#4 +byte printf_number_buffer::format_justify_left#5 +byte printf_number_buffer::format_justify_left#6 +byte printf_number_buffer::format_justify_left#7 +byte printf_number_buffer::format_justify_left#8 +byte printf_number_buffer::format_justify_left#9 +byte printf_number_buffer::format_min_length +byte printf_number_buffer::format_min_length#0 +byte printf_number_buffer::format_min_length#1 +byte printf_number_buffer::format_min_length#2 +byte printf_number_buffer::format_min_length#3 +byte printf_number_buffer::format_min_length#4 +byte printf_number_buffer::format_min_length#5 +byte printf_number_buffer::format_min_length#6 +byte printf_number_buffer::format_min_length#7 +byte printf_number_buffer::format_radix +byte printf_number_buffer::format_radix#0 +byte printf_number_buffer::format_radix#1 +byte printf_number_buffer::format_radix#2 +byte printf_number_buffer::format_sign_always +byte printf_number_buffer::format_sign_always#0 +byte printf_number_buffer::format_sign_always#1 +byte printf_number_buffer::format_sign_always#2 +byte printf_number_buffer::format_upper_case +byte printf_number_buffer::format_upper_case#0 +byte printf_number_buffer::format_upper_case#1 +byte printf_number_buffer::format_upper_case#10 +byte printf_number_buffer::format_upper_case#11 +byte printf_number_buffer::format_upper_case#12 +byte printf_number_buffer::format_upper_case#13 +byte printf_number_buffer::format_upper_case#14 +byte printf_number_buffer::format_upper_case#15 +byte printf_number_buffer::format_upper_case#16 +byte printf_number_buffer::format_upper_case#17 +byte printf_number_buffer::format_upper_case#18 +byte printf_number_buffer::format_upper_case#2 +byte printf_number_buffer::format_upper_case#3 +byte printf_number_buffer::format_upper_case#4 +byte printf_number_buffer::format_upper_case#5 +byte printf_number_buffer::format_upper_case#6 +byte printf_number_buffer::format_upper_case#7 +byte printf_number_buffer::format_upper_case#8 +byte printf_number_buffer::format_upper_case#9 +byte printf_number_buffer::format_zero_padding +byte printf_number_buffer::format_zero_padding#0 +byte printf_number_buffer::format_zero_padding#1 +byte printf_number_buffer::format_zero_padding#10 +byte printf_number_buffer::format_zero_padding#11 +byte printf_number_buffer::format_zero_padding#12 +byte printf_number_buffer::format_zero_padding#13 +byte printf_number_buffer::format_zero_padding#14 +byte printf_number_buffer::format_zero_padding#15 +byte printf_number_buffer::format_zero_padding#16 +byte printf_number_buffer::format_zero_padding#17 +byte printf_number_buffer::format_zero_padding#18 +byte printf_number_buffer::format_zero_padding#19 +byte printf_number_buffer::format_zero_padding#2 +byte printf_number_buffer::format_zero_padding#20 +byte printf_number_buffer::format_zero_padding#21 +byte printf_number_buffer::format_zero_padding#22 +byte printf_number_buffer::format_zero_padding#3 +byte printf_number_buffer::format_zero_padding#4 +byte printf_number_buffer::format_zero_padding#5 +byte printf_number_buffer::format_zero_padding#6 +byte printf_number_buffer::format_zero_padding#7 +byte printf_number_buffer::format_zero_padding#8 +byte printf_number_buffer::format_zero_padding#9 +signed byte printf_number_buffer::len +signed byte printf_number_buffer::len#0 +signed byte printf_number_buffer::len#1 +signed byte printf_number_buffer::len#2 +signed byte printf_number_buffer::len#3 +signed byte printf_number_buffer::padding +signed byte printf_number_buffer::padding#0 +signed byte printf_number_buffer::padding#1 +signed byte printf_number_buffer::padding#10 +signed byte printf_number_buffer::padding#11 +signed byte printf_number_buffer::padding#12 +signed byte printf_number_buffer::padding#13 +signed byte printf_number_buffer::padding#14 +signed byte printf_number_buffer::padding#15 +signed byte printf_number_buffer::padding#16 +signed byte printf_number_buffer::padding#17 +signed byte printf_number_buffer::padding#2 +signed byte printf_number_buffer::padding#3 +signed byte printf_number_buffer::padding#4 +signed byte printf_number_buffer::padding#5 +signed byte printf_number_buffer::padding#6 +signed byte printf_number_buffer::padding#7 +signed byte printf_number_buffer::padding#8 +signed byte printf_number_buffer::padding#9 +void printf_padding(byte printf_padding::pad , byte printf_padding::length) +bool~ printf_padding::$0 +byte printf_padding::i +byte printf_padding::i#0 +byte printf_padding::i#1 +byte printf_padding::i#2 +byte printf_padding::i#3 +byte printf_padding::i#4 +byte printf_padding::length +byte printf_padding::length#0 +byte printf_padding::length#1 +byte printf_padding::length#2 +byte printf_padding::length#3 +byte printf_padding::length#4 +byte printf_padding::length#5 +byte printf_padding::length#6 +byte printf_padding::pad +byte printf_padding::pad#0 +byte printf_padding::pad#1 +byte printf_padding::pad#2 +byte printf_padding::pad#3 +byte printf_padding::pad#4 +byte printf_padding::pad#5 +byte printf_padding::pad#6 +void printf_uchar(byte printf_uchar::uvalue , byte printf_uchar::format_min_length , byte printf_uchar::format_justify_left , byte printf_uchar::format_sign_always , byte printf_uchar::format_zero_padding , byte printf_uchar::format_upper_case , byte printf_uchar::format_radix) +number~ printf_uchar::$0 +byte~ printf_uchar::$1 +number~ printf_uchar::$2 +bool~ printf_uchar::$5 +struct printf_format_number printf_uchar::format +byte printf_uchar::format_justify_left +byte printf_uchar::format_justify_left#0 +byte printf_uchar::format_justify_left#1 +byte printf_uchar::format_justify_left#2 +byte printf_uchar::format_justify_left#3 +byte printf_uchar::format_justify_left#4 +byte printf_uchar::format_justify_left#5 +byte printf_uchar::format_justify_left#6 +byte printf_uchar::format_min_length +byte printf_uchar::format_min_length#0 +byte printf_uchar::format_min_length#1 +byte printf_uchar::format_min_length#2 +byte printf_uchar::format_min_length#3 +byte printf_uchar::format_min_length#4 +byte printf_uchar::format_min_length#5 +byte printf_uchar::format_min_length#6 +byte printf_uchar::format_radix +byte printf_uchar::format_radix#0 +byte printf_uchar::format_radix#1 +byte printf_uchar::format_radix#2 +byte printf_uchar::format_radix#3 +byte printf_uchar::format_radix#4 +byte printf_uchar::format_radix#5 +byte printf_uchar::format_radix#6 +byte printf_uchar::format_sign_always +byte printf_uchar::format_sign_always#0 +byte printf_uchar::format_sign_always#1 +byte printf_uchar::format_sign_always#2 +byte printf_uchar::format_sign_always#3 +byte printf_uchar::format_sign_always#4 +byte printf_uchar::format_sign_always#5 +byte printf_uchar::format_sign_always#6 +byte printf_uchar::format_upper_case +byte printf_uchar::format_upper_case#0 +byte printf_uchar::format_upper_case#1 +byte printf_uchar::format_upper_case#2 +byte printf_uchar::format_upper_case#3 +byte printf_uchar::format_upper_case#4 +byte printf_uchar::format_upper_case#5 +byte printf_uchar::format_upper_case#6 +byte printf_uchar::format_zero_padding +byte printf_uchar::format_zero_padding#0 +byte printf_uchar::format_zero_padding#1 +byte printf_uchar::format_zero_padding#2 +byte printf_uchar::format_zero_padding#3 +byte printf_uchar::format_zero_padding#4 +byte printf_uchar::format_zero_padding#5 +byte printf_uchar::format_zero_padding#6 +byte printf_uchar::uvalue +byte printf_uchar::uvalue#0 +byte printf_uchar::uvalue#1 +byte printf_uchar::uvalue#2 +byte printf_uchar::uvalue#3 +byte printf_uchar::uvalue#4 +byte printf_uchar::uvalue#5 +void printf_uint(word printf_uint::uvalue , byte printf_uint::format_min_length , byte printf_uint::format_justify_left , byte printf_uint::format_sign_always , byte printf_uint::format_zero_padding , byte printf_uint::format_upper_case , byte printf_uint::format_radix) +number~ printf_uint::$0 +byte~ printf_uint::$1 +number~ printf_uint::$2 +bool~ printf_uint::$5 +struct printf_format_number printf_uint::format +byte printf_uint::format_justify_left +byte printf_uint::format_justify_left#0 +byte printf_uint::format_justify_left#1 +byte printf_uint::format_justify_left#2 +byte printf_uint::format_justify_left#3 +byte printf_uint::format_justify_left#4 +byte printf_uint::format_justify_left#5 +byte printf_uint::format_justify_left#6 +byte printf_uint::format_min_length +byte printf_uint::format_min_length#0 +byte printf_uint::format_min_length#1 +byte printf_uint::format_min_length#2 +byte printf_uint::format_min_length#3 +byte printf_uint::format_min_length#4 +byte printf_uint::format_min_length#5 +byte printf_uint::format_min_length#6 +byte printf_uint::format_radix +byte printf_uint::format_radix#0 +byte printf_uint::format_radix#1 +byte printf_uint::format_radix#2 +byte printf_uint::format_radix#3 +byte printf_uint::format_radix#4 +byte printf_uint::format_radix#5 +byte printf_uint::format_radix#6 +byte printf_uint::format_sign_always +byte printf_uint::format_sign_always#0 +byte printf_uint::format_sign_always#1 +byte printf_uint::format_sign_always#2 +byte printf_uint::format_sign_always#3 +byte printf_uint::format_sign_always#4 +byte printf_uint::format_sign_always#5 +byte printf_uint::format_sign_always#6 +byte printf_uint::format_upper_case +byte printf_uint::format_upper_case#0 +byte printf_uint::format_upper_case#1 +byte printf_uint::format_upper_case#2 +byte printf_uint::format_upper_case#3 +byte printf_uint::format_upper_case#4 +byte printf_uint::format_upper_case#5 +byte printf_uint::format_upper_case#6 +byte printf_uint::format_zero_padding +byte printf_uint::format_zero_padding#0 +byte printf_uint::format_zero_padding#1 +byte printf_uint::format_zero_padding#2 +byte printf_uint::format_zero_padding#3 +byte printf_uint::format_zero_padding#4 +byte printf_uint::format_zero_padding#5 +byte printf_uint::format_zero_padding#6 +word printf_uint::uvalue +word printf_uint::uvalue#0 +word printf_uint::uvalue#1 +word printf_uint::uvalue#2 +word printf_uint::uvalue#3 +word printf_uint::uvalue#4 +word printf_uint::uvalue#5 +void printf_ulong(dword printf_ulong::uvalue , byte printf_ulong::format_min_length , byte printf_ulong::format_justify_left , byte printf_ulong::format_sign_always , byte printf_ulong::format_zero_padding , byte printf_ulong::format_upper_case , byte printf_ulong::format_radix) +number~ printf_ulong::$0 +byte~ printf_ulong::$1 +number~ printf_ulong::$2 +bool~ printf_ulong::$5 +struct printf_format_number printf_ulong::format +byte printf_ulong::format_justify_left +byte printf_ulong::format_justify_left#0 +byte printf_ulong::format_justify_left#1 +byte printf_ulong::format_justify_left#2 +byte printf_ulong::format_justify_left#3 +byte printf_ulong::format_justify_left#4 +byte printf_ulong::format_justify_left#5 +byte printf_ulong::format_justify_left#6 +byte printf_ulong::format_justify_left#7 +byte printf_ulong::format_min_length +byte printf_ulong::format_min_length#0 +byte printf_ulong::format_min_length#1 +byte printf_ulong::format_min_length#2 +byte printf_ulong::format_min_length#3 +byte printf_ulong::format_min_length#4 +byte printf_ulong::format_min_length#5 +byte printf_ulong::format_min_length#6 +byte printf_ulong::format_min_length#7 +byte printf_ulong::format_radix +byte printf_ulong::format_radix#0 +byte printf_ulong::format_radix#1 +byte printf_ulong::format_radix#2 +byte printf_ulong::format_radix#3 +byte printf_ulong::format_radix#4 +byte printf_ulong::format_radix#5 +byte printf_ulong::format_radix#6 +byte printf_ulong::format_radix#7 +byte printf_ulong::format_sign_always +byte printf_ulong::format_sign_always#0 +byte printf_ulong::format_sign_always#1 +byte printf_ulong::format_sign_always#2 +byte printf_ulong::format_sign_always#3 +byte printf_ulong::format_sign_always#4 +byte printf_ulong::format_sign_always#5 +byte printf_ulong::format_sign_always#6 +byte printf_ulong::format_sign_always#7 +byte printf_ulong::format_upper_case +byte printf_ulong::format_upper_case#0 +byte printf_ulong::format_upper_case#1 +byte printf_ulong::format_upper_case#2 +byte printf_ulong::format_upper_case#3 +byte printf_ulong::format_upper_case#4 +byte printf_ulong::format_upper_case#5 +byte printf_ulong::format_upper_case#6 +byte printf_ulong::format_upper_case#7 +byte printf_ulong::format_zero_padding +byte printf_ulong::format_zero_padding#0 +byte printf_ulong::format_zero_padding#1 +byte printf_ulong::format_zero_padding#2 +byte printf_ulong::format_zero_padding#3 +byte printf_ulong::format_zero_padding#4 +byte printf_ulong::format_zero_padding#5 +byte printf_ulong::format_zero_padding#6 +byte printf_ulong::format_zero_padding#7 +dword printf_ulong::uvalue +dword printf_ulong::uvalue#0 +dword printf_ulong::uvalue#1 +dword printf_ulong::uvalue#2 +dword printf_ulong::uvalue#3 +dword printf_ulong::uvalue#4 +dword printf_ulong::uvalue#5 +dword printf_ulong::uvalue#6 +void screenlayer(byte screenlayer::layer) +byte~ screenlayer::$0 +word~ screenlayer::$1 +word~ screenlayer::$2 +byte~ screenlayer::$3 +word~ screenlayer::$4 +word~ screenlayer::$5 +byte screenlayer::layer +byte screenlayer::layer#0 +byte screenlayer::layer#1 +byte~ screenlayer::vera_layer_get_height1_$0 +byte~ screenlayer::vera_layer_get_height1_$1 +byte~ screenlayer::vera_layer_get_height1_$2 +byte~ screenlayer::vera_layer_get_height1_$3 +byte* screenlayer::vera_layer_get_height1_config +byte* screenlayer::vera_layer_get_height1_config#0 +byte screenlayer::vera_layer_get_height1_layer +byte screenlayer::vera_layer_get_height1_layer#0 +byte screenlayer::vera_layer_get_height1_layer#1 +word screenlayer::vera_layer_get_height1_return +word screenlayer::vera_layer_get_height1_return#0 +word screenlayer::vera_layer_get_height1_return#1 +word screenlayer::vera_layer_get_height1_return#2 +word screenlayer::vera_layer_get_height1_return#3 +byte~ screenlayer::vera_layer_get_width1_$0 +byte~ screenlayer::vera_layer_get_width1_$1 +byte~ screenlayer::vera_layer_get_width1_$2 +byte~ screenlayer::vera_layer_get_width1_$3 +byte* screenlayer::vera_layer_get_width1_config +byte* screenlayer::vera_layer_get_width1_config#0 +byte screenlayer::vera_layer_get_width1_layer +byte screenlayer::vera_layer_get_width1_layer#0 +byte screenlayer::vera_layer_get_width1_layer#1 +word screenlayer::vera_layer_get_width1_return +word screenlayer::vera_layer_get_width1_return#0 +word screenlayer::vera_layer_get_width1_return#1 +word screenlayer::vera_layer_get_width1_return#2 +word screenlayer::vera_layer_get_width1_return#3 +void screensize(byte* screensize::x , byte* screensize::y) +byte~ screensize::$0 +number~ screensize::$1 +byte~ screensize::$2 +number~ screensize::$3 +byte screensize::hscale +byte screensize::hscale#0 +byte screensize::vscale +byte screensize::vscale#0 +byte* screensize::x +byte* screensize::x#0 +byte* screensize::x#1 +byte* screensize::y +byte* screensize::y#0 +byte* screensize::y#1 +word strlen(byte* strlen::str) +bool~ strlen::$0 +word strlen::len +word strlen::len#0 +word strlen::len#1 +word strlen::len#2 +word strlen::len#3 +word strlen::len#4 +word strlen::return +word strlen::return#0 +word strlen::return#1 +word strlen::return#2 +word strlen::return#3 +word strlen::return#4 +byte* strlen::str +byte* strlen::str#0 +byte* strlen::str#1 +byte* strlen::str#2 +byte* strlen::str#3 +byte* strlen::str#4 +byte* strupr(byte* strupr::str) +byte~ strupr::$0 +bool~ strupr::$1 +byte* strupr::return +byte* strupr::return#0 +byte* strupr::return#1 +byte* strupr::return#2 +byte* strupr::return#3 +byte* strupr::src +byte* strupr::src#0 +byte* strupr::src#1 +byte* strupr::src#2 +byte* strupr::src#3 +byte* strupr::src#4 +byte* strupr::str +byte* strupr::str#0 +byte* strupr::str#1 +byte* strupr::str#2 +byte* strupr::str#3 +byte* strupr::str#4 +byte* strupr::str#5 +byte toupper(byte toupper::ch) +bool~ toupper::$0 +bool~ toupper::$1 +bool~ toupper::$2 +byte~ toupper::$3 +byte toupper::ch +byte toupper::ch#0 +byte toupper::ch#1 +byte toupper::ch#2 +byte toupper::ch#3 +byte toupper::return +byte toupper::return#0 +byte toupper::return#1 +byte toupper::return#2 +byte toupper::return#3 +byte toupper::return#4 +byte toupper::return#5 +void uctoa(byte uctoa::value , byte* uctoa::buffer , byte uctoa::radix) +bool~ uctoa::$0 +bool~ uctoa::$1 +byte~ uctoa::$10 +bool~ uctoa::$2 +bool~ uctoa::$3 +number~ uctoa::$4 +bool~ uctoa::$5 +bool~ uctoa::$6 +bool~ uctoa::$7 +bool~ uctoa::$8 +byte~ uctoa::$9 +byte* uctoa::buffer +byte* uctoa::buffer#0 +byte* uctoa::buffer#1 +byte* uctoa::buffer#10 +byte* uctoa::buffer#11 +byte* uctoa::buffer#12 +byte* uctoa::buffer#13 +byte* uctoa::buffer#14 +byte* uctoa::buffer#15 +byte* uctoa::buffer#16 +byte* uctoa::buffer#17 +byte* uctoa::buffer#18 +byte* uctoa::buffer#19 +byte* uctoa::buffer#2 +byte* uctoa::buffer#20 +byte* uctoa::buffer#21 +byte* uctoa::buffer#3 +byte* uctoa::buffer#4 +byte* uctoa::buffer#5 +byte* uctoa::buffer#6 +byte* uctoa::buffer#7 +byte* uctoa::buffer#8 +byte* uctoa::buffer#9 +byte uctoa::digit +byte uctoa::digit#0 +byte uctoa::digit#1 +byte uctoa::digit#2 +byte uctoa::digit#3 +byte uctoa::digit#4 +byte uctoa::digit#5 +byte uctoa::digit#6 +byte uctoa::digit_value +byte uctoa::digit_value#0 +byte uctoa::digit_value#1 +byte* uctoa::digit_values +byte* uctoa::digit_values#0 +byte* uctoa::digit_values#1 +byte* uctoa::digit_values#10 +byte* uctoa::digit_values#2 +byte* uctoa::digit_values#3 +byte* uctoa::digit_values#4 +byte* uctoa::digit_values#5 +byte* uctoa::digit_values#6 +byte* uctoa::digit_values#7 +byte* uctoa::digit_values#8 +byte* uctoa::digit_values#9 +byte uctoa::max_digits +byte uctoa::max_digits#0 +byte uctoa::max_digits#1 +byte uctoa::max_digits#10 +byte uctoa::max_digits#2 +byte uctoa::max_digits#3 +byte uctoa::max_digits#4 +byte uctoa::max_digits#5 +byte uctoa::max_digits#6 +byte uctoa::max_digits#7 +byte uctoa::max_digits#8 +byte uctoa::max_digits#9 +byte uctoa::radix +byte uctoa::radix#0 +byte uctoa::radix#1 +byte uctoa::radix#2 +byte uctoa::radix#3 +byte uctoa::radix#4 +byte uctoa::started +byte uctoa::started#0 +byte uctoa::started#1 +byte uctoa::started#2 +byte uctoa::started#3 +byte uctoa::started#4 +byte uctoa::value +byte uctoa::value#0 +byte uctoa::value#1 +byte uctoa::value#10 +byte uctoa::value#11 +byte uctoa::value#12 +byte uctoa::value#13 +byte uctoa::value#14 +byte uctoa::value#15 +byte uctoa::value#2 +byte uctoa::value#3 +byte uctoa::value#4 +byte uctoa::value#5 +byte uctoa::value#6 +byte uctoa::value#7 +byte uctoa::value#8 +byte uctoa::value#9 +byte uctoa_append(byte* uctoa_append::buffer , byte uctoa_append::value , byte uctoa_append::sub) +bool~ uctoa_append::$0 +byte* uctoa_append::buffer +byte* uctoa_append::buffer#0 +byte* uctoa_append::buffer#1 +byte* uctoa_append::buffer#2 +byte* uctoa_append::buffer#3 +byte* uctoa_append::buffer#4 +byte uctoa_append::digit +byte uctoa_append::digit#0 +byte uctoa_append::digit#1 +byte uctoa_append::digit#2 +byte uctoa_append::digit#3 +byte uctoa_append::digit#4 +byte uctoa_append::return +byte uctoa_append::return#0 +byte uctoa_append::return#1 +byte uctoa_append::return#2 +byte uctoa_append::return#3 +byte uctoa_append::return#4 +byte uctoa_append::sub +byte uctoa_append::sub#0 +byte uctoa_append::sub#1 +byte uctoa_append::sub#2 +byte uctoa_append::sub#3 +byte uctoa_append::value +byte uctoa_append::value#0 +byte uctoa_append::value#1 +byte uctoa_append::value#2 +byte uctoa_append::value#3 +byte uctoa_append::value#4 +byte uctoa_append::value#5 +void ultoa(dword ultoa::value , byte* ultoa::buffer , byte ultoa::radix) +bool~ ultoa::$0 +bool~ ultoa::$1 +byte~ ultoa::$10 +byte~ ultoa::$11 +bool~ ultoa::$2 +bool~ ultoa::$3 +number~ ultoa::$4 +bool~ ultoa::$5 +bool~ ultoa::$6 +bool~ ultoa::$7 +bool~ ultoa::$8 +dword~ ultoa::$9 +byte* ultoa::buffer +byte* ultoa::buffer#0 +byte* ultoa::buffer#1 +byte* ultoa::buffer#10 +byte* ultoa::buffer#11 +byte* ultoa::buffer#12 +byte* ultoa::buffer#13 +byte* ultoa::buffer#14 +byte* ultoa::buffer#15 +byte* ultoa::buffer#16 +byte* ultoa::buffer#17 +byte* ultoa::buffer#18 +byte* ultoa::buffer#19 +byte* ultoa::buffer#2 +byte* ultoa::buffer#20 +byte* ultoa::buffer#21 +byte* ultoa::buffer#3 +byte* ultoa::buffer#4 +byte* ultoa::buffer#5 +byte* ultoa::buffer#6 +byte* ultoa::buffer#7 +byte* ultoa::buffer#8 +byte* ultoa::buffer#9 +byte ultoa::digit +byte ultoa::digit#0 +byte ultoa::digit#1 +byte ultoa::digit#2 +byte ultoa::digit#3 +byte ultoa::digit#4 +byte ultoa::digit#5 +byte ultoa::digit#6 +dword ultoa::digit_value +dword ultoa::digit_value#0 +dword ultoa::digit_value#1 +dword* ultoa::digit_values +dword* ultoa::digit_values#0 +dword* ultoa::digit_values#1 +dword* ultoa::digit_values#10 +dword* ultoa::digit_values#2 +dword* ultoa::digit_values#3 +dword* ultoa::digit_values#4 +dword* ultoa::digit_values#5 +dword* ultoa::digit_values#6 +dword* ultoa::digit_values#7 +dword* ultoa::digit_values#8 +dword* ultoa::digit_values#9 +byte ultoa::max_digits +byte ultoa::max_digits#0 +byte ultoa::max_digits#1 +byte ultoa::max_digits#10 +byte ultoa::max_digits#2 +byte ultoa::max_digits#3 +byte ultoa::max_digits#4 +byte ultoa::max_digits#5 +byte ultoa::max_digits#6 +byte ultoa::max_digits#7 +byte ultoa::max_digits#8 +byte ultoa::max_digits#9 +byte ultoa::radix +byte ultoa::radix#0 +byte ultoa::radix#1 +byte ultoa::radix#2 +byte ultoa::radix#3 +byte ultoa::radix#4 +byte ultoa::started +byte ultoa::started#0 +byte ultoa::started#1 +byte ultoa::started#2 +byte ultoa::started#3 +byte ultoa::started#4 +dword ultoa::value +dword ultoa::value#0 +dword ultoa::value#1 +dword ultoa::value#10 +dword ultoa::value#11 +dword ultoa::value#12 +dword ultoa::value#13 +dword ultoa::value#14 +dword ultoa::value#15 +dword ultoa::value#2 +dword ultoa::value#3 +dword ultoa::value#4 +dword ultoa::value#5 +dword ultoa::value#6 +dword ultoa::value#7 +dword ultoa::value#8 +dword ultoa::value#9 +dword ultoa_append(byte* ultoa_append::buffer , dword ultoa_append::value , dword ultoa_append::sub) +bool~ ultoa_append::$0 +byte* ultoa_append::buffer +byte* ultoa_append::buffer#0 +byte* ultoa_append::buffer#1 +byte* ultoa_append::buffer#2 +byte* ultoa_append::buffer#3 +byte* ultoa_append::buffer#4 +byte ultoa_append::digit +byte ultoa_append::digit#0 +byte ultoa_append::digit#1 +byte ultoa_append::digit#2 +byte ultoa_append::digit#3 +byte ultoa_append::digit#4 +dword ultoa_append::return +dword ultoa_append::return#0 +dword ultoa_append::return#1 +dword ultoa_append::return#2 +dword ultoa_append::return#3 +dword ultoa_append::return#4 +dword ultoa_append::sub +dword ultoa_append::sub#0 +dword ultoa_append::sub#1 +dword ultoa_append::sub#2 +dword ultoa_append::sub#3 +dword ultoa_append::value +dword ultoa_append::value#0 +dword ultoa_append::value#1 +dword ultoa_append::value#2 +dword ultoa_append::value#3 +dword ultoa_append::value#4 +dword ultoa_append::value#5 +void utoa(word utoa::value , byte* utoa::buffer , byte utoa::radix) +bool~ utoa::$0 +bool~ utoa::$1 +byte~ utoa::$10 +byte~ utoa::$11 +bool~ utoa::$2 +bool~ utoa::$3 +number~ utoa::$4 +bool~ utoa::$5 +bool~ utoa::$6 +bool~ utoa::$7 +bool~ utoa::$8 +word~ utoa::$9 +byte* utoa::buffer +byte* utoa::buffer#0 +byte* utoa::buffer#1 +byte* utoa::buffer#10 +byte* utoa::buffer#11 +byte* utoa::buffer#12 +byte* utoa::buffer#13 +byte* utoa::buffer#14 +byte* utoa::buffer#15 +byte* utoa::buffer#16 +byte* utoa::buffer#17 +byte* utoa::buffer#18 +byte* utoa::buffer#19 +byte* utoa::buffer#2 +byte* utoa::buffer#20 +byte* utoa::buffer#21 +byte* utoa::buffer#3 +byte* utoa::buffer#4 +byte* utoa::buffer#5 +byte* utoa::buffer#6 +byte* utoa::buffer#7 +byte* utoa::buffer#8 +byte* utoa::buffer#9 +byte utoa::digit +byte utoa::digit#0 +byte utoa::digit#1 +byte utoa::digit#2 +byte utoa::digit#3 +byte utoa::digit#4 +byte utoa::digit#5 +byte utoa::digit#6 +word utoa::digit_value +word utoa::digit_value#0 +word utoa::digit_value#1 +word* utoa::digit_values +word* utoa::digit_values#0 +word* utoa::digit_values#1 +word* utoa::digit_values#10 +word* utoa::digit_values#2 +word* utoa::digit_values#3 +word* utoa::digit_values#4 +word* utoa::digit_values#5 +word* utoa::digit_values#6 +word* utoa::digit_values#7 +word* utoa::digit_values#8 +word* utoa::digit_values#9 +byte utoa::max_digits +byte utoa::max_digits#0 +byte utoa::max_digits#1 +byte utoa::max_digits#10 +byte utoa::max_digits#2 +byte utoa::max_digits#3 +byte utoa::max_digits#4 +byte utoa::max_digits#5 +byte utoa::max_digits#6 +byte utoa::max_digits#7 +byte utoa::max_digits#8 +byte utoa::max_digits#9 +byte utoa::radix +byte utoa::radix#0 +byte utoa::radix#1 +byte utoa::radix#2 +byte utoa::radix#3 +byte utoa::radix#4 +byte utoa::started +byte utoa::started#0 +byte utoa::started#1 +byte utoa::started#2 +byte utoa::started#3 +byte utoa::started#4 +word utoa::value +word utoa::value#0 +word utoa::value#1 +word utoa::value#10 +word utoa::value#11 +word utoa::value#12 +word utoa::value#13 +word utoa::value#14 +word utoa::value#15 +word utoa::value#2 +word utoa::value#3 +word utoa::value#4 +word utoa::value#5 +word utoa::value#6 +word utoa::value#7 +word utoa::value#8 +word utoa::value#9 +word utoa_append(byte* utoa_append::buffer , word utoa_append::value , word utoa_append::sub) +bool~ utoa_append::$0 +byte* utoa_append::buffer +byte* utoa_append::buffer#0 +byte* utoa_append::buffer#1 +byte* utoa_append::buffer#2 +byte* utoa_append::buffer#3 +byte* utoa_append::buffer#4 +byte utoa_append::digit +byte utoa_append::digit#0 +byte utoa_append::digit#1 +byte utoa_append::digit#2 +byte utoa_append::digit#3 +byte utoa_append::digit#4 +word utoa_append::return +word utoa_append::return#0 +word utoa_append::return#1 +word utoa_append::return#2 +word utoa_append::return#3 +word utoa_append::return#4 +word utoa_append::sub +word utoa_append::sub#0 +word utoa_append::sub#1 +word utoa_append::sub#2 +word utoa_append::sub#3 +word utoa_append::value +word utoa_append::value#0 +word utoa_append::value#1 +word utoa_append::value#2 +word utoa_append::value#3 +word utoa_append::value#4 +word utoa_append::value#5 +const byte* vera_layer_backcolor[2] = { BLUE, BLUE } +const byte** vera_layer_config[2] = { VERA_L0_CONFIG, VERA_L1_CONFIG } +byte vera_layer_get_color(byte vera_layer_get_color::layer) +byte~ vera_layer_get_color::$0 +byte~ vera_layer_get_color::$1 +byte~ vera_layer_get_color::$2 +byte~ vera_layer_get_color::$3 +bool~ vera_layer_get_color::$4 +byte* vera_layer_get_color::addr +byte* vera_layer_get_color::addr#0 +byte vera_layer_get_color::layer +byte vera_layer_get_color::layer#0 +byte vera_layer_get_color::layer#1 +byte vera_layer_get_color::layer#2 +byte vera_layer_get_color::layer#3 +byte vera_layer_get_color::layer#4 +byte vera_layer_get_color::return +byte vera_layer_get_color::return#0 +byte vera_layer_get_color::return#1 +byte vera_layer_get_color::return#2 +byte vera_layer_get_color::return#3 +byte vera_layer_get_color::return#4 +byte vera_layer_get_color::return#5 +byte vera_layer_get_color::return#6 +byte vera_layer_get_color::return#7 +byte vera_layer_get_mapbase_bank(byte vera_layer_get_mapbase_bank::layer) +byte vera_layer_get_mapbase_bank::layer +byte vera_layer_get_mapbase_bank::layer#0 +byte vera_layer_get_mapbase_bank::layer#1 +byte vera_layer_get_mapbase_bank::return +byte vera_layer_get_mapbase_bank::return#0 +byte vera_layer_get_mapbase_bank::return#1 +byte vera_layer_get_mapbase_bank::return#2 +byte vera_layer_get_mapbase_bank::return#3 +byte vera_layer_get_mapbase_bank::return#4 +word vera_layer_get_mapbase_offset(byte vera_layer_get_mapbase_offset::layer) +byte~ vera_layer_get_mapbase_offset::$0 +byte vera_layer_get_mapbase_offset::layer +byte vera_layer_get_mapbase_offset::layer#0 +byte vera_layer_get_mapbase_offset::layer#1 +word vera_layer_get_mapbase_offset::return +word vera_layer_get_mapbase_offset::return#0 +word vera_layer_get_mapbase_offset::return#1 +word vera_layer_get_mapbase_offset::return#2 +word vera_layer_get_mapbase_offset::return#3 +word vera_layer_get_mapbase_offset::return#4 +byte vera_layer_get_rowshift(byte vera_layer_get_rowshift::layer) +byte vera_layer_get_rowshift::layer +byte vera_layer_get_rowshift::layer#0 +byte vera_layer_get_rowshift::layer#1 +byte vera_layer_get_rowshift::return +byte vera_layer_get_rowshift::return#0 +byte vera_layer_get_rowshift::return#1 +byte vera_layer_get_rowshift::return#2 +byte vera_layer_get_rowshift::return#3 +byte vera_layer_get_rowshift::return#4 +word vera_layer_get_rowskip(byte vera_layer_get_rowskip::layer) +byte~ vera_layer_get_rowskip::$0 +byte vera_layer_get_rowskip::layer +byte vera_layer_get_rowskip::layer#0 +byte vera_layer_get_rowskip::layer#1 +word vera_layer_get_rowskip::return +word vera_layer_get_rowskip::return#0 +word vera_layer_get_rowskip::return#1 +word vera_layer_get_rowskip::return#2 +word vera_layer_get_rowskip::return#3 +word vera_layer_get_rowskip::return#4 +const byte** vera_layer_mapbase[2] = { VERA_L0_MAPBASE, VERA_L1_MAPBASE } +void vera_layer_mode_text(byte vera_layer_mode_text::layer , dword vera_layer_mode_text::mapbase_address , dword vera_layer_mode_text::tilebase_address , word vera_layer_mode_text::mapwidth , word vera_layer_mode_text::mapheight , byte vera_layer_mode_text::tilewidth , byte vera_layer_mode_text::tileheight , word vera_layer_mode_text::color_mode) +word vera_layer_mode_text::color_mode +word vera_layer_mode_text::color_mode#0 +word vera_layer_mode_text::color_mode#1 +word vera_layer_mode_text::color_mode#2 +word vera_layer_mode_text::color_mode#3 +byte vera_layer_mode_text::layer +byte vera_layer_mode_text::layer#0 +byte vera_layer_mode_text::layer#1 +byte vera_layer_mode_text::layer#2 +byte vera_layer_mode_text::layer#3 +byte vera_layer_mode_text::layer#4 +byte vera_layer_mode_text::layer#5 +dword vera_layer_mode_text::mapbase_address +dword vera_layer_mode_text::mapbase_address#0 +dword vera_layer_mode_text::mapbase_address#1 +word vera_layer_mode_text::mapheight +word vera_layer_mode_text::mapheight#0 +word vera_layer_mode_text::mapheight#1 +word vera_layer_mode_text::mapwidth +word vera_layer_mode_text::mapwidth#0 +word vera_layer_mode_text::mapwidth#1 +dword vera_layer_mode_text::tilebase_address +dword vera_layer_mode_text::tilebase_address#0 +dword vera_layer_mode_text::tilebase_address#1 +byte vera_layer_mode_text::tileheight +byte vera_layer_mode_text::tileheight#0 +byte vera_layer_mode_text::tileheight#1 +byte vera_layer_mode_text::tilewidth +byte vera_layer_mode_text::tilewidth#0 +byte vera_layer_mode_text::tilewidth#1 +void vera_layer_mode_tile(byte vera_layer_mode_tile::layer , dword vera_layer_mode_tile::mapbase_address , dword vera_layer_mode_tile::tilebase_address , word vera_layer_mode_tile::mapwidth , word vera_layer_mode_tile::mapheight , byte vera_layer_mode_tile::tilewidth , byte vera_layer_mode_tile::tileheight , byte vera_layer_mode_tile::color_depth) +word~ vera_layer_mode_tile::$1 +word~ vera_layer_mode_tile::$10 +byte~ vera_layer_mode_tile::$11 +byte~ vera_layer_mode_tile::$13 +byte~ vera_layer_mode_tile::$14 +byte~ vera_layer_mode_tile::$15 +byte~ vera_layer_mode_tile::$16 +byte~ vera_layer_mode_tile::$17 +byte~ vera_layer_mode_tile::$18 +byte~ vera_layer_mode_tile::$19 +word~ vera_layer_mode_tile::$2 +byte~ vera_layer_mode_tile::$20 +dword~ vera_layer_mode_tile::$3 +word~ vera_layer_mode_tile::$4 +byte~ vera_layer_mode_tile::$5 +word~ vera_layer_mode_tile::$7 +word~ vera_layer_mode_tile::$8 +dword~ vera_layer_mode_tile::$9 +byte vera_layer_mode_tile::color_depth +byte vera_layer_mode_tile::color_depth#0 +byte vera_layer_mode_tile::color_depth#1 +byte vera_layer_mode_tile::color_depth#2 +byte vera_layer_mode_tile::color_depth#3 +byte vera_layer_mode_tile::color_depth#4 +byte vera_layer_mode_tile::config +byte vera_layer_mode_tile::config#0 +byte vera_layer_mode_tile::config#1 +byte vera_layer_mode_tile::config#10 +byte vera_layer_mode_tile::config#11 +byte vera_layer_mode_tile::config#12 +byte vera_layer_mode_tile::config#13 +byte vera_layer_mode_tile::config#14 +byte vera_layer_mode_tile::config#15 +byte vera_layer_mode_tile::config#16 +byte vera_layer_mode_tile::config#17 +byte vera_layer_mode_tile::config#18 +byte vera_layer_mode_tile::config#19 +byte vera_layer_mode_tile::config#2 +byte vera_layer_mode_tile::config#20 +byte vera_layer_mode_tile::config#21 +byte vera_layer_mode_tile::config#22 +byte vera_layer_mode_tile::config#23 +byte vera_layer_mode_tile::config#24 +byte vera_layer_mode_tile::config#25 +byte vera_layer_mode_tile::config#26 +byte vera_layer_mode_tile::config#27 +byte vera_layer_mode_tile::config#28 +byte vera_layer_mode_tile::config#29 +byte vera_layer_mode_tile::config#3 +byte vera_layer_mode_tile::config#30 +byte vera_layer_mode_tile::config#31 +byte vera_layer_mode_tile::config#32 +byte vera_layer_mode_tile::config#33 +byte vera_layer_mode_tile::config#34 +byte vera_layer_mode_tile::config#35 +byte vera_layer_mode_tile::config#36 +byte vera_layer_mode_tile::config#4 +byte vera_layer_mode_tile::config#5 +byte vera_layer_mode_tile::config#6 +byte vera_layer_mode_tile::config#7 +byte vera_layer_mode_tile::config#8 +byte vera_layer_mode_tile::config#9 +byte vera_layer_mode_tile::layer +byte vera_layer_mode_tile::layer#0 +byte vera_layer_mode_tile::layer#1 +byte vera_layer_mode_tile::layer#10 +byte vera_layer_mode_tile::layer#11 +byte vera_layer_mode_tile::layer#12 +byte vera_layer_mode_tile::layer#13 +byte vera_layer_mode_tile::layer#14 +byte vera_layer_mode_tile::layer#15 +byte vera_layer_mode_tile::layer#16 +byte vera_layer_mode_tile::layer#17 +byte vera_layer_mode_tile::layer#18 +byte vera_layer_mode_tile::layer#19 +byte vera_layer_mode_tile::layer#2 +byte vera_layer_mode_tile::layer#20 +byte vera_layer_mode_tile::layer#21 +byte vera_layer_mode_tile::layer#22 +byte vera_layer_mode_tile::layer#23 +byte vera_layer_mode_tile::layer#24 +byte vera_layer_mode_tile::layer#25 +byte vera_layer_mode_tile::layer#26 +byte vera_layer_mode_tile::layer#27 +byte vera_layer_mode_tile::layer#28 +byte vera_layer_mode_tile::layer#29 +byte vera_layer_mode_tile::layer#3 +byte vera_layer_mode_tile::layer#30 +byte vera_layer_mode_tile::layer#31 +byte vera_layer_mode_tile::layer#32 +byte vera_layer_mode_tile::layer#33 +byte vera_layer_mode_tile::layer#34 +byte vera_layer_mode_tile::layer#35 +byte vera_layer_mode_tile::layer#4 +byte vera_layer_mode_tile::layer#5 +byte vera_layer_mode_tile::layer#6 +byte vera_layer_mode_tile::layer#7 +byte vera_layer_mode_tile::layer#8 +byte vera_layer_mode_tile::layer#9 +byte vera_layer_mode_tile::mapbase +byte vera_layer_mode_tile::mapbase#0 +dword vera_layer_mode_tile::mapbase_address +dword vera_layer_mode_tile::mapbase_address#0 +dword vera_layer_mode_tile::mapbase_address#1 +dword vera_layer_mode_tile::mapbase_address#10 +dword vera_layer_mode_tile::mapbase_address#11 +dword vera_layer_mode_tile::mapbase_address#12 +dword vera_layer_mode_tile::mapbase_address#13 +dword vera_layer_mode_tile::mapbase_address#14 +dword vera_layer_mode_tile::mapbase_address#15 +dword vera_layer_mode_tile::mapbase_address#16 +dword vera_layer_mode_tile::mapbase_address#17 +dword vera_layer_mode_tile::mapbase_address#18 +dword vera_layer_mode_tile::mapbase_address#19 +dword vera_layer_mode_tile::mapbase_address#2 +dword vera_layer_mode_tile::mapbase_address#20 +dword vera_layer_mode_tile::mapbase_address#21 +dword vera_layer_mode_tile::mapbase_address#22 +dword vera_layer_mode_tile::mapbase_address#23 +dword vera_layer_mode_tile::mapbase_address#24 +dword vera_layer_mode_tile::mapbase_address#25 +dword vera_layer_mode_tile::mapbase_address#26 +dword vera_layer_mode_tile::mapbase_address#27 +dword vera_layer_mode_tile::mapbase_address#3 +dword vera_layer_mode_tile::mapbase_address#4 +dword vera_layer_mode_tile::mapbase_address#5 +dword vera_layer_mode_tile::mapbase_address#6 +dword vera_layer_mode_tile::mapbase_address#7 +dword vera_layer_mode_tile::mapbase_address#8 +dword vera_layer_mode_tile::mapbase_address#9 +word vera_layer_mode_tile::mapheight +word vera_layer_mode_tile::mapheight#0 +word vera_layer_mode_tile::mapheight#1 +word vera_layer_mode_tile::mapheight#10 +word vera_layer_mode_tile::mapheight#11 +word vera_layer_mode_tile::mapheight#12 +word vera_layer_mode_tile::mapheight#13 +word vera_layer_mode_tile::mapheight#14 +word vera_layer_mode_tile::mapheight#15 +word vera_layer_mode_tile::mapheight#16 +word vera_layer_mode_tile::mapheight#17 +word vera_layer_mode_tile::mapheight#18 +word vera_layer_mode_tile::mapheight#19 +word vera_layer_mode_tile::mapheight#2 +word vera_layer_mode_tile::mapheight#20 +word vera_layer_mode_tile::mapheight#3 +word vera_layer_mode_tile::mapheight#4 +word vera_layer_mode_tile::mapheight#5 +word vera_layer_mode_tile::mapheight#6 +word vera_layer_mode_tile::mapheight#7 +word vera_layer_mode_tile::mapheight#8 +word vera_layer_mode_tile::mapheight#9 +word vera_layer_mode_tile::mapwidth +word vera_layer_mode_tile::mapwidth#0 +word vera_layer_mode_tile::mapwidth#1 +word vera_layer_mode_tile::mapwidth#10 +word vera_layer_mode_tile::mapwidth#11 +word vera_layer_mode_tile::mapwidth#12 +word vera_layer_mode_tile::mapwidth#2 +word vera_layer_mode_tile::mapwidth#3 +word vera_layer_mode_tile::mapwidth#4 +word vera_layer_mode_tile::mapwidth#5 +word vera_layer_mode_tile::mapwidth#6 +word vera_layer_mode_tile::mapwidth#7 +word vera_layer_mode_tile::mapwidth#8 +word vera_layer_mode_tile::mapwidth#9 +byte vera_layer_mode_tile::tilebase +byte vera_layer_mode_tile::tilebase#0 +byte vera_layer_mode_tile::tilebase#1 +byte vera_layer_mode_tile::tilebase#10 +byte vera_layer_mode_tile::tilebase#11 +byte vera_layer_mode_tile::tilebase#12 +byte vera_layer_mode_tile::tilebase#13 +byte vera_layer_mode_tile::tilebase#2 +byte vera_layer_mode_tile::tilebase#3 +byte vera_layer_mode_tile::tilebase#4 +byte vera_layer_mode_tile::tilebase#5 +byte vera_layer_mode_tile::tilebase#6 +byte vera_layer_mode_tile::tilebase#7 +byte vera_layer_mode_tile::tilebase#8 +byte vera_layer_mode_tile::tilebase#9 +dword vera_layer_mode_tile::tilebase_address +dword vera_layer_mode_tile::tilebase_address#0 +dword vera_layer_mode_tile::tilebase_address#1 +dword vera_layer_mode_tile::tilebase_address#10 +dword vera_layer_mode_tile::tilebase_address#11 +dword vera_layer_mode_tile::tilebase_address#12 +dword vera_layer_mode_tile::tilebase_address#13 +dword vera_layer_mode_tile::tilebase_address#14 +dword vera_layer_mode_tile::tilebase_address#15 +dword vera_layer_mode_tile::tilebase_address#16 +dword vera_layer_mode_tile::tilebase_address#17 +dword vera_layer_mode_tile::tilebase_address#18 +dword vera_layer_mode_tile::tilebase_address#19 +dword vera_layer_mode_tile::tilebase_address#2 +dword vera_layer_mode_tile::tilebase_address#20 +dword vera_layer_mode_tile::tilebase_address#21 +dword vera_layer_mode_tile::tilebase_address#22 +dword vera_layer_mode_tile::tilebase_address#23 +dword vera_layer_mode_tile::tilebase_address#24 +dword vera_layer_mode_tile::tilebase_address#25 +dword vera_layer_mode_tile::tilebase_address#26 +dword vera_layer_mode_tile::tilebase_address#27 +dword vera_layer_mode_tile::tilebase_address#28 +dword vera_layer_mode_tile::tilebase_address#3 +dword vera_layer_mode_tile::tilebase_address#4 +dword vera_layer_mode_tile::tilebase_address#5 +dword vera_layer_mode_tile::tilebase_address#6 +dword vera_layer_mode_tile::tilebase_address#7 +dword vera_layer_mode_tile::tilebase_address#8 +dword vera_layer_mode_tile::tilebase_address#9 +byte vera_layer_mode_tile::tileheight +byte vera_layer_mode_tile::tileheight#0 +byte vera_layer_mode_tile::tileheight#1 +byte vera_layer_mode_tile::tileheight#10 +byte vera_layer_mode_tile::tileheight#11 +byte vera_layer_mode_tile::tileheight#12 +byte vera_layer_mode_tile::tileheight#13 +byte vera_layer_mode_tile::tileheight#14 +byte vera_layer_mode_tile::tileheight#15 +byte vera_layer_mode_tile::tileheight#16 +byte vera_layer_mode_tile::tileheight#17 +byte vera_layer_mode_tile::tileheight#18 +byte vera_layer_mode_tile::tileheight#19 +byte vera_layer_mode_tile::tileheight#2 +byte vera_layer_mode_tile::tileheight#20 +byte vera_layer_mode_tile::tileheight#21 +byte vera_layer_mode_tile::tileheight#22 +byte vera_layer_mode_tile::tileheight#23 +byte vera_layer_mode_tile::tileheight#24 +byte vera_layer_mode_tile::tileheight#25 +byte vera_layer_mode_tile::tileheight#26 +byte vera_layer_mode_tile::tileheight#27 +byte vera_layer_mode_tile::tileheight#28 +byte vera_layer_mode_tile::tileheight#29 +byte vera_layer_mode_tile::tileheight#3 +byte vera_layer_mode_tile::tileheight#30 +byte vera_layer_mode_tile::tileheight#31 +byte vera_layer_mode_tile::tileheight#32 +byte vera_layer_mode_tile::tileheight#4 +byte vera_layer_mode_tile::tileheight#5 +byte vera_layer_mode_tile::tileheight#6 +byte vera_layer_mode_tile::tileheight#7 +byte vera_layer_mode_tile::tileheight#8 +byte vera_layer_mode_tile::tileheight#9 +byte vera_layer_mode_tile::tilewidth +byte vera_layer_mode_tile::tilewidth#0 +byte vera_layer_mode_tile::tilewidth#1 +byte vera_layer_mode_tile::tilewidth#10 +byte vera_layer_mode_tile::tilewidth#11 +byte vera_layer_mode_tile::tilewidth#12 +byte vera_layer_mode_tile::tilewidth#13 +byte vera_layer_mode_tile::tilewidth#14 +byte vera_layer_mode_tile::tilewidth#15 +byte vera_layer_mode_tile::tilewidth#16 +byte vera_layer_mode_tile::tilewidth#17 +byte vera_layer_mode_tile::tilewidth#18 +byte vera_layer_mode_tile::tilewidth#19 +byte vera_layer_mode_tile::tilewidth#2 +byte vera_layer_mode_tile::tilewidth#20 +byte vera_layer_mode_tile::tilewidth#21 +byte vera_layer_mode_tile::tilewidth#22 +byte vera_layer_mode_tile::tilewidth#23 +byte vera_layer_mode_tile::tilewidth#24 +byte vera_layer_mode_tile::tilewidth#25 +byte vera_layer_mode_tile::tilewidth#26 +byte vera_layer_mode_tile::tilewidth#27 +byte vera_layer_mode_tile::tilewidth#28 +byte vera_layer_mode_tile::tilewidth#3 +byte vera_layer_mode_tile::tilewidth#4 +byte vera_layer_mode_tile::tilewidth#5 +byte vera_layer_mode_tile::tilewidth#6 +byte vera_layer_mode_tile::tilewidth#7 +byte vera_layer_mode_tile::tilewidth#8 +byte vera_layer_mode_tile::tilewidth#9 +const byte* vera_layer_rowshift[2] = { 0, 0 } +const word* vera_layer_rowskip[2] = { 0, 0 } +byte vera_layer_set_backcolor(byte vera_layer_set_backcolor::layer , byte vera_layer_set_backcolor::color) +byte vera_layer_set_backcolor::color +byte vera_layer_set_backcolor::color#0 +byte vera_layer_set_backcolor::color#1 +byte vera_layer_set_backcolor::layer +byte vera_layer_set_backcolor::layer#0 +byte vera_layer_set_backcolor::layer#1 +byte vera_layer_set_backcolor::old +byte vera_layer_set_backcolor::old#0 +byte vera_layer_set_backcolor::return +byte vera_layer_set_backcolor::return#0 +byte vera_layer_set_backcolor::return#1 +byte vera_layer_set_backcolor::return#2 +byte vera_layer_set_backcolor::return#3 +void vera_layer_set_config(byte vera_layer_set_config::layer , byte vera_layer_set_config::config) +byte~ vera_layer_set_config::$0 +byte* vera_layer_set_config::addr +byte* vera_layer_set_config::addr#0 +byte vera_layer_set_config::config +byte vera_layer_set_config::config#0 +byte vera_layer_set_config::config#1 +byte vera_layer_set_config::layer +byte vera_layer_set_config::layer#0 +byte vera_layer_set_config::layer#1 +void vera_layer_set_mapbase(byte vera_layer_set_mapbase::layer , byte vera_layer_set_mapbase::mapbase) +byte~ vera_layer_set_mapbase::$0 +byte* vera_layer_set_mapbase::addr +byte* vera_layer_set_mapbase::addr#0 +byte vera_layer_set_mapbase::layer +byte vera_layer_set_mapbase::layer#0 +byte vera_layer_set_mapbase::layer#1 +byte vera_layer_set_mapbase::layer#2 +byte vera_layer_set_mapbase::layer#3 +byte vera_layer_set_mapbase::mapbase +byte vera_layer_set_mapbase::mapbase#0 +byte vera_layer_set_mapbase::mapbase#1 +byte vera_layer_set_mapbase::mapbase#2 +byte vera_layer_set_mapbase::mapbase#3 +void vera_layer_set_text_color_mode(byte vera_layer_set_text_color_mode::layer , byte vera_layer_set_text_color_mode::color_mode) +byte~ vera_layer_set_text_color_mode::$0 +byte* vera_layer_set_text_color_mode::addr +byte* vera_layer_set_text_color_mode::addr#0 +byte vera_layer_set_text_color_mode::color_mode +byte vera_layer_set_text_color_mode::color_mode#0 +byte vera_layer_set_text_color_mode::color_mode#1 +byte vera_layer_set_text_color_mode::color_mode#2 +byte vera_layer_set_text_color_mode::layer +byte vera_layer_set_text_color_mode::layer#0 +byte vera_layer_set_text_color_mode::layer#1 +byte vera_layer_set_text_color_mode::layer#2 +byte vera_layer_set_textcolor(byte vera_layer_set_textcolor::layer , byte vera_layer_set_textcolor::color) +byte vera_layer_set_textcolor::color +byte vera_layer_set_textcolor::color#0 +byte vera_layer_set_textcolor::color#1 +byte vera_layer_set_textcolor::layer +byte vera_layer_set_textcolor::layer#0 +byte vera_layer_set_textcolor::layer#1 +byte vera_layer_set_textcolor::old +byte vera_layer_set_textcolor::old#0 +byte vera_layer_set_textcolor::return +byte vera_layer_set_textcolor::return#0 +byte vera_layer_set_textcolor::return#1 +byte vera_layer_set_textcolor::return#2 +byte vera_layer_set_textcolor::return#3 +void vera_layer_set_tilebase(byte vera_layer_set_tilebase::layer , byte vera_layer_set_tilebase::tilebase) +byte~ vera_layer_set_tilebase::$0 +byte* vera_layer_set_tilebase::addr +byte* vera_layer_set_tilebase::addr#0 +byte vera_layer_set_tilebase::layer +byte vera_layer_set_tilebase::layer#0 +byte vera_layer_set_tilebase::layer#1 +byte vera_layer_set_tilebase::tilebase +byte vera_layer_set_tilebase::tilebase#0 +byte vera_layer_set_tilebase::tilebase#1 +const byte* vera_layer_textcolor[2] = { WHITE, WHITE } +const byte** vera_layer_tilebase[2] = { VERA_L0_TILEBASE, VERA_L1_TILEBASE } +const dword* vera_mapbase_address[2] = { 0, 0 } +const byte* vera_mapbase_bank[2] = { 0, 0 } +const word* vera_mapbase_offset[2] = { 0, 0 } +const dword* vera_tilebase_address[2] = { 0, 0 } +const byte* vera_tilebase_bank[2] = { 0, 0 } +const word* vera_tilebase_offset[2] = { 0, 0 } + +Adding number conversion cast (unumber) 0 in strupr::$1 = 0 != *strupr::src#2 +Adding number conversion cast (unumber) 0 in strlen::$0 = 0 != *strlen::str#2 +Adding number conversion cast (unumber) 0 in vera_layer_get_color::$4 = 0 != vera_layer_get_color::$0 +Adding number conversion cast (unumber) 4 in vera_layer_get_color::$1 = vera_layer_backcolor[vera_layer_get_color::layer#4] << 4 +Adding number conversion cast (unumber) 1 in if(vera_layer_mode_tile::color_depth#1==1) goto vera_layer_mode_tile::@4 +Adding number conversion cast (unumber) 2 in if(vera_layer_mode_tile::color_depth#2==2) goto vera_layer_mode_tile::@5 +Adding number conversion cast (unumber) 4 in if(vera_layer_mode_tile::color_depth#3==4) goto vera_layer_mode_tile::@6 +Adding number conversion cast (unumber) 8 in if(vera_layer_mode_tile::color_depth#4==8) goto vera_layer_mode_tile::@7 +Adding number conversion cast (unumber) $20 in if(vera_layer_mode_tile::mapwidth#1==$20) goto vera_layer_mode_tile::@12 +Adding number conversion cast (unumber) 6 in vera_layer_rowshift[vera_layer_mode_tile::layer#1] = 6 +Adding number conversion cast (unumber) $40 in vera_layer_rowskip[vera_layer_mode_tile::$13] = $40 +Adding number conversion cast (unumber) $40 in if(vera_layer_mode_tile::mapwidth#2==$40) goto vera_layer_mode_tile::@13 +Adding number conversion cast (unumber) 7 in vera_layer_rowshift[vera_layer_mode_tile::layer#2] = 7 +Adding number conversion cast (unumber) $80 in vera_layer_rowskip[vera_layer_mode_tile::$14] = $80 +Adding number conversion cast (unumber) $80 in if(vera_layer_mode_tile::mapwidth#3==$80) goto vera_layer_mode_tile::@14 +Adding number conversion cast (unumber) 8 in vera_layer_rowshift[vera_layer_mode_tile::layer#3] = 8 +Adding number conversion cast (unumber) $100 in vera_layer_rowskip[vera_layer_mode_tile::$15] = $100 +Adding number conversion cast (unumber) $100 in if(vera_layer_mode_tile::mapwidth#4==$100) goto vera_layer_mode_tile::@15 +Adding number conversion cast (unumber) 9 in vera_layer_rowshift[vera_layer_mode_tile::layer#4] = 9 +Adding number conversion cast (unumber) $200 in vera_layer_rowskip[vera_layer_mode_tile::$16] = $200 +Adding number conversion cast (unumber) $20 in if(vera_layer_mode_tile::mapheight#1==$20) goto vera_layer_mode_tile::@20 +Adding number conversion cast (unumber) $40 in if(vera_layer_mode_tile::mapheight#2==$40) goto vera_layer_mode_tile::@21 +Adding number conversion cast (unumber) $80 in if(vera_layer_mode_tile::mapheight#3==$80) goto vera_layer_mode_tile::@22 +Adding number conversion cast (unumber) $100 in if(vera_layer_mode_tile::mapheight#4==$100) goto vera_layer_mode_tile::@23 +Adding number conversion cast (unumber) 1 in vera_layer_mode_tile::$3 = vera_layer_mode_tile::mapbase_address#2 >> 1 +Adding number conversion cast (unumber) 1 in vera_layer_mode_tile::$9 = vera_layer_mode_tile::tilebase_address#2 >> 1 +Adding number conversion cast (unumber) 8 in if(vera_layer_mode_tile::tilewidth#1==8) goto vera_layer_mode_tile::@26 +Adding number conversion cast (unumber) $10 in if(vera_layer_mode_tile::tilewidth#2==$10) goto vera_layer_mode_tile::@27 +Adding number conversion cast (unumber) 8 in if(vera_layer_mode_tile::tileheight#1==8) goto vera_layer_mode_tile::@30 +Adding number conversion cast (unumber) $10 in if(vera_layer_mode_tile::tileheight#2==$10) goto vera_layer_mode_tile::@31 +Adding number conversion cast (unumber) 1 in vera_layer_mode_tile::color_depth#0 = 1 +Adding number conversion cast (unumber) $10 in if(vera_layer_mode_text::color_mode#1==$10) goto vera_layer_mode_text::@2 +Adding number conversion cast (unumber) $100 in if(vera_layer_mode_text::color_mode#2==$100) goto vera_layer_mode_text::@3 +Adding number conversion cast (unumber) 1 in vera_layer_mode_text::layer#0 = 1 +Adding number conversion cast (unumber) $80 in vera_layer_mode_text::mapwidth#0 = $80 +Adding number conversion cast (unumber) $40 in vera_layer_mode_text::mapheight#0 = $40 +Adding number conversion cast (unumber) 8 in vera_layer_mode_text::tilewidth#0 = 8 +Adding number conversion cast (unumber) 8 in vera_layer_mode_text::tileheight#0 = 8 +Adding number conversion cast (unumber) $10 in vera_layer_mode_text::color_mode#0 = $10 +Adding number conversion cast (unumber) 1 in screenlayer::layer#0 = 1 +Adding number conversion cast (unumber) 1 in vera_layer_set_textcolor::layer#0 = 1 +Adding number conversion cast (unumber) 1 in vera_layer_set_backcolor::layer#0 = 1 +Adding number conversion cast (unumber) 0 in vera_layer_set_mapbase::layer#1 = 0 +Adding number conversion cast (unumber) $20 in vera_layer_set_mapbase::mapbase#1 = $20 +Adding number conversion cast (unumber) 1 in vera_layer_set_mapbase::layer#2 = 1 +Adding number conversion cast (unumber) 0 in vera_layer_set_mapbase::mapbase#2 = 0 +Adding number conversion cast (unumber) 0 in gotoxy::x#0 = 0 +Adding number conversion cast (unumber) 1 in conio_x16_init::$9 = conio_screen_height - 1 +Adding number conversion cast (unumber) conio_x16_init::$9 in conio_x16_init::$9 = conio_screen_height - (unumber)1 +Adding number conversion cast (unumber) 0 in gotoxy::y#1 = 0 +Adding number conversion cast (unumber) 0 in gotoxy::x#1 = 0 +Adding number conversion cast (unumber) 7 in screensize::$0 = *VERA_DC_HSCALE >> 7 +Adding number conversion cast (unumber) $28 in screensize::$1 = $28 << screensize::hscale#0 +Adding number conversion cast (unumber) screensize::$1 in screensize::$1 = (unumber)$28 << screensize::hscale#0 +Adding number conversion cast (unumber) 7 in screensize::$2 = *VERA_DC_VSCALE >> 7 +Adding number conversion cast (unumber) $1e in screensize::$3 = $1e << screensize::vscale#0 +Adding number conversion cast (unumber) screensize::$3 in screensize::$3 = (unumber)$1e << screensize::vscale#0 +Adding number conversion cast (unumber) 1 in cputc::$2 = conio_cursor_x[conio_screen_layer] << 1 +Adding number conversion cast (unumber) 0 in cputc::$17 = 0 != cputc::scroll_enable#0 +Adding number conversion cast (unumber) 0 in conio_cursor_x[conio_screen_layer] = 0 +Adding number conversion cast (unumber) 0 in conio_cursor_x[conio_screen_layer] = 0 +Adding number conversion cast (unumber) 2 in insertup::$0 = conio_screen_width * 2 +Adding number conversion cast (unumber) insertup::$0 in insertup::$0 = conio_screen_width * (unumber)2 +Adding number conversion cast (unumber) 1 in insertup::$3 = insertup::i#3 - 1 +Adding number conversion cast (unumber) insertup::$3 in insertup::$3 = insertup::i#3 - (unumber)1 +Adding number conversion cast (unumber) insertup::$4 in insertup::$4 = insertup::$3 << conio_rowshift +Adding number conversion cast (unumber) 0 in memcpy_in_vram::dest_bank#0 = 0 +Adding number conversion cast (unumber) 0 in memcpy_in_vram::src_bank#0 = 0 +Adding number conversion cast (unumber) 0 in cscroll::$7 = 0 != conio_scroll_enable[conio_screen_layer] +Adding number conversion cast (unumber) 1 in cscroll::$5 = conio_screen_height - 1 +Adding number conversion cast (unumber) cscroll::$5 in cscroll::$5 = conio_screen_height - (unumber)1 +Adding number conversion cast (unumber) 0 in gotoxy::x#2 = 0 +Adding number conversion cast (unumber) 0 in cputs::$2 = 0 != cputs::$0 +Adding number conversion cast (unumber) 4 in screenlayer::vera_layer_get_width1_$1 = screenlayer::vera_layer_get_width1_$0 >> 4 +Adding number conversion cast (unumber) 6 in screenlayer::vera_layer_get_height1_$1 = screenlayer::vera_layer_get_height1_$0 >> 6 +Adding number conversion cast (unumber) 3 in uctoa::max_digits#1 = 3 +Adding number conversion cast (unumber) 2 in uctoa::max_digits#2 = 2 +Adding number conversion cast (unumber) 3 in uctoa::max_digits#3 = 3 +Adding number conversion cast (unumber) 8 in uctoa::max_digits#4 = 8 +Adding number conversion cast (unumber) 0 in *uctoa::buffer#2 = 0 +Adding number conversion cast (unumber) 1 in uctoa::$4 = uctoa::max_digits#5 - 1 +Adding number conversion cast (unumber) uctoa::$4 in uctoa::$4 = uctoa::max_digits#5 - (unumber)1 +Adding number conversion cast (unumber) 0 in *uctoa::buffer#3 = 0 +Adding number conversion cast (unumber) 1 in uctoa::started#1 = 1 +Adding number conversion cast (unumber) 5 in utoa::max_digits#1 = 5 +Adding number conversion cast (unumber) 4 in utoa::max_digits#2 = 4 +Adding number conversion cast (unumber) 6 in utoa::max_digits#3 = 6 +Adding number conversion cast (unumber) $10 in utoa::max_digits#4 = $10 +Adding number conversion cast (unumber) 0 in *utoa::buffer#2 = 0 +Adding number conversion cast (unumber) 1 in utoa::$4 = utoa::max_digits#5 - 1 +Adding number conversion cast (unumber) utoa::$4 in utoa::$4 = utoa::max_digits#5 - (unumber)1 +Adding number conversion cast (unumber) 0 in *utoa::buffer#3 = 0 +Adding number conversion cast (unumber) 1 in utoa::started#1 = 1 +Adding number conversion cast (unumber) $a in ultoa::max_digits#1 = $a +Adding number conversion cast (unumber) 8 in ultoa::max_digits#2 = 8 +Adding number conversion cast (unumber) $b in ultoa::max_digits#3 = $b +Adding number conversion cast (unumber) $20 in ultoa::max_digits#4 = $20 +Adding number conversion cast (unumber) 0 in *ultoa::buffer#2 = 0 +Adding number conversion cast (unumber) 1 in ultoa::$4 = ultoa::max_digits#5 - 1 +Adding number conversion cast (unumber) ultoa::$4 in ultoa::$4 = ultoa::max_digits#5 - (unumber)1 +Adding number conversion cast (unumber) 0 in *ultoa::buffer#3 = 0 +Adding number conversion cast (unumber) 1 in ultoa::started#1 = 1 +Adding number conversion cast (unumber) 0 in printf_ulong::$5 = 0 != printf_ulong::format_sign_always#3 +Adding number conversion cast (unumber) printf_ulong::$2 in CONIO_SCREEN_BANK#79 = phi( printf_ulong::@1/CONIO_SCREEN_BANK#89, printf_ulong::@2/CONIO_SCREEN_BANK#90 ) + CONIO_SCREEN_TEXT#90 = phi( printf_ulong::@1/CONIO_SCREEN_TEXT#102, printf_ulong::@2/CONIO_SCREEN_TEXT#103 ) + printf_ulong::format_upper_case#4 = phi( printf_ulong::@1/printf_ulong::format_upper_case#5, printf_ulong::@2/printf_ulong::format_upper_case#6 ) + printf_ulong::format_zero_padding#4 = phi( printf_ulong::@1/printf_ulong::format_zero_padding#5, printf_ulong::@2/printf_ulong::format_zero_padding#6 ) + printf_ulong::format_sign_always#5 = phi( printf_ulong::@1/printf_ulong::format_sign_always#6, printf_ulong::@2/printf_ulong::format_sign_always#7 ) + printf_ulong::format_justify_left#4 = phi( printf_ulong::@1/printf_ulong::format_justify_left#5, printf_ulong::@2/printf_ulong::format_justify_left#6 ) + printf_ulong::format_min_length#4 = phi( printf_ulong::@1/printf_ulong::format_min_length#5, printf_ulong::@2/printf_ulong::format_min_length#6 ) + printf_ulong::format_radix#3 = phi( printf_ulong::@1/printf_ulong::format_radix#5, printf_ulong::@2/printf_ulong::format_radix#6 ) + printf_ulong::uvalue#3 = phi( printf_ulong::@1/printf_ulong::uvalue#4, printf_ulong::@2/printf_ulong::uvalue#5 ) + printf_ulong::$2 = phi( printf_ulong::@1/printf_ulong::$1, printf_ulong::@2/printf_ulong::$0 ) +Adding number conversion cast (unumber) printf_ulong::$0 in CONIO_SCREEN_BANK#79 = phi( printf_ulong::@1/CONIO_SCREEN_BANK#89, printf_ulong::@2/CONIO_SCREEN_BANK#90 ) + CONIO_SCREEN_TEXT#90 = phi( printf_ulong::@1/CONIO_SCREEN_TEXT#102, printf_ulong::@2/CONIO_SCREEN_TEXT#103 ) + printf_ulong::format_upper_case#4 = phi( printf_ulong::@1/printf_ulong::format_upper_case#5, printf_ulong::@2/printf_ulong::format_upper_case#6 ) + printf_ulong::format_zero_padding#4 = phi( printf_ulong::@1/printf_ulong::format_zero_padding#5, printf_ulong::@2/printf_ulong::format_zero_padding#6 ) + printf_ulong::format_sign_always#5 = phi( printf_ulong::@1/printf_ulong::format_sign_always#6, printf_ulong::@2/printf_ulong::format_sign_always#7 ) + printf_ulong::format_justify_left#4 = phi( printf_ulong::@1/printf_ulong::format_justify_left#5, printf_ulong::@2/printf_ulong::format_justify_left#6 ) + printf_ulong::format_min_length#4 = phi( printf_ulong::@1/printf_ulong::format_min_length#5, printf_ulong::@2/printf_ulong::format_min_length#6 ) + printf_ulong::format_radix#3 = phi( printf_ulong::@1/printf_ulong::format_radix#5, printf_ulong::@2/printf_ulong::format_radix#6 ) + printf_ulong::uvalue#3 = phi( printf_ulong::@1/printf_ulong::uvalue#4, printf_ulong::@2/printf_ulong::uvalue#5 ) + printf_ulong::$2 = phi( printf_ulong::@1/printf_ulong::$1, printf_ulong::@2/printf_ulong::$0 ) +Adding number conversion cast (unumber) 0 in printf_uint::$5 = 0 != printf_uint::format_sign_always#2 +Adding number conversion cast (unumber) printf_uint::$2 in CONIO_SCREEN_BANK#80 = phi( printf_uint::@1/CONIO_SCREEN_BANK#91, printf_uint::@2/CONIO_SCREEN_BANK#92 ) + CONIO_SCREEN_TEXT#91 = phi( printf_uint::@1/CONIO_SCREEN_TEXT#104, printf_uint::@2/CONIO_SCREEN_TEXT#105 ) + printf_uint::format_upper_case#3 = phi( printf_uint::@1/printf_uint::format_upper_case#4, printf_uint::@2/printf_uint::format_upper_case#5 ) + printf_uint::format_zero_padding#3 = phi( printf_uint::@1/printf_uint::format_zero_padding#4, printf_uint::@2/printf_uint::format_zero_padding#5 ) + printf_uint::format_sign_always#4 = phi( printf_uint::@1/printf_uint::format_sign_always#5, printf_uint::@2/printf_uint::format_sign_always#6 ) + printf_uint::format_justify_left#3 = phi( printf_uint::@1/printf_uint::format_justify_left#4, printf_uint::@2/printf_uint::format_justify_left#5 ) + printf_uint::format_min_length#3 = phi( printf_uint::@1/printf_uint::format_min_length#4, printf_uint::@2/printf_uint::format_min_length#5 ) + printf_uint::format_radix#2 = phi( printf_uint::@1/printf_uint::format_radix#4, printf_uint::@2/printf_uint::format_radix#5 ) + printf_uint::uvalue#2 = phi( printf_uint::@1/printf_uint::uvalue#3, printf_uint::@2/printf_uint::uvalue#4 ) + printf_uint::$2 = phi( printf_uint::@1/printf_uint::$1, printf_uint::@2/printf_uint::$0 ) +Adding number conversion cast (unumber) printf_uint::$0 in CONIO_SCREEN_BANK#80 = phi( printf_uint::@1/CONIO_SCREEN_BANK#91, printf_uint::@2/CONIO_SCREEN_BANK#92 ) + CONIO_SCREEN_TEXT#91 = phi( printf_uint::@1/CONIO_SCREEN_TEXT#104, printf_uint::@2/CONIO_SCREEN_TEXT#105 ) + printf_uint::format_upper_case#3 = phi( printf_uint::@1/printf_uint::format_upper_case#4, printf_uint::@2/printf_uint::format_upper_case#5 ) + printf_uint::format_zero_padding#3 = phi( printf_uint::@1/printf_uint::format_zero_padding#4, printf_uint::@2/printf_uint::format_zero_padding#5 ) + printf_uint::format_sign_always#4 = phi( printf_uint::@1/printf_uint::format_sign_always#5, printf_uint::@2/printf_uint::format_sign_always#6 ) + printf_uint::format_justify_left#3 = phi( printf_uint::@1/printf_uint::format_justify_left#4, printf_uint::@2/printf_uint::format_justify_left#5 ) + printf_uint::format_min_length#3 = phi( printf_uint::@1/printf_uint::format_min_length#4, printf_uint::@2/printf_uint::format_min_length#5 ) + printf_uint::format_radix#2 = phi( printf_uint::@1/printf_uint::format_radix#4, printf_uint::@2/printf_uint::format_radix#5 ) + printf_uint::uvalue#2 = phi( printf_uint::@1/printf_uint::uvalue#3, printf_uint::@2/printf_uint::uvalue#4 ) + printf_uint::$2 = phi( printf_uint::@1/printf_uint::$1, printf_uint::@2/printf_uint::$0 ) +Adding number conversion cast (unumber) 0 in printf_uchar::$5 = 0 != printf_uchar::format_sign_always#2 +Adding number conversion cast (unumber) printf_uchar::$2 in CONIO_SCREEN_BANK#81 = phi( printf_uchar::@1/CONIO_SCREEN_BANK#93, printf_uchar::@2/CONIO_SCREEN_BANK#94 ) + CONIO_SCREEN_TEXT#92 = phi( printf_uchar::@1/CONIO_SCREEN_TEXT#106, printf_uchar::@2/CONIO_SCREEN_TEXT#107 ) + printf_uchar::format_upper_case#3 = phi( printf_uchar::@1/printf_uchar::format_upper_case#4, printf_uchar::@2/printf_uchar::format_upper_case#5 ) + printf_uchar::format_zero_padding#3 = phi( printf_uchar::@1/printf_uchar::format_zero_padding#4, printf_uchar::@2/printf_uchar::format_zero_padding#5 ) + printf_uchar::format_sign_always#4 = phi( printf_uchar::@1/printf_uchar::format_sign_always#5, printf_uchar::@2/printf_uchar::format_sign_always#6 ) + printf_uchar::format_justify_left#3 = phi( printf_uchar::@1/printf_uchar::format_justify_left#4, printf_uchar::@2/printf_uchar::format_justify_left#5 ) + printf_uchar::format_min_length#3 = phi( printf_uchar::@1/printf_uchar::format_min_length#4, printf_uchar::@2/printf_uchar::format_min_length#5 ) + printf_uchar::format_radix#2 = phi( printf_uchar::@1/printf_uchar::format_radix#4, printf_uchar::@2/printf_uchar::format_radix#5 ) + printf_uchar::uvalue#2 = phi( printf_uchar::@1/printf_uchar::uvalue#3, printf_uchar::@2/printf_uchar::uvalue#4 ) + printf_uchar::$2 = phi( printf_uchar::@1/printf_uchar::$1, printf_uchar::@2/printf_uchar::$0 ) +Adding number conversion cast (unumber) printf_uchar::$0 in CONIO_SCREEN_BANK#81 = phi( printf_uchar::@1/CONIO_SCREEN_BANK#93, printf_uchar::@2/CONIO_SCREEN_BANK#94 ) + CONIO_SCREEN_TEXT#92 = phi( printf_uchar::@1/CONIO_SCREEN_TEXT#106, printf_uchar::@2/CONIO_SCREEN_TEXT#107 ) + printf_uchar::format_upper_case#3 = phi( printf_uchar::@1/printf_uchar::format_upper_case#4, printf_uchar::@2/printf_uchar::format_upper_case#5 ) + printf_uchar::format_zero_padding#3 = phi( printf_uchar::@1/printf_uchar::format_zero_padding#4, printf_uchar::@2/printf_uchar::format_zero_padding#5 ) + printf_uchar::format_sign_always#4 = phi( printf_uchar::@1/printf_uchar::format_sign_always#5, printf_uchar::@2/printf_uchar::format_sign_always#6 ) + printf_uchar::format_justify_left#3 = phi( printf_uchar::@1/printf_uchar::format_justify_left#4, printf_uchar::@2/printf_uchar::format_justify_left#5 ) + printf_uchar::format_min_length#3 = phi( printf_uchar::@1/printf_uchar::format_min_length#4, printf_uchar::@2/printf_uchar::format_min_length#5 ) + printf_uchar::format_radix#2 = phi( printf_uchar::@1/printf_uchar::format_radix#4, printf_uchar::@2/printf_uchar::format_radix#5 ) + printf_uchar::uvalue#2 = phi( printf_uchar::@1/printf_uchar::uvalue#3, printf_uchar::@2/printf_uchar::uvalue#4 ) + printf_uchar::$2 = phi( printf_uchar::@1/printf_uchar::$1, printf_uchar::@2/printf_uchar::$0 ) +Adding number conversion cast (unumber) 0 in printf_number_buffer::$26 = 0 != printf_number_buffer::format_min_length#3 +Adding number conversion cast (unumber) 0 in printf_number_buffer::$27 = 0 != printf_number_buffer::format_justify_left#3 +Adding number conversion cast (unumber) 0 in printf_number_buffer::$28 = 0 != printf_number_buffer::format_zero_padding#3 +Adding number conversion cast (unumber) 0 in printf_number_buffer::$29 = 0 != printf_number_buffer::buffer_sign#3 +Adding number conversion cast (snumber) 0 in printf_number_buffer::$22 = printf_number_buffer::padding#1 < 0 +Adding number conversion cast (snumber) 0 in printf_number_buffer::padding#2 = 0 +Adding number conversion cast (unumber) 0 in printf_number_buffer::$30 = 0 != printf_number_buffer::buffer_sign#4 +Adding number conversion cast (unumber) 0 in printf_number_buffer::$31 = 0 != printf_number_buffer::format_upper_case#3 +Adding number conversion cast (unumber) 0 in printf_number_buffer::$32 = 0 != printf_number_buffer::format_zero_padding#5 +Adding number conversion cast (unumber) $3f000 in main::$0 = main::src1#2 < $3f000 +Adding number conversion cast (unumber) -1 in main::$2 = main::$1 + -1 +Adding number conversion cast (unumber) main::$2 in main::$2 = main::$1 + (unumber)-1 +Adding number conversion cast (unumber) 8 in main::$4 = main::$3 << 8 +Adding number conversion cast (unumber) 5 in main::$9 = main::$8 >> 5 +Adding number conversion cast (unumber) 3 in main::$11 = main::$10 << 3 +Adding number conversion cast (unumber) 8 in main::$15 = main::$14 << 8 +Adding number conversion cast (unumber) 5 in main::$20 = main::$19 >> 5 +Adding number conversion cast (unumber) 3 in main::$22 = main::$21 << 3 +Adding number conversion cast (unumber) $1fff in main::$26 = main::$25 & $1fff +Adding number conversion cast (unumber) main::$26 in main::$26 = main::$25 & (unumber)$1fff +Adding number conversion cast (unumber) $1fff in main::$28 = main::$27 & $1fff +Adding number conversion cast (unumber) main::$28 in main::$28 = main::$27 & (unumber)$1fff +Successful SSA optimization PassNAddNumberTypeConversions +Adding number conversion cast (unumber) 0 in printf_ulong::$0 = 0 +Adding number conversion cast (unumber) 0 in printf_uint::$0 = 0 +Adding number conversion cast (unumber) 0 in printf_uchar::$0 = 0 +Successful SSA optimization PassNAddNumberTypeConversions +Inlining cast vera_layer_rowshift[vera_layer_mode_tile::layer#1] = (unumber)6 +Inlining cast vera_layer_rowskip[vera_layer_mode_tile::$13] = (unumber)$40 +Inlining cast vera_layer_rowshift[vera_layer_mode_tile::layer#2] = (unumber)7 +Inlining cast vera_layer_rowskip[vera_layer_mode_tile::$14] = (unumber)$80 +Inlining cast vera_layer_rowshift[vera_layer_mode_tile::layer#3] = (unumber)8 +Inlining cast vera_layer_rowskip[vera_layer_mode_tile::$15] = (unumber)$100 +Inlining cast vera_layer_rowshift[vera_layer_mode_tile::layer#4] = (unumber)9 +Inlining cast vera_layer_rowskip[vera_layer_mode_tile::$16] = (unumber)$200 +Inlining cast vera_layer_mode_tile::color_depth#0 = (unumber)1 +Inlining cast vera_layer_mode_text::layer#0 = (unumber)1 +Inlining cast vera_layer_mode_text::mapwidth#0 = (unumber)$80 +Inlining cast vera_layer_mode_text::mapheight#0 = (unumber)$40 +Inlining cast vera_layer_mode_text::tilewidth#0 = (unumber)8 +Inlining cast vera_layer_mode_text::tileheight#0 = (unumber)8 +Inlining cast vera_layer_mode_text::color_mode#0 = (unumber)$10 +Inlining cast screenlayer::layer#0 = (unumber)1 +Inlining cast vera_layer_set_textcolor::layer#0 = (unumber)1 +Inlining cast vera_layer_set_backcolor::layer#0 = (unumber)1 +Inlining cast vera_layer_set_mapbase::layer#1 = (unumber)0 +Inlining cast vera_layer_set_mapbase::mapbase#1 = (unumber)$20 +Inlining cast vera_layer_set_mapbase::layer#2 = (unumber)1 +Inlining cast vera_layer_set_mapbase::mapbase#2 = (unumber)0 +Inlining cast gotoxy::x#0 = (unumber)0 +Inlining cast gotoxy::y#1 = (unumber)0 +Inlining cast gotoxy::x#1 = (unumber)0 +Inlining cast conio_cursor_x[conio_screen_layer] = (unumber)0 +Inlining cast conio_cursor_x[conio_screen_layer] = (unumber)0 +Inlining cast memcpy_in_vram::dest_bank#0 = (unumber)0 +Inlining cast memcpy_in_vram::src_bank#0 = (unumber)0 +Inlining cast gotoxy::x#2 = (unumber)0 +Inlining cast CONIO_SCREEN_TEXT#2 = (byte*)screenlayer::$1 +Inlining cast uctoa::max_digits#1 = (unumber)3 +Inlining cast uctoa::max_digits#2 = (unumber)2 +Inlining cast uctoa::max_digits#3 = (unumber)3 +Inlining cast uctoa::max_digits#4 = (unumber)8 +Inlining cast *uctoa::buffer#2 = (unumber)0 +Inlining cast *uctoa::buffer#3 = (unumber)0 +Inlining cast uctoa::started#1 = (unumber)1 +Inlining cast utoa::max_digits#1 = (unumber)5 +Inlining cast utoa::max_digits#2 = (unumber)4 +Inlining cast utoa::max_digits#3 = (unumber)6 +Inlining cast utoa::max_digits#4 = (unumber)$10 +Inlining cast *utoa::buffer#2 = (unumber)0 +Inlining cast *utoa::buffer#3 = (unumber)0 +Inlining cast utoa::started#1 = (unumber)1 +Inlining cast ultoa::max_digits#1 = (unumber)$a +Inlining cast ultoa::max_digits#2 = (unumber)8 +Inlining cast ultoa::max_digits#3 = (unumber)$b +Inlining cast ultoa::max_digits#4 = (unumber)$20 +Inlining cast *ultoa::buffer#2 = (unumber)0 +Inlining cast *ultoa::buffer#3 = (unumber)0 +Inlining cast ultoa::started#1 = (unumber)1 +Inlining cast printf_ulong::$0 = (unumber)0 +Inlining cast printf_uint::$0 = (unumber)0 +Inlining cast printf_uchar::$0 = (unumber)0 +Inlining cast printf_number_buffer::padding#2 = (snumber)0 +Successful SSA optimization Pass2InlineCast +Simplifying constant pointer cast (byte*) 40736 +Simplifying constant pointer cast (byte*) 40737 +Simplifying constant pointer cast (byte*) 40738 +Simplifying constant pointer cast (byte*) 40739 +Simplifying constant pointer cast (byte*) 40740 +Simplifying constant pointer cast (byte*) 40741 +Simplifying constant pointer cast (byte*) 40746 +Simplifying constant pointer cast (byte*) 40747 +Simplifying constant pointer cast (byte*) 40749 +Simplifying constant pointer cast (byte*) 40750 +Simplifying constant pointer cast (byte*) 40751 +Simplifying constant pointer cast (byte*) 40756 +Simplifying constant pointer cast (byte*) 40757 +Simplifying constant pointer cast (byte*) 40758 +Simplifying constant pointer cast (byte*) 0 +Simplifying constant pointer cast (byte*) 214 +Simplifying constant integer cast 0 +Simplifying constant integer cast 0 +Simplifying constant integer cast 0 +Simplifying constant integer cast 4 +Simplifying constant integer cast 1 +Simplifying constant integer cast 2 +Simplifying constant integer cast 4 +Simplifying constant integer cast 8 +Simplifying constant integer cast $20 +Simplifying constant integer cast 6 +Simplifying constant integer cast $40 +Simplifying constant integer cast $40 +Simplifying constant integer cast 7 +Simplifying constant integer cast $80 +Simplifying constant integer cast $80 +Simplifying constant integer cast 8 +Simplifying constant integer cast $100 +Simplifying constant integer cast $100 +Simplifying constant integer cast 9 +Simplifying constant integer cast $200 +Simplifying constant integer cast $20 +Simplifying constant integer cast $40 +Simplifying constant integer cast $80 +Simplifying constant integer cast $100 +Simplifying constant integer cast 1 +Simplifying constant integer cast 1 +Simplifying constant integer cast 8 +Simplifying constant integer cast $10 +Simplifying constant integer cast 8 +Simplifying constant integer cast $10 +Simplifying constant integer cast 1 +Simplifying constant integer cast $10 +Simplifying constant integer cast $100 +Simplifying constant integer cast 1 +Simplifying constant integer cast 0 +Simplifying constant integer cast $f800 +Simplifying constant integer cast $80 +Simplifying constant integer cast $40 +Simplifying constant integer cast 8 +Simplifying constant integer cast 8 +Simplifying constant integer cast $10 +Simplifying constant integer cast 1 +Simplifying constant integer cast 1 +Simplifying constant integer cast 1 +Simplifying constant integer cast 0 +Simplifying constant integer cast $20 +Simplifying constant integer cast 1 +Simplifying constant integer cast 0 +Simplifying constant integer cast 0 +Simplifying constant integer cast 1 +Simplifying constant integer cast 0 +Simplifying constant integer cast 0 +Simplifying constant integer cast 7 +Simplifying constant integer cast $28 +Simplifying constant integer cast 7 +Simplifying constant integer cast $1e +Simplifying constant integer cast 1 +Simplifying constant integer cast 0 +Simplifying constant integer cast 0 +Simplifying constant integer cast 0 +Simplifying constant integer cast 2 +Simplifying constant integer cast 1 +Simplifying constant integer cast 0 +Simplifying constant integer cast 0 +Simplifying constant integer cast 0 +Simplifying constant integer cast 1 +Simplifying constant integer cast 0 +Simplifying constant integer cast 0 +Simplifying constant integer cast 4 +Simplifying constant integer cast 6 +Simplifying constant integer cast 3 +Simplifying constant integer cast 2 +Simplifying constant integer cast 3 +Simplifying constant integer cast 8 +Simplifying constant integer cast 0 +Simplifying constant integer cast 1 +Simplifying constant integer cast uctoa::value#3 +Simplifying constant integer cast 0 +Simplifying constant integer cast 1 +Simplifying constant integer cast 5 +Simplifying constant integer cast 4 +Simplifying constant integer cast 6 +Simplifying constant integer cast $10 +Simplifying constant integer cast 0 +Simplifying constant integer cast 1 +Simplifying constant integer cast 0 +Simplifying constant integer cast 1 +Simplifying constant integer cast $a +Simplifying constant integer cast 8 +Simplifying constant integer cast $b +Simplifying constant integer cast $20 +Simplifying constant integer cast 0 +Simplifying constant integer cast 1 +Simplifying constant integer cast 0 +Simplifying constant integer cast 1 +Simplifying constant integer cast 0 +Simplifying constant integer cast 0 +Simplifying constant integer cast 0 +Simplifying constant integer cast 0 +Simplifying constant integer cast 0 +Simplifying constant integer cast 0 +Simplifying constant integer cast 0 +Simplifying constant integer cast 0 +Simplifying constant integer cast 0 +Simplifying constant integer cast 0 +Simplifying constant integer cast 0 +Simplifying constant integer cast 0 +Simplifying constant integer cast 0 +Simplifying constant integer cast 0 +Simplifying constant integer cast 0 +Simplifying constant integer cast $3f000 +Simplifying constant integer cast -1 +Simplifying constant integer cast 8 +Simplifying constant integer cast 5 +Simplifying constant integer cast 3 +Simplifying constant integer cast 8 +Simplifying constant integer cast 5 +Simplifying constant integer cast 3 +Simplifying constant integer cast $1fff +Simplifying constant integer cast $1fff +Successful SSA optimization PassNCastSimplification +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 4 +Finalized unsigned number type (byte) 1 +Finalized unsigned number type (byte) 2 +Finalized unsigned number type (byte) 4 +Finalized unsigned number type (byte) 8 +Finalized unsigned number type (byte) $20 +Finalized unsigned number type (byte) 6 +Finalized unsigned number type (byte) $40 +Finalized unsigned number type (byte) $40 +Finalized unsigned number type (byte) 7 +Finalized unsigned number type (byte) $80 +Finalized unsigned number type (byte) $80 +Finalized unsigned number type (byte) 8 +Finalized unsigned number type (word) $100 +Finalized unsigned number type (word) $100 +Finalized unsigned number type (byte) 9 +Finalized unsigned number type (word) $200 +Finalized unsigned number type (byte) $20 +Finalized unsigned number type (byte) $40 +Finalized unsigned number type (byte) $80 +Finalized unsigned number type (word) $100 +Finalized unsigned number type (byte) 1 +Finalized unsigned number type (byte) 1 +Finalized unsigned number type (byte) 8 +Finalized unsigned number type (byte) $10 +Finalized unsigned number type (byte) 8 +Finalized unsigned number type (byte) $10 +Finalized unsigned number type (byte) 1 +Finalized unsigned number type (byte) $10 +Finalized unsigned number type (word) $100 +Finalized unsigned number type (byte) 1 +Finalized unsigned number type (byte) $80 +Finalized unsigned number type (byte) $40 +Finalized unsigned number type (byte) 8 +Finalized unsigned number type (byte) 8 +Finalized unsigned number type (byte) $10 +Finalized unsigned number type (byte) 1 +Finalized unsigned number type (byte) 1 +Finalized unsigned number type (byte) 1 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) $20 +Finalized unsigned number type (byte) 1 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 1 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 7 +Finalized unsigned number type (byte) $28 +Finalized unsigned number type (byte) 7 +Finalized unsigned number type (byte) $1e +Finalized unsigned number type (byte) 1 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 2 +Finalized unsigned number type (byte) 1 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 1 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 4 +Finalized unsigned number type (byte) 6 +Finalized unsigned number type (byte) 3 +Finalized unsigned number type (byte) 2 +Finalized unsigned number type (byte) 3 +Finalized unsigned number type (byte) 8 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 1 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 1 +Finalized unsigned number type (byte) 5 +Finalized unsigned number type (byte) 4 +Finalized unsigned number type (byte) 6 +Finalized unsigned number type (byte) $10 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 1 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 1 +Finalized unsigned number type (byte) $a +Finalized unsigned number type (byte) 8 +Finalized unsigned number type (byte) $b +Finalized unsigned number type (byte) $20 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 1 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 1 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 0 +Finalized signed number type (signed byte) 0 +Finalized signed number type (signed byte) 0 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (dword) $3f000 +Finalized unsigned number type (byte) -1 +Finalized unsigned number type (byte) 8 +Finalized unsigned number type (byte) 5 +Finalized unsigned number type (byte) 3 +Finalized unsigned number type (byte) 8 +Finalized unsigned number type (byte) 5 +Finalized unsigned number type (byte) 3 +Finalized unsigned number type (word) $1fff +Finalized unsigned number type (word) $1fff +Successful SSA optimization PassNFinalizeNumberTypeConversions +Inferred type updated to byte in conio_x16_init::$9 = conio_screen_height - 1 +Inferred type updated to byte in screensize::$1 = $28 << screensize::hscale#0 +Inferred type updated to byte in screensize::$3 = $1e << screensize::vscale#0 +Inferred type updated to byte in insertup::$0 = conio_screen_width * 2 +Inferred type updated to byte in insertup::$3 = insertup::i#3 - 1 +Inferred type updated to byte in insertup::$4 = insertup::$3 << conio_rowshift +Inferred type updated to byte in cscroll::$5 = conio_screen_height - 1 +Inferred type updated to byte in uctoa::$4 = uctoa::max_digits#5 - 1 +Inferred type updated to byte in utoa::$4 = utoa::max_digits#5 - 1 +Inferred type updated to byte in ultoa::$4 = ultoa::max_digits#5 - 1 +Inferred type updated to byte in printf_ulong::$0 = 0 +Inferred type updated to byte for printf_ulong::$2 +Inferred type updated to byte in printf_uint::$0 = 0 +Inferred type updated to byte for printf_uint::$2 +Inferred type updated to byte in printf_uchar::$0 = 0 +Inferred type updated to byte for printf_uchar::$2 +Inferred type updated to dword in main::$2 = main::$1 + -1 +Inferred type updated to word in main::$26 = main::$25 & $1fff +Inferred type updated to word in main::$28 = main::$27 & $1fff +Inversing boolean not [317] conio_x16_init::$8 = conio_x16_init::line#2 < conio_screen_height from [316] conio_x16_init::$7 = conio_x16_init::line#2 >= conio_screen_height +Inversing boolean not [333] gotoxy::$1 = gotoxy::y#3 <= conio_screen_height from [332] gotoxy::$0 = gotoxy::y#3 > conio_screen_height +Inversing boolean not [337] gotoxy::$3 = gotoxy::x#3 < conio_screen_width from [336] gotoxy::$2 = gotoxy::x#3 >= conio_screen_width +Inversing boolean not [394] cputc::$12 = conio_cursor_x[conio_screen_layer] != conio_screen_width from [393] cputc::$11 = conio_cursor_x[conio_screen_layer] == conio_screen_width +Inversing boolean not [399] cputc::$9 = cputc::$16 != conio_width from [398] cputc::$8 = cputc::$16 == conio_width +Inversing boolean not [472] cscroll::$1 = conio_cursor_y[conio_screen_layer] < conio_screen_height from [471] cscroll::$0 = conio_cursor_y[conio_screen_layer] >= conio_screen_height +Inversing boolean not [484] cscroll::$3 = conio_cursor_y[conio_screen_layer] < conio_height from [483] cscroll::$2 = conio_cursor_y[conio_screen_layer] >= conio_height +Inversing boolean not [884] printf_number_buffer::$0 = 0 == printf_number_buffer::format_min_length#3 from [883] printf_number_buffer::$26 = 0 != printf_number_buffer::format_min_length#3 +Inversing boolean not [888] printf_number_buffer::$1 = 0 == printf_number_buffer::format_justify_left#3 from [887] printf_number_buffer::$27 = 0 != printf_number_buffer::format_justify_left#3 +Inversing boolean not [890] printf_number_buffer::$2 = 0 == printf_number_buffer::format_zero_padding#3 from [889] printf_number_buffer::$28 = 0 != printf_number_buffer::format_zero_padding#3 +Inversing boolean not [903] printf_number_buffer::$20 = 0 == printf_number_buffer::buffer_sign#3 from [902] printf_number_buffer::$29 = 0 != printf_number_buffer::buffer_sign#3 +Inversing boolean not [910] printf_number_buffer::$23 = printf_number_buffer::padding#1 >= 0 from [909] printf_number_buffer::$22 = printf_number_buffer::padding#1 < 0 +Inversing boolean not [918] printf_number_buffer::$7 = 0 == printf_number_buffer::buffer_sign#4 from [917] printf_number_buffer::$30 = 0 != printf_number_buffer::buffer_sign#4 +Inversing boolean not [935] printf_number_buffer::$12 = 0 == printf_number_buffer::format_upper_case#3 from [934] printf_number_buffer::$31 = 0 != printf_number_buffer::format_upper_case#3 +Inversing boolean not [947] printf_number_buffer::$14 = 0 == printf_number_buffer::format_zero_padding#5 from [946] printf_number_buffer::$32 = 0 != printf_number_buffer::format_zero_padding#5 +Successful SSA optimization Pass2UnaryNotSimplification +Alias candidate removed (volatile)screenlayer::vera_layer_get_width1_return#0 = screenlayer::vera_layer_get_width1_return#2 screenlayer::vera_layer_get_width1_return#1 screenlayer::vera_layer_get_width1_return#3 screenlayer::$2 conio_width +Alias candidate removed (volatile)conio_rowshift = screenlayer::$3 +Alias candidate removed (volatile)conio_rowskip = screenlayer::$4 +Alias candidate removed (volatile)screenlayer::vera_layer_get_height1_return#0 = screenlayer::vera_layer_get_height1_return#2 screenlayer::vera_layer_get_height1_return#1 screenlayer::vera_layer_get_height1_return#3 screenlayer::$5 conio_height +Alias toupper::ch#1 = toupper::ch#2 toupper::ch#3 toupper::return#1 +Alias toupper::return#0 = toupper::$3 +Alias toupper::return#2 = toupper::return#4 +Alias strupr::src#0 = strupr::str#1 +Alias strupr::src#2 = strupr::src#3 strupr::src#4 +Alias strupr::str#2 = strupr::str#5 strupr::str#3 strupr::str#4 strupr::return#0 strupr::return#3 strupr::return#1 +Alias toupper::return#3 = toupper::return#5 +Alias strlen::len#2 = strlen::len#4 strlen::len#3 strlen::return#0 strlen::return#3 strlen::return#1 +Alias strlen::str#2 = strlen::str#3 +Alias memcpy_in_vram::i#2 = memcpy_in_vram::i#3 +Alias memcpy_in_vram::num#1 = memcpy_in_vram::num#3 +Alias vera_layer_get_mapbase_bank::return#0 = vera_layer_get_mapbase_bank::return#3 vera_layer_get_mapbase_bank::return#1 +Alias vera_layer_get_mapbase_offset::return#0 = vera_layer_get_mapbase_offset::return#3 vera_layer_get_mapbase_offset::return#1 +Alias vera_layer_set_textcolor::return#0 = vera_layer_set_textcolor::old#0 vera_layer_set_textcolor::return#3 vera_layer_set_textcolor::return#1 +Alias vera_layer_set_backcolor::return#0 = vera_layer_set_backcolor::old#0 vera_layer_set_backcolor::return#3 vera_layer_set_backcolor::return#1 +Alias vera_layer_get_color::layer#2 = vera_layer_get_color::layer#3 vera_layer_get_color::layer#4 +Alias vera_layer_get_color::return#1 = vera_layer_get_color::$2 +Alias vera_layer_get_color::return#2 = vera_layer_get_color::return#5 +Alias vera_layer_get_rowshift::return#0 = vera_layer_get_rowshift::return#3 vera_layer_get_rowshift::return#1 +Alias vera_layer_get_rowskip::return#0 = vera_layer_get_rowskip::return#3 vera_layer_get_rowskip::return#1 +Alias vera_layer_mode_tile::config#0 = vera_layer_mode_tile::config#13 vera_layer_mode_tile::config#26 vera_layer_mode_tile::config#14 vera_layer_mode_tile::config#27 vera_layer_mode_tile::config#15 vera_layer_mode_tile::config#28 vera_layer_mode_tile::config#16 +Alias vera_layer_mode_tile::mapwidth#10 = vera_layer_mode_tile::mapwidth#6 vera_layer_mode_tile::mapwidth#11 vera_layer_mode_tile::mapwidth#7 vera_layer_mode_tile::mapwidth#12 vera_layer_mode_tile::mapwidth#8 vera_layer_mode_tile::mapwidth#5 vera_layer_mode_tile::mapwidth#9 +Alias vera_layer_mode_tile::layer#21 = vera_layer_mode_tile::layer#22 vera_layer_mode_tile::layer#30 vera_layer_mode_tile::layer#31 vera_layer_mode_tile::layer#23 vera_layer_mode_tile::layer#32 vera_layer_mode_tile::layer#24 vera_layer_mode_tile::layer#25 +Alias vera_layer_mode_tile::mapheight#13 = vera_layer_mode_tile::mapheight#14 vera_layer_mode_tile::mapheight#18 vera_layer_mode_tile::mapheight#19 vera_layer_mode_tile::mapheight#15 vera_layer_mode_tile::mapheight#20 vera_layer_mode_tile::mapheight#16 vera_layer_mode_tile::mapheight#17 +Alias vera_layer_mode_tile::mapbase_address#20 = vera_layer_mode_tile::mapbase_address#21 vera_layer_mode_tile::mapbase_address#25 vera_layer_mode_tile::mapbase_address#26 vera_layer_mode_tile::mapbase_address#22 vera_layer_mode_tile::mapbase_address#27 vera_layer_mode_tile::mapbase_address#23 vera_layer_mode_tile::mapbase_address#24 +Alias vera_layer_mode_tile::tilebase_address#21 = vera_layer_mode_tile::tilebase_address#22 vera_layer_mode_tile::tilebase_address#26 vera_layer_mode_tile::tilebase_address#27 vera_layer_mode_tile::tilebase_address#23 vera_layer_mode_tile::tilebase_address#28 vera_layer_mode_tile::tilebase_address#24 vera_layer_mode_tile::tilebase_address#25 +Alias vera_layer_mode_tile::tilewidth#21 = vera_layer_mode_tile::tilewidth#22 vera_layer_mode_tile::tilewidth#26 vera_layer_mode_tile::tilewidth#27 vera_layer_mode_tile::tilewidth#23 vera_layer_mode_tile::tilewidth#28 vera_layer_mode_tile::tilewidth#24 vera_layer_mode_tile::tilewidth#25 +Alias vera_layer_mode_tile::tileheight#25 = vera_layer_mode_tile::tileheight#26 vera_layer_mode_tile::tileheight#30 vera_layer_mode_tile::tileheight#31 vera_layer_mode_tile::tileheight#27 vera_layer_mode_tile::tileheight#32 vera_layer_mode_tile::tileheight#28 vera_layer_mode_tile::tileheight#29 +Alias vera_layer_mode_tile::color_depth#1 = vera_layer_mode_tile::color_depth#2 vera_layer_mode_tile::color_depth#3 vera_layer_mode_tile::color_depth#4 +Alias vera_layer_mode_tile::config#17 = vera_layer_mode_tile::config#29 vera_layer_mode_tile::config#30 vera_layer_mode_tile::config#18 vera_layer_mode_tile::config#31 vera_layer_mode_tile::config#19 vera_layer_mode_tile::config#32 vera_layer_mode_tile::config#20 +Alias vera_layer_mode_tile::layer#1 = vera_layer_mode_tile::layer#9 vera_layer_mode_tile::layer#10 vera_layer_mode_tile::layer#2 vera_layer_mode_tile::layer#11 vera_layer_mode_tile::layer#3 vera_layer_mode_tile::layer#12 vera_layer_mode_tile::layer#4 +Alias vera_layer_mode_tile::mapheight#10 = vera_layer_mode_tile::mapheight#6 vera_layer_mode_tile::mapheight#11 vera_layer_mode_tile::mapheight#7 vera_layer_mode_tile::mapheight#12 vera_layer_mode_tile::mapheight#8 vera_layer_mode_tile::mapheight#5 vera_layer_mode_tile::mapheight#9 +Alias vera_layer_mode_tile::mapbase_address#12 = vera_layer_mode_tile::mapbase_address#13 vera_layer_mode_tile::mapbase_address#17 vera_layer_mode_tile::mapbase_address#18 vera_layer_mode_tile::mapbase_address#14 vera_layer_mode_tile::mapbase_address#19 vera_layer_mode_tile::mapbase_address#15 vera_layer_mode_tile::mapbase_address#16 +Alias vera_layer_mode_tile::tilebase_address#13 = vera_layer_mode_tile::tilebase_address#14 vera_layer_mode_tile::tilebase_address#18 vera_layer_mode_tile::tilebase_address#19 vera_layer_mode_tile::tilebase_address#15 vera_layer_mode_tile::tilebase_address#20 vera_layer_mode_tile::tilebase_address#16 vera_layer_mode_tile::tilebase_address#17 +Alias vera_layer_mode_tile::tilewidth#13 = vera_layer_mode_tile::tilewidth#14 vera_layer_mode_tile::tilewidth#18 vera_layer_mode_tile::tilewidth#19 vera_layer_mode_tile::tilewidth#15 vera_layer_mode_tile::tilewidth#20 vera_layer_mode_tile::tilewidth#16 vera_layer_mode_tile::tilewidth#17 +Alias vera_layer_mode_tile::tileheight#17 = vera_layer_mode_tile::tileheight#18 vera_layer_mode_tile::tileheight#22 vera_layer_mode_tile::tileheight#23 vera_layer_mode_tile::tileheight#19 vera_layer_mode_tile::tileheight#24 vera_layer_mode_tile::tileheight#20 vera_layer_mode_tile::tileheight#21 +Alias vera_layer_mode_tile::mapwidth#1 = vera_layer_mode_tile::mapwidth#2 vera_layer_mode_tile::mapwidth#3 vera_layer_mode_tile::mapwidth#4 +Alias vera_layer_mode_tile::config#21 = vera_layer_mode_tile::config#33 vera_layer_mode_tile::config#34 vera_layer_mode_tile::config#22 vera_layer_mode_tile::config#35 vera_layer_mode_tile::config#23 vera_layer_mode_tile::config#36 vera_layer_mode_tile::config#24 +Alias vera_layer_mode_tile::layer#13 = vera_layer_mode_tile::layer#14 vera_layer_mode_tile::layer#26 vera_layer_mode_tile::layer#27 vera_layer_mode_tile::layer#15 vera_layer_mode_tile::layer#28 vera_layer_mode_tile::layer#16 vera_layer_mode_tile::layer#17 +Alias vera_layer_mode_tile::mapbase_address#10 = vera_layer_mode_tile::mapbase_address#5 vera_layer_mode_tile::mapbase_address#9 vera_layer_mode_tile::mapbase_address#6 vera_layer_mode_tile::mapbase_address#11 vera_layer_mode_tile::mapbase_address#7 vera_layer_mode_tile::mapbase_address#4 vera_layer_mode_tile::mapbase_address#8 +Alias vera_layer_mode_tile::tilebase_address#10 = vera_layer_mode_tile::tilebase_address#6 vera_layer_mode_tile::tilebase_address#11 vera_layer_mode_tile::tilebase_address#7 vera_layer_mode_tile::tilebase_address#12 vera_layer_mode_tile::tilebase_address#8 vera_layer_mode_tile::tilebase_address#5 vera_layer_mode_tile::tilebase_address#9 +Alias vera_layer_mode_tile::tilewidth#10 = vera_layer_mode_tile::tilewidth#6 vera_layer_mode_tile::tilewidth#11 vera_layer_mode_tile::tilewidth#7 vera_layer_mode_tile::tilewidth#12 vera_layer_mode_tile::tilewidth#8 vera_layer_mode_tile::tilewidth#5 vera_layer_mode_tile::tilewidth#9 +Alias vera_layer_mode_tile::tileheight#10 = vera_layer_mode_tile::tileheight#14 vera_layer_mode_tile::tileheight#15 vera_layer_mode_tile::tileheight#11 vera_layer_mode_tile::tileheight#16 vera_layer_mode_tile::tileheight#12 vera_layer_mode_tile::tileheight#9 vera_layer_mode_tile::tileheight#13 +Alias vera_layer_mode_tile::mapheight#1 = vera_layer_mode_tile::mapheight#2 vera_layer_mode_tile::mapheight#3 vera_layer_mode_tile::mapheight#4 +Alias vera_layer_mode_tile::mapbase_address#2 = vera_layer_mode_tile::mapbase_address#3 +Alias vera_layer_mode_tile::layer#33 = vera_layer_mode_tile::layer#6 vera_layer_mode_tile::layer#5 vera_layer_mode_tile::layer#7 vera_layer_mode_tile::layer#34 vera_layer_mode_tile::layer#35 +Alias vera_layer_mode_tile::tilebase_address#2 = vera_layer_mode_tile::tilebase_address#3 vera_layer_mode_tile::tilebase_address#4 +Alias vera_layer_mode_tile::tilewidth#1 = vera_layer_mode_tile::tilewidth#3 vera_layer_mode_tile::tilewidth#4 vera_layer_mode_tile::tilewidth#2 +Alias vera_layer_mode_tile::tileheight#3 = vera_layer_mode_tile::tileheight#7 vera_layer_mode_tile::tileheight#8 vera_layer_mode_tile::tileheight#6 vera_layer_mode_tile::tileheight#4 vera_layer_mode_tile::tileheight#5 +Alias vera_layer_mode_tile::mapbase_address#0 = vera_layer_mode_tile::$3 +Alias vera_layer_mode_tile::mapbase#0 = vera_layer_mode_tile::$5 +Alias vera_layer_mode_tile::tilebase_address#0 = vera_layer_mode_tile::$9 +Alias vera_layer_mode_tile::tilebase#0 = vera_layer_mode_tile::$11 +Alias vera_layer_mode_tile::tilebase#1 = vera_layer_mode_tile::tilebase#6 vera_layer_mode_tile::tilebase#11 vera_layer_mode_tile::tilebase#7 +Alias vera_layer_mode_tile::tilebase#12 = vera_layer_mode_tile::tilebase#8 vera_layer_mode_tile::tilebase#13 vera_layer_mode_tile::tilebase#9 +Alias vera_layer_mode_tile::layer#18 = vera_layer_mode_tile::layer#19 vera_layer_mode_tile::layer#29 vera_layer_mode_tile::layer#20 +Alias vera_layer_mode_tile::tileheight#1 = vera_layer_mode_tile::tileheight#2 +Alias vera_layer_mode_text::color_mode#1 = vera_layer_mode_text::color_mode#3 vera_layer_mode_text::color_mode#2 +Alias vera_layer_mode_text::layer#1 = vera_layer_mode_text::layer#4 vera_layer_mode_text::layer#2 vera_layer_mode_text::layer#5 vera_layer_mode_text::layer#3 +Alias CONIO_SCREEN_BANK#13 = CONIO_SCREEN_BANK#18 CONIO_SCREEN_BANK#23 +Alias CONIO_SCREEN_TEXT#15 = CONIO_SCREEN_TEXT#22 CONIO_SCREEN_TEXT#31 +Alias conio_x16_init::line#0 = conio_x16_init::line#9 conio_x16_init::line#8 conio_x16_init::line#7 conio_x16_init::line#6 conio_x16_init::line#5 conio_x16_init::line#4 conio_x16_init::line#2 +Alias CONIO_SCREEN_BANK#0 = CONIO_SCREEN_BANK#7 CONIO_SCREEN_BANK#43 CONIO_SCREEN_BANK#35 CONIO_SCREEN_BANK#30 CONIO_SCREEN_BANK#25 CONIO_SCREEN_BANK#24 +Alias CONIO_SCREEN_TEXT#0 = CONIO_SCREEN_TEXT#7 CONIO_SCREEN_TEXT#66 CONIO_SCREEN_TEXT#48 CONIO_SCREEN_TEXT#39 CONIO_SCREEN_TEXT#33 CONIO_SCREEN_TEXT#32 +Alias CONIO_SCREEN_BANK#1 = CONIO_SCREEN_BANK#14 CONIO_SCREEN_BANK#19 CONIO_SCREEN_BANK#8 +Alias CONIO_SCREEN_TEXT#1 = CONIO_SCREEN_TEXT#16 CONIO_SCREEN_TEXT#23 CONIO_SCREEN_TEXT#8 +Alias conio_x16_init::line#1 = conio_x16_init::$9 +Alias gotoxy::x#5 = gotoxy::x#6 +Alias gotoxy::line_offset#0 = gotoxy::$4 +Alias gotoxy::y#5 = gotoxy::y#6 +Alias screensize::hscale#0 = screensize::$0 +Alias screensize::vscale#0 = screensize::$2 +Alias vera_layer_get_color::return#3 = vera_layer_get_color::return#6 +Alias CONIO_SCREEN_TEXT#100 = CONIO_SCREEN_TEXT#9 CONIO_SCREEN_TEXT#17 CONIO_SCREEN_TEXT#86 CONIO_SCREEN_TEXT#108 CONIO_SCREEN_TEXT#99 CONIO_SCREEN_TEXT#87 CONIO_SCREEN_TEXT#88 +Alias cputc::c#3 = cputc::c#5 cputc::c#4 +Alias CONIO_SCREEN_BANK#15 = CONIO_SCREEN_BANK#20 CONIO_SCREEN_BANK#9 +Alias cputc::color#0 = cputc::$0 cputc::color#1 +Alias cputc::conio_addr#0 = cputc::$1 +Alias cputc::conio_addr#1 = cputc::conio_addr#2 +Alias clearline::addr#0 = clearline::$0 +Alias vera_layer_get_color::return#4 = vera_layer_get_color::return#7 +Alias clearline::color#0 = clearline::$3 +Alias clearline::color#1 = clearline::color#2 +Alias clearline::c#2 = clearline::c#3 +Alias insertup::width#0 = insertup::$0 +Alias insertup::i#2 = insertup::i#3 insertup::i#4 +Alias CONIO_SCREEN_TEXT#11 = CONIO_SCREEN_TEXT#19 CONIO_SCREEN_TEXT#28 CONIO_SCREEN_TEXT#18 +Alias insertup::width#1 = insertup::width#2 insertup::width#3 +Alias insertup::cy#1 = insertup::cy#3 insertup::cy#2 +Alias insertup::line#0 = insertup::$4 +Alias insertup::start#0 = insertup::$5 +Alias CONIO_SCREEN_TEXT#34 = CONIO_SCREEN_TEXT#40 CONIO_SCREEN_TEXT#49 +Alias gotoxy::y#2 = cscroll::$5 +Alias cputs::c#1 = cputs::$0 cputs::c#2 +Alias CONIO_SCREEN_TEXT#24 = CONIO_SCREEN_TEXT#35 CONIO_SCREEN_TEXT#42 +Alias cputs::s#0 = cputs::s#13 cputs::s#12 +Alias CONIO_SCREEN_BANK#26 = CONIO_SCREEN_BANK#31 CONIO_SCREEN_BANK#37 +Alias vera_layer_get_mapbase_bank::return#2 = vera_layer_get_mapbase_bank::return#4 +Alias CONIO_SCREEN_BANK#10 = CONIO_SCREEN_BANK#2 screenlayer::$0 CONIO_SCREEN_BANK#88 CONIO_SCREEN_BANK#78 CONIO_SCREEN_BANK#60 CONIO_SCREEN_BANK#53 CONIO_SCREEN_BANK#38 CONIO_SCREEN_BANK#32 CONIO_SCREEN_BANK#29 CONIO_SCREEN_BANK#21 CONIO_SCREEN_BANK#16 CONIO_SCREEN_BANK#3 +Alias vera_layer_get_mapbase_offset::return#2 = vera_layer_get_mapbase_offset::return#4 +Alias screenlayer::vera_layer_get_width1_layer#0 = screenlayer::vera_layer_get_width1_layer#1 +Alias CONIO_SCREEN_TEXT#101 = CONIO_SCREEN_TEXT#2 CONIO_SCREEN_TEXT#89 CONIO_SCREEN_TEXT#68 CONIO_SCREEN_TEXT#59 CONIO_SCREEN_TEXT#43 CONIO_SCREEN_TEXT#36 CONIO_SCREEN_TEXT#29 CONIO_SCREEN_TEXT#20 CONIO_SCREEN_TEXT#12 CONIO_SCREEN_TEXT#3 +Alias vera_layer_get_rowshift::return#2 = vera_layer_get_rowshift::return#4 +Alias vera_layer_get_rowskip::return#2 = vera_layer_get_rowskip::return#4 +Alias screenlayer::vera_layer_get_height1_layer#0 = screenlayer::vera_layer_get_height1_layer#1 +Alias uctoa::value#10 = uctoa::value#8 uctoa::value#12 uctoa::value#13 uctoa::value#9 uctoa::value#14 uctoa::value#15 uctoa::value#11 +Alias uctoa::buffer#10 = uctoa::buffer#17 uctoa::buffer#21 uctoa::buffer#16 uctoa::buffer#18 uctoa::buffer#13 uctoa::buffer#19 uctoa::buffer#20 uctoa::buffer#6 +Alias uctoa::radix#1 = uctoa::radix#2 uctoa::radix#3 uctoa::radix#4 +Alias uctoa::digit_values#10 = uctoa::digit_values#5 uctoa::digit_values#6 uctoa::digit_values#9 +Alias uctoa::digit#2 = uctoa::digit#3 uctoa::digit#6 uctoa::digit#5 +Alias uctoa::value#2 = uctoa::value#5 uctoa::value#3 uctoa::$10 uctoa::value#4 +Alias uctoa::started#2 = uctoa::started#3 +Alias uctoa::buffer#11 = uctoa::buffer#12 uctoa::buffer#7 uctoa::buffer#8 uctoa::buffer#9 +Alias uctoa::max_digits#10 = uctoa::max_digits#8 uctoa::max_digits#5 uctoa::max_digits#9 +Alias uctoa::digit_value#0 = uctoa::digit_value#1 +Alias uctoa_append::return#0 = uctoa_append::return#3 +Alias uctoa::value#0 = uctoa::$9 +Alias uctoa_append::digit#2 = uctoa_append::digit#4 uctoa_append::digit#3 +Alias uctoa_append::value#2 = uctoa_append::value#3 uctoa_append::value#4 uctoa_append::return#1 uctoa_append::return#4 uctoa_append::return#2 +Alias uctoa_append::sub#1 = uctoa_append::sub#2 +Alias uctoa_append::buffer#1 = uctoa_append::buffer#4 uctoa_append::buffer#2 +Alias utoa::value#10 = utoa::value#8 utoa::value#12 utoa::value#13 utoa::value#9 utoa::value#14 utoa::value#15 utoa::value#11 +Alias utoa::buffer#10 = utoa::buffer#17 utoa::buffer#21 utoa::buffer#16 utoa::buffer#18 utoa::buffer#13 utoa::buffer#19 utoa::buffer#20 utoa::buffer#6 +Alias utoa::radix#1 = utoa::radix#2 utoa::radix#3 utoa::radix#4 +Alias utoa::digit#2 = utoa::digit#3 utoa::digit#6 utoa::digit#5 +Alias utoa::digit_values#10 = utoa::digit_values#5 utoa::digit_values#6 utoa::digit_values#9 +Alias utoa::value#2 = utoa::value#5 utoa::value#3 utoa::value#4 +Alias utoa::started#2 = utoa::started#3 +Alias utoa::buffer#11 = utoa::buffer#12 utoa::buffer#7 utoa::buffer#8 utoa::buffer#9 +Alias utoa::max_digits#10 = utoa::max_digits#8 utoa::max_digits#5 utoa::max_digits#9 +Alias utoa::digit_value#0 = utoa::digit_value#1 +Alias utoa_append::return#0 = utoa_append::return#3 +Alias utoa::value#0 = utoa::$9 +Alias utoa_append::digit#2 = utoa_append::digit#4 utoa_append::digit#3 +Alias utoa_append::value#2 = utoa_append::value#3 utoa_append::value#4 utoa_append::return#1 utoa_append::return#4 utoa_append::return#2 +Alias utoa_append::sub#1 = utoa_append::sub#2 +Alias utoa_append::buffer#1 = utoa_append::buffer#4 utoa_append::buffer#2 +Alias ultoa::value#10 = ultoa::value#8 ultoa::value#12 ultoa::value#13 ultoa::value#9 ultoa::value#14 ultoa::value#15 ultoa::value#11 +Alias ultoa::buffer#10 = ultoa::buffer#17 ultoa::buffer#21 ultoa::buffer#16 ultoa::buffer#18 ultoa::buffer#13 ultoa::buffer#19 ultoa::buffer#20 ultoa::buffer#6 +Alias ultoa::radix#1 = ultoa::radix#2 ultoa::radix#3 ultoa::radix#4 +Alias ultoa::digit#2 = ultoa::digit#3 ultoa::digit#6 ultoa::digit#5 +Alias ultoa::digit_values#10 = ultoa::digit_values#5 ultoa::digit_values#6 ultoa::digit_values#9 +Alias ultoa::value#2 = ultoa::value#5 ultoa::value#3 ultoa::value#4 +Alias ultoa::started#2 = ultoa::started#3 +Alias ultoa::buffer#11 = ultoa::buffer#12 ultoa::buffer#7 ultoa::buffer#8 ultoa::buffer#9 +Alias ultoa::max_digits#10 = ultoa::max_digits#8 ultoa::max_digits#5 ultoa::max_digits#9 +Alias ultoa::digit_value#0 = ultoa::digit_value#1 +Alias ultoa_append::return#0 = ultoa_append::return#3 +Alias ultoa::value#0 = ultoa::$9 +Alias ultoa_append::digit#2 = ultoa_append::digit#4 ultoa_append::digit#3 +Alias ultoa_append::value#2 = ultoa_append::value#3 ultoa_append::value#4 ultoa_append::return#1 ultoa_append::return#4 ultoa_append::return#2 +Alias ultoa_append::sub#1 = ultoa_append::sub#2 +Alias ultoa_append::buffer#1 = ultoa_append::buffer#4 ultoa_append::buffer#2 +Alias printf_padding::pad#3 = printf_padding::pad#4 printf_padding::pad#6 +Alias printf_padding::i#2 = printf_padding::i#4 printf_padding::i#3 +Alias CONIO_SCREEN_TEXT#26 = CONIO_SCREEN_TEXT#37 CONIO_SCREEN_TEXT#45 +Alias printf_padding::length#3 = printf_padding::length#6 printf_padding::length#5 +Alias CONIO_SCREEN_BANK#28 = CONIO_SCREEN_BANK#33 CONIO_SCREEN_BANK#40 +Alias printf_ulong::uvalue#4 = printf_ulong::uvalue#6 printf_ulong::uvalue#5 +Alias printf_ulong::format_radix#5 = printf_ulong::format_radix#7 printf_ulong::format_radix#6 +Alias printf_ulong::format_min_length#5 = printf_ulong::format_min_length#7 printf_ulong::format_min_length#6 +Alias printf_ulong::format_justify_left#5 = printf_ulong::format_justify_left#7 printf_ulong::format_justify_left#6 +Alias printf_ulong::format_sign_always#3 = printf_ulong::format_sign_always#6 printf_ulong::format_sign_always#7 +Alias printf_ulong::format_zero_padding#5 = printf_ulong::format_zero_padding#7 printf_ulong::format_zero_padding#6 +Alias printf_ulong::format_upper_case#5 = printf_ulong::format_upper_case#7 printf_ulong::format_upper_case#6 +Alias CONIO_SCREEN_TEXT#102 = CONIO_SCREEN_TEXT#109 CONIO_SCREEN_TEXT#103 +Alias CONIO_SCREEN_BANK#89 = CONIO_SCREEN_BANK#95 CONIO_SCREEN_BANK#90 +Alias printf_ulong::format_min_length#3 = printf_ulong::format_min_length#4 +Alias printf_ulong::format_justify_left#3 = printf_ulong::format_justify_left#4 +Alias printf_ulong::format_sign_always#4 = printf_ulong::format_sign_always#5 +Alias printf_ulong::format_zero_padding#3 = printf_ulong::format_zero_padding#4 +Alias printf_ulong::format_upper_case#3 = printf_ulong::format_upper_case#4 +Alias printf_ulong::format_radix#3 = printf_ulong::format_radix#4 +Alias CONIO_SCREEN_TEXT#71 = CONIO_SCREEN_TEXT#90 +Alias CONIO_SCREEN_BANK#63 = CONIO_SCREEN_BANK#79 +Alias printf_uint::uvalue#3 = printf_uint::uvalue#5 printf_uint::uvalue#4 +Alias printf_uint::format_radix#4 = printf_uint::format_radix#6 printf_uint::format_radix#5 +Alias printf_uint::format_min_length#4 = printf_uint::format_min_length#6 printf_uint::format_min_length#5 +Alias printf_uint::format_justify_left#4 = printf_uint::format_justify_left#6 printf_uint::format_justify_left#5 +Alias printf_uint::format_sign_always#2 = printf_uint::format_sign_always#5 printf_uint::format_sign_always#6 +Alias printf_uint::format_zero_padding#4 = printf_uint::format_zero_padding#6 printf_uint::format_zero_padding#5 +Alias printf_uint::format_upper_case#4 = printf_uint::format_upper_case#6 printf_uint::format_upper_case#5 +Alias CONIO_SCREEN_TEXT#104 = CONIO_SCREEN_TEXT#110 CONIO_SCREEN_TEXT#105 +Alias CONIO_SCREEN_BANK#91 = CONIO_SCREEN_BANK#96 CONIO_SCREEN_BANK#92 +Alias printf_uint::format_min_length#2 = printf_uint::format_min_length#3 +Alias printf_uint::format_justify_left#2 = printf_uint::format_justify_left#3 +Alias printf_uint::format_sign_always#3 = printf_uint::format_sign_always#4 +Alias printf_uint::format_zero_padding#2 = printf_uint::format_zero_padding#3 +Alias printf_uint::format_upper_case#2 = printf_uint::format_upper_case#3 +Alias printf_uint::format_radix#2 = printf_uint::format_radix#3 +Alias CONIO_SCREEN_TEXT#70 = CONIO_SCREEN_TEXT#91 +Alias CONIO_SCREEN_BANK#62 = CONIO_SCREEN_BANK#80 +Alias printf_uchar::uvalue#3 = printf_uchar::uvalue#5 printf_uchar::uvalue#4 +Alias printf_uchar::format_radix#4 = printf_uchar::format_radix#6 printf_uchar::format_radix#5 +Alias printf_uchar::format_min_length#4 = printf_uchar::format_min_length#6 printf_uchar::format_min_length#5 +Alias printf_uchar::format_justify_left#4 = printf_uchar::format_justify_left#6 printf_uchar::format_justify_left#5 +Alias printf_uchar::format_sign_always#2 = printf_uchar::format_sign_always#5 printf_uchar::format_sign_always#6 +Alias printf_uchar::format_zero_padding#4 = printf_uchar::format_zero_padding#6 printf_uchar::format_zero_padding#5 +Alias printf_uchar::format_upper_case#4 = printf_uchar::format_upper_case#6 printf_uchar::format_upper_case#5 +Alias CONIO_SCREEN_TEXT#106 = CONIO_SCREEN_TEXT#111 CONIO_SCREEN_TEXT#107 +Alias CONIO_SCREEN_BANK#93 = CONIO_SCREEN_BANK#97 CONIO_SCREEN_BANK#94 +Alias printf_uchar::format_min_length#2 = printf_uchar::format_min_length#3 +Alias printf_uchar::format_justify_left#2 = printf_uchar::format_justify_left#3 +Alias printf_uchar::format_sign_always#3 = printf_uchar::format_sign_always#4 +Alias printf_uchar::format_zero_padding#2 = printf_uchar::format_zero_padding#3 +Alias printf_uchar::format_upper_case#2 = printf_uchar::format_upper_case#3 +Alias printf_uchar::format_radix#2 = printf_uchar::format_radix#3 +Alias CONIO_SCREEN_TEXT#69 = CONIO_SCREEN_TEXT#92 +Alias CONIO_SCREEN_BANK#61 = CONIO_SCREEN_BANK#81 +Alias printf_number_buffer::buffer_digits#20 = printf_number_buffer::buffer_digits#3 printf_number_buffer::buffer_digits#6 printf_number_buffer::buffer_digits#21 +Alias printf_number_buffer::buffer_sign#13 = printf_number_buffer::buffer_sign#6 printf_number_buffer::buffer_sign#9 printf_number_buffer::buffer_sign#3 +Alias printf_number_buffer::format_min_length#3 = printf_number_buffer::format_min_length#7 printf_number_buffer::format_min_length#5 printf_number_buffer::format_min_length#6 +Alias printf_number_buffer::format_justify_left#10 = printf_number_buffer::format_justify_left#13 printf_number_buffer::format_justify_left#5 printf_number_buffer::format_justify_left#9 +Alias printf_number_buffer::format_zero_padding#12 = printf_number_buffer::format_zero_padding#18 printf_number_buffer::format_zero_padding#6 printf_number_buffer::format_zero_padding#13 +Alias printf_number_buffer::format_upper_case#12 = printf_number_buffer::format_upper_case#18 printf_number_buffer::format_upper_case#16 printf_number_buffer::format_upper_case#17 +Alias CONIO_SCREEN_TEXT#63 = CONIO_SCREEN_TEXT#93 CONIO_SCREEN_TEXT#72 CONIO_SCREEN_TEXT#73 +Alias CONIO_SCREEN_BANK#57 = CONIO_SCREEN_BANK#82 CONIO_SCREEN_BANK#64 CONIO_SCREEN_BANK#65 +Alias strlen::return#2 = strlen::return#4 +Alias printf_number_buffer::padding#1 = printf_number_buffer::$21 +Alias printf_number_buffer::len#0 = printf_number_buffer::len#3 +Alias printf_number_buffer::format_justify_left#6 = printf_number_buffer::format_justify_left#7 +Alias printf_number_buffer::format_zero_padding#7 = printf_number_buffer::format_zero_padding#8 +Alias printf_number_buffer::buffer_sign#10 = printf_number_buffer::buffer_sign#11 +Alias printf_number_buffer::format_upper_case#13 = printf_number_buffer::format_upper_case#14 +Alias printf_number_buffer::buffer_digits#17 = printf_number_buffer::buffer_digits#18 +Alias CONIO_SCREEN_TEXT#64 = CONIO_SCREEN_TEXT#65 +Alias CONIO_SCREEN_BANK#58 = CONIO_SCREEN_BANK#59 +Alias printf_number_buffer::padding#12 = printf_number_buffer::padding#4 printf_number_buffer::padding#3 +Alias printf_number_buffer::buffer_sign#12 = printf_number_buffer::buffer_sign#7 printf_number_buffer::buffer_sign#8 +Alias printf_number_buffer::format_zero_padding#14 = printf_number_buffer::format_zero_padding#19 printf_number_buffer::format_zero_padding#3 +Alias printf_number_buffer::format_upper_case#10 = printf_number_buffer::format_upper_case#15 printf_number_buffer::format_upper_case#9 +Alias CONIO_SCREEN_TEXT#46 = CONIO_SCREEN_TEXT#62 CONIO_SCREEN_TEXT#47 +Alias printf_number_buffer::buffer_digits#14 = printf_number_buffer::buffer_digits#19 printf_number_buffer::buffer_digits#15 +Alias CONIO_SCREEN_BANK#41 = CONIO_SCREEN_BANK#56 CONIO_SCREEN_BANK#42 +Alias printf_number_buffer::format_justify_left#20 = printf_number_buffer::format_justify_left#22 printf_number_buffer::format_justify_left#3 +Alias printf_number_buffer::buffer_sign#4 = printf_number_buffer::buffer_sign#5 +Alias CONIO_SCREEN_TEXT#25 = CONIO_SCREEN_TEXT#38 CONIO_SCREEN_TEXT#94 +Alias printf_number_buffer::format_zero_padding#10 = printf_number_buffer::format_zero_padding#15 printf_number_buffer::format_zero_padding#9 +Alias printf_number_buffer::padding#10 = printf_number_buffer::padding#13 printf_number_buffer::padding#9 +Alias CONIO_SCREEN_BANK#27 = CONIO_SCREEN_BANK#34 CONIO_SCREEN_BANK#83 +Alias printf_number_buffer::format_upper_case#11 = printf_number_buffer::format_upper_case#7 printf_number_buffer::format_upper_case#6 +Alias printf_number_buffer::buffer_digits#11 = printf_number_buffer::buffer_digits#16 printf_number_buffer::buffer_digits#12 +Alias printf_number_buffer::format_justify_left#17 = printf_number_buffer::format_justify_left#21 printf_number_buffer::format_justify_left#18 +Alias printf_number_buffer::padding#16 = printf_number_buffer::padding#6 printf_number_buffer::padding#5 +Alias printf_number_buffer::format_upper_case#4 = printf_number_buffer::format_upper_case#8 printf_number_buffer::format_upper_case#5 +Alias printf_number_buffer::buffer_digits#10 = printf_number_buffer::buffer_digits#13 printf_number_buffer::buffer_digits#9 +Alias printf_number_buffer::format_zero_padding#20 = printf_number_buffer::format_zero_padding#22 printf_number_buffer::format_zero_padding#4 +Alias printf_number_buffer::format_justify_left#14 = printf_number_buffer::format_justify_left#19 printf_number_buffer::format_justify_left#15 +Alias CONIO_SCREEN_TEXT#60 = CONIO_SCREEN_TEXT#74 CONIO_SCREEN_TEXT#95 +Alias CONIO_SCREEN_BANK#54 = CONIO_SCREEN_BANK#66 CONIO_SCREEN_BANK#84 +Alias printf_number_buffer::format_zero_padding#11 = printf_number_buffer::format_zero_padding#5 +Alias printf_number_buffer::format_justify_left#4 = printf_number_buffer::format_justify_left#8 +Alias printf_number_buffer::padding#11 = printf_number_buffer::padding#7 printf_number_buffer::padding#8 +Alias CONIO_SCREEN_TEXT#58 = CONIO_SCREEN_TEXT#77 CONIO_SCREEN_TEXT#61 +Alias CONIO_SCREEN_BANK#52 = CONIO_SCREEN_BANK#69 CONIO_SCREEN_BANK#55 +Alias printf_number_buffer::buffer_digits#5 = printf_number_buffer::buffer_digits#8 printf_number_buffer::buffer_digits#7 +Alias printf_number_buffer::format_zero_padding#16 = printf_number_buffer::format_zero_padding#21 printf_number_buffer::format_zero_padding#17 +Alias printf_number_buffer::format_justify_left#11 = printf_number_buffer::format_justify_left#16 printf_number_buffer::format_justify_left#12 +Alias printf_number_buffer::padding#14 = printf_number_buffer::padding#17 printf_number_buffer::padding#15 +Alias CONIO_SCREEN_TEXT#75 = CONIO_SCREEN_TEXT#96 CONIO_SCREEN_TEXT#76 +Alias CONIO_SCREEN_BANK#67 = CONIO_SCREEN_BANK#85 CONIO_SCREEN_BANK#68 +Alias main::src1#10 = main::src1#3 main::src1#2 main::calcbeg#0 main::calcbeg#1 main::src1#18 main::src1#17 main::src1#16 main::src1#15 main::src1#14 main::src1#13 main::src1#12 main::src1#11 main::src1#9 main::src1#8 main::src1#7 main::src1#6 main::src1#5 main::src1#4 +Alias main::num#10 = main::num#2 main::num#5 main::num#8 main::num#6 main::num#3 main::num#18 main::num#17 main::num#16 main::num#15 main::num#14 main::num#13 main::num#12 main::num#11 main::num#9 main::num#7 main::num#4 +Alias CONIO_SCREEN_TEXT#50 = CONIO_SCREEN_TEXT#54 CONIO_SCREEN_TEXT#78 CONIO_SCREEN_TEXT#79 CONIO_SCREEN_TEXT#55 CONIO_SCREEN_TEXT#80 CONIO_SCREEN_TEXT#56 CONIO_SCREEN_TEXT#81 CONIO_SCREEN_TEXT#57 CONIO_SCREEN_TEXT#82 CONIO_SCREEN_TEXT#83 CONIO_SCREEN_TEXT#51 CONIO_SCREEN_TEXT#84 CONIO_SCREEN_TEXT#52 CONIO_SCREEN_TEXT#85 CONIO_SCREEN_TEXT#53 CONIO_SCREEN_TEXT#98 +Alias CONIO_SCREEN_BANK#44 = CONIO_SCREEN_BANK#48 CONIO_SCREEN_BANK#70 CONIO_SCREEN_BANK#71 CONIO_SCREEN_BANK#49 CONIO_SCREEN_BANK#72 CONIO_SCREEN_BANK#50 CONIO_SCREEN_BANK#73 CONIO_SCREEN_BANK#51 CONIO_SCREEN_BANK#74 CONIO_SCREEN_BANK#75 CONIO_SCREEN_BANK#45 CONIO_SCREEN_BANK#76 CONIO_SCREEN_BANK#46 CONIO_SCREEN_BANK#77 CONIO_SCREEN_BANK#47 CONIO_SCREEN_BANK#87 +Alias main::calcend#0 = main::$2 main::calcend#5 main::calcend#4 main::calcend#3 main::calcend#2 main::calcend#1 +Alias main::beg#0 = main::$26 +Alias main::end#0 = main::$28 +Alias main::bankbeg#0 = main::bankbeg#7 main::bankbeg#6 main::bankbeg#5 main::bankbeg#4 main::bankbeg#3 main::bankbeg#2 main::bankbeg#1 +Alias main::bankend#0 = main::bankend#9 main::bankend#8 main::bankend#7 main::bankend#6 main::bankend#5 main::bankend#4 main::bankend#3 main::bankend#2 main::bankend#1 +Alias main::beg#1 = main::beg#12 main::beg#11 main::beg#10 main::beg#9 main::beg#8 main::beg#7 main::beg#6 main::beg#5 main::beg#4 main::beg#3 main::beg#2 +Alias main::end#1 = main::end#14 main::end#13 main::end#12 main::end#11 main::end#10 main::end#9 main::end#8 main::end#7 main::end#6 main::end#5 main::end#4 main::end#3 main::end#2 +Alias CONIO_SCREEN_BANK#11 = CONIO_SCREEN_BANK#5 CONIO_SCREEN_BANK#22 CONIO_SCREEN_BANK#17 CONIO_SCREEN_BANK#12 CONIO_SCREEN_BANK#6 +Alias CONIO_SCREEN_TEXT#13 = CONIO_SCREEN_TEXT#5 CONIO_SCREEN_TEXT#30 CONIO_SCREEN_TEXT#21 CONIO_SCREEN_TEXT#14 CONIO_SCREEN_TEXT#6 +Successful SSA optimization Pass2AliasElimination +Alias candidate removed (volatile)screenlayer::vera_layer_get_width1_return#0 = screenlayer::vera_layer_get_width1_return#2 screenlayer::vera_layer_get_width1_return#1 screenlayer::vera_layer_get_width1_return#3 screenlayer::$2 conio_width +Alias candidate removed (volatile)conio_rowshift = screenlayer::$3 +Alias candidate removed (volatile)conio_rowskip = screenlayer::$4 +Alias candidate removed (volatile)screenlayer::vera_layer_get_height1_return#0 = screenlayer::vera_layer_get_height1_return#2 screenlayer::vera_layer_get_height1_return#1 screenlayer::vera_layer_get_height1_return#3 screenlayer::$5 conio_height +Alias vera_layer_mode_tile::mapwidth#1 = vera_layer_mode_tile::mapwidth#10 +Alias vera_layer_mode_tile::layer#1 = vera_layer_mode_tile::layer#21 vera_layer_mode_tile::layer#13 vera_layer_mode_tile::layer#33 vera_layer_mode_tile::layer#18 vera_layer_mode_tile::layer#8 +Alias vera_layer_mode_tile::mapheight#1 = vera_layer_mode_tile::mapheight#10 vera_layer_mode_tile::mapheight#13 +Alias vera_layer_mode_tile::mapbase_address#10 = vera_layer_mode_tile::mapbase_address#12 vera_layer_mode_tile::mapbase_address#20 vera_layer_mode_tile::mapbase_address#2 +Alias vera_layer_mode_tile::tilebase_address#10 = vera_layer_mode_tile::tilebase_address#13 vera_layer_mode_tile::tilebase_address#21 vera_layer_mode_tile::tilebase_address#2 +Alias vera_layer_mode_tile::tilewidth#1 = vera_layer_mode_tile::tilewidth#13 vera_layer_mode_tile::tilewidth#21 vera_layer_mode_tile::tilewidth#10 +Alias vera_layer_mode_tile::tileheight#1 = vera_layer_mode_tile::tileheight#17 vera_layer_mode_tile::tileheight#25 vera_layer_mode_tile::tileheight#10 vera_layer_mode_tile::tileheight#3 +Alias CONIO_SCREEN_BANK#0 = CONIO_SCREEN_BANK#1 +Alias CONIO_SCREEN_TEXT#0 = CONIO_SCREEN_TEXT#1 +Alias gotoxy::x#3 = gotoxy::x#5 +Alias gotoxy::y#4 = gotoxy::y#5 +Alias uctoa::value#10 = uctoa::value#7 +Alias uctoa::buffer#10 = uctoa::buffer#15 +Alias uctoa::digit#2 = uctoa::digit#4 +Alias uctoa::max_digits#10 = uctoa::max_digits#6 +Alias uctoa::digit_values#10 = uctoa::digit_values#7 +Alias utoa::value#10 = utoa::value#7 +Alias utoa::buffer#10 = utoa::buffer#15 +Alias utoa::digit#2 = utoa::digit#4 +Alias utoa::max_digits#10 = utoa::max_digits#6 +Alias utoa::digit_values#10 = utoa::digit_values#7 +Alias ultoa::value#10 = ultoa::value#7 +Alias ultoa::buffer#10 = ultoa::buffer#15 +Alias ultoa::digit#2 = ultoa::digit#4 +Alias ultoa::max_digits#10 = ultoa::max_digits#6 +Alias ultoa::digit_values#10 = ultoa::digit_values#7 +Alias printf_ulong::uvalue#3 = printf_ulong::uvalue#4 +Alias printf_ulong::format_radix#3 = printf_ulong::format_radix#5 +Alias printf_ulong::format_min_length#3 = printf_ulong::format_min_length#5 +Alias printf_ulong::format_justify_left#3 = printf_ulong::format_justify_left#5 +Alias printf_ulong::format_sign_always#3 = printf_ulong::format_sign_always#4 +Alias printf_ulong::format_zero_padding#3 = printf_ulong::format_zero_padding#5 +Alias printf_ulong::format_upper_case#3 = printf_ulong::format_upper_case#5 +Alias CONIO_SCREEN_TEXT#102 = CONIO_SCREEN_TEXT#71 +Alias CONIO_SCREEN_BANK#63 = CONIO_SCREEN_BANK#89 +Alias printf_uint::uvalue#2 = printf_uint::uvalue#3 +Alias printf_uint::format_radix#2 = printf_uint::format_radix#4 +Alias printf_uint::format_min_length#2 = printf_uint::format_min_length#4 +Alias printf_uint::format_justify_left#2 = printf_uint::format_justify_left#4 +Alias printf_uint::format_sign_always#2 = printf_uint::format_sign_always#3 +Alias printf_uint::format_zero_padding#2 = printf_uint::format_zero_padding#4 +Alias printf_uint::format_upper_case#2 = printf_uint::format_upper_case#4 +Alias CONIO_SCREEN_TEXT#104 = CONIO_SCREEN_TEXT#70 +Alias CONIO_SCREEN_BANK#62 = CONIO_SCREEN_BANK#91 +Alias printf_uchar::uvalue#2 = printf_uchar::uvalue#3 +Alias printf_uchar::format_radix#2 = printf_uchar::format_radix#4 +Alias printf_uchar::format_min_length#2 = printf_uchar::format_min_length#4 +Alias printf_uchar::format_justify_left#2 = printf_uchar::format_justify_left#4 +Alias printf_uchar::format_sign_always#2 = printf_uchar::format_sign_always#3 +Alias printf_uchar::format_zero_padding#2 = printf_uchar::format_zero_padding#4 +Alias printf_uchar::format_upper_case#2 = printf_uchar::format_upper_case#4 +Alias CONIO_SCREEN_TEXT#106 = CONIO_SCREEN_TEXT#69 +Alias CONIO_SCREEN_BANK#61 = CONIO_SCREEN_BANK#93 +Alias printf_number_buffer::format_min_length#3 = printf_number_buffer::format_min_length#4 +Alias printf_number_buffer::format_justify_left#10 = printf_number_buffer::format_justify_left#6 +Alias printf_number_buffer::format_zero_padding#12 = printf_number_buffer::format_zero_padding#7 +Alias printf_number_buffer::buffer_sign#10 = printf_number_buffer::buffer_sign#13 +Alias printf_number_buffer::format_upper_case#12 = printf_number_buffer::format_upper_case#13 +Alias printf_number_buffer::buffer_digits#17 = printf_number_buffer::buffer_digits#20 +Alias CONIO_SCREEN_TEXT#63 = CONIO_SCREEN_TEXT#64 +Alias CONIO_SCREEN_BANK#57 = CONIO_SCREEN_BANK#58 +Alias printf_number_buffer::buffer_sign#12 = printf_number_buffer::buffer_sign#4 +Alias printf_number_buffer::format_zero_padding#10 = printf_number_buffer::format_zero_padding#14 printf_number_buffer::format_zero_padding#20 printf_number_buffer::format_zero_padding#16 printf_number_buffer::format_zero_padding#11 +Alias printf_number_buffer::padding#10 = printf_number_buffer::padding#12 printf_number_buffer::padding#16 printf_number_buffer::padding#14 printf_number_buffer::padding#11 +Alias printf_number_buffer::format_upper_case#10 = printf_number_buffer::format_upper_case#11 printf_number_buffer::format_upper_case#4 printf_number_buffer::format_upper_case#3 +Alias printf_number_buffer::buffer_digits#10 = printf_number_buffer::buffer_digits#11 printf_number_buffer::buffer_digits#14 printf_number_buffer::buffer_digits#5 printf_number_buffer::buffer_digits#4 +Alias CONIO_SCREEN_TEXT#25 = CONIO_SCREEN_TEXT#46 CONIO_SCREEN_TEXT#60 CONIO_SCREEN_TEXT#75 CONIO_SCREEN_TEXT#58 +Alias printf_number_buffer::format_justify_left#11 = printf_number_buffer::format_justify_left#17 printf_number_buffer::format_justify_left#20 printf_number_buffer::format_justify_left#14 printf_number_buffer::format_justify_left#4 +Alias CONIO_SCREEN_BANK#27 = CONIO_SCREEN_BANK#41 CONIO_SCREEN_BANK#54 CONIO_SCREEN_BANK#67 CONIO_SCREEN_BANK#52 +Successful SSA optimization Pass2AliasElimination +Alias candidate removed (volatile)screenlayer::vera_layer_get_width1_return#0 = screenlayer::vera_layer_get_width1_return#2 screenlayer::vera_layer_get_width1_return#1 screenlayer::vera_layer_get_width1_return#3 screenlayer::$2 conio_width +Alias candidate removed (volatile)conio_rowshift = screenlayer::$3 +Alias candidate removed (volatile)conio_rowskip = screenlayer::$4 +Alias candidate removed (volatile)screenlayer::vera_layer_get_height1_return#0 = screenlayer::vera_layer_get_height1_return#2 screenlayer::vera_layer_get_height1_return#1 screenlayer::vera_layer_get_height1_return#3 screenlayer::$5 conio_height +Alias printf_number_buffer::format_justify_left#10 = printf_number_buffer::format_justify_left#11 +Alias printf_number_buffer::format_zero_padding#10 = printf_number_buffer::format_zero_padding#12 +Alias printf_number_buffer::buffer_sign#10 = printf_number_buffer::buffer_sign#12 +Alias printf_number_buffer::format_upper_case#10 = printf_number_buffer::format_upper_case#12 +Alias printf_number_buffer::buffer_digits#10 = printf_number_buffer::buffer_digits#17 +Alias CONIO_SCREEN_TEXT#25 = CONIO_SCREEN_TEXT#63 +Alias CONIO_SCREEN_BANK#27 = CONIO_SCREEN_BANK#57 +Successful SSA optimization Pass2AliasElimination +Alias candidate removed (volatile)screenlayer::vera_layer_get_width1_return#0 = screenlayer::vera_layer_get_width1_return#2 screenlayer::vera_layer_get_width1_return#1 screenlayer::vera_layer_get_width1_return#3 screenlayer::$2 conio_width +Alias candidate removed (volatile)conio_rowshift = screenlayer::$3 +Alias candidate removed (volatile)conio_rowskip = screenlayer::$4 +Alias candidate removed (volatile)screenlayer::vera_layer_get_height1_return#0 = screenlayer::vera_layer_get_height1_return#2 screenlayer::vera_layer_get_height1_return#1 screenlayer::vera_layer_get_height1_return#3 screenlayer::$5 conio_height +Identical Phi Values toupper::ch#1 toupper::ch#0 +Identical Phi Values strupr::src#0 strupr::str#0 +Identical Phi Values strupr::str#2 strupr::src#0 +Identical Phi Values strlen::str#4 strlen::str#1 +Identical Phi Values memcpy_in_vram::src#1 memcpy_in_vram::src#0 +Identical Phi Values memcpy_in_vram::src_increment#1 memcpy_in_vram::src_increment#0 +Identical Phi Values memcpy_in_vram::src_bank#1 memcpy_in_vram::src_bank#0 +Identical Phi Values memcpy_in_vram::dest#1 memcpy_in_vram::dest#0 +Identical Phi Values memcpy_in_vram::dest_increment#1 memcpy_in_vram::dest_increment#0 +Identical Phi Values memcpy_in_vram::dest_bank#1 memcpy_in_vram::dest_bank#0 +Identical Phi Values memcpy_in_vram::num#2 memcpy_in_vram::num#0 +Identical Phi Values memcpy_in_vram::num#1 memcpy_in_vram::num#2 +Identical Phi Values vera_layer_set_config::layer#1 vera_layer_set_config::layer#0 +Identical Phi Values vera_layer_set_config::config#1 vera_layer_set_config::config#0 +Identical Phi Values vera_layer_get_mapbase_bank::layer#1 vera_layer_get_mapbase_bank::layer#0 +Identical Phi Values vera_layer_get_mapbase_offset::layer#1 vera_layer_get_mapbase_offset::layer#0 +Identical Phi Values vera_layer_set_tilebase::layer#1 vera_layer_set_tilebase::layer#0 +Identical Phi Values vera_layer_set_tilebase::tilebase#1 vera_layer_set_tilebase::tilebase#0 +Identical Phi Values vera_layer_set_textcolor::layer#1 vera_layer_set_textcolor::layer#0 +Identical Phi Values vera_layer_set_textcolor::color#1 vera_layer_set_textcolor::color#0 +Identical Phi Values vera_layer_set_backcolor::layer#1 vera_layer_set_backcolor::layer#0 +Identical Phi Values vera_layer_set_backcolor::color#1 vera_layer_set_backcolor::color#0 +Identical Phi Values vera_layer_get_rowshift::layer#1 vera_layer_get_rowshift::layer#0 +Identical Phi Values vera_layer_get_rowskip::layer#1 vera_layer_get_rowskip::layer#0 +Identical Phi Values vera_layer_mode_tile::color_depth#1 vera_layer_mode_tile::color_depth#0 +Identical Phi Values vera_layer_mode_tile::mapwidth#1 vera_layer_mode_tile::mapwidth#0 +Identical Phi Values vera_layer_mode_tile::layer#1 vera_layer_mode_tile::layer#0 +Identical Phi Values vera_layer_mode_tile::mapheight#1 vera_layer_mode_tile::mapheight#0 +Identical Phi Values vera_layer_mode_tile::mapbase_address#10 vera_layer_mode_tile::mapbase_address#1 +Identical Phi Values vera_layer_mode_tile::tilebase_address#10 vera_layer_mode_tile::tilebase_address#1 +Identical Phi Values vera_layer_mode_tile::tilewidth#1 vera_layer_mode_tile::tilewidth#0 +Identical Phi Values vera_layer_mode_tile::tileheight#1 vera_layer_mode_tile::tileheight#0 +Identical Phi Values vera_layer_mode_text::layer#1 vera_layer_mode_text::layer#0 +Identical Phi Values vera_layer_mode_text::mapbase_address#1 vera_layer_mode_text::mapbase_address#0 +Identical Phi Values vera_layer_mode_text::tilebase_address#1 vera_layer_mode_text::tilebase_address#0 +Identical Phi Values vera_layer_mode_text::mapwidth#1 vera_layer_mode_text::mapwidth#0 +Identical Phi Values vera_layer_mode_text::mapheight#1 vera_layer_mode_text::mapheight#0 +Identical Phi Values vera_layer_mode_text::tilewidth#1 vera_layer_mode_text::tilewidth#0 +Identical Phi Values vera_layer_mode_text::tileheight#1 vera_layer_mode_text::tileheight#0 +Identical Phi Values vera_layer_mode_text::color_mode#1 vera_layer_mode_text::color_mode#0 +Identical Phi Values CONIO_SCREEN_BANK#13 CONIO_SCREEN_BANK#4 +Identical Phi Values CONIO_SCREEN_TEXT#15 CONIO_SCREEN_TEXT#4 +Identical Phi Values CONIO_SCREEN_BANK#0 CONIO_SCREEN_BANK#10 +Identical Phi Values CONIO_SCREEN_TEXT#0 CONIO_SCREEN_TEXT#101 +Identical Phi Values screensize::x#1 screensize::x#0 +Identical Phi Values screensize::y#1 screensize::y#0 +Identical Phi Values CONIO_SCREEN_TEXT#67 CONIO_SCREEN_TEXT#100 +Identical Phi Values CONIO_SCREEN_TEXT#10 CONIO_SCREEN_TEXT#11 +Identical Phi Values clearline::color#1 clearline::color#0 +Identical Phi Values CONIO_SCREEN_TEXT#27 CONIO_SCREEN_TEXT#34 +Identical Phi Values insertup::cy#1 insertup::cy#0 +Identical Phi Values CONIO_SCREEN_TEXT#11 CONIO_SCREEN_TEXT#27 +Identical Phi Values insertup::width#1 insertup::width#0 +Identical Phi Values CONIO_SCREEN_TEXT#34 CONIO_SCREEN_TEXT#67 +Identical Phi Values CONIO_SCREEN_TEXT#24 CONIO_SCREEN_TEXT#41 +Identical Phi Values CONIO_SCREEN_BANK#26 CONIO_SCREEN_BANK#36 +Identical Phi Values screenlayer::layer#1 screenlayer::layer#0 +Identical Phi Values screenlayer::vera_layer_get_width1_return#2 screenlayer::vera_layer_get_width1_return#0 +Identical Phi Values screenlayer::vera_layer_get_width1_return#3 screenlayer::vera_layer_get_width1_return#1 +Identical Phi Values screenlayer::vera_layer_get_height1_return#2 screenlayer::vera_layer_get_height1_return#0 +Identical Phi Values screenlayer::vera_layer_get_height1_return#3 screenlayer::vera_layer_get_height1_return#1 +Identical Phi Values uctoa::radix#1 uctoa::radix#0 +Identical Phi Values uctoa::value#10 uctoa::value#1 +Identical Phi Values uctoa::buffer#10 uctoa::buffer#5 +Identical Phi Values uctoa::max_digits#10 uctoa::max_digits#7 +Identical Phi Values uctoa::digit_values#10 uctoa::digit_values#8 +Identical Phi Values uctoa_append::value#5 uctoa_append::value#0 +Identical Phi Values uctoa_append::sub#3 uctoa_append::sub#0 +Identical Phi Values uctoa_append::buffer#3 uctoa_append::buffer#0 +Identical Phi Values uctoa_append::sub#1 uctoa_append::sub#3 +Identical Phi Values uctoa_append::buffer#1 uctoa_append::buffer#3 +Identical Phi Values utoa::radix#1 utoa::radix#0 +Identical Phi Values utoa::value#10 utoa::value#1 +Identical Phi Values utoa::buffer#10 utoa::buffer#5 +Identical Phi Values utoa::max_digits#10 utoa::max_digits#7 +Identical Phi Values utoa::digit_values#10 utoa::digit_values#8 +Identical Phi Values utoa_append::value#5 utoa_append::value#0 +Identical Phi Values utoa_append::sub#3 utoa_append::sub#0 +Identical Phi Values utoa_append::buffer#3 utoa_append::buffer#0 +Identical Phi Values utoa_append::sub#1 utoa_append::sub#3 +Identical Phi Values utoa_append::buffer#1 utoa_append::buffer#3 +Identical Phi Values ultoa::radix#1 ultoa::radix#0 +Identical Phi Values ultoa::value#10 ultoa::value#1 +Identical Phi Values ultoa::buffer#10 ultoa::buffer#5 +Identical Phi Values ultoa::max_digits#10 ultoa::max_digits#7 +Identical Phi Values ultoa::digit_values#10 ultoa::digit_values#8 +Identical Phi Values ultoa_append::value#5 ultoa_append::value#0 +Identical Phi Values ultoa_append::sub#3 ultoa_append::sub#0 +Identical Phi Values ultoa_append::buffer#3 ultoa_append::buffer#0 +Identical Phi Values ultoa_append::sub#1 ultoa_append::sub#3 +Identical Phi Values ultoa_append::buffer#1 ultoa_append::buffer#3 +Identical Phi Values CONIO_SCREEN_TEXT#44 CONIO_SCREEN_TEXT#25 +Identical Phi Values CONIO_SCREEN_BANK#39 CONIO_SCREEN_BANK#27 +Identical Phi Values printf_padding::length#3 printf_padding::length#4 +Identical Phi Values printf_padding::pad#3 printf_padding::pad#5 +Identical Phi Values CONIO_SCREEN_TEXT#26 CONIO_SCREEN_TEXT#44 +Identical Phi Values CONIO_SCREEN_BANK#28 CONIO_SCREEN_BANK#39 +Identical Phi Values CONIO_SCREEN_TEXT#102 CONIO_SCREEN_TEXT#50 +Identical Phi Values CONIO_SCREEN_BANK#63 CONIO_SCREEN_BANK#44 +Identical Phi Values CONIO_SCREEN_TEXT#104 CONIO_SCREEN_TEXT#50 +Identical Phi Values CONIO_SCREEN_BANK#62 CONIO_SCREEN_BANK#44 +Identical Phi Values CONIO_SCREEN_TEXT#106 CONIO_SCREEN_TEXT#50 +Identical Phi Values CONIO_SCREEN_BANK#61 CONIO_SCREEN_BANK#44 +Identical Phi Values CONIO_SCREEN_TEXT#97 CONIO_SCREEN_TEXT#13 +Identical Phi Values CONIO_SCREEN_BANK#86 CONIO_SCREEN_BANK#11 +Identical Phi Values CONIO_SCREEN_TEXT#50 CONIO_SCREEN_TEXT#97 +Identical Phi Values CONIO_SCREEN_BANK#44 CONIO_SCREEN_BANK#86 +Identical Phi Values CONIO_SCREEN_BANK#11 CONIO_SCREEN_BANK#0 +Identical Phi Values CONIO_SCREEN_TEXT#13 CONIO_SCREEN_TEXT#0 +Successful SSA optimization Pass2IdenticalPhiElimination +Identical Phi Values CONIO_SCREEN_TEXT#25 CONIO_SCREEN_TEXT#101 +Identical Phi Values CONIO_SCREEN_BANK#27 CONIO_SCREEN_BANK#10 +Successful SSA optimization Pass2IdenticalPhiElimination +Identical Phi Values CONIO_SCREEN_TEXT#41 CONIO_SCREEN_TEXT#101 +Identical Phi Values CONIO_SCREEN_BANK#36 CONIO_SCREEN_BANK#10 +Successful SSA optimization Pass2IdenticalPhiElimination +Identical Phi Values CONIO_SCREEN_TEXT#100 CONIO_SCREEN_TEXT#101 +Identical Phi Values CONIO_SCREEN_BANK#15 CONIO_SCREEN_BANK#10 +Successful SSA optimization Pass2IdenticalPhiElimination +Simple Condition strupr::$1 [11] if(0!=*strupr::src#2) goto strupr::@2 +Simple Condition strlen::$0 [23] if(0!=*strlen::str#2) goto strlen::@2 +Simple Condition memcpy_in_vram::$6 [45] if(memcpy_in_vram::i#2=uctoa_append::sub#0) goto uctoa_append::@2 +Simple Condition utoa::$0 [487] if(utoa::radix#0==DECIMAL) goto utoa::@1 +Simple Condition utoa::$1 [491] if(utoa::radix#0==HEXADECIMAL) goto utoa::@2 +Simple Condition utoa::$2 [495] if(utoa::radix#0==OCTAL) goto utoa::@3 +Simple Condition utoa::$3 [499] if(utoa::radix#0==BINARY) goto utoa::@4 +Simple Condition utoa::$5 [516] if(utoa::digit#2=utoa_append::sub#0) goto utoa_append::@2 +Simple Condition ultoa::$0 [550] if(ultoa::radix#0==DECIMAL) goto ultoa::@1 +Simple Condition ultoa::$1 [554] if(ultoa::radix#0==HEXADECIMAL) goto ultoa::@2 +Simple Condition ultoa::$2 [558] if(ultoa::radix#0==OCTAL) goto ultoa::@3 +Simple Condition ultoa::$3 [562] if(ultoa::radix#0==BINARY) goto ultoa::@4 +Simple Condition ultoa::$5 [579] if(ultoa::digit#2=ultoa_append::sub#0) goto ultoa_append::@2 +Simple Condition printf_padding::$0 [613] if(printf_padding::i#2=0) goto printf_number_buffer::@1 +Simple Condition printf_number_buffer::$7 [707] if(0==printf_number_buffer::buffer_sign#10) goto printf_number_buffer::@3 +Simple Condition printf_number_buffer::$12 [717] if(0==printf_number_buffer::format_upper_case#10) goto printf_number_buffer::@5 +Simple Condition main::$0 [740] if(main::src1#10<$3f000) goto main::@2 +Successful SSA optimization Pass2ConditionalJumpSimplification +Rewriting && if()-condition to two if()s [3] toupper::$2 = toupper::$0 && toupper::$1 +Rewriting ! if()-condition to reversed if() [459] uctoa::$8 = ! uctoa::$7 +Rewriting || if()-condition to two if()s [458] uctoa::$7 = uctoa::started#2 || uctoa::$6 +Rewriting ! if()-condition to reversed if() [521] utoa::$8 = ! utoa::$7 +Rewriting || if()-condition to two if()s [520] utoa::$7 = utoa::started#2 || utoa::$6 +Rewriting ! if()-condition to reversed if() [584] ultoa::$8 = ! ultoa::$7 +Rewriting || if()-condition to two if()s [583] ultoa::$7 = ultoa::started#2 || ultoa::$6 +Rewriting ! if()-condition to reversed if() [690] printf_number_buffer::$5 = ! printf_number_buffer::$4 +Rewriting && if()-condition to two if()s [689] printf_number_buffer::$4 = printf_number_buffer::$3 && printf_number_buffer::padding#10 +Rewriting && if()-condition to two if()s [688] printf_number_buffer::$3 = printf_number_buffer::$1 && printf_number_buffer::$2 +Rewriting ! if()-condition to reversed if() [712] printf_number_buffer::$10 = ! printf_number_buffer::$9 +Rewriting && if()-condition to two if()s [711] printf_number_buffer::$9 = printf_number_buffer::format_zero_padding#10 && printf_number_buffer::padding#10 +Rewriting ! if()-condition to reversed if() [726] printf_number_buffer::$17 = ! printf_number_buffer::$16 +Rewriting && if()-condition to two if()s [725] printf_number_buffer::$16 = printf_number_buffer::$15 && printf_number_buffer::padding#10 +Rewriting && if()-condition to two if()s [724] printf_number_buffer::$15 = printf_number_buffer::format_justify_left#10 && printf_number_buffer::$14 +Successful SSA optimization Pass2ConditionalAndOrRewriting +Warning! Adding boolean cast to non-boolean condition uctoa::started#2 +Warning! Adding boolean cast to non-boolean condition utoa::started#2 +Warning! Adding boolean cast to non-boolean condition ultoa::started#2 +Warning! Adding boolean cast to non-boolean condition printf_number_buffer::format_zero_padding#10 +Warning! Adding boolean cast to non-boolean condition printf_number_buffer::format_justify_left#10 +Warning! Adding boolean cast to non-boolean condition printf_number_buffer::padding#10 +Warning! Adding boolean cast to non-boolean condition printf_number_buffer::padding#10 +Warning! Adding boolean cast to non-boolean condition printf_number_buffer::padding#10 +Negating conditional jump and destination [111] if(vera_layer_mode_tile::color_depth#0!=8) goto vera_layer_mode_tile::@8 +Negating conditional jump and destination [129] if(vera_layer_mode_tile::mapwidth#0!=$100) goto vera_layer_mode_tile::@16 +Negating conditional jump and destination [141] if(vera_layer_mode_tile::mapheight#0!=$100) goto vera_layer_mode_tile::@24 +Negating conditional jump and destination [173] if(vera_layer_mode_tile::tilewidth#0!=$10) goto vera_layer_mode_tile::@28 +Negating conditional jump and destination [178] if(vera_layer_mode_tile::tileheight#0!=$10) goto vera_layer_mode_tile::@32 +Constant strlen::len#0 = 0 +Constant memcpy_in_vram::i#0 = 0 +Constant vera_layer_mode_tile::config#0 = 0 +Constant vera_layer_mode_tile::color_depth#0 = 1 +Constant vera_layer_set_text_color_mode::color_mode#0 = VERA_LAYER_CONFIG_16C +Constant vera_layer_set_text_color_mode::color_mode#1 = VERA_LAYER_CONFIG_256C +Constant vera_layer_mode_text::layer#0 = 1 +Constant vera_layer_mode_text::mapbase_address#0 = 0 +Constant vera_layer_mode_text::tilebase_address#0 = $f800 +Constant vera_layer_mode_text::mapwidth#0 = $80 +Constant vera_layer_mode_text::mapheight#0 = $40 +Constant vera_layer_mode_text::tilewidth#0 = 8 +Constant vera_layer_mode_text::tileheight#0 = 8 +Constant vera_layer_mode_text::color_mode#0 = $10 +Constant screensize::x#0 = &conio_screen_width +Constant screensize::y#0 = &conio_screen_height +Constant screenlayer::layer#0 = 1 +Constant vera_layer_set_textcolor::layer#0 = 1 +Constant vera_layer_set_textcolor::color#0 = WHITE +Constant vera_layer_set_backcolor::layer#0 = 1 +Constant vera_layer_set_backcolor::color#0 = BLUE +Constant vera_layer_set_mapbase::layer#1 = 0 +Constant vera_layer_set_mapbase::mapbase#1 = $20 +Constant vera_layer_set_mapbase::layer#2 = 1 +Constant vera_layer_set_mapbase::mapbase#2 = 0 +Constant gotoxy::x#0 = 0 +Constant gotoxy::y#1 = 0 +Constant gotoxy::x#1 = 0 +Constant clearline::c#0 = 0 +Constant insertup::i#0 = 1 +Constant memcpy_in_vram::dest_bank#0 = 0 +Constant memcpy_in_vram::dest_increment#0 = VERA_INC_1 +Constant memcpy_in_vram::src_bank#0 = 0 +Constant memcpy_in_vram::src_increment#0 = VERA_INC_1 +Constant gotoxy::x#2 = 0 +Constant cputs::c#0 = 0 +Constant uctoa::max_digits#0 = 0 +Constant uctoa::digit_values#0 = (byte*) 0 +Constant uctoa::max_digits#1 = 3 +Constant uctoa::digit_values#1 = RADIX_DECIMAL_VALUES_CHAR +Constant uctoa::max_digits#2 = 2 +Constant uctoa::digit_values#2 = RADIX_HEXADECIMAL_VALUES_CHAR +Constant uctoa::max_digits#3 = 3 +Constant uctoa::digit_values#3 = RADIX_OCTAL_VALUES_CHAR +Constant uctoa::max_digits#4 = 8 +Constant uctoa::digit_values#4 = RADIX_BINARY_VALUES_CHAR +Constant uctoa::started#0 = 0 +Constant uctoa::digit#0 = 0 +Constant uctoa::started#1 = 1 +Constant uctoa_append::digit#0 = 0 +Constant utoa::max_digits#0 = 0 +Constant utoa::digit_values#0 = (word*) 0 +Constant utoa::max_digits#1 = 5 +Constant utoa::digit_values#1 = RADIX_DECIMAL_VALUES +Constant utoa::max_digits#2 = 4 +Constant utoa::digit_values#2 = RADIX_HEXADECIMAL_VALUES +Constant utoa::max_digits#3 = 6 +Constant utoa::digit_values#3 = RADIX_OCTAL_VALUES +Constant utoa::max_digits#4 = $10 +Constant utoa::digit_values#4 = RADIX_BINARY_VALUES +Constant utoa::started#0 = 0 +Constant utoa::digit#0 = 0 +Constant utoa::started#1 = 1 +Constant utoa_append::digit#0 = 0 +Constant ultoa::max_digits#0 = 0 +Constant ultoa::digit_values#0 = (dword*) 0 +Constant ultoa::max_digits#1 = $a +Constant ultoa::digit_values#1 = RADIX_DECIMAL_VALUES_LONG +Constant ultoa::max_digits#2 = 8 +Constant ultoa::digit_values#2 = RADIX_HEXADECIMAL_VALUES_LONG +Constant ultoa::max_digits#3 = $b +Constant ultoa::digit_values#3 = RADIX_OCTAL_VALUES_LONG +Constant ultoa::max_digits#4 = $20 +Constant ultoa::digit_values#4 = RADIX_BINARY_VALUES_LONG +Constant ultoa::started#0 = 0 +Constant ultoa::digit#0 = 0 +Constant ultoa::started#1 = 1 +Constant ultoa_append::digit#0 = 0 +Constant printf_padding::i#0 = 0 +Constant printf_ulong::$1 = '+' +Constant printf_ulong::$0 = 0 +Constant ultoa::buffer#5 = (byte*)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS +Constant printf_number_buffer::buffer_digits#0 = (byte*)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS +Constant printf_uint::$1 = '+' +Constant printf_uint::$0 = 0 +Constant utoa::buffer#5 = (byte*)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS +Constant printf_number_buffer::buffer_digits#1 = (byte*)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS +Constant printf_uchar::$1 = '+' +Constant printf_uchar::$0 = 0 +Constant uctoa::buffer#5 = (byte*)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS +Constant printf_number_buffer::buffer_digits#2 = (byte*)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS +Constant printf_number_buffer::padding#0 = 0 +Constant printf_number_buffer::padding#2 = 0 +Constant printf_padding::pad#0 = ' ' +Constant printf_padding::pad#1 = '0' +Constant printf_padding::pad#2 = ' ' +Constant main::num#0 = (dword)$40*$40*2 +Constant main::src1#0 = 0 +Constant cputs::s#2 = main::s +Constant printf_ulong::format_min_length#0 = 0 +Constant printf_ulong::format_justify_left#0 = 0 +Constant printf_ulong::format_sign_always#0 = 0 +Constant printf_ulong::format_zero_padding#0 = 0 +Constant printf_ulong::format_upper_case#0 = 0 +Constant printf_ulong::format_radix#0 = HEXADECIMAL +Constant cputs::s#3 = main::s1 +Constant printf_ulong::format_min_length#1 = 0 +Constant printf_ulong::format_justify_left#1 = 0 +Constant printf_ulong::format_sign_always#1 = 0 +Constant printf_ulong::format_zero_padding#1 = 0 +Constant printf_ulong::format_upper_case#1 = 0 +Constant printf_ulong::format_radix#1 = HEXADECIMAL +Constant cputs::s#4 = main::s2 +Constant printf_ulong::format_min_length#2 = 0 +Constant printf_ulong::format_justify_left#2 = 0 +Constant printf_ulong::format_sign_always#2 = 0 +Constant printf_ulong::format_zero_padding#2 = 0 +Constant printf_ulong::format_upper_case#2 = 0 +Constant printf_ulong::format_radix#2 = HEXADECIMAL +Constant cputs::s#5 = main::s3 +Constant printf_uchar::format_min_length#0 = 0 +Constant printf_uchar::format_justify_left#0 = 0 +Constant printf_uchar::format_sign_always#0 = 0 +Constant printf_uchar::format_zero_padding#0 = 0 +Constant printf_uchar::format_upper_case#0 = 0 +Constant printf_uchar::format_radix#0 = HEXADECIMAL +Constant cputs::s#6 = main::s4 +Constant printf_uchar::format_min_length#1 = 0 +Constant printf_uchar::format_justify_left#1 = 0 +Constant printf_uchar::format_sign_always#1 = 0 +Constant printf_uchar::format_zero_padding#1 = 0 +Constant printf_uchar::format_upper_case#1 = 0 +Constant printf_uchar::format_radix#1 = HEXADECIMAL +Constant cputs::s#7 = main::s5 +Constant printf_uint::format_min_length#0 = 0 +Constant printf_uint::format_justify_left#0 = 0 +Constant printf_uint::format_sign_always#0 = 0 +Constant printf_uint::format_zero_padding#0 = 0 +Constant printf_uint::format_upper_case#0 = 0 +Constant printf_uint::format_radix#0 = HEXADECIMAL +Constant cputs::s#8 = main::s6 +Constant printf_uint::format_min_length#1 = 0 +Constant printf_uint::format_justify_left#1 = 0 +Constant printf_uint::format_sign_always#1 = 0 +Constant printf_uint::format_zero_padding#1 = 0 +Constant printf_uint::format_upper_case#1 = 0 +Constant printf_uint::format_radix#1 = HEXADECIMAL +Constant cputs::s#9 = main::s7 +Constant CONIO_SCREEN_TEXT#4 = DEFAULT_SCREEN +Constant CONIO_SCREEN_BANK#4 = 0 +Successful SSA optimization Pass2ConstantIdentification +Constant vera_layer_mode_tile::layer#0 = vera_layer_mode_text::layer#0 +Constant vera_layer_mode_tile::mapbase_address#1 = vera_layer_mode_text::mapbase_address#0 +Constant vera_layer_mode_tile::tilebase_address#1 = vera_layer_mode_text::tilebase_address#0 +Constant vera_layer_mode_tile::mapwidth#0 = vera_layer_mode_text::mapwidth#0 +Constant vera_layer_mode_tile::mapheight#0 = vera_layer_mode_text::mapheight#0 +Constant vera_layer_mode_tile::tilewidth#0 = vera_layer_mode_text::tilewidth#0 +Constant vera_layer_mode_tile::tileheight#0 = vera_layer_mode_text::tileheight#0 +Constant vera_layer_set_text_color_mode::layer#0 = vera_layer_mode_text::layer#0 +Constant vera_layer_set_text_color_mode::layer#1 = vera_layer_mode_text::layer#0 +Successful SSA optimization Pass2ConstantIdentification +Constant vera_layer_set_config::layer#0 = vera_layer_mode_tile::layer#0 +Constant vera_layer_set_mapbase::layer#0 = vera_layer_mode_tile::layer#0 +Constant vera_layer_set_tilebase::layer#0 = vera_layer_mode_tile::layer#0 +Successful SSA optimization Pass2ConstantIdentification +if() condition always true - replacing block destination [105] if(vera_layer_mode_tile::color_depth#0==1) goto vera_layer_mode_tile::@4 +if() condition always false - eliminating [107] if(vera_layer_mode_tile::color_depth#0==2) goto vera_layer_mode_tile::@5 +if() condition always false - eliminating [109] if(vera_layer_mode_tile::color_depth#0==4) goto vera_layer_mode_tile::@6 +if() condition always true - replacing block destination [111] if(vera_layer_mode_tile::color_depth#0!=8) goto vera_layer_mode_tile::@8 +if() condition always false - eliminating [114] if(vera_layer_mode_tile::mapwidth#0==$20) goto vera_layer_mode_tile::@12 +if() condition always false - eliminating [119] if(vera_layer_mode_tile::mapwidth#0==$40) goto vera_layer_mode_tile::@13 +if() condition always true - replacing block destination [124] if(vera_layer_mode_tile::mapwidth#0==$80) goto vera_layer_mode_tile::@14 +if() condition always true - replacing block destination [129] if(vera_layer_mode_tile::mapwidth#0!=$100) goto vera_layer_mode_tile::@16 +if() condition always false - eliminating [135] if(vera_layer_mode_tile::mapheight#0==$20) goto vera_layer_mode_tile::@20 +if() condition always true - replacing block destination [137] if(vera_layer_mode_tile::mapheight#0==$40) goto vera_layer_mode_tile::@21 +if() condition always false - eliminating [139] if(vera_layer_mode_tile::mapheight#0==$80) goto vera_layer_mode_tile::@22 +if() condition always true - replacing block destination [141] if(vera_layer_mode_tile::mapheight#0!=$100) goto vera_layer_mode_tile::@24 +if() condition always true - replacing block destination [171] if(vera_layer_mode_tile::tilewidth#0==8) goto vera_layer_mode_tile::@26 +if() condition always true - replacing block destination [173] if(vera_layer_mode_tile::tilewidth#0!=$10) goto vera_layer_mode_tile::@28 +if() condition always true - replacing block destination [176] if(vera_layer_mode_tile::tileheight#0==8) goto vera_layer_mode_tile::@30 +if() condition always true - replacing block destination [178] if(vera_layer_mode_tile::tileheight#0!=$10) goto vera_layer_mode_tile::@32 +if() condition always true - replacing block destination [195] if(vera_layer_mode_text::color_mode#0==$10) goto vera_layer_mode_text::@2 +if() condition always false - eliminating [199] if(vera_layer_mode_text::color_mode#0==$100) goto vera_layer_mode_text::@3 +Successful SSA optimization Pass2ConstantIfs +Simplifying expression containing zero memcpy_in_vram::src_increment#0 in [33] memcpy_in_vram::$2 = memcpy_in_vram::src_increment#0 | memcpy_in_vram::src_bank#0 +Simplifying expression containing zero memcpy_in_vram::dest_increment#0 in [40] memcpy_in_vram::$5 = memcpy_in_vram::dest_increment#0 | memcpy_in_vram::dest_bank#0 +Simplifying expression containing zero VERA_LAYER_COLOR_DEPTH_1BPP in [106] vera_layer_mode_tile::config#1 = vera_layer_mode_tile::config#0 | VERA_LAYER_COLOR_DEPTH_1BPP +Simplifying expression containing zero VERA_LAYER_COLOR_DEPTH_2BPP in [108] vera_layer_mode_tile::config#2 = vera_layer_mode_tile::config#0 | VERA_LAYER_COLOR_DEPTH_2BPP +Simplifying expression containing zero VERA_LAYER_COLOR_DEPTH_4BPP in [110] vera_layer_mode_tile::config#3 = vera_layer_mode_tile::config#0 | VERA_LAYER_COLOR_DEPTH_4BPP +Simplifying expression containing zero VERA_LAYER_COLOR_DEPTH_8BPP in [112] vera_layer_mode_tile::config#4 = vera_layer_mode_tile::config#0 | VERA_LAYER_COLOR_DEPTH_8BPP +Simplifying expression containing zero vera_layer_mode_tile::config#17 in [115] vera_layer_mode_tile::config#5 = vera_layer_mode_tile::config#17 | VERA_LAYER_WIDTH_32 +Simplifying expression containing zero vera_layer_mode_tile::config#21 in [136] vera_layer_mode_tile::config#9 = vera_layer_mode_tile::config#21 | VERA_LAYER_HEIGHT_32 +Simplifying expression containing zero vera_layer_mode_tile::tilebase#1 in [172] vera_layer_mode_tile::tilebase#2 = vera_layer_mode_tile::tilebase#1 | VERA_TILEBASE_WIDTH_8 +Simplifying expression containing zero vera_layer_mode_tile::tilebase#12 in [177] vera_layer_mode_tile::tilebase#4 = vera_layer_mode_tile::tilebase#12 | VERA_TILEBASE_HEIGHT_8 +Simplifying expression containing zero (byte*)&printf_buffer in [624] *((byte*)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_SIGN) = printf_ulong::$2 +Simplifying expression containing zero (byte*)&printf_buffer in [629] printf_number_buffer::buffer_sign#0 = *((byte*)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_SIGN) +Simplifying expression containing zero (byte*)&printf_buffer in [645] *((byte*)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_SIGN) = printf_uint::$2 +Simplifying expression containing zero (byte*)&printf_buffer in [650] printf_number_buffer::buffer_sign#1 = *((byte*)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_SIGN) +Simplifying expression containing zero (byte*)&printf_buffer in [666] *((byte*)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_SIGN) = printf_uchar::$2 +Simplifying expression containing zero (byte*)&printf_buffer in [671] printf_number_buffer::buffer_sign#2 = *((byte*)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_SIGN) +Successful SSA optimization PassNSimplifyExpressionWithZero +Eliminating unused variable vera_layer_set_textcolor::return#2 and assignment [154] vera_layer_set_textcolor::return#2 = vera_layer_set_textcolor::return#0 +Eliminating unused variable vera_layer_set_backcolor::return#2 and assignment [156] vera_layer_set_backcolor::return#2 = vera_layer_set_backcolor::return#0 +Eliminating unused variable printf_number_buffer::format_sign_always#0 and assignment [447] printf_number_buffer::format_sign_always#0 = printf_ulong::format_sign_always#3 +Eliminating unused variable printf_number_buffer::format_radix#0 and assignment [450] printf_number_buffer::format_radix#0 = printf_ulong::format_radix#3 +Eliminating unused variable printf_number_buffer::format_sign_always#1 and assignment [463] printf_number_buffer::format_sign_always#1 = printf_uint::format_sign_always#2 +Eliminating unused variable printf_number_buffer::format_radix#1 and assignment [466] printf_number_buffer::format_radix#1 = printf_uint::format_radix#2 +Eliminating unused variable printf_number_buffer::format_sign_always#2 and assignment [479] printf_number_buffer::format_sign_always#2 = printf_uchar::format_sign_always#2 +Eliminating unused variable printf_number_buffer::format_radix#2 and assignment [482] printf_number_buffer::format_radix#2 = printf_uchar::format_radix#2 +Eliminating unused variable strupr::return#2 and assignment [519] strupr::return#2 = strupr::str#0 +Eliminating unused constant VERA_LAYER_WIDTH_32 +Eliminating unused constant VERA_LAYER_HEIGHT_32 +Eliminating unused constant VERA_TILEBASE_WIDTH_8 +Eliminating unused constant VERA_TILEBASE_HEIGHT_8 +Eliminating unused constant memcpy_in_vram::dest_bank#0 +Eliminating unused constant memcpy_in_vram::src_bank#0 +Eliminating unused constant vera_layer_mode_tile::color_depth#0 +Eliminating unused constant vera_layer_mode_tile::mapwidth#0 +Eliminating unused constant vera_layer_mode_tile::mapheight#0 +Eliminating unused constant vera_layer_mode_tile::tilewidth#0 +Eliminating unused constant vera_layer_mode_tile::tileheight#0 +Eliminating unused constant vera_layer_mode_text::color_mode#0 +Eliminating unused constant cputs::c#0 +Eliminating unused constant uctoa::max_digits#0 +Eliminating unused constant uctoa::digit_values#0 +Eliminating unused constant utoa::max_digits#0 +Eliminating unused constant utoa::digit_values#0 +Eliminating unused constant ultoa::max_digits#0 +Eliminating unused constant ultoa::digit_values#0 +Eliminating unused constant OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_SIGN +Eliminating unused constant CONIO_SCREEN_TEXT#4 +Eliminating unused constant CONIO_SCREEN_BANK#4 +Successful SSA optimization PassNEliminateUnusedVars +Eliminating unused variable vera_layer_set_textcolor::return#0 and assignment [63] vera_layer_set_textcolor::return#0 = vera_layer_textcolor[vera_layer_set_textcolor::layer#0] +Eliminating unused variable vera_layer_set_backcolor::return#0 and assignment [66] vera_layer_set_backcolor::return#0 = vera_layer_backcolor[vera_layer_set_backcolor::layer#0] +Eliminating unused constant DEFAULT_SCREEN +Eliminating unused constant vera_layer_mode_text::mapwidth#0 +Eliminating unused constant vera_layer_mode_text::mapheight#0 +Eliminating unused constant vera_layer_mode_text::tilewidth#0 +Eliminating unused constant vera_layer_mode_text::tileheight#0 +Successful SSA optimization PassNEliminateUnusedVars +Eliminating variable vera_layer_mode_tile::config#2 from unused block vera_layer_mode_tile::@5 +Eliminating variable vera_layer_mode_tile::config#3 from unused block vera_layer_mode_tile::@6 +Eliminating variable vera_layer_mode_tile::config#4 from unused block vera_layer_mode_tile::@7 +Eliminating variable vera_layer_mode_tile::config#5 from unused block vera_layer_mode_tile::@12 +Eliminating variable vera_layer_mode_tile::$13 from unused block vera_layer_mode_tile::@12 +Eliminating variable vera_layer_mode_tile::config#6 from unused block vera_layer_mode_tile::@13 +Eliminating variable vera_layer_mode_tile::$14 from unused block vera_layer_mode_tile::@13 +Eliminating variable vera_layer_mode_tile::config#8 from unused block vera_layer_mode_tile::@15 +Eliminating variable vera_layer_mode_tile::$16 from unused block vera_layer_mode_tile::@15 +Eliminating variable vera_layer_mode_tile::config#9 from unused block vera_layer_mode_tile::@20 +Eliminating variable vera_layer_mode_tile::config#11 from unused block vera_layer_mode_tile::@22 +Eliminating variable vera_layer_mode_tile::config#12 from unused block vera_layer_mode_tile::@23 +Eliminating variable vera_layer_mode_tile::tilebase#3 from unused block vera_layer_mode_tile::@27 +Eliminating variable vera_layer_mode_tile::tilebase#5 from unused block vera_layer_mode_tile::@31 +Removing unused block vera_layer_mode_tile::@1 +Removing PHI-reference to removed block (vera_layer_mode_tile::@5) in block vera_layer_mode_tile::@8 +Removing unused block vera_layer_mode_tile::@5 +Removing unused block vera_layer_mode_tile::@2 +Removing PHI-reference to removed block (vera_layer_mode_tile::@6) in block vera_layer_mode_tile::@8 +Removing unused block vera_layer_mode_tile::@6 +Removing PHI-reference to removed block (vera_layer_mode_tile::@3) in block vera_layer_mode_tile::@8 +Removing unused block vera_layer_mode_tile::@3 +Removing PHI-reference to removed block (vera_layer_mode_tile::@7) in block vera_layer_mode_tile::@8 +Removing unused block vera_layer_mode_tile::@7 +Removing PHI-reference to removed block (vera_layer_mode_tile::@12) in block vera_layer_mode_tile::@16 +Removing unused block vera_layer_mode_tile::@12 +Removing PHI-reference to removed block (vera_layer_mode_tile::@13) in block vera_layer_mode_tile::@16 +Removing unused block vera_layer_mode_tile::@13 +Removing PHI-reference to removed block (vera_layer_mode_tile::@11) in block vera_layer_mode_tile::@16 +Removing unused block vera_layer_mode_tile::@11 +Removing PHI-reference to removed block (vera_layer_mode_tile::@15) in block vera_layer_mode_tile::@16 +Removing unused block vera_layer_mode_tile::@15 +Removing PHI-reference to removed block (vera_layer_mode_tile::@20) in block vera_layer_mode_tile::@24 +Removing unused block vera_layer_mode_tile::@20 +Removing unused block vera_layer_mode_tile::@18 +Removing PHI-reference to removed block (vera_layer_mode_tile::@22) in block vera_layer_mode_tile::@24 +Removing unused block vera_layer_mode_tile::@22 +Removing PHI-reference to removed block (vera_layer_mode_tile::@19) in block vera_layer_mode_tile::@24 +Removing unused block vera_layer_mode_tile::@19 +Removing PHI-reference to removed block (vera_layer_mode_tile::@23) in block vera_layer_mode_tile::@24 +Removing unused block vera_layer_mode_tile::@23 +Removing PHI-reference to removed block (vera_layer_mode_tile::@25) in block vera_layer_mode_tile::@28 +Removing unused block vera_layer_mode_tile::@25 +Removing PHI-reference to removed block (vera_layer_mode_tile::@27) in block vera_layer_mode_tile::@28 +Removing unused block vera_layer_mode_tile::@27 +Removing PHI-reference to removed block (vera_layer_mode_tile::@29) in block vera_layer_mode_tile::@32 +Removing unused block vera_layer_mode_tile::@29 +Removing PHI-reference to removed block (vera_layer_mode_tile::@31) in block vera_layer_mode_tile::@32 +Removing unused block vera_layer_mode_tile::@31 +Removing unused block vera_layer_mode_text::@1 +Removing PHI-reference to removed block (vera_layer_mode_text::@3) in block vera_layer_set_text_color_mode +Removing PHI-reference to removed block (vera_layer_mode_text::@3) in block vera_layer_set_text_color_mode +Removing unused block vera_layer_mode_text::@3 +Removing unused block vera_layer_mode_text::@6 +Successful SSA optimization Pass2EliminateUnusedBlocks +Adding number conversion cast (unumber) 0 in uctoa::$11 = 0 != uctoa::started#2 +Adding number conversion cast (unumber) 0 in utoa::$12 = 0 != utoa::started#2 +Adding number conversion cast (unumber) 0 in ultoa::$12 = 0 != ultoa::started#2 +Adding number conversion cast (unumber) 0 in printf_number_buffer::$33 = 0 != printf_number_buffer::format_zero_padding#10 +Adding number conversion cast (unumber) 0 in printf_number_buffer::$34 = 0 != printf_number_buffer::format_justify_left#10 +Adding number conversion cast (snumber) 0 in printf_number_buffer::$35 = 0 != printf_number_buffer::padding#10 +Adding number conversion cast (snumber) 0 in printf_number_buffer::$36 = 0 != printf_number_buffer::padding#10 +Adding number conversion cast (snumber) 0 in printf_number_buffer::$37 = 0 != printf_number_buffer::padding#10 +Successful SSA optimization PassNAddNumberTypeConversions +Simplifying constant integer cast 0 +Simplifying constant integer cast 0 +Simplifying constant integer cast 0 +Simplifying constant integer cast 0 +Simplifying constant integer cast 0 +Simplifying constant integer cast 0 +Simplifying constant integer cast 0 +Simplifying constant integer cast 0 +Successful SSA optimization PassNCastSimplification +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 0 +Finalized signed number type (signed byte) 0 +Finalized signed number type (signed byte) 0 +Finalized signed number type (signed byte) 0 +Successful SSA optimization PassNFinalizeNumberTypeConversions +Alias candidate removed (volatile)screenlayer::vera_layer_get_width1_return#0 = screenlayer::vera_layer_get_width1_return#1 screenlayer::$2 conio_width +Alias candidate removed (volatile)conio_rowshift = screenlayer::$3 +Alias candidate removed (volatile)conio_rowskip = screenlayer::$4 +Alias candidate removed (volatile)screenlayer::vera_layer_get_height1_return#0 = screenlayer::vera_layer_get_height1_return#1 screenlayer::$5 conio_height +Alias vera_layer_mode_tile::config#1 = vera_layer_mode_tile::config#17 +Alias vera_layer_mode_tile::config#21 = vera_layer_mode_tile::config#7 +Alias vera_layer_mode_tile::config#10 = vera_layer_mode_tile::config#25 +Alias vera_layer_mode_tile::tilebase#1 = vera_layer_mode_tile::tilebase#2 vera_layer_mode_tile::tilebase#12 vera_layer_mode_tile::tilebase#4 vera_layer_mode_tile::tilebase#10 +Successful SSA optimization Pass2AliasElimination +Alias candidate removed (volatile)screenlayer::vera_layer_get_width1_return#0 = screenlayer::vera_layer_get_width1_return#1 screenlayer::$2 conio_width +Alias candidate removed (volatile)conio_rowshift = screenlayer::$3 +Alias candidate removed (volatile)conio_rowskip = screenlayer::$4 +Alias candidate removed (volatile)screenlayer::vera_layer_get_height1_return#0 = screenlayer::vera_layer_get_height1_return#1 screenlayer::$5 conio_height +Identical Phi Values vera_layer_set_text_color_mode::layer#2 vera_layer_set_text_color_mode::layer#0 +Identical Phi Values vera_layer_set_text_color_mode::color_mode#2 vera_layer_set_text_color_mode::color_mode#0 +Successful SSA optimization Pass2IdenticalPhiElimination +Simple Condition toupper::$0 [2] if(toupper::ch#0>='a') goto toupper::@3 +Simple Condition uctoa::$11 [299] if(0!=uctoa::started#2) goto uctoa::@14 +Simple Condition utoa::$12 [338] if(0!=utoa::started#2) goto utoa::@14 +Simple Condition ultoa::$12 [378] if(0!=ultoa::started#2) goto ultoa::@14 +Simple Condition printf_number_buffer::$1 [452] if(0==printf_number_buffer::format_justify_left#10) goto printf_number_buffer::@23 +Simple Condition printf_number_buffer::$33 [468] if(0!=printf_number_buffer::format_zero_padding#10) goto printf_number_buffer::@24 +Simple Condition printf_number_buffer::$34 [478] if(0!=printf_number_buffer::format_justify_left#10) goto printf_number_buffer::@26 +Simple Condition toupper::$1 [557] if(toupper::ch#0<='z') goto toupper::@1 +Simple Condition uctoa::$6 [558] if(uctoa::value#2>=uctoa::digit_value#0) goto uctoa::@14 +Simple Condition utoa::$6 [559] if(utoa::value#2>=utoa::digit_value#0) goto utoa::@14 +Simple Condition ultoa::$6 [560] if(ultoa::value#2>=ultoa::digit_value#0) goto ultoa::@14 +Simple Condition printf_number_buffer::$35 [562] if(0!=printf_number_buffer::padding#10) goto printf_number_buffer::@8 +Simple Condition printf_number_buffer::$2 [563] if(0==printf_number_buffer::format_zero_padding#10) goto printf_number_buffer::@22 +Simple Condition printf_number_buffer::$36 [565] if(0!=printf_number_buffer::padding#10) goto printf_number_buffer::@10 +Simple Condition printf_number_buffer::$37 [567] if(0!=printf_number_buffer::padding#10) goto printf_number_buffer::@12 +Simple Condition printf_number_buffer::$14 [568] if(0==printf_number_buffer::format_zero_padding#10) goto printf_number_buffer::@25 +Successful SSA optimization Pass2ConditionalJumpSimplification +Negating conditional jump and destination [2] if(toupper::ch#0<'a') goto toupper::@2 +Negating conditional jump and destination [452] if(0!=printf_number_buffer::format_justify_left#10) goto printf_number_buffer::@2 +Negating conditional jump and destination [468] if(0==printf_number_buffer::format_zero_padding#10) goto printf_number_buffer::@4 +Negating conditional jump and destination [478] if(0==printf_number_buffer::format_justify_left#10) goto printf_number_buffer::@return +Negating conditional jump and destination [563] if(0!=printf_number_buffer::format_zero_padding#10) goto printf_number_buffer::@2 +Negating conditional jump and destination [568] if(0!=printf_number_buffer::format_zero_padding#10) goto printf_number_buffer::@return +Successful SSA optimization Pass2ConditionalJumpSequenceImprovement +Constant right-side identified [39] vera_layer_set_config::$0 = vera_layer_set_config::layer#0 * SIZEOF_POINTER +Constant right-side identified [44] vera_layer_set_text_color_mode::$0 = vera_layer_set_text_color_mode::layer#0 * SIZEOF_POINTER +Constant right-side identified [59] vera_layer_set_tilebase::$0 = vera_layer_set_tilebase::layer#0 * SIZEOF_POINTER +Constant right-side identified [85] vera_layer_mode_tile::$15 = vera_layer_mode_tile::layer#0 * SIZEOF_WORD +Constant right-side identified [90] vera_layer_mode_tile::$1 = < vera_layer_mode_tile::mapbase_address#1 +Constant right-side identified [91] vera_layer_mode_tile::$17 = vera_layer_mode_tile::layer#0 * SIZEOF_WORD +Constant right-side identified [93] vera_layer_mode_tile::$2 = > vera_layer_mode_tile::mapbase_address#1 +Constant right-side identified [95] vera_layer_mode_tile::$18 = vera_layer_mode_tile::layer#0 * SIZEOF_DWORD +Constant right-side identified [97] vera_layer_mode_tile::mapbase_address#0 = vera_layer_mode_tile::mapbase_address#1 >> 1 +Constant right-side identified [102] vera_layer_mode_tile::$7 = < vera_layer_mode_tile::tilebase_address#1 +Constant right-side identified [103] vera_layer_mode_tile::$19 = vera_layer_mode_tile::layer#0 * SIZEOF_WORD +Constant right-side identified [105] vera_layer_mode_tile::$8 = > vera_layer_mode_tile::tilebase_address#1 +Constant right-side identified [107] vera_layer_mode_tile::$20 = vera_layer_mode_tile::layer#0 * SIZEOF_DWORD +Constant right-side identified [109] vera_layer_mode_tile::tilebase_address#0 = vera_layer_mode_tile::tilebase_address#1 >> 1 +Constant right-side identified [285] uctoa::buffer#0 = ++ uctoa::buffer#5 +Constant right-side identified [323] utoa::buffer#0 = ++ utoa::buffer#5 +Constant right-side identified [363] ultoa::buffer#0 = ++ ultoa::buffer#5 +Successful SSA optimization Pass2ConstantRValueConsolidation +Constant memcpy_in_vram::$2 = memcpy_in_vram::src_increment#0 +Constant memcpy_in_vram::$5 = memcpy_in_vram::dest_increment#0 +Constant vera_layer_set_config::$0 = vera_layer_set_config::layer#0*SIZEOF_POINTER +Constant vera_layer_set_text_color_mode::$0 = vera_layer_set_text_color_mode::layer#0*SIZEOF_POINTER +Constant vera_layer_set_tilebase::$0 = vera_layer_set_tilebase::layer#0*SIZEOF_POINTER +Constant vera_layer_mode_tile::config#1 = VERA_LAYER_COLOR_DEPTH_1BPP +Constant vera_layer_mode_tile::$15 = vera_layer_mode_tile::layer#0*SIZEOF_WORD +Constant vera_layer_mode_tile::$1 = vera_layer_mode_tile::mapbase_address#1 +Constant vera_layer_mode_tile::$18 = vera_layer_mode_tile::layer#0*SIZEOF_DWORD +Constant vera_layer_mode_tile::mapbase_address#0 = vera_layer_mode_tile::mapbase_address#1>>1 +Constant vera_layer_mode_tile::$7 = vera_layer_mode_tile::tilebase_address#1 +Constant vera_layer_mode_tile::$20 = vera_layer_mode_tile::layer#0*SIZEOF_DWORD +Constant vera_layer_mode_tile::tilebase_address#0 = vera_layer_mode_tile::tilebase_address#1>>1 +Constant uctoa::buffer#0 = ++uctoa::buffer#5 +Constant utoa::buffer#0 = ++utoa::buffer#5 +Constant ultoa::buffer#0 = ++ultoa::buffer#5 +Successful SSA optimization Pass2ConstantIdentification +Constant value identified (byte)vera_layer_mode_tile::$2 in [94] vera_mapbase_bank[vera_layer_mode_tile::layer#0] = (byte)vera_layer_mode_tile::$2 +Constant value identified (byte)vera_layer_mode_tile::$8 in [106] vera_tilebase_bank[vera_layer_mode_tile::layer#0] = (byte)vera_layer_mode_tile::$8 +Successful SSA optimization Pass2ConstantValues +Simplifying constant evaluating to zero vera_layer_mode_tile::mapbase_address#1 in +Simplifying constant evaluating to zero vera_layer_mode_tile::mapbase_address#1>>1 in +Simplifying constant evaluating to zero >vera_layer_mode_tile::tilebase_address#1 in +Simplifying constant evaluating to zero (byte)vera_layer_mode_tile::$2 in [94] vera_mapbase_bank[vera_layer_mode_tile::layer#0] = (byte)vera_layer_mode_tile::$2 +Simplifying constant evaluating to zero (byte)vera_layer_mode_tile::$8 in [106] vera_tilebase_bank[vera_layer_mode_tile::layer#0] = (byte)vera_layer_mode_tile::$8 +Successful SSA optimization PassNSimplifyConstantZero +Simplifying expression containing zero *vera_layer_set_text_color_mode::addr#0 in [47] *vera_layer_set_text_color_mode::addr#0 = *vera_layer_set_text_color_mode::addr#0 | vera_layer_set_text_color_mode::color_mode#0 +Simplifying expression containing zero VERA_LAYER_WIDTH_128 in [83] vera_layer_mode_tile::config#21 = vera_layer_mode_tile::config#1 | VERA_LAYER_WIDTH_128 +Successful SSA optimization PassNSimplifyExpressionWithZero +Eliminating unused constant VERA_LAYER_WIDTH_64 +Eliminating unused constant VERA_LAYER_WIDTH_256 +Eliminating unused constant VERA_LAYER_HEIGHT_128 +Eliminating unused constant VERA_LAYER_HEIGHT_256 +Eliminating unused constant VERA_LAYER_COLOR_DEPTH_2BPP +Eliminating unused constant VERA_LAYER_COLOR_DEPTH_4BPP +Eliminating unused constant VERA_LAYER_COLOR_DEPTH_8BPP +Eliminating unused constant VERA_TILEBASE_WIDTH_16 +Eliminating unused constant VERA_TILEBASE_HEIGHT_16 +Eliminating unused constant vera_layer_set_text_color_mode::color_mode#0 +Eliminating unused constant vera_layer_set_text_color_mode::color_mode#1 +Eliminating unused constant vera_layer_set_text_color_mode::layer#1 +Eliminating unused constant vera_layer_mode_tile::config#0 +Eliminating unused constant vera_layer_mode_tile::config#1 +Eliminating unused constant vera_layer_mode_tile::$2 +Eliminating unused constant vera_layer_mode_tile::$8 +Successful SSA optimization PassNEliminateUnusedVars +Eliminating unused constant VERA_LAYER_COLOR_DEPTH_1BPP +Eliminating unused constant VERA_LAYER_CONFIG_16C +Successful SSA optimization PassNEliminateUnusedVars +Alias candidate removed (volatile)screenlayer::vera_layer_get_width1_return#0 = screenlayer::vera_layer_get_width1_return#1 screenlayer::$2 conio_width +Alias candidate removed (volatile)conio_rowshift = screenlayer::$3 +Alias candidate removed (volatile)conio_rowskip = screenlayer::$4 +Alias candidate removed (volatile)screenlayer::vera_layer_get_height1_return#0 = screenlayer::vera_layer_get_height1_return#1 screenlayer::$5 conio_height +Constant right-side identified [83] vera_layer_mode_tile::$4 = < vera_layer_mode_tile::mapbase_address#0 +Constant right-side identified [90] vera_layer_mode_tile::$10 = < vera_layer_mode_tile::tilebase_address#0 +Constant right-side identified [266] uctoa::buffer#1 = ++ uctoa::buffer#0 +Constant right-side identified [301] utoa::buffer#1 = ++ utoa::buffer#0 +Constant right-side identified [338] ultoa::buffer#1 = ++ ultoa::buffer#0 +Successful SSA optimization Pass2ConstantRValueConsolidation +Constant vera_layer_mode_tile::config#21 = VERA_LAYER_WIDTH_128 +Constant vera_layer_mode_tile::$4 = vera_layer_mode_tile::$4 +Constant right-side identified [88] vera_layer_mode_tile::tilebase#0 = > vera_layer_mode_tile::$10 +Constant right-side identified [264] uctoa::buffer#2 = ++ uctoa::buffer#1 +Constant right-side identified [298] utoa::buffer#2 = ++ utoa::buffer#1 +Constant right-side identified [334] ultoa::buffer#2 = ++ ultoa::buffer#1 +Successful SSA optimization Pass2ConstantRValueConsolidation +Constant vera_layer_mode_tile::config#10 = vera_layer_mode_tile::config#21|VERA_LAYER_HEIGHT_64 +Constant vera_layer_mode_tile::mapbase#0 = >vera_layer_mode_tile::$4 +Constant vera_layer_mode_tile::tilebase#0 = >vera_layer_mode_tile::$10 +Constant uctoa::buffer#2 = ++uctoa::buffer#1 +Constant utoa::buffer#2 = ++utoa::buffer#1 +Constant ultoa::buffer#2 = ++ultoa::buffer#1 +Successful SSA optimization Pass2ConstantIdentification +Constant vera_layer_set_config::config#0 = vera_layer_mode_tile::config#10 +Constant vera_layer_set_mapbase::mapbase#0 = vera_layer_mode_tile::mapbase#0 +Successful SSA optimization Pass2ConstantIdentification +Simplifying constant evaluating to zero >vera_layer_mode_tile::$4 in +Successful SSA optimization PassNSimplifyConstantZero +Eliminating unused constant vera_layer_mode_tile::$4 +Successful SSA optimization PassNEliminateUnusedVars +Alias candidate removed (volatile)screenlayer::vera_layer_get_width1_return#0 = screenlayer::vera_layer_get_width1_return#1 screenlayer::$2 conio_width +Alias candidate removed (volatile)conio_rowshift = screenlayer::$3 +Alias candidate removed (volatile)conio_rowskip = screenlayer::$4 +Alias candidate removed (volatile)screenlayer::vera_layer_get_height1_return#0 = screenlayer::vera_layer_get_height1_return#1 screenlayer::$5 conio_height +Constant right-side identified [84] vera_layer_mode_tile::tilebase#1 = vera_layer_mode_tile::tilebase#0 & VERA_LAYER_TILEBASE_MASK +Successful SSA optimization Pass2ConstantRValueConsolidation +Constant vera_layer_mode_tile::tilebase#1 = vera_layer_mode_tile::tilebase#0&VERA_LAYER_TILEBASE_MASK +Successful SSA optimization Pass2ConstantIdentification +Constant vera_layer_set_tilebase::tilebase#0 = vera_layer_mode_tile::tilebase#1 +Successful SSA optimization Pass2ConstantIdentification +Alias candidate removed (volatile)screenlayer::vera_layer_get_width1_return#0 = screenlayer::vera_layer_get_width1_return#1 screenlayer::$2 conio_width +Alias candidate removed (volatile)conio_rowshift = screenlayer::$3 +Alias candidate removed (volatile)conio_rowskip = screenlayer::$4 +Alias candidate removed (volatile)screenlayer::vera_layer_get_height1_return#0 = screenlayer::vera_layer_get_height1_return#1 screenlayer::$5 conio_height +Inlining Noop Cast [188] memcpy_in_vram::src#0 = (void*)insertup::$6 keeping memcpy_in_vram::src#0 +Inlining Noop Cast [218] CONIO_SCREEN_TEXT#101 = (byte*)screenlayer::$1 keeping CONIO_SCREEN_TEXT#101 +Successful SSA optimization Pass2NopCastInlining +Inlining Noop Cast [413] printf_number_buffer::$25 = (signed byte)printf_number_buffer::format_min_length#3 keeping printf_number_buffer::format_min_length#3 +Successful SSA optimization Pass2NopCastInlining +Rewriting multiplication to use shift [43] vera_layer_set_mapbase::$0 = vera_layer_set_mapbase::layer#3 * SIZEOF_POINTER +Rewriting multiplication to use shift [49] vera_layer_get_mapbase_offset::$0 = vera_layer_get_mapbase_offset::layer#0 * SIZEOF_WORD +Rewriting multiplication to use shift [60] vera_layer_get_color::$3 = vera_layer_get_color::layer#2 * SIZEOF_POINTER +Rewriting multiplication to use shift [71] vera_layer_get_rowskip::$0 = vera_layer_get_rowskip::layer#0 * SIZEOF_WORD +Rewriting multiplication to use shift [112] gotoxy::$5 = conio_screen_layer * SIZEOF_WORD +Rewriting multiplication to use shift [127] cputc::$15 = conio_screen_layer * SIZEOF_WORD +Rewriting multiplication to use shift [151] cputln::$2 = conio_screen_layer * SIZEOF_WORD +Rewriting multiplication to use shift [154] cputln::$3 = conio_screen_layer * SIZEOF_WORD +Rewriting multiplication to use shift [161] clearline::$5 = conio_screen_layer * SIZEOF_WORD +Rewriting multiplication to use shift [180] insertup::width#0 = conio_screen_width * 2 +Rewriting multiplication to use shift [220] screenlayer::vera_layer_get_width1_$2 = screenlayer::vera_layer_get_width1_layer#0 * SIZEOF_POINTER +Rewriting multiplication to use shift [224] screenlayer::vera_layer_get_width1_$3 = screenlayer::vera_layer_get_width1_$1 * SIZEOF_WORD +Rewriting multiplication to use shift [240] screenlayer::vera_layer_get_height1_$2 = screenlayer::vera_layer_get_height1_layer#0 * SIZEOF_POINTER +Rewriting multiplication to use shift [244] screenlayer::vera_layer_get_height1_$3 = screenlayer::vera_layer_get_height1_$1 * SIZEOF_WORD +Rewriting multiplication to use shift [296] utoa::$10 = utoa::digit#2 * SIZEOF_WORD +Rewriting multiplication to use shift [331] ultoa::$10 = ultoa::digit#2 * SIZEOF_DWORD +Successful SSA optimization Pass2MultiplyToShiftRewriting +Inlining constant with var siblings strlen::len#0 +Inlining constant with var siblings memcpy_in_vram::i#0 +Inlining constant with var siblings vera_layer_set_mapbase::layer#1 +Inlining constant with var siblings vera_layer_set_mapbase::mapbase#1 +Inlining constant with var siblings vera_layer_set_mapbase::layer#2 +Inlining constant with var siblings vera_layer_set_mapbase::mapbase#2 +Inlining constant with var siblings vera_layer_set_mapbase::layer#0 +Inlining constant with var siblings vera_layer_set_mapbase::mapbase#0 +Inlining constant with different constant siblings vera_layer_mode_tile::tilebase_address#1 +Inlining constant with different constant siblings vera_layer_mode_tile::config#21 +Inlining constant with different constant siblings vera_layer_mode_tile::tilebase#0 +Inlining constant with different constant siblings vera_layer_mode_tile::tilebase#1 +Inlining constant with var siblings gotoxy::x#0 +Inlining constant with var siblings gotoxy::y#1 +Inlining constant with var siblings gotoxy::x#1 +Inlining constant with var siblings gotoxy::x#2 +Inlining constant with var siblings clearline::c#0 +Inlining constant with var siblings insertup::i#0 +Inlining constant with var siblings cputs::s#2 +Inlining constant with var siblings cputs::s#3 +Inlining constant with var siblings cputs::s#4 +Inlining constant with var siblings cputs::s#5 +Inlining constant with var siblings cputs::s#6 +Inlining constant with var siblings cputs::s#7 +Inlining constant with var siblings cputs::s#8 +Inlining constant with var siblings cputs::s#9 +Inlining constant with var siblings uctoa::max_digits#1 +Inlining constant with var siblings uctoa::digit_values#1 +Inlining constant with var siblings uctoa::max_digits#2 +Inlining constant with var siblings uctoa::digit_values#2 +Inlining constant with var siblings uctoa::max_digits#3 +Inlining constant with var siblings uctoa::digit_values#3 +Inlining constant with var siblings uctoa::max_digits#4 +Inlining constant with var siblings uctoa::digit_values#4 +Inlining constant with var siblings uctoa::started#0 +Inlining constant with var siblings uctoa::digit#0 +Inlining constant with var siblings uctoa::started#1 +Inlining constant with var siblings uctoa::buffer#5 +Inlining constant with var siblings uctoa::buffer#0 +Inlining constant with var siblings uctoa::buffer#1 +Inlining constant with var siblings uctoa::buffer#2 +Inlining constant with var siblings uctoa_append::digit#0 +Inlining constant with var siblings utoa::max_digits#1 +Inlining constant with var siblings utoa::digit_values#1 +Inlining constant with var siblings utoa::max_digits#2 +Inlining constant with var siblings utoa::digit_values#2 +Inlining constant with var siblings utoa::max_digits#3 +Inlining constant with var siblings utoa::digit_values#3 +Inlining constant with var siblings utoa::max_digits#4 +Inlining constant with var siblings utoa::digit_values#4 +Inlining constant with var siblings utoa::started#0 +Inlining constant with var siblings utoa::digit#0 +Inlining constant with var siblings utoa::started#1 +Inlining constant with var siblings utoa::buffer#5 +Inlining constant with var siblings utoa::buffer#0 +Inlining constant with var siblings utoa::buffer#1 +Inlining constant with var siblings utoa::buffer#2 +Inlining constant with var siblings utoa_append::digit#0 +Inlining constant with var siblings ultoa::max_digits#1 +Inlining constant with var siblings ultoa::digit_values#1 +Inlining constant with var siblings ultoa::max_digits#2 +Inlining constant with var siblings ultoa::digit_values#2 +Inlining constant with var siblings ultoa::max_digits#3 +Inlining constant with var siblings ultoa::digit_values#3 +Inlining constant with var siblings ultoa::max_digits#4 +Inlining constant with var siblings ultoa::digit_values#4 +Inlining constant with var siblings ultoa::started#0 +Inlining constant with var siblings ultoa::digit#0 +Inlining constant with var siblings ultoa::started#1 +Inlining constant with var siblings ultoa::buffer#5 +Inlining constant with var siblings ultoa::buffer#0 +Inlining constant with var siblings ultoa::buffer#1 +Inlining constant with var siblings ultoa::buffer#2 +Inlining constant with var siblings ultoa_append::digit#0 +Inlining constant with var siblings printf_padding::i#0 +Inlining constant with var siblings printf_padding::pad#0 +Inlining constant with var siblings printf_padding::pad#1 +Inlining constant with var siblings printf_padding::pad#2 +Inlining constant with var siblings printf_ulong::format_min_length#0 +Inlining constant with var siblings printf_ulong::format_justify_left#0 +Inlining constant with var siblings printf_ulong::format_sign_always#0 +Inlining constant with var siblings printf_ulong::format_zero_padding#0 +Inlining constant with var siblings printf_ulong::format_upper_case#0 +Inlining constant with var siblings printf_ulong::format_radix#0 +Inlining constant with var siblings printf_ulong::format_min_length#1 +Inlining constant with var siblings printf_ulong::format_justify_left#1 +Inlining constant with var siblings printf_ulong::format_sign_always#1 +Inlining constant with var siblings printf_ulong::format_zero_padding#1 +Inlining constant with var siblings printf_ulong::format_upper_case#1 +Inlining constant with var siblings printf_ulong::format_radix#1 +Inlining constant with var siblings printf_ulong::format_min_length#2 +Inlining constant with var siblings printf_ulong::format_justify_left#2 +Inlining constant with var siblings printf_ulong::format_sign_always#2 +Inlining constant with var siblings printf_ulong::format_zero_padding#2 +Inlining constant with var siblings printf_ulong::format_upper_case#2 +Inlining constant with var siblings printf_ulong::format_radix#2 +Inlining constant with var siblings printf_uint::format_min_length#0 +Inlining constant with var siblings printf_uint::format_justify_left#0 +Inlining constant with var siblings printf_uint::format_sign_always#0 +Inlining constant with var siblings printf_uint::format_zero_padding#0 +Inlining constant with var siblings printf_uint::format_upper_case#0 +Inlining constant with var siblings printf_uint::format_radix#0 +Inlining constant with var siblings printf_uint::format_min_length#1 +Inlining constant with var siblings printf_uint::format_justify_left#1 +Inlining constant with var siblings printf_uint::format_sign_always#1 +Inlining constant with var siblings printf_uint::format_zero_padding#1 +Inlining constant with var siblings printf_uint::format_upper_case#1 +Inlining constant with var siblings printf_uint::format_radix#1 +Inlining constant with var siblings printf_uchar::format_min_length#0 +Inlining constant with var siblings printf_uchar::format_justify_left#0 +Inlining constant with var siblings printf_uchar::format_sign_always#0 +Inlining constant with var siblings printf_uchar::format_zero_padding#0 +Inlining constant with var siblings printf_uchar::format_upper_case#0 +Inlining constant with var siblings printf_uchar::format_radix#0 +Inlining constant with var siblings printf_uchar::format_min_length#1 +Inlining constant with var siblings printf_uchar::format_justify_left#1 +Inlining constant with var siblings printf_uchar::format_sign_always#1 +Inlining constant with var siblings printf_uchar::format_zero_padding#1 +Inlining constant with var siblings printf_uchar::format_upper_case#1 +Inlining constant with var siblings printf_uchar::format_radix#1 +Inlining constant with var siblings printf_number_buffer::buffer_digits#0 +Inlining constant with var siblings printf_number_buffer::buffer_digits#1 +Inlining constant with var siblings printf_number_buffer::buffer_digits#2 +Inlining constant with var siblings printf_number_buffer::padding#0 +Inlining constant with var siblings printf_number_buffer::padding#2 +Inlining constant with var siblings main::num#0 +Inlining constant with var siblings main::src1#0 +Constant inlined vera_layer_set_config::layer#0 = vera_layer_mode_text::layer#0 +Constant inlined cputs::s#5 = main::s3 +Constant inlined cputs::s#6 = main::s4 +Constant inlined utoa::digit_values#1 = RADIX_DECIMAL_VALUES +Constant inlined cputs::s#3 = main::s1 +Constant inlined printf_number_buffer::buffer_digits#0 = (byte*)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS +Constant inlined vera_layer_set_textcolor::color#0 = WHITE +Constant inlined cputs::s#4 = main::s2 +Constant inlined printf_number_buffer::buffer_digits#1 = (byte*)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS +Constant inlined utoa::digit_values#4 = RADIX_BINARY_VALUES +Constant inlined printf_number_buffer::buffer_digits#2 = (byte*)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS +Constant inlined cputs::s#2 = main::s +Constant inlined utoa::digit_values#2 = RADIX_HEXADECIMAL_VALUES +Constant inlined utoa::digit_values#3 = RADIX_OCTAL_VALUES +Constant inlined strlen::len#0 = 0 +Constant inlined printf_ulong::format_upper_case#0 = 0 +Constant inlined vera_layer_set_tilebase::tilebase#0 = > main::src1#10 + [39] main::$4 = main::$3 << 8 + [40] main::$5 = < main::$4 + [41] main::$6 = < main::src1#10 + [42] main::$7 = > main::$6 + [43] main::$30 = (word)main::$5 + [44] main::$8 = main::$30 | main::$7 + [45] main::$9 = main::$8 >> 5 + [46] main::$10 = > main::src1#10 + [47] main::$11 = main::$10 << 3 + [48] main::$12 = < main::$11 + [49] main::$31 = (word)main::$12 + [50] main::$13 = main::$9 + main::$31 + [51] main::bankbeg#0 = (byte)main::$13 + [52] main::$14 = > main::calcend#0 + [53] main::$15 = main::$14 << 8 + [54] main::$16 = < main::$15 + [55] main::$17 = < main::calcend#0 + [56] main::$18 = > main::$17 + [57] main::$32 = (word)main::$16 + [58] main::$19 = main::$32 | main::$18 + [59] main::$20 = main::$19 >> 5 + [60] main::$21 = > main::calcend#0 + [61] main::$22 = main::$21 << 3 + [62] main::$23 = < main::$22 + [63] main::$33 = (word)main::$23 + [64] main::$24 = main::$20 + main::$33 + [65] main::bankend#0 = (byte)main::$24 + [66] main::$25 = < main::src1#10 + [67] main::beg#0 = main::$25 & $1fff + [68] main::$27 = < main::calcend#0 + [69] main::end#0 = main::$27 & $1fff + [70] main::beg#1 = main::beg#0 + main::borderbeg + [71] main::end#1 = main::end#0 + main::borderbeg + [72] call cputs + to:main::@3 +main::@3: scope:[main] from main::@2 + [73] printf_ulong::uvalue#0 = main::src1#10 + [74] call printf_ulong + to:main::@4 +main::@4: scope:[main] from main::@3 + [75] phi() + [76] call cputs + to:main::@5 +main::@5: scope:[main] from main::@4 + [77] printf_ulong::uvalue#1 = main::num#10 + [78] call printf_ulong + to:main::@6 +main::@6: scope:[main] from main::@5 + [79] phi() + [80] call cputs + to:main::@7 +main::@7: scope:[main] from main::@6 + [81] printf_ulong::uvalue#2 = main::calcend#0 + [82] call printf_ulong + to:main::@8 +main::@8: scope:[main] from main::@7 + [83] phi() + [84] call cputs + to:main::@9 +main::@9: scope:[main] from main::@8 + [85] printf_uchar::uvalue#0 = main::bankbeg#0 + [86] call printf_uchar + to:main::@10 +main::@10: scope:[main] from main::@9 + [87] phi() + [88] call cputs + to:main::@11 +main::@11: scope:[main] from main::@10 + [89] printf_uchar::uvalue#1 = main::bankend#0 + [90] call printf_uchar + to:main::@12 +main::@12: scope:[main] from main::@11 + [91] phi() + [92] call cputs + to:main::@13 +main::@13: scope:[main] from main::@12 + [93] printf_uint::uvalue#0 = main::beg#1 + [94] call printf_uint + to:main::@14 +main::@14: scope:[main] from main::@13 + [95] phi() + [96] call cputs + to:main::@15 +main::@15: scope:[main] from main::@14 + [97] printf_uint::uvalue#1 = main::end#1 + [98] call printf_uint + to:main::@16 +main::@16: scope:[main] from main::@15 + [99] phi() + [100] call cputs + to:main::@17 +main::@17: scope:[main] from main::@16 + [101] main::num#1 = main::num#10 + main::inc + [102] main::src1#1 = main::src1#10 + main::num#1 + to:main::@1 + +void vera_layer_mode_text(byte vera_layer_mode_text::layer , dword vera_layer_mode_text::mapbase_address , dword vera_layer_mode_text::tilebase_address , word vera_layer_mode_text::mapwidth , word vera_layer_mode_text::mapheight , byte vera_layer_mode_text::tilewidth , byte vera_layer_mode_text::tileheight , word vera_layer_mode_text::color_mode) +vera_layer_mode_text: scope:[vera_layer_mode_text] from conio_x16_init + [103] phi() + [104] call vera_layer_mode_tile + to:vera_layer_mode_text::@1 +vera_layer_mode_text::@1: scope:[vera_layer_mode_text] from vera_layer_mode_text + [105] phi() + [106] call vera_layer_set_text_color_mode + to:vera_layer_mode_text::@return +vera_layer_mode_text::@return: scope:[vera_layer_mode_text] from vera_layer_mode_text::@1 + [107] return + to:@return + +void screensize(byte* screensize::x , byte* screensize::y) +screensize: scope:[screensize] from conio_x16_init::@3 + [108] screensize::hscale#0 = *VERA_DC_HSCALE >> 7 + [109] screensize::$1 = $28 << screensize::hscale#0 + [110] *screensize::x#0 = screensize::$1 + [111] screensize::vscale#0 = *VERA_DC_VSCALE >> 7 + [112] screensize::$3 = $1e << screensize::vscale#0 + [113] *screensize::y#0 = screensize::$3 + to:screensize::@return +screensize::@return: scope:[screensize] from screensize + [114] return + to:@return + +void screenlayer(byte screenlayer::layer) +screenlayer: scope:[screenlayer] from conio_x16_init::@4 + [115] conio_screen_layer = screenlayer::layer#0 + [116] vera_layer_get_mapbase_bank::layer#0 = conio_screen_layer + [117] call vera_layer_get_mapbase_bank + [118] vera_layer_get_mapbase_bank::return#2 = vera_layer_get_mapbase_bank::return#0 + to:screenlayer::@3 +screenlayer::@3: scope:[screenlayer] from screenlayer + [119] CONIO_SCREEN_BANK#10 = vera_layer_get_mapbase_bank::return#2 + [120] vera_layer_get_mapbase_offset::layer#0 = conio_screen_layer + [121] call vera_layer_get_mapbase_offset + [122] vera_layer_get_mapbase_offset::return#2 = vera_layer_get_mapbase_offset::return#0 + to:screenlayer::@4 +screenlayer::@4: scope:[screenlayer] from screenlayer::@3 + [123] CONIO_SCREEN_TEXT#101 = vera_layer_get_mapbase_offset::return#2 + [124] screenlayer::vera_layer_get_width1_layer#0 = conio_screen_layer + to:screenlayer::vera_layer_get_width1 +screenlayer::vera_layer_get_width1: scope:[screenlayer] from screenlayer::@4 + [125] screenlayer::vera_layer_get_width1_$2 = screenlayer::vera_layer_get_width1_layer#0 << 1 + [126] screenlayer::vera_layer_get_width1_config#0 = vera_layer_config[screenlayer::vera_layer_get_width1_$2] + [127] screenlayer::vera_layer_get_width1_$0 = *screenlayer::vera_layer_get_width1_config#0 & VERA_LAYER_WIDTH_MASK + [128] screenlayer::vera_layer_get_width1_$1 = screenlayer::vera_layer_get_width1_$0 >> 4 + [129] screenlayer::vera_layer_get_width1_$3 = screenlayer::vera_layer_get_width1_$1 << 1 + [130] screenlayer::vera_layer_get_width1_return#0 = VERA_LAYER_WIDTH[screenlayer::vera_layer_get_width1_$3] + to:screenlayer::vera_layer_get_width1_@return +screenlayer::vera_layer_get_width1_@return: scope:[screenlayer] from screenlayer::vera_layer_get_width1 + [131] screenlayer::vera_layer_get_width1_return#1 = screenlayer::vera_layer_get_width1_return#0 + to:screenlayer::@1 +screenlayer::@1: scope:[screenlayer] from screenlayer::vera_layer_get_width1_@return + [132] screenlayer::$2 = screenlayer::vera_layer_get_width1_return#1 + [133] conio_width = screenlayer::$2 + [134] vera_layer_get_rowshift::layer#0 = conio_screen_layer + [135] call vera_layer_get_rowshift + [136] vera_layer_get_rowshift::return#2 = vera_layer_get_rowshift::return#0 + to:screenlayer::@5 +screenlayer::@5: scope:[screenlayer] from screenlayer::@1 + [137] screenlayer::$3 = vera_layer_get_rowshift::return#2 + [138] conio_rowshift = screenlayer::$3 + [139] vera_layer_get_rowskip::layer#0 = conio_screen_layer + [140] call vera_layer_get_rowskip + [141] vera_layer_get_rowskip::return#2 = vera_layer_get_rowskip::return#0 + to:screenlayer::@6 +screenlayer::@6: scope:[screenlayer] from screenlayer::@5 + [142] screenlayer::$4 = vera_layer_get_rowskip::return#2 + [143] conio_rowskip = screenlayer::$4 + [144] screenlayer::vera_layer_get_height1_layer#0 = conio_screen_layer + to:screenlayer::vera_layer_get_height1 +screenlayer::vera_layer_get_height1: scope:[screenlayer] from screenlayer::@6 + [145] screenlayer::vera_layer_get_height1_$2 = screenlayer::vera_layer_get_height1_layer#0 << 1 + [146] screenlayer::vera_layer_get_height1_config#0 = vera_layer_config[screenlayer::vera_layer_get_height1_$2] + [147] screenlayer::vera_layer_get_height1_$0 = *screenlayer::vera_layer_get_height1_config#0 & VERA_LAYER_HEIGHT_MASK + [148] screenlayer::vera_layer_get_height1_$1 = screenlayer::vera_layer_get_height1_$0 >> 6 + [149] screenlayer::vera_layer_get_height1_$3 = screenlayer::vera_layer_get_height1_$1 << 1 + [150] screenlayer::vera_layer_get_height1_return#0 = VERA_LAYER_HEIGHT[screenlayer::vera_layer_get_height1_$3] + to:screenlayer::vera_layer_get_height1_@return +screenlayer::vera_layer_get_height1_@return: scope:[screenlayer] from screenlayer::vera_layer_get_height1 + [151] screenlayer::vera_layer_get_height1_return#1 = screenlayer::vera_layer_get_height1_return#0 + to:screenlayer::@2 +screenlayer::@2: scope:[screenlayer] from screenlayer::vera_layer_get_height1_@return + [152] screenlayer::$5 = screenlayer::vera_layer_get_height1_return#1 + [153] conio_height = screenlayer::$5 + to:screenlayer::@return +screenlayer::@return: scope:[screenlayer] from screenlayer::@2 + [154] return + to:@return + +byte vera_layer_set_textcolor(byte vera_layer_set_textcolor::layer , byte vera_layer_set_textcolor::color) +vera_layer_set_textcolor: scope:[vera_layer_set_textcolor] from conio_x16_init::@5 + [155] *(vera_layer_textcolor+vera_layer_set_textcolor::layer#0) = WHITE + to:vera_layer_set_textcolor::@return +vera_layer_set_textcolor::@return: scope:[vera_layer_set_textcolor] from vera_layer_set_textcolor + [156] return + to:@return + +byte vera_layer_set_backcolor(byte vera_layer_set_backcolor::layer , byte vera_layer_set_backcolor::color) +vera_layer_set_backcolor: scope:[vera_layer_set_backcolor] from conio_x16_init::@6 + [157] *(vera_layer_backcolor+vera_layer_set_backcolor::layer#0) = BLUE + to:vera_layer_set_backcolor::@return +vera_layer_set_backcolor::@return: scope:[vera_layer_set_backcolor] from vera_layer_set_backcolor + [158] return + to:@return + +void vera_layer_set_mapbase(byte vera_layer_set_mapbase::layer , byte vera_layer_set_mapbase::mapbase) +vera_layer_set_mapbase: scope:[vera_layer_set_mapbase] from conio_x16_init::@7 conio_x16_init::@8 vera_layer_mode_tile::@4 + [159] vera_layer_set_mapbase::mapbase#3 = phi( conio_x16_init::@7/$20, conio_x16_init::@8/0, vera_layer_mode_tile::@4/vera_layer_mode_tile::mapbase#0 ) + [159] vera_layer_set_mapbase::layer#3 = phi( conio_x16_init::@7/0, conio_x16_init::@8/1, vera_layer_mode_tile::@4/vera_layer_mode_text::layer#0 ) + [160] vera_layer_set_mapbase::$0 = vera_layer_set_mapbase::layer#3 << 1 + [161] vera_layer_set_mapbase::addr#0 = vera_layer_mapbase[vera_layer_set_mapbase::$0] + [162] *vera_layer_set_mapbase::addr#0 = vera_layer_set_mapbase::mapbase#3 + to:vera_layer_set_mapbase::@return +vera_layer_set_mapbase::@return: scope:[vera_layer_set_mapbase] from vera_layer_set_mapbase + [163] return + to:@return + +void gotoxy(byte gotoxy::x , byte gotoxy::y) +gotoxy: scope:[gotoxy] from conio_x16_init::@1 cscroll::@5 + [164] gotoxy::y#3 = phi( conio_x16_init::@1/gotoxy::y#0, cscroll::@5/gotoxy::y#2 ) + [165] if(gotoxy::y#3<=conio_screen_height) goto gotoxy::@4 + to:gotoxy::@1 +gotoxy::@4: scope:[gotoxy] from gotoxy + [166] phi() + to:gotoxy::@1 +gotoxy::@1: scope:[gotoxy] from gotoxy gotoxy::@4 + [167] gotoxy::y#4 = phi( gotoxy::@4/gotoxy::y#3, gotoxy/0 ) + [168] if(0 cputc::conio_addr#1 + [249] *VERA_ADDRX_M = cputc::$5 + [250] cputc::$6 = CONIO_SCREEN_BANK#10 | VERA_INC_1 + [251] *VERA_ADDRX_H = cputc::$6 + [252] *VERA_DATA0 = cputc::c#3 + [253] *VERA_DATA0 = cputc::color#0 + [254] conio_cursor_x[conio_screen_layer] = ++ conio_cursor_x[conio_screen_layer] + [255] cputc::scroll_enable#0 = conio_scroll_enable[conio_screen_layer] + [256] if(0!=cputc::scroll_enable#0) goto cputc::@5 + to:cputc::@3 +cputc::@3: scope:[cputc] from cputc::@2 + [257] cputc::$16 = (word)conio_cursor_x[conio_screen_layer] + [258] if(cputc::$16!=conio_width) goto cputc::@return + to:cputc::@4 +cputc::@4: scope:[cputc] from cputc::@3 + [259] phi() + [260] call cputln + to:cputc::@return +cputc::@return: scope:[cputc] from cputc::@1 cputc::@3 cputc::@4 cputc::@5 cputc::@6 + [261] return + to:@return +cputc::@5: scope:[cputc] from cputc::@2 + [262] if(conio_cursor_x[conio_screen_layer]!=conio_screen_width) goto cputc::@return + to:cputc::@6 +cputc::@6: scope:[cputc] from cputc::@5 + [263] phi() + [264] call cputln + to:cputc::@return +cputc::@1: scope:[cputc] from cputc::@7 + [265] phi() + [266] call cputln + to:cputc::@return + +void ultoa(dword ultoa::value , byte* ultoa::buffer , byte ultoa::radix) +ultoa: scope:[ultoa] from printf_ulong::@1 + [267] phi() + to:ultoa::@1 +ultoa::@1: scope:[ultoa] from ultoa ultoa::@4 + [268] ultoa::buffer#11 = phi( ultoa::@4/ultoa::buffer#14, ultoa/(byte*)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS ) + [268] ultoa::started#2 = phi( ultoa::@4/ultoa::started#4, ultoa/0 ) + [268] ultoa::value#2 = phi( ultoa::@4/ultoa::value#6, ultoa/ultoa::value#1 ) + [268] ultoa::digit#2 = phi( ultoa::@4/ultoa::digit#1, ultoa/0 ) + [269] if(ultoa::digit#2<8-1) goto ultoa::@2 + to:ultoa::@3 +ultoa::@3: scope:[ultoa] from ultoa::@1 + [270] ultoa::$11 = (byte)ultoa::value#2 + [271] *ultoa::buffer#11 = DIGITS[ultoa::$11] + [272] ultoa::buffer#3 = ++ ultoa::buffer#11 + [273] *ultoa::buffer#3 = 0 + to:ultoa::@return +ultoa::@return: scope:[ultoa] from ultoa::@3 + [274] return + to:@return +ultoa::@2: scope:[ultoa] from ultoa::@1 + [275] ultoa::$10 = ultoa::digit#2 << 2 + [276] ultoa::digit_value#0 = RADIX_HEXADECIMAL_VALUES_LONG[ultoa::$10] + [277] if(0!=ultoa::started#2) goto ultoa::@5 + to:ultoa::@7 +ultoa::@7: scope:[ultoa] from ultoa::@2 + [278] if(ultoa::value#2>=ultoa::digit_value#0) goto ultoa::@5 + to:ultoa::@4 +ultoa::@4: scope:[ultoa] from ultoa::@6 ultoa::@7 + [279] ultoa::buffer#14 = phi( ultoa::@7/ultoa::buffer#11, ultoa::@6/ultoa::buffer#4 ) + [279] ultoa::started#4 = phi( ultoa::@7/ultoa::started#2, ultoa::@6/1 ) + [279] ultoa::value#6 = phi( ultoa::@7/ultoa::value#2, ultoa::@6/ultoa::value#0 ) + [280] ultoa::digit#1 = ++ ultoa::digit#2 + to:ultoa::@1 +ultoa::@5: scope:[ultoa] from ultoa::@2 ultoa::@7 + [281] ultoa_append::buffer#0 = ultoa::buffer#11 + [282] ultoa_append::value#0 = ultoa::value#2 + [283] ultoa_append::sub#0 = ultoa::digit_value#0 + [284] call ultoa_append + [285] ultoa_append::return#0 = ultoa_append::value#2 + to:ultoa::@6 +ultoa::@6: scope:[ultoa] from ultoa::@5 + [286] ultoa::value#0 = ultoa_append::return#0 + [287] ultoa::buffer#4 = ++ ultoa::buffer#11 + to:ultoa::@4 + +void printf_number_buffer(byte printf_number_buffer::buffer_sign , byte* printf_number_buffer::buffer_digits , byte printf_number_buffer::format_min_length , byte printf_number_buffer::format_justify_left , byte printf_number_buffer::format_sign_always , byte printf_number_buffer::format_zero_padding , byte printf_number_buffer::format_upper_case , byte printf_number_buffer::format_radix) +printf_number_buffer: scope:[printf_number_buffer] from printf_uchar::@2 printf_uint::@2 printf_ulong::@2 + [288] printf_number_buffer::buffer_sign#10 = phi( printf_uchar::@2/printf_number_buffer::buffer_sign#2, printf_uint::@2/printf_number_buffer::buffer_sign#1, printf_ulong::@2/printf_number_buffer::buffer_sign#0 ) + to:printf_number_buffer::@1 +printf_number_buffer::@1: scope:[printf_number_buffer] from printf_number_buffer + [289] if(0==printf_number_buffer::buffer_sign#10) goto printf_number_buffer::@2 + to:printf_number_buffer::@3 +printf_number_buffer::@3: scope:[printf_number_buffer] from printf_number_buffer::@1 + [290] cputc::c#2 = printf_number_buffer::buffer_sign#10 + [291] call cputc + to:printf_number_buffer::@2 +printf_number_buffer::@2: scope:[printf_number_buffer] from printf_number_buffer::@1 printf_number_buffer::@3 + [292] phi() + [293] call cputs + to:printf_number_buffer::@return +printf_number_buffer::@return: scope:[printf_number_buffer] from printf_number_buffer::@2 + [294] return + to:@return + +void uctoa(byte uctoa::value , byte* uctoa::buffer , byte uctoa::radix) +uctoa: scope:[uctoa] from printf_uchar::@1 + [295] phi() + to:uctoa::@1 +uctoa::@1: scope:[uctoa] from uctoa uctoa::@4 + [296] uctoa::buffer#11 = phi( uctoa::@4/uctoa::buffer#14, uctoa/(byte*)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS ) + [296] uctoa::started#2 = phi( uctoa::@4/uctoa::started#4, uctoa/0 ) + [296] uctoa::value#2 = phi( uctoa::@4/uctoa::value#6, uctoa/uctoa::value#1 ) + [296] uctoa::digit#2 = phi( uctoa::@4/uctoa::digit#1, uctoa/0 ) + [297] if(uctoa::digit#2<2-1) goto uctoa::@2 + to:uctoa::@3 +uctoa::@3: scope:[uctoa] from uctoa::@1 + [298] *uctoa::buffer#11 = DIGITS[uctoa::value#2] + [299] uctoa::buffer#3 = ++ uctoa::buffer#11 + [300] *uctoa::buffer#3 = 0 + to:uctoa::@return +uctoa::@return: scope:[uctoa] from uctoa::@3 + [301] return + to:@return +uctoa::@2: scope:[uctoa] from uctoa::@1 + [302] uctoa::digit_value#0 = RADIX_HEXADECIMAL_VALUES_CHAR[uctoa::digit#2] + [303] if(0!=uctoa::started#2) goto uctoa::@5 + to:uctoa::@7 +uctoa::@7: scope:[uctoa] from uctoa::@2 + [304] if(uctoa::value#2>=uctoa::digit_value#0) goto uctoa::@5 + to:uctoa::@4 +uctoa::@4: scope:[uctoa] from uctoa::@6 uctoa::@7 + [305] uctoa::buffer#14 = phi( uctoa::@7/uctoa::buffer#11, uctoa::@6/uctoa::buffer#4 ) + [305] uctoa::started#4 = phi( uctoa::@7/uctoa::started#2, uctoa::@6/1 ) + [305] uctoa::value#6 = phi( uctoa::@7/uctoa::value#2, uctoa::@6/uctoa::value#0 ) + [306] uctoa::digit#1 = ++ uctoa::digit#2 + to:uctoa::@1 +uctoa::@5: scope:[uctoa] from uctoa::@2 uctoa::@7 + [307] uctoa_append::buffer#0 = uctoa::buffer#11 + [308] uctoa_append::value#0 = uctoa::value#2 + [309] uctoa_append::sub#0 = uctoa::digit_value#0 + [310] call uctoa_append + [311] uctoa_append::return#0 = uctoa_append::value#2 + to:uctoa::@6 +uctoa::@6: scope:[uctoa] from uctoa::@5 + [312] uctoa::value#0 = uctoa_append::return#0 + [313] uctoa::buffer#4 = ++ uctoa::buffer#11 + to:uctoa::@4 + +void utoa(word utoa::value , byte* utoa::buffer , byte utoa::radix) +utoa: scope:[utoa] from printf_uint::@1 + [314] phi() + to:utoa::@1 +utoa::@1: scope:[utoa] from utoa utoa::@4 + [315] utoa::buffer#11 = phi( utoa::@4/utoa::buffer#14, utoa/(byte*)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS ) + [315] utoa::started#2 = phi( utoa::@4/utoa::started#4, utoa/0 ) + [315] utoa::value#2 = phi( utoa::@4/utoa::value#6, utoa/utoa::value#1 ) + [315] utoa::digit#2 = phi( utoa::@4/utoa::digit#1, utoa/0 ) + [316] if(utoa::digit#2<4-1) goto utoa::@2 + to:utoa::@3 +utoa::@3: scope:[utoa] from utoa::@1 + [317] utoa::$11 = (byte)utoa::value#2 + [318] *utoa::buffer#11 = DIGITS[utoa::$11] + [319] utoa::buffer#3 = ++ utoa::buffer#11 + [320] *utoa::buffer#3 = 0 + to:utoa::@return +utoa::@return: scope:[utoa] from utoa::@3 + [321] return + to:@return +utoa::@2: scope:[utoa] from utoa::@1 + [322] utoa::$10 = utoa::digit#2 << 1 + [323] utoa::digit_value#0 = RADIX_HEXADECIMAL_VALUES[utoa::$10] + [324] if(0!=utoa::started#2) goto utoa::@5 + to:utoa::@7 +utoa::@7: scope:[utoa] from utoa::@2 + [325] if(utoa::value#2>=utoa::digit_value#0) goto utoa::@5 + to:utoa::@4 +utoa::@4: scope:[utoa] from utoa::@6 utoa::@7 + [326] utoa::buffer#14 = phi( utoa::@7/utoa::buffer#11, utoa::@6/utoa::buffer#4 ) + [326] utoa::started#4 = phi( utoa::@7/utoa::started#2, utoa::@6/1 ) + [326] utoa::value#6 = phi( utoa::@7/utoa::value#2, utoa::@6/utoa::value#0 ) + [327] utoa::digit#1 = ++ utoa::digit#2 + to:utoa::@1 +utoa::@5: scope:[utoa] from utoa::@2 utoa::@7 + [328] utoa_append::buffer#0 = utoa::buffer#11 + [329] utoa_append::value#0 = utoa::value#2 + [330] utoa_append::sub#0 = utoa::digit_value#0 + [331] call utoa_append + [332] utoa_append::return#0 = utoa_append::value#2 + to:utoa::@6 +utoa::@6: scope:[utoa] from utoa::@5 + [333] utoa::value#0 = utoa_append::return#0 + [334] utoa::buffer#4 = ++ utoa::buffer#11 + to:utoa::@4 + +void vera_layer_set_config(byte vera_layer_set_config::layer , byte vera_layer_set_config::config) +vera_layer_set_config: scope:[vera_layer_set_config] from vera_layer_mode_tile::@2 + [335] vera_layer_set_config::addr#0 = *(vera_layer_config+vera_layer_mode_text::layer#0*SIZEOF_POINTER) + [336] *vera_layer_set_config::addr#0 = vera_layer_mode_tile::config#10 + to:vera_layer_set_config::@return +vera_layer_set_config::@return: scope:[vera_layer_set_config] from vera_layer_set_config + [337] return + to:@return + +void vera_layer_set_tilebase(byte vera_layer_set_tilebase::layer , byte vera_layer_set_tilebase::tilebase) +vera_layer_set_tilebase: scope:[vera_layer_set_tilebase] from vera_layer_mode_tile::@3 + [338] vera_layer_set_tilebase::addr#0 = *(vera_layer_tilebase+vera_layer_mode_text::layer#0*SIZEOF_POINTER) + [339] *vera_layer_set_tilebase::addr#0 = >=ultoa_append::sub#0) goto ultoa_append::@2 + to:ultoa_append::@3 +ultoa_append::@3: scope:[ultoa_append] from ultoa_append::@1 + [363] *ultoa_append::buffer#0 = DIGITS[ultoa_append::digit#2] + to:ultoa_append::@return +ultoa_append::@return: scope:[ultoa_append] from ultoa_append::@3 + [364] return + to:@return +ultoa_append::@2: scope:[ultoa_append] from ultoa_append::@1 + [365] ultoa_append::digit#1 = ++ ultoa_append::digit#2 + [366] ultoa_append::value#1 = ultoa_append::value#2 - ultoa_append::sub#0 + to:ultoa_append::@1 + +byte uctoa_append(byte* uctoa_append::buffer , byte uctoa_append::value , byte uctoa_append::sub) +uctoa_append: scope:[uctoa_append] from uctoa::@5 + [367] phi() + to:uctoa_append::@1 +uctoa_append::@1: scope:[uctoa_append] from uctoa_append uctoa_append::@2 + [368] uctoa_append::digit#2 = phi( uctoa_append/0, uctoa_append::@2/uctoa_append::digit#1 ) + [368] uctoa_append::value#2 = phi( uctoa_append/uctoa_append::value#0, uctoa_append::@2/uctoa_append::value#1 ) + [369] if(uctoa_append::value#2>=uctoa_append::sub#0) goto uctoa_append::@2 + to:uctoa_append::@3 +uctoa_append::@3: scope:[uctoa_append] from uctoa_append::@1 + [370] *uctoa_append::buffer#0 = DIGITS[uctoa_append::digit#2] + to:uctoa_append::@return +uctoa_append::@return: scope:[uctoa_append] from uctoa_append::@3 + [371] return + to:@return +uctoa_append::@2: scope:[uctoa_append] from uctoa_append::@1 + [372] uctoa_append::digit#1 = ++ uctoa_append::digit#2 + [373] uctoa_append::value#1 = uctoa_append::value#2 - uctoa_append::sub#0 + to:uctoa_append::@1 + +word utoa_append(byte* utoa_append::buffer , word utoa_append::value , word utoa_append::sub) +utoa_append: scope:[utoa_append] from utoa::@5 + [374] phi() + to:utoa_append::@1 +utoa_append::@1: scope:[utoa_append] from utoa_append utoa_append::@2 + [375] utoa_append::digit#2 = phi( utoa_append/0, utoa_append::@2/utoa_append::digit#1 ) + [375] utoa_append::value#2 = phi( utoa_append/utoa_append::value#0, utoa_append::@2/utoa_append::value#1 ) + [376] if(utoa_append::value#2>=utoa_append::sub#0) goto utoa_append::@2 + to:utoa_append::@3 +utoa_append::@3: scope:[utoa_append] from utoa_append::@1 + [377] *utoa_append::buffer#0 = DIGITS[utoa_append::digit#2] + to:utoa_append::@return +utoa_append::@return: scope:[utoa_append] from utoa_append::@3 + [378] return + to:@return +utoa_append::@2: scope:[utoa_append] from utoa_append::@1 + [379] utoa_append::digit#1 = ++ utoa_append::digit#2 + [380] utoa_append::value#1 = utoa_append::value#2 - utoa_append::sub#0 + to:utoa_append::@1 + +void cscroll() +cscroll: scope:[cscroll] from cputln + [381] if(conio_cursor_y[conio_screen_layer] clearline::addr#0 + [411] *VERA_ADDRX_M = clearline::$2 + [412] *VERA_ADDRX_H = VERA_INC_1 + [413] vera_layer_get_color::layer#1 = conio_screen_layer + [414] call vera_layer_get_color + [415] vera_layer_get_color::return#4 = vera_layer_get_color::return#2 + to:clearline::@4 +clearline::@4: scope:[clearline] from clearline + [416] clearline::color#0 = vera_layer_get_color::return#4 + to:clearline::@1 +clearline::@1: scope:[clearline] from clearline::@2 clearline::@4 + [417] clearline::c#2 = phi( clearline::@2/clearline::c#1, clearline::@4/0 ) + [418] if(clearline::c#2 (void*)memcpy_in_vram::src#0 + [428] *VERA_ADDRX_M = memcpy_in_vram::$1 + [429] *VERA_ADDRX_H = VERA_INC_1 + [430] *VERA_CTRL = *VERA_CTRL | VERA_ADDRSEL + [431] memcpy_in_vram::$3 = < memcpy_in_vram::dest#0 + [432] *VERA_ADDRX_L = memcpy_in_vram::$3 + [433] memcpy_in_vram::$4 = > memcpy_in_vram::dest#0 + [434] *VERA_ADDRX_M = memcpy_in_vram::$4 + [435] *VERA_ADDRX_H = VERA_INC_1 + to:memcpy_in_vram::@1 +memcpy_in_vram::@1: scope:[memcpy_in_vram] from memcpy_in_vram memcpy_in_vram::@2 + [436] memcpy_in_vram::i#2 = phi( memcpy_in_vram/0, memcpy_in_vram::@2/memcpy_in_vram::i#1 ) + [437] if(memcpy_in_vram::i#2 main::src1#10 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::$3 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] ( main:10 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::$3 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] { } ) always clobbers reg byte a +Statement [39] main::$4 = main::$3 << 8 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::$4 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] ( main:10 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::$4 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] { } ) always clobbers reg byte a +Statement [41] main::$6 = < main::src1#10 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::$5 main::$6 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] ( main:10 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::$5 main::$6 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] { } ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp[1]:83 [ main::$5 ] +Statement [43] main::$30 = (word)main::$5 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::$7 main::$30 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] ( main:10 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::$7 main::$30 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] { } ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp[1]:86 [ main::$7 ] +Statement [44] main::$8 = main::$30 | main::$7 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::$8 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] ( main:10 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::$8 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] { } ) always clobbers reg byte a +Statement [45] main::$9 = main::$8 >> 5 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::$9 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] ( main:10 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::$9 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] { } ) always clobbers reg byte a +Statement [46] main::$10 = > main::src1#10 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::$9 main::$10 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] ( main:10 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::$9 main::$10 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] { } ) always clobbers reg byte a +Statement [47] main::$11 = main::$10 << 3 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::$9 main::$11 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] ( main:10 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::$9 main::$11 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] { } ) always clobbers reg byte a +Statement [49] main::$31 = (word)main::$12 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::$9 main::$31 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] ( main:10 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::$9 main::$31 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] { } ) always clobbers reg byte a +Statement [50] main::$13 = main::$9 + main::$31 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::$13 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] ( main:10 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::$13 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] { } ) always clobbers reg byte a +Statement [51] main::bankbeg#0 = (byte)main::$13 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] ( main:10 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] { } ) always clobbers reg byte a +Statement [52] main::$14 = > main::calcend#0 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::$14 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] ( main:10 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::$14 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] { } ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp[1]:102 [ main::bankbeg#0 ] +Statement [53] main::$15 = main::$14 << 8 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::$15 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] ( main:10 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::$15 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] { } ) always clobbers reg byte a +Statement [55] main::$17 = < main::calcend#0 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::$16 main::$17 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] ( main:10 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::$16 main::$17 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] { } ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp[1]:107 [ main::$16 ] +Statement [57] main::$32 = (word)main::$16 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::$18 main::$32 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] ( main:10 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::$18 main::$32 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] { } ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp[1]:110 [ main::$18 ] +Statement [58] main::$19 = main::$32 | main::$18 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::$19 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] ( main:10 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::$19 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] { } ) always clobbers reg byte a +Statement [59] main::$20 = main::$19 >> 5 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::$20 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] ( main:10 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::$20 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] { } ) always clobbers reg byte a +Statement [60] main::$21 = > main::calcend#0 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::$20 main::$21 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] ( main:10 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::$20 main::$21 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] { } ) always clobbers reg byte a +Statement [61] main::$22 = main::$21 << 3 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::$20 main::$22 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] ( main:10 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::$20 main::$22 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] { } ) always clobbers reg byte a +Statement [63] main::$33 = (word)main::$23 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::$20 main::$33 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] ( main:10 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::$20 main::$33 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] { } ) always clobbers reg byte a +Statement [64] main::$24 = main::$20 + main::$33 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::$24 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] ( main:10 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::$24 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] { } ) always clobbers reg byte a +Statement [65] main::bankend#0 = (byte)main::$24 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::bankend#0 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] ( main:10 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::bankend#0 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] { } ) always clobbers reg byte a +Statement [66] main::$25 = < main::src1#10 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::bankend#0 main::$25 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] ( main:10 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::bankend#0 main::$25 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] { } ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp[1]:126 [ main::bankend#0 ] +Statement [67] main::beg#0 = main::$25 & $1fff [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::bankend#0 main::beg#0 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] ( main:10 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::bankend#0 main::beg#0 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] { } ) always clobbers reg byte a +Statement [68] main::$27 = < main::calcend#0 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::bankend#0 main::beg#0 main::$27 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] ( main:10 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::bankend#0 main::beg#0 main::$27 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] { } ) always clobbers reg byte a +Statement [69] main::end#0 = main::$27 & $1fff [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::bankend#0 main::beg#0 main::end#0 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] ( main:10 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::bankend#0 main::beg#0 main::end#0 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] { } ) always clobbers reg byte a +Statement [70] main::beg#1 = main::beg#0 + main::borderbeg [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::bankend#0 main::end#0 main::beg#1 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] ( main:10 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::bankend#0 main::end#0 main::beg#1 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] { } ) always clobbers reg byte a +Statement [71] main::end#1 = main::end#0 + main::borderbeg [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] ( main:10 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] { } ) always clobbers reg byte a +Statement [73] printf_ulong::uvalue#0 = main::src1#10 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 printf_ulong::uvalue#0 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] ( main:10 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 printf_ulong::uvalue#0 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] { { printf_ulong::uvalue#0 = printf_ulong::uvalue#3 main::src1#10 } } ) always clobbers reg byte a +Statement [77] printf_ulong::uvalue#1 = main::num#10 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 printf_ulong::uvalue#1 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] ( main:10 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 printf_ulong::uvalue#1 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] { { printf_ulong::uvalue#1 = printf_ulong::uvalue#3 main::num#10 } } ) always clobbers reg byte a +Statement [81] printf_ulong::uvalue#2 = main::calcend#0 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 printf_ulong::uvalue#2 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] ( main:10 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 printf_ulong::uvalue#2 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] { { printf_ulong::uvalue#2 = printf_ulong::uvalue#3 main::calcend#0 } } ) always clobbers reg byte a +Statement [93] printf_uint::uvalue#0 = main::beg#1 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::end#1 printf_uint::uvalue#0 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] ( main:10 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::end#1 printf_uint::uvalue#0 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] { { printf_uint::uvalue#0 = printf_uint::uvalue#2 main::beg#1 } } ) always clobbers reg byte a +Statement [97] printf_uint::uvalue#1 = main::end#1 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 printf_uint::uvalue#1 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] ( main:10 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 printf_uint::uvalue#1 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] { { printf_uint::uvalue#1 = printf_uint::uvalue#2 main::end#1 } } ) always clobbers reg byte a +Statement [101] main::num#1 = main::num#10 + main::inc [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#1 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] ( main:10 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#1 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] { } ) always clobbers reg byte a +Statement [102] main::src1#1 = main::src1#10 + main::num#1 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#1 main::num#1 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] ( main:10 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#1 main::num#1 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] { } ) always clobbers reg byte a +Statement [108] screensize::hscale#0 = *VERA_DC_HSCALE >> 7 [ screensize::hscale#0 ] ( screensize:15 [ conio_screen_width conio_screen_height conio_x16_init::line#0 screensize::hscale#0 ] { } conio_x16_init:8::screensize:15 [ printf_buffer conio_screen_width conio_screen_height conio_x16_init::line#0 screensize::hscale#0 ] { } ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp[1]:2 [ conio_x16_init::line#3 conio_x16_init::line#1 conio_x16_init::line#0 ] +Statement [109] screensize::$1 = $28 << screensize::hscale#0 [ screensize::$1 ] ( screensize:15 [ conio_screen_width conio_screen_height conio_x16_init::line#0 screensize::$1 ] { } conio_x16_init:8::screensize:15 [ printf_buffer conio_screen_width conio_screen_height conio_x16_init::line#0 screensize::$1 ] { } ) always clobbers reg byte a +Statement [111] screensize::vscale#0 = *VERA_DC_VSCALE >> 7 [ screensize::vscale#0 ] ( screensize:15 [ conio_screen_width conio_screen_height conio_x16_init::line#0 screensize::vscale#0 ] { } conio_x16_init:8::screensize:15 [ printf_buffer conio_screen_width conio_screen_height conio_x16_init::line#0 screensize::vscale#0 ] { } ) always clobbers reg byte a +Statement [112] screensize::$3 = $1e << screensize::vscale#0 [ screensize::$3 ] ( screensize:15 [ conio_screen_width conio_screen_height conio_x16_init::line#0 screensize::$3 ] { } conio_x16_init:8::screensize:15 [ printf_buffer conio_screen_width conio_screen_height conio_x16_init::line#0 screensize::$3 ] { } ) always clobbers reg byte a +Statement [115] conio_screen_layer = screenlayer::layer#0 [ conio_screen_layer ] ( screenlayer:17 [ conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer ] { { vera_layer_get_mapbase_bank::layer#0 = conio_screen_layer } { vera_layer_get_mapbase_bank::return#0 = vera_layer_get_mapbase_bank::return#2 } } conio_x16_init:8::screenlayer:17 [ printf_buffer conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer ] { { vera_layer_get_mapbase_bank::layer#0 = conio_screen_layer } { vera_layer_get_mapbase_bank::return#0 = vera_layer_get_mapbase_bank::return#2 } } ) always clobbers reg byte a +Statement [122] vera_layer_get_mapbase_offset::return#2 = vera_layer_get_mapbase_offset::return#0 [ conio_screen_layer CONIO_SCREEN_BANK#10 vera_layer_get_mapbase_offset::return#2 ] ( screenlayer:17 [ conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer CONIO_SCREEN_BANK#10 vera_layer_get_mapbase_offset::return#2 ] { { vera_layer_get_mapbase_offset::layer#0 = conio_screen_layer } { vera_layer_get_mapbase_offset::return#0 = vera_layer_get_mapbase_offset::return#2 } } conio_x16_init:8::screenlayer:17 [ printf_buffer conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer CONIO_SCREEN_BANK#10 vera_layer_get_mapbase_offset::return#2 ] { { vera_layer_get_mapbase_offset::layer#0 = conio_screen_layer } { vera_layer_get_mapbase_offset::return#0 = vera_layer_get_mapbase_offset::return#2 } } ) always clobbers reg byte a +Statement [123] CONIO_SCREEN_TEXT#101 = vera_layer_get_mapbase_offset::return#2 [ conio_screen_layer CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 ] ( screenlayer:17 [ conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 ] { } conio_x16_init:8::screenlayer:17 [ printf_buffer conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 ] { } ) always clobbers reg byte a +Statement [125] screenlayer::vera_layer_get_width1_$2 = screenlayer::vera_layer_get_width1_layer#0 << 1 [ conio_screen_layer CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::vera_layer_get_width1_$2 ] ( screenlayer:17 [ conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::vera_layer_get_width1_$2 ] { } conio_x16_init:8::screenlayer:17 [ printf_buffer conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::vera_layer_get_width1_$2 ] { } ) always clobbers reg byte a +Statement [126] screenlayer::vera_layer_get_width1_config#0 = vera_layer_config[screenlayer::vera_layer_get_width1_$2] [ conio_screen_layer CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::vera_layer_get_width1_config#0 ] ( screenlayer:17 [ conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::vera_layer_get_width1_config#0 ] { } conio_x16_init:8::screenlayer:17 [ printf_buffer conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::vera_layer_get_width1_config#0 ] { } ) always clobbers reg byte a +Statement [127] screenlayer::vera_layer_get_width1_$0 = *screenlayer::vera_layer_get_width1_config#0 & VERA_LAYER_WIDTH_MASK [ conio_screen_layer CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::vera_layer_get_width1_$0 ] ( screenlayer:17 [ conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::vera_layer_get_width1_$0 ] { } conio_x16_init:8::screenlayer:17 [ printf_buffer conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::vera_layer_get_width1_$0 ] { } ) always clobbers reg byte a reg byte y +Removing always clobbered register reg byte y as potential for zp[1]:2 [ conio_x16_init::line#3 conio_x16_init::line#1 conio_x16_init::line#0 ] +Removing always clobbered register reg byte y as potential for zp[1]:145 [ CONIO_SCREEN_BANK#10 ] +Statement [128] screenlayer::vera_layer_get_width1_$1 = screenlayer::vera_layer_get_width1_$0 >> 4 [ conio_screen_layer CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::vera_layer_get_width1_$1 ] ( screenlayer:17 [ conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::vera_layer_get_width1_$1 ] { } conio_x16_init:8::screenlayer:17 [ printf_buffer conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::vera_layer_get_width1_$1 ] { } ) always clobbers reg byte a +Statement [129] screenlayer::vera_layer_get_width1_$3 = screenlayer::vera_layer_get_width1_$1 << 1 [ conio_screen_layer CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::vera_layer_get_width1_$3 ] ( screenlayer:17 [ conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::vera_layer_get_width1_$3 ] { } conio_x16_init:8::screenlayer:17 [ printf_buffer conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::vera_layer_get_width1_$3 ] { } ) always clobbers reg byte a +Statement [130] screenlayer::vera_layer_get_width1_return#0 = VERA_LAYER_WIDTH[screenlayer::vera_layer_get_width1_$3] [ conio_screen_layer CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::vera_layer_get_width1_return#0 ] ( screenlayer:17 [ conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::vera_layer_get_width1_return#0 ] { } conio_x16_init:8::screenlayer:17 [ printf_buffer conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::vera_layer_get_width1_return#0 ] { } ) always clobbers reg byte a +Statement [131] screenlayer::vera_layer_get_width1_return#1 = screenlayer::vera_layer_get_width1_return#0 [ conio_screen_layer CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::vera_layer_get_width1_return#1 ] ( screenlayer:17 [ conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::vera_layer_get_width1_return#1 ] { } conio_x16_init:8::screenlayer:17 [ printf_buffer conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::vera_layer_get_width1_return#1 ] { } ) always clobbers reg byte a +Statement [132] screenlayer::$2 = screenlayer::vera_layer_get_width1_return#1 [ conio_screen_layer CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::$2 ] ( screenlayer:17 [ conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::$2 ] { { vera_layer_get_rowshift::layer#0 = conio_screen_layer } { vera_layer_get_rowshift::return#0 = vera_layer_get_rowshift::return#2 } } conio_x16_init:8::screenlayer:17 [ printf_buffer conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::$2 ] { { vera_layer_get_rowshift::layer#0 = conio_screen_layer } { vera_layer_get_rowshift::return#0 = vera_layer_get_rowshift::return#2 } } ) always clobbers reg byte a +Statement [133] conio_width = screenlayer::$2 [ conio_screen_layer conio_width CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 ] ( screenlayer:17 [ conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 ] { { vera_layer_get_rowshift::layer#0 = conio_screen_layer } { vera_layer_get_rowshift::return#0 = vera_layer_get_rowshift::return#2 } } conio_x16_init:8::screenlayer:17 [ printf_buffer conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 ] { { vera_layer_get_rowshift::layer#0 = conio_screen_layer } { vera_layer_get_rowshift::return#0 = vera_layer_get_rowshift::return#2 } } ) always clobbers reg byte a +Statement [141] vera_layer_get_rowskip::return#2 = vera_layer_get_rowskip::return#0 [ conio_screen_layer conio_width conio_rowshift CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 vera_layer_get_rowskip::return#2 ] ( screenlayer:17 [ conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width conio_rowshift CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 vera_layer_get_rowskip::return#2 ] { { vera_layer_get_rowskip::layer#0 = conio_screen_layer } { vera_layer_get_rowskip::return#0 = vera_layer_get_rowskip::return#2 } } conio_x16_init:8::screenlayer:17 [ printf_buffer conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width conio_rowshift CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 vera_layer_get_rowskip::return#2 ] { { vera_layer_get_rowskip::layer#0 = conio_screen_layer } { vera_layer_get_rowskip::return#0 = vera_layer_get_rowskip::return#2 } } ) always clobbers reg byte a +Statement [142] screenlayer::$4 = vera_layer_get_rowskip::return#2 [ conio_screen_layer conio_width conio_rowshift CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::$4 ] ( screenlayer:17 [ conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width conio_rowshift CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::$4 ] { } conio_x16_init:8::screenlayer:17 [ printf_buffer conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width conio_rowshift CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::$4 ] { } ) always clobbers reg byte a +Statement [143] conio_rowskip = screenlayer::$4 [ conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 ] ( screenlayer:17 [ conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 ] { } conio_x16_init:8::screenlayer:17 [ printf_buffer conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 ] { } ) always clobbers reg byte a +Statement [145] screenlayer::vera_layer_get_height1_$2 = screenlayer::vera_layer_get_height1_layer#0 << 1 [ conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::vera_layer_get_height1_$2 ] ( screenlayer:17 [ conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::vera_layer_get_height1_$2 ] { } conio_x16_init:8::screenlayer:17 [ printf_buffer conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::vera_layer_get_height1_$2 ] { } ) always clobbers reg byte a +Statement [146] screenlayer::vera_layer_get_height1_config#0 = vera_layer_config[screenlayer::vera_layer_get_height1_$2] [ conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::vera_layer_get_height1_config#0 ] ( screenlayer:17 [ conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::vera_layer_get_height1_config#0 ] { } conio_x16_init:8::screenlayer:17 [ printf_buffer conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::vera_layer_get_height1_config#0 ] { } ) always clobbers reg byte a +Statement [147] screenlayer::vera_layer_get_height1_$0 = *screenlayer::vera_layer_get_height1_config#0 & VERA_LAYER_HEIGHT_MASK [ conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::vera_layer_get_height1_$0 ] ( screenlayer:17 [ conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::vera_layer_get_height1_$0 ] { } conio_x16_init:8::screenlayer:17 [ printf_buffer conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::vera_layer_get_height1_$0 ] { } ) always clobbers reg byte a reg byte y +Statement [148] screenlayer::vera_layer_get_height1_$1 = screenlayer::vera_layer_get_height1_$0 >> 6 [ conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::vera_layer_get_height1_$1 ] ( screenlayer:17 [ conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::vera_layer_get_height1_$1 ] { } conio_x16_init:8::screenlayer:17 [ printf_buffer conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::vera_layer_get_height1_$1 ] { } ) always clobbers reg byte a +Statement [149] screenlayer::vera_layer_get_height1_$3 = screenlayer::vera_layer_get_height1_$1 << 1 [ conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::vera_layer_get_height1_$3 ] ( screenlayer:17 [ conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::vera_layer_get_height1_$3 ] { } conio_x16_init:8::screenlayer:17 [ printf_buffer conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::vera_layer_get_height1_$3 ] { } ) always clobbers reg byte a +Statement [150] screenlayer::vera_layer_get_height1_return#0 = VERA_LAYER_HEIGHT[screenlayer::vera_layer_get_height1_$3] [ conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::vera_layer_get_height1_return#0 ] ( screenlayer:17 [ conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::vera_layer_get_height1_return#0 ] { } conio_x16_init:8::screenlayer:17 [ printf_buffer conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::vera_layer_get_height1_return#0 ] { } ) always clobbers reg byte a +Statement [151] screenlayer::vera_layer_get_height1_return#1 = screenlayer::vera_layer_get_height1_return#0 [ conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::vera_layer_get_height1_return#1 ] ( screenlayer:17 [ conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::vera_layer_get_height1_return#1 ] { } conio_x16_init:8::screenlayer:17 [ printf_buffer conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::vera_layer_get_height1_return#1 ] { } ) always clobbers reg byte a +Statement [152] screenlayer::$5 = screenlayer::vera_layer_get_height1_return#1 [ conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::$5 ] ( screenlayer:17 [ conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::$5 ] { } conio_x16_init:8::screenlayer:17 [ printf_buffer conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::$5 ] { } ) always clobbers reg byte a +Statement [153] conio_height = screenlayer::$5 [ conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 ] ( screenlayer:17 [ conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 ] { } conio_x16_init:8::screenlayer:17 [ printf_buffer conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 ] { } ) always clobbers reg byte a +Statement [155] *(vera_layer_textcolor+vera_layer_set_textcolor::layer#0) = WHITE [ ] ( vera_layer_set_textcolor:19 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip conio_x16_init::line#0 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 ] { } conio_x16_init:8::vera_layer_set_textcolor:19 [ printf_buffer conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip conio_x16_init::line#0 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 ] { } ) always clobbers reg byte a +Statement [157] *(vera_layer_backcolor+vera_layer_set_backcolor::layer#0) = BLUE [ ] ( vera_layer_set_backcolor:21 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip conio_x16_init::line#0 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 ] { } conio_x16_init:8::vera_layer_set_backcolor:21 [ printf_buffer conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip conio_x16_init::line#0 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 ] { } ) always clobbers reg byte a +Statement [160] vera_layer_set_mapbase::$0 = vera_layer_set_mapbase::layer#3 << 1 [ vera_layer_set_mapbase::mapbase#3 vera_layer_set_mapbase::$0 ] ( vera_layer_set_mapbase:23 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip conio_x16_init::line#0 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 vera_layer_set_mapbase::mapbase#3 vera_layer_set_mapbase::$0 ] { } conio_x16_init:8::vera_layer_set_mapbase:23 [ printf_buffer conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip conio_x16_init::line#0 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 vera_layer_set_mapbase::mapbase#3 vera_layer_set_mapbase::$0 ] { } vera_layer_set_mapbase:25 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip conio_x16_init::line#0 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 vera_layer_set_mapbase::mapbase#3 vera_layer_set_mapbase::$0 ] { } conio_x16_init:8::vera_layer_set_mapbase:25 [ printf_buffer conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip conio_x16_init::line#0 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 vera_layer_set_mapbase::mapbase#3 vera_layer_set_mapbase::$0 ] { } vera_layer_mode_text:13::vera_layer_mode_tile:104::vera_layer_set_mapbase:214 [ conio_screen_width conio_screen_height conio_x16_init::line#0 vera_layer_set_mapbase::mapbase#3 vera_layer_set_mapbase::$0 ] { } conio_x16_init:8::vera_layer_mode_text:13::vera_layer_mode_tile:104::vera_layer_set_mapbase:214 [ printf_buffer conio_screen_width conio_screen_height conio_x16_init::line#0 vera_layer_set_mapbase::mapbase#3 vera_layer_set_mapbase::$0 ] { } ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp[1]:12 [ vera_layer_set_mapbase::mapbase#3 ] +Statement [161] vera_layer_set_mapbase::addr#0 = vera_layer_mapbase[vera_layer_set_mapbase::$0] [ vera_layer_set_mapbase::mapbase#3 vera_layer_set_mapbase::addr#0 ] ( vera_layer_set_mapbase:23 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip conio_x16_init::line#0 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 vera_layer_set_mapbase::mapbase#3 vera_layer_set_mapbase::addr#0 ] { } conio_x16_init:8::vera_layer_set_mapbase:23 [ printf_buffer conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip conio_x16_init::line#0 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 vera_layer_set_mapbase::mapbase#3 vera_layer_set_mapbase::addr#0 ] { } vera_layer_set_mapbase:25 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip conio_x16_init::line#0 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 vera_layer_set_mapbase::mapbase#3 vera_layer_set_mapbase::addr#0 ] { } conio_x16_init:8::vera_layer_set_mapbase:25 [ printf_buffer conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip conio_x16_init::line#0 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 vera_layer_set_mapbase::mapbase#3 vera_layer_set_mapbase::addr#0 ] { } vera_layer_mode_text:13::vera_layer_mode_tile:104::vera_layer_set_mapbase:214 [ conio_screen_width conio_screen_height conio_x16_init::line#0 vera_layer_set_mapbase::mapbase#3 vera_layer_set_mapbase::addr#0 ] { } conio_x16_init:8::vera_layer_mode_text:13::vera_layer_mode_tile:104::vera_layer_set_mapbase:214 [ printf_buffer conio_screen_width conio_screen_height conio_x16_init::line#0 vera_layer_set_mapbase::mapbase#3 vera_layer_set_mapbase::addr#0 ] { } ) always clobbers reg byte a +Statement [162] *vera_layer_set_mapbase::addr#0 = vera_layer_set_mapbase::mapbase#3 [ ] ( vera_layer_set_mapbase:23 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip conio_x16_init::line#0 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 ] { } conio_x16_init:8::vera_layer_set_mapbase:23 [ printf_buffer conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip conio_x16_init::line#0 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 ] { } vera_layer_set_mapbase:25 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip conio_x16_init::line#0 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 ] { } conio_x16_init:8::vera_layer_set_mapbase:25 [ printf_buffer conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip conio_x16_init::line#0 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 ] { } vera_layer_mode_text:13::vera_layer_mode_tile:104::vera_layer_set_mapbase:214 [ conio_screen_width conio_screen_height conio_x16_init::line#0 ] { } conio_x16_init:8::vera_layer_mode_text:13::vera_layer_mode_tile:104::vera_layer_set_mapbase:214 [ printf_buffer conio_screen_width conio_screen_height conio_x16_init::line#0 ] { } ) always clobbers reg byte a reg byte y +Statement [168] if(0=ultoa::digit_value#0) goto ultoa::@5 [ printf_buffer ultoa::digit#2 ultoa::value#2 ultoa::started#2 ultoa::buffer#11 ultoa::digit_value#0 ] ( main:10::printf_ulong:74::ultoa:188 [ main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ultoa::digit#2 ultoa::value#2 ultoa::started#2 ultoa::buffer#11 ultoa::digit_value#0 ] { { printf_ulong::uvalue#0 = printf_ulong::uvalue#3 main::src1#10 ultoa::value#1 } } main:10::printf_ulong:78::ultoa:188 [ main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ultoa::digit#2 ultoa::value#2 ultoa::started#2 ultoa::buffer#11 ultoa::digit_value#0 ] { { printf_ulong::uvalue#1 = printf_ulong::uvalue#3 main::num#10 ultoa::value#1 } } main:10::printf_ulong:82::ultoa:188 [ main::src1#10 main::num#10 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ultoa::digit#2 ultoa::value#2 ultoa::started#2 ultoa::buffer#11 ultoa::digit_value#0 ] { { printf_ulong::uvalue#2 = printf_ulong::uvalue#3 main::calcend#0 ultoa::value#1 } } ) always clobbers reg byte a +Statement [281] ultoa_append::buffer#0 = ultoa::buffer#11 [ printf_buffer ultoa::digit#2 ultoa::value#2 ultoa::buffer#11 ultoa::digit_value#0 ultoa_append::buffer#0 ] ( main:10::printf_ulong:74::ultoa:188 [ main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ultoa::digit#2 ultoa::value#2 ultoa::buffer#11 ultoa::digit_value#0 ultoa_append::buffer#0 ] { { printf_ulong::uvalue#0 = printf_ulong::uvalue#3 main::src1#10 ultoa::value#1 } { ultoa_append::buffer#0 = ultoa::buffer#11 } { ultoa_append::value#0 = ultoa::value#2 } { ultoa_append::sub#0 = ultoa::digit_value#0 } { ultoa_append::return#0 = ultoa_append::value#2 } } main:10::printf_ulong:78::ultoa:188 [ main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ultoa::digit#2 ultoa::value#2 ultoa::buffer#11 ultoa::digit_value#0 ultoa_append::buffer#0 ] { { printf_ulong::uvalue#1 = printf_ulong::uvalue#3 main::num#10 ultoa::value#1 } { ultoa_append::buffer#0 = ultoa::buffer#11 } { ultoa_append::value#0 = ultoa::value#2 } { ultoa_append::sub#0 = ultoa::digit_value#0 } { ultoa_append::return#0 = ultoa_append::value#2 } } main:10::printf_ulong:82::ultoa:188 [ main::src1#10 main::num#10 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ultoa::digit#2 ultoa::value#2 ultoa::buffer#11 ultoa::digit_value#0 ultoa_append::buffer#0 ] { { printf_ulong::uvalue#2 = printf_ulong::uvalue#3 main::calcend#0 ultoa::value#1 } { ultoa_append::buffer#0 = ultoa::buffer#11 } { ultoa_append::value#0 = ultoa::value#2 } { ultoa_append::sub#0 = ultoa::digit_value#0 } { ultoa_append::return#0 = ultoa_append::value#2 } } ) always clobbers reg byte a +Statement [282] ultoa_append::value#0 = ultoa::value#2 [ printf_buffer ultoa::digit#2 ultoa::buffer#11 ultoa::digit_value#0 ultoa_append::buffer#0 ultoa_append::value#0 ] ( main:10::printf_ulong:74::ultoa:188 [ main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ultoa::digit#2 ultoa::buffer#11 ultoa::digit_value#0 ultoa_append::buffer#0 ultoa_append::value#0 ] { { printf_ulong::uvalue#0 = printf_ulong::uvalue#3 main::src1#10 ultoa::value#1 } { ultoa_append::buffer#0 = ultoa::buffer#11 } { ultoa_append::value#0 = ultoa::value#2 } { ultoa_append::sub#0 = ultoa::digit_value#0 } { ultoa_append::return#0 = ultoa_append::value#2 } } main:10::printf_ulong:78::ultoa:188 [ main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ultoa::digit#2 ultoa::buffer#11 ultoa::digit_value#0 ultoa_append::buffer#0 ultoa_append::value#0 ] { { printf_ulong::uvalue#1 = printf_ulong::uvalue#3 main::num#10 ultoa::value#1 } { ultoa_append::buffer#0 = ultoa::buffer#11 } { ultoa_append::value#0 = ultoa::value#2 } { ultoa_append::sub#0 = ultoa::digit_value#0 } { ultoa_append::return#0 = ultoa_append::value#2 } } main:10::printf_ulong:82::ultoa:188 [ main::src1#10 main::num#10 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ultoa::digit#2 ultoa::buffer#11 ultoa::digit_value#0 ultoa_append::buffer#0 ultoa_append::value#0 ] { { printf_ulong::uvalue#2 = printf_ulong::uvalue#3 main::calcend#0 ultoa::value#1 } { ultoa_append::buffer#0 = ultoa::buffer#11 } { ultoa_append::value#0 = ultoa::value#2 } { ultoa_append::sub#0 = ultoa::digit_value#0 } { ultoa_append::return#0 = ultoa_append::value#2 } } ) always clobbers reg byte a +Statement [283] ultoa_append::sub#0 = ultoa::digit_value#0 [ printf_buffer ultoa::digit#2 ultoa::buffer#11 ultoa_append::buffer#0 ultoa_append::value#0 ultoa_append::sub#0 ] ( main:10::printf_ulong:74::ultoa:188 [ main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ultoa::digit#2 ultoa::buffer#11 ultoa_append::buffer#0 ultoa_append::value#0 ultoa_append::sub#0 ] { { printf_ulong::uvalue#0 = printf_ulong::uvalue#3 main::src1#10 ultoa::value#1 } { ultoa_append::buffer#0 = ultoa::buffer#11 } { ultoa_append::value#0 = ultoa::value#2 } { ultoa_append::sub#0 = ultoa::digit_value#0 } { ultoa_append::return#0 = ultoa_append::value#2 } } main:10::printf_ulong:78::ultoa:188 [ main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ultoa::digit#2 ultoa::buffer#11 ultoa_append::buffer#0 ultoa_append::value#0 ultoa_append::sub#0 ] { { printf_ulong::uvalue#1 = printf_ulong::uvalue#3 main::num#10 ultoa::value#1 } { ultoa_append::buffer#0 = ultoa::buffer#11 } { ultoa_append::value#0 = ultoa::value#2 } { ultoa_append::sub#0 = ultoa::digit_value#0 } { ultoa_append::return#0 = ultoa_append::value#2 } } main:10::printf_ulong:82::ultoa:188 [ main::src1#10 main::num#10 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ultoa::digit#2 ultoa::buffer#11 ultoa_append::buffer#0 ultoa_append::value#0 ultoa_append::sub#0 ] { { printf_ulong::uvalue#2 = printf_ulong::uvalue#3 main::calcend#0 ultoa::value#1 } { ultoa_append::buffer#0 = ultoa::buffer#11 } { ultoa_append::value#0 = ultoa::value#2 } { ultoa_append::sub#0 = ultoa::digit_value#0 } { ultoa_append::return#0 = ultoa_append::value#2 } } ) always clobbers reg byte a +Statement [285] ultoa_append::return#0 = ultoa_append::value#2 [ printf_buffer ultoa::digit#2 ultoa::buffer#11 ultoa_append::return#0 ] ( main:10::printf_ulong:74::ultoa:188 [ main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ultoa::digit#2 ultoa::buffer#11 ultoa_append::return#0 ] { { printf_ulong::uvalue#0 = printf_ulong::uvalue#3 main::src1#10 ultoa::value#1 } { ultoa_append::buffer#0 = ultoa::buffer#11 } { ultoa_append::value#0 = ultoa::value#2 } { ultoa_append::sub#0 = ultoa::digit_value#0 } { ultoa_append::return#0 = ultoa_append::value#2 } } main:10::printf_ulong:78::ultoa:188 [ main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ultoa::digit#2 ultoa::buffer#11 ultoa_append::return#0 ] { { printf_ulong::uvalue#1 = printf_ulong::uvalue#3 main::num#10 ultoa::value#1 } { ultoa_append::buffer#0 = ultoa::buffer#11 } { ultoa_append::value#0 = ultoa::value#2 } { ultoa_append::sub#0 = ultoa::digit_value#0 } { ultoa_append::return#0 = ultoa_append::value#2 } } main:10::printf_ulong:82::ultoa:188 [ main::src1#10 main::num#10 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ultoa::digit#2 ultoa::buffer#11 ultoa_append::return#0 ] { { printf_ulong::uvalue#2 = printf_ulong::uvalue#3 main::calcend#0 ultoa::value#1 } { ultoa_append::buffer#0 = ultoa::buffer#11 } { ultoa_append::value#0 = ultoa::value#2 } { ultoa_append::sub#0 = ultoa::digit_value#0 } { ultoa_append::return#0 = ultoa_append::value#2 } } ) always clobbers reg byte a +Statement [286] ultoa::value#0 = ultoa_append::return#0 [ printf_buffer ultoa::digit#2 ultoa::buffer#11 ultoa::value#0 ] ( main:10::printf_ulong:74::ultoa:188 [ main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ultoa::digit#2 ultoa::buffer#11 ultoa::value#0 ] { { printf_ulong::uvalue#0 = printf_ulong::uvalue#3 main::src1#10 ultoa::value#1 } } main:10::printf_ulong:78::ultoa:188 [ main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ultoa::digit#2 ultoa::buffer#11 ultoa::value#0 ] { { printf_ulong::uvalue#1 = printf_ulong::uvalue#3 main::num#10 ultoa::value#1 } } main:10::printf_ulong:82::ultoa:188 [ main::src1#10 main::num#10 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ultoa::digit#2 ultoa::buffer#11 ultoa::value#0 ] { { printf_ulong::uvalue#2 = printf_ulong::uvalue#3 main::calcend#0 ultoa::value#1 } } ) always clobbers reg byte a +Statement [298] *uctoa::buffer#11 = DIGITS[uctoa::value#2] [ printf_buffer uctoa::buffer#11 ] ( main:10::printf_uchar:86::uctoa:195 [ main::src1#10 main::num#10 main::bankend#0 main::beg#1 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer uctoa::buffer#11 ] { { printf_uchar::uvalue#0 = printf_uchar::uvalue#2 main::bankbeg#0 uctoa::value#1 } } main:10::printf_uchar:90::uctoa:195 [ main::src1#10 main::num#10 main::beg#1 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer uctoa::buffer#11 ] { { printf_uchar::uvalue#1 = printf_uchar::uvalue#2 main::bankend#0 uctoa::value#1 } } ) always clobbers reg byte a reg byte y +Statement [299] uctoa::buffer#3 = ++ uctoa::buffer#11 [ printf_buffer uctoa::buffer#3 ] ( main:10::printf_uchar:86::uctoa:195 [ main::src1#10 main::num#10 main::bankend#0 main::beg#1 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer uctoa::buffer#3 ] { { printf_uchar::uvalue#0 = printf_uchar::uvalue#2 main::bankbeg#0 uctoa::value#1 } } main:10::printf_uchar:90::uctoa:195 [ main::src1#10 main::num#10 main::beg#1 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer uctoa::buffer#3 ] { { printf_uchar::uvalue#1 = printf_uchar::uvalue#2 main::bankend#0 uctoa::value#1 } } ) always clobbers reg byte a +Statement [300] *uctoa::buffer#3 = 0 [ printf_buffer ] ( main:10::printf_uchar:86::uctoa:195 [ main::src1#10 main::num#10 main::bankend#0 main::beg#1 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] { { printf_uchar::uvalue#0 = printf_uchar::uvalue#2 main::bankbeg#0 uctoa::value#1 } } main:10::printf_uchar:90::uctoa:195 [ main::src1#10 main::num#10 main::beg#1 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] { { printf_uchar::uvalue#1 = printf_uchar::uvalue#2 main::bankend#0 uctoa::value#1 } } ) always clobbers reg byte a reg byte y +Statement [307] uctoa_append::buffer#0 = uctoa::buffer#11 [ printf_buffer uctoa::digit#2 uctoa::value#2 uctoa::buffer#11 uctoa::digit_value#0 uctoa_append::buffer#0 ] ( main:10::printf_uchar:86::uctoa:195 [ main::src1#10 main::num#10 main::bankend#0 main::beg#1 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer uctoa::digit#2 uctoa::value#2 uctoa::buffer#11 uctoa::digit_value#0 uctoa_append::buffer#0 ] { { printf_uchar::uvalue#0 = printf_uchar::uvalue#2 main::bankbeg#0 uctoa::value#1 } { uctoa_append::buffer#0 = uctoa::buffer#11 } { uctoa_append::value#0 = uctoa::value#2 } { uctoa_append::sub#0 = uctoa::digit_value#0 } { uctoa_append::return#0 = uctoa_append::value#2 } } main:10::printf_uchar:90::uctoa:195 [ main::src1#10 main::num#10 main::beg#1 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer uctoa::digit#2 uctoa::value#2 uctoa::buffer#11 uctoa::digit_value#0 uctoa_append::buffer#0 ] { { printf_uchar::uvalue#1 = printf_uchar::uvalue#2 main::bankend#0 uctoa::value#1 } { uctoa_append::buffer#0 = uctoa::buffer#11 } { uctoa_append::value#0 = uctoa::value#2 } { uctoa_append::sub#0 = uctoa::digit_value#0 } { uctoa_append::return#0 = uctoa_append::value#2 } } ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp[1]:33 [ uctoa::digit#2 uctoa::digit#1 ] +Removing always clobbered register reg byte a as potential for zp[1]:34 [ uctoa::value#2 uctoa::value#6 uctoa::value#1 uctoa::value#0 ] +Removing always clobbered register reg byte a as potential for zp[1]:238 [ uctoa::digit_value#0 ] +Statement [317] utoa::$11 = (byte)utoa::value#2 [ printf_buffer utoa::buffer#11 utoa::$11 ] ( main:10::printf_uint:94::utoa:202 [ main::src1#10 main::num#10 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer utoa::buffer#11 utoa::$11 ] { { printf_uint::uvalue#0 = printf_uint::uvalue#2 main::beg#1 utoa::value#1 } } main:10::printf_uint:98::utoa:202 [ main::src1#10 main::num#10 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer utoa::buffer#11 utoa::$11 ] { { printf_uint::uvalue#1 = printf_uint::uvalue#2 main::end#1 utoa::value#1 } } ) always clobbers reg byte a +Statement [318] *utoa::buffer#11 = DIGITS[utoa::$11] [ printf_buffer utoa::buffer#11 ] ( main:10::printf_uint:94::utoa:202 [ main::src1#10 main::num#10 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer utoa::buffer#11 ] { { printf_uint::uvalue#0 = printf_uint::uvalue#2 main::beg#1 utoa::value#1 } } main:10::printf_uint:98::utoa:202 [ main::src1#10 main::num#10 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer utoa::buffer#11 ] { { printf_uint::uvalue#1 = printf_uint::uvalue#2 main::end#1 utoa::value#1 } } ) always clobbers reg byte a reg byte y +Statement [319] utoa::buffer#3 = ++ utoa::buffer#11 [ printf_buffer utoa::buffer#3 ] ( main:10::printf_uint:94::utoa:202 [ main::src1#10 main::num#10 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer utoa::buffer#3 ] { { printf_uint::uvalue#0 = printf_uint::uvalue#2 main::beg#1 utoa::value#1 } } main:10::printf_uint:98::utoa:202 [ main::src1#10 main::num#10 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer utoa::buffer#3 ] { { printf_uint::uvalue#1 = printf_uint::uvalue#2 main::end#1 utoa::value#1 } } ) always clobbers reg byte a +Statement [320] *utoa::buffer#3 = 0 [ printf_buffer ] ( main:10::printf_uint:94::utoa:202 [ main::src1#10 main::num#10 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] { { printf_uint::uvalue#0 = printf_uint::uvalue#2 main::beg#1 utoa::value#1 } } main:10::printf_uint:98::utoa:202 [ main::src1#10 main::num#10 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] { { printf_uint::uvalue#1 = printf_uint::uvalue#2 main::end#1 utoa::value#1 } } ) always clobbers reg byte a reg byte y +Statement [322] utoa::$10 = utoa::digit#2 << 1 [ printf_buffer utoa::digit#2 utoa::value#2 utoa::started#2 utoa::buffer#11 utoa::$10 ] ( main:10::printf_uint:94::utoa:202 [ main::src1#10 main::num#10 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer utoa::digit#2 utoa::value#2 utoa::started#2 utoa::buffer#11 utoa::$10 ] { { printf_uint::uvalue#0 = printf_uint::uvalue#2 main::beg#1 utoa::value#1 } } main:10::printf_uint:98::utoa:202 [ main::src1#10 main::num#10 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer utoa::digit#2 utoa::value#2 utoa::started#2 utoa::buffer#11 utoa::$10 ] { { printf_uint::uvalue#1 = printf_uint::uvalue#2 main::end#1 utoa::value#1 } } ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp[1]:38 [ utoa::digit#2 utoa::digit#1 ] +Removing always clobbered register reg byte a as potential for zp[1]:41 [ utoa::started#2 utoa::started#4 ] +Statement [323] utoa::digit_value#0 = RADIX_HEXADECIMAL_VALUES[utoa::$10] [ printf_buffer utoa::digit#2 utoa::value#2 utoa::started#2 utoa::buffer#11 utoa::digit_value#0 ] ( main:10::printf_uint:94::utoa:202 [ main::src1#10 main::num#10 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer utoa::digit#2 utoa::value#2 utoa::started#2 utoa::buffer#11 utoa::digit_value#0 ] { { printf_uint::uvalue#0 = printf_uint::uvalue#2 main::beg#1 utoa::value#1 } } main:10::printf_uint:98::utoa:202 [ main::src1#10 main::num#10 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer utoa::digit#2 utoa::value#2 utoa::started#2 utoa::buffer#11 utoa::digit_value#0 ] { { printf_uint::uvalue#1 = printf_uint::uvalue#2 main::end#1 utoa::value#1 } } ) always clobbers reg byte a +Statement [325] if(utoa::value#2>=utoa::digit_value#0) goto utoa::@5 [ printf_buffer utoa::digit#2 utoa::value#2 utoa::started#2 utoa::buffer#11 utoa::digit_value#0 ] ( main:10::printf_uint:94::utoa:202 [ main::src1#10 main::num#10 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer utoa::digit#2 utoa::value#2 utoa::started#2 utoa::buffer#11 utoa::digit_value#0 ] { { printf_uint::uvalue#0 = printf_uint::uvalue#2 main::beg#1 utoa::value#1 } } main:10::printf_uint:98::utoa:202 [ main::src1#10 main::num#10 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer utoa::digit#2 utoa::value#2 utoa::started#2 utoa::buffer#11 utoa::digit_value#0 ] { { printf_uint::uvalue#1 = printf_uint::uvalue#2 main::end#1 utoa::value#1 } } ) always clobbers reg byte a +Statement [328] utoa_append::buffer#0 = utoa::buffer#11 [ printf_buffer utoa::digit#2 utoa::value#2 utoa::buffer#11 utoa::digit_value#0 utoa_append::buffer#0 ] ( main:10::printf_uint:94::utoa:202 [ main::src1#10 main::num#10 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer utoa::digit#2 utoa::value#2 utoa::buffer#11 utoa::digit_value#0 utoa_append::buffer#0 ] { { printf_uint::uvalue#0 = printf_uint::uvalue#2 main::beg#1 utoa::value#1 } { utoa_append::buffer#0 = utoa::buffer#11 } { utoa_append::value#0 = utoa::value#2 } { utoa_append::sub#0 = utoa::digit_value#0 } { utoa_append::return#0 = utoa_append::value#2 } } main:10::printf_uint:98::utoa:202 [ main::src1#10 main::num#10 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer utoa::digit#2 utoa::value#2 utoa::buffer#11 utoa::digit_value#0 utoa_append::buffer#0 ] { { printf_uint::uvalue#1 = printf_uint::uvalue#2 main::end#1 utoa::value#1 } { utoa_append::buffer#0 = utoa::buffer#11 } { utoa_append::value#0 = utoa::value#2 } { utoa_append::sub#0 = utoa::digit_value#0 } { utoa_append::return#0 = utoa_append::value#2 } } ) always clobbers reg byte a +Statement [329] utoa_append::value#0 = utoa::value#2 [ printf_buffer utoa::digit#2 utoa::buffer#11 utoa::digit_value#0 utoa_append::buffer#0 utoa_append::value#0 ] ( main:10::printf_uint:94::utoa:202 [ main::src1#10 main::num#10 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer utoa::digit#2 utoa::buffer#11 utoa::digit_value#0 utoa_append::buffer#0 utoa_append::value#0 ] { { printf_uint::uvalue#0 = printf_uint::uvalue#2 main::beg#1 utoa::value#1 } { utoa_append::buffer#0 = utoa::buffer#11 } { utoa_append::value#0 = utoa::value#2 } { utoa_append::sub#0 = utoa::digit_value#0 } { utoa_append::return#0 = utoa_append::value#2 } } main:10::printf_uint:98::utoa:202 [ main::src1#10 main::num#10 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer utoa::digit#2 utoa::buffer#11 utoa::digit_value#0 utoa_append::buffer#0 utoa_append::value#0 ] { { printf_uint::uvalue#1 = printf_uint::uvalue#2 main::end#1 utoa::value#1 } { utoa_append::buffer#0 = utoa::buffer#11 } { utoa_append::value#0 = utoa::value#2 } { utoa_append::sub#0 = utoa::digit_value#0 } { utoa_append::return#0 = utoa_append::value#2 } } ) always clobbers reg byte a +Statement [330] utoa_append::sub#0 = utoa::digit_value#0 [ printf_buffer utoa::digit#2 utoa::buffer#11 utoa_append::buffer#0 utoa_append::value#0 utoa_append::sub#0 ] ( main:10::printf_uint:94::utoa:202 [ main::src1#10 main::num#10 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer utoa::digit#2 utoa::buffer#11 utoa_append::buffer#0 utoa_append::value#0 utoa_append::sub#0 ] { { printf_uint::uvalue#0 = printf_uint::uvalue#2 main::beg#1 utoa::value#1 } { utoa_append::buffer#0 = utoa::buffer#11 } { utoa_append::value#0 = utoa::value#2 } { utoa_append::sub#0 = utoa::digit_value#0 } { utoa_append::return#0 = utoa_append::value#2 } } main:10::printf_uint:98::utoa:202 [ main::src1#10 main::num#10 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer utoa::digit#2 utoa::buffer#11 utoa_append::buffer#0 utoa_append::value#0 utoa_append::sub#0 ] { { printf_uint::uvalue#1 = printf_uint::uvalue#2 main::end#1 utoa::value#1 } { utoa_append::buffer#0 = utoa::buffer#11 } { utoa_append::value#0 = utoa::value#2 } { utoa_append::sub#0 = utoa::digit_value#0 } { utoa_append::return#0 = utoa_append::value#2 } } ) always clobbers reg byte a +Statement [332] utoa_append::return#0 = utoa_append::value#2 [ printf_buffer utoa::digit#2 utoa::buffer#11 utoa_append::return#0 ] ( main:10::printf_uint:94::utoa:202 [ main::src1#10 main::num#10 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer utoa::digit#2 utoa::buffer#11 utoa_append::return#0 ] { { printf_uint::uvalue#0 = printf_uint::uvalue#2 main::beg#1 utoa::value#1 } { utoa_append::buffer#0 = utoa::buffer#11 } { utoa_append::value#0 = utoa::value#2 } { utoa_append::sub#0 = utoa::digit_value#0 } { utoa_append::return#0 = utoa_append::value#2 } } main:10::printf_uint:98::utoa:202 [ main::src1#10 main::num#10 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer utoa::digit#2 utoa::buffer#11 utoa_append::return#0 ] { { printf_uint::uvalue#1 = printf_uint::uvalue#2 main::end#1 utoa::value#1 } { utoa_append::buffer#0 = utoa::buffer#11 } { utoa_append::value#0 = utoa::value#2 } { utoa_append::sub#0 = utoa::digit_value#0 } { utoa_append::return#0 = utoa_append::value#2 } } ) always clobbers reg byte a +Statement [333] utoa::value#0 = utoa_append::return#0 [ printf_buffer utoa::digit#2 utoa::buffer#11 utoa::value#0 ] ( main:10::printf_uint:94::utoa:202 [ main::src1#10 main::num#10 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer utoa::digit#2 utoa::buffer#11 utoa::value#0 ] { { printf_uint::uvalue#0 = printf_uint::uvalue#2 main::beg#1 utoa::value#1 } } main:10::printf_uint:98::utoa:202 [ main::src1#10 main::num#10 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer utoa::digit#2 utoa::buffer#11 utoa::value#0 ] { { printf_uint::uvalue#1 = printf_uint::uvalue#2 main::end#1 utoa::value#1 } } ) always clobbers reg byte a +Statement [335] vera_layer_set_config::addr#0 = *(vera_layer_config+vera_layer_mode_text::layer#0*SIZEOF_POINTER) [ vera_layer_set_config::addr#0 ] ( vera_layer_mode_text:13::vera_layer_mode_tile:104::vera_layer_set_config:210 [ conio_screen_width conio_screen_height conio_x16_init::line#0 vera_layer_set_config::addr#0 ] { } conio_x16_init:8::vera_layer_mode_text:13::vera_layer_mode_tile:104::vera_layer_set_config:210 [ printf_buffer conio_screen_width conio_screen_height conio_x16_init::line#0 vera_layer_set_config::addr#0 ] { } ) always clobbers reg byte a +Statement [336] *vera_layer_set_config::addr#0 = vera_layer_mode_tile::config#10 [ ] ( vera_layer_mode_text:13::vera_layer_mode_tile:104::vera_layer_set_config:210 [ conio_screen_width conio_screen_height conio_x16_init::line#0 ] { } conio_x16_init:8::vera_layer_mode_text:13::vera_layer_mode_tile:104::vera_layer_set_config:210 [ printf_buffer conio_screen_width conio_screen_height conio_x16_init::line#0 ] { } ) always clobbers reg byte a reg byte y +Statement [338] vera_layer_set_tilebase::addr#0 = *(vera_layer_tilebase+vera_layer_mode_text::layer#0*SIZEOF_POINTER) [ vera_layer_set_tilebase::addr#0 ] ( vera_layer_mode_text:13::vera_layer_mode_tile:104::vera_layer_set_tilebase:219 [ conio_screen_width conio_screen_height conio_x16_init::line#0 vera_layer_set_tilebase::addr#0 ] { } conio_x16_init:8::vera_layer_mode_text:13::vera_layer_mode_tile:104::vera_layer_set_tilebase:219 [ printf_buffer conio_screen_width conio_screen_height conio_x16_init::line#0 vera_layer_set_tilebase::addr#0 ] { } ) always clobbers reg byte a +Statement [339] *vera_layer_set_tilebase::addr#0 = >=ultoa_append::sub#0) goto ultoa_append::@2 [ ultoa_append::buffer#0 ultoa_append::sub#0 ultoa_append::value#2 ultoa_append::digit#2 ] ( main:10::printf_ulong:74::ultoa:188::ultoa_append:284 [ main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ultoa::digit#2 ultoa::buffer#11 ultoa_append::buffer#0 ultoa_append::sub#0 ultoa_append::value#2 ultoa_append::digit#2 ] { { printf_ulong::uvalue#0 = printf_ulong::uvalue#3 main::src1#10 ultoa::value#1 } { ultoa_append::buffer#0 = ultoa::buffer#11 } { ultoa_append::value#0 = ultoa::value#2 } { ultoa_append::sub#0 = ultoa::digit_value#0 } { ultoa_append::return#0 = ultoa_append::value#2 } } main:10::printf_ulong:78::ultoa:188::ultoa_append:284 [ main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ultoa::digit#2 ultoa::buffer#11 ultoa_append::buffer#0 ultoa_append::sub#0 ultoa_append::value#2 ultoa_append::digit#2 ] { { printf_ulong::uvalue#1 = printf_ulong::uvalue#3 main::num#10 ultoa::value#1 } { ultoa_append::buffer#0 = ultoa::buffer#11 } { ultoa_append::value#0 = ultoa::value#2 } { ultoa_append::sub#0 = ultoa::digit_value#0 } { ultoa_append::return#0 = ultoa_append::value#2 } } main:10::printf_ulong:82::ultoa:188::ultoa_append:284 [ main::src1#10 main::num#10 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ultoa::digit#2 ultoa::buffer#11 ultoa_append::buffer#0 ultoa_append::sub#0 ultoa_append::value#2 ultoa_append::digit#2 ] { { printf_ulong::uvalue#2 = printf_ulong::uvalue#3 main::calcend#0 ultoa::value#1 } { ultoa_append::buffer#0 = ultoa::buffer#11 } { ultoa_append::value#0 = ultoa::value#2 } { ultoa_append::sub#0 = ultoa::digit_value#0 } { ultoa_append::return#0 = ultoa_append::value#2 } } ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp[1]:50 [ ultoa_append::digit#2 ultoa_append::digit#1 ] +Statement [363] *ultoa_append::buffer#0 = DIGITS[ultoa_append::digit#2] [ ultoa_append::value#2 ] ( main:10::printf_ulong:74::ultoa:188::ultoa_append:284 [ main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ultoa::digit#2 ultoa::buffer#11 ultoa_append::value#2 ] { { printf_ulong::uvalue#0 = printf_ulong::uvalue#3 main::src1#10 ultoa::value#1 } { ultoa_append::buffer#0 = ultoa::buffer#11 } { ultoa_append::value#0 = ultoa::value#2 } { ultoa_append::sub#0 = ultoa::digit_value#0 } { ultoa_append::return#0 = ultoa_append::value#2 } } main:10::printf_ulong:78::ultoa:188::ultoa_append:284 [ main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ultoa::digit#2 ultoa::buffer#11 ultoa_append::value#2 ] { { printf_ulong::uvalue#1 = printf_ulong::uvalue#3 main::num#10 ultoa::value#1 } { ultoa_append::buffer#0 = ultoa::buffer#11 } { ultoa_append::value#0 = ultoa::value#2 } { ultoa_append::sub#0 = ultoa::digit_value#0 } { ultoa_append::return#0 = ultoa_append::value#2 } } main:10::printf_ulong:82::ultoa:188::ultoa_append:284 [ main::src1#10 main::num#10 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ultoa::digit#2 ultoa::buffer#11 ultoa_append::value#2 ] { { printf_ulong::uvalue#2 = printf_ulong::uvalue#3 main::calcend#0 ultoa::value#1 } { ultoa_append::buffer#0 = ultoa::buffer#11 } { ultoa_append::value#0 = ultoa::value#2 } { ultoa_append::sub#0 = ultoa::digit_value#0 } { ultoa_append::return#0 = ultoa_append::value#2 } } ) always clobbers reg byte a reg byte y +Removing always clobbered register reg byte y as potential for zp[1]:24 [ ultoa::digit#2 ultoa::digit#1 ] +Statement [366] ultoa_append::value#1 = ultoa_append::value#2 - ultoa_append::sub#0 [ ultoa_append::buffer#0 ultoa_append::sub#0 ultoa_append::value#1 ultoa_append::digit#1 ] ( main:10::printf_ulong:74::ultoa:188::ultoa_append:284 [ main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ultoa::digit#2 ultoa::buffer#11 ultoa_append::buffer#0 ultoa_append::sub#0 ultoa_append::value#1 ultoa_append::digit#1 ] { { printf_ulong::uvalue#0 = printf_ulong::uvalue#3 main::src1#10 ultoa::value#1 } { ultoa_append::buffer#0 = ultoa::buffer#11 } { ultoa_append::value#0 = ultoa::value#2 } { ultoa_append::sub#0 = ultoa::digit_value#0 } { ultoa_append::return#0 = ultoa_append::value#2 } } main:10::printf_ulong:78::ultoa:188::ultoa_append:284 [ main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ultoa::digit#2 ultoa::buffer#11 ultoa_append::buffer#0 ultoa_append::sub#0 ultoa_append::value#1 ultoa_append::digit#1 ] { { printf_ulong::uvalue#1 = printf_ulong::uvalue#3 main::num#10 ultoa::value#1 } { ultoa_append::buffer#0 = ultoa::buffer#11 } { ultoa_append::value#0 = ultoa::value#2 } { ultoa_append::sub#0 = ultoa::digit_value#0 } { ultoa_append::return#0 = ultoa_append::value#2 } } main:10::printf_ulong:82::ultoa:188::ultoa_append:284 [ main::src1#10 main::num#10 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ultoa::digit#2 ultoa::buffer#11 ultoa_append::buffer#0 ultoa_append::sub#0 ultoa_append::value#1 ultoa_append::digit#1 ] { { printf_ulong::uvalue#2 = printf_ulong::uvalue#3 main::calcend#0 ultoa::value#1 } { ultoa_append::buffer#0 = ultoa::buffer#11 } { ultoa_append::value#0 = ultoa::value#2 } { ultoa_append::sub#0 = ultoa::digit_value#0 } { ultoa_append::return#0 = ultoa_append::value#2 } } ) always clobbers reg byte a +Statement [370] *uctoa_append::buffer#0 = DIGITS[uctoa_append::digit#2] [ uctoa_append::value#2 ] ( main:10::printf_uchar:86::uctoa:195::uctoa_append:310 [ main::src1#10 main::num#10 main::bankend#0 main::beg#1 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer uctoa::digit#2 uctoa::buffer#11 uctoa_append::value#2 ] { { printf_uchar::uvalue#0 = printf_uchar::uvalue#2 main::bankbeg#0 uctoa::value#1 } { uctoa_append::buffer#0 = uctoa::buffer#11 } { uctoa_append::value#0 = uctoa::value#2 } { uctoa_append::sub#0 = uctoa::digit_value#0 } { uctoa_append::return#0 = uctoa_append::value#2 } } main:10::printf_uchar:90::uctoa:195::uctoa_append:310 [ main::src1#10 main::num#10 main::beg#1 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer uctoa::digit#2 uctoa::buffer#11 uctoa_append::value#2 ] { { printf_uchar::uvalue#1 = printf_uchar::uvalue#2 main::bankend#0 uctoa::value#1 } { uctoa_append::buffer#0 = uctoa::buffer#11 } { uctoa_append::value#0 = uctoa::value#2 } { uctoa_append::sub#0 = uctoa::digit_value#0 } { uctoa_append::return#0 = uctoa_append::value#2 } } ) always clobbers reg byte a reg byte y +Removing always clobbered register reg byte y as potential for zp[1]:33 [ uctoa::digit#2 uctoa::digit#1 ] +Removing always clobbered register reg byte a as potential for zp[1]:51 [ uctoa_append::value#2 uctoa_append::value#0 uctoa_append::value#1 ] +Removing always clobbered register reg byte y as potential for zp[1]:51 [ uctoa_append::value#2 uctoa_append::value#0 uctoa_append::value#1 ] +Statement [373] uctoa_append::value#1 = uctoa_append::value#2 - uctoa_append::sub#0 [ uctoa_append::buffer#0 uctoa_append::sub#0 uctoa_append::value#1 uctoa_append::digit#1 ] ( main:10::printf_uchar:86::uctoa:195::uctoa_append:310 [ main::src1#10 main::num#10 main::bankend#0 main::beg#1 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer uctoa::digit#2 uctoa::buffer#11 uctoa_append::buffer#0 uctoa_append::sub#0 uctoa_append::value#1 uctoa_append::digit#1 ] { { printf_uchar::uvalue#0 = printf_uchar::uvalue#2 main::bankbeg#0 uctoa::value#1 } { uctoa_append::buffer#0 = uctoa::buffer#11 } { uctoa_append::value#0 = uctoa::value#2 } { uctoa_append::sub#0 = uctoa::digit_value#0 } { uctoa_append::return#0 = uctoa_append::value#2 } } main:10::printf_uchar:90::uctoa:195::uctoa_append:310 [ main::src1#10 main::num#10 main::beg#1 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer uctoa::digit#2 uctoa::buffer#11 uctoa_append::buffer#0 uctoa_append::sub#0 uctoa_append::value#1 uctoa_append::digit#1 ] { { printf_uchar::uvalue#1 = printf_uchar::uvalue#2 main::bankend#0 uctoa::value#1 } { uctoa_append::buffer#0 = uctoa::buffer#11 } { uctoa_append::value#0 = uctoa::value#2 } { uctoa_append::sub#0 = uctoa::digit_value#0 } { uctoa_append::return#0 = uctoa_append::value#2 } } ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp[1]:241 [ uctoa_append::sub#0 ] +Removing always clobbered register reg byte a as potential for zp[1]:52 [ uctoa_append::digit#2 uctoa_append::digit#1 ] +Statement [376] if(utoa_append::value#2>=utoa_append::sub#0) goto utoa_append::@2 [ utoa_append::buffer#0 utoa_append::sub#0 utoa_append::value#2 utoa_append::digit#2 ] ( main:10::printf_uint:94::utoa:202::utoa_append:331 [ main::src1#10 main::num#10 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer utoa::digit#2 utoa::buffer#11 utoa_append::buffer#0 utoa_append::sub#0 utoa_append::value#2 utoa_append::digit#2 ] { { printf_uint::uvalue#0 = printf_uint::uvalue#2 main::beg#1 utoa::value#1 } { utoa_append::buffer#0 = utoa::buffer#11 } { utoa_append::value#0 = utoa::value#2 } { utoa_append::sub#0 = utoa::digit_value#0 } { utoa_append::return#0 = utoa_append::value#2 } } main:10::printf_uint:98::utoa:202::utoa_append:331 [ main::src1#10 main::num#10 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer utoa::digit#2 utoa::buffer#11 utoa_append::buffer#0 utoa_append::sub#0 utoa_append::value#2 utoa_append::digit#2 ] { { printf_uint::uvalue#1 = printf_uint::uvalue#2 main::end#1 utoa::value#1 } { utoa_append::buffer#0 = utoa::buffer#11 } { utoa_append::value#0 = utoa::value#2 } { utoa_append::sub#0 = utoa::digit_value#0 } { utoa_append::return#0 = utoa_append::value#2 } } ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp[1]:55 [ utoa_append::digit#2 utoa_append::digit#1 ] +Statement [377] *utoa_append::buffer#0 = DIGITS[utoa_append::digit#2] [ utoa_append::value#2 ] ( main:10::printf_uint:94::utoa:202::utoa_append:331 [ main::src1#10 main::num#10 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer utoa::digit#2 utoa::buffer#11 utoa_append::value#2 ] { { printf_uint::uvalue#0 = printf_uint::uvalue#2 main::beg#1 utoa::value#1 } { utoa_append::buffer#0 = utoa::buffer#11 } { utoa_append::value#0 = utoa::value#2 } { utoa_append::sub#0 = utoa::digit_value#0 } { utoa_append::return#0 = utoa_append::value#2 } } main:10::printf_uint:98::utoa:202::utoa_append:331 [ main::src1#10 main::num#10 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer utoa::digit#2 utoa::buffer#11 utoa_append::value#2 ] { { printf_uint::uvalue#1 = printf_uint::uvalue#2 main::end#1 utoa::value#1 } { utoa_append::buffer#0 = utoa::buffer#11 } { utoa_append::value#0 = utoa::value#2 } { utoa_append::sub#0 = utoa::digit_value#0 } { utoa_append::return#0 = utoa_append::value#2 } } ) always clobbers reg byte a reg byte y +Removing always clobbered register reg byte y as potential for zp[1]:38 [ utoa::digit#2 utoa::digit#1 ] +Statement [380] utoa_append::value#1 = utoa_append::value#2 - utoa_append::sub#0 [ utoa_append::buffer#0 utoa_append::sub#0 utoa_append::value#1 utoa_append::digit#1 ] ( main:10::printf_uint:94::utoa:202::utoa_append:331 [ main::src1#10 main::num#10 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer utoa::digit#2 utoa::buffer#11 utoa_append::buffer#0 utoa_append::sub#0 utoa_append::value#1 utoa_append::digit#1 ] { { printf_uint::uvalue#0 = printf_uint::uvalue#2 main::beg#1 utoa::value#1 } { utoa_append::buffer#0 = utoa::buffer#11 } { utoa_append::value#0 = utoa::value#2 } { utoa_append::sub#0 = utoa::digit_value#0 } { utoa_append::return#0 = utoa_append::value#2 } } main:10::printf_uint:98::utoa:202::utoa_append:331 [ main::src1#10 main::num#10 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer utoa::digit#2 utoa::buffer#11 utoa_append::buffer#0 utoa_append::sub#0 utoa_append::value#1 utoa_append::digit#1 ] { { printf_uint::uvalue#1 = printf_uint::uvalue#2 main::end#1 utoa::value#1 } { utoa_append::buffer#0 = utoa::buffer#11 } { utoa_append::value#0 = utoa::value#2 } { utoa_append::sub#0 = utoa::digit_value#0 } { utoa_append::return#0 = utoa_append::value#2 } } ) always clobbers reg byte a +Statement [381] if(conio_cursor_y[conio_screen_layer] main::src1#10 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::$3 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] ( main:10 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::$3 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] { } ) always clobbers reg byte a +Statement [39] main::$4 = main::$3 << 8 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::$4 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] ( main:10 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::$4 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] { } ) always clobbers reg byte a +Statement [41] main::$6 = < main::src1#10 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::$5 main::$6 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] ( main:10 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::$5 main::$6 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] { } ) always clobbers reg byte a +Statement [43] main::$30 = (word)main::$5 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::$7 main::$30 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] ( main:10 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::$7 main::$30 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] { } ) always clobbers reg byte a +Statement [44] main::$8 = main::$30 | main::$7 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::$8 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] ( main:10 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::$8 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] { } ) always clobbers reg byte a +Statement [45] main::$9 = main::$8 >> 5 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::$9 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] ( main:10 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::$9 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] { } ) always clobbers reg byte a +Statement [46] main::$10 = > main::src1#10 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::$9 main::$10 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] ( main:10 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::$9 main::$10 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] { } ) always clobbers reg byte a +Statement [47] main::$11 = main::$10 << 3 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::$9 main::$11 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] ( main:10 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::$9 main::$11 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] { } ) always clobbers reg byte a +Statement [49] main::$31 = (word)main::$12 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::$9 main::$31 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] ( main:10 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::$9 main::$31 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] { } ) always clobbers reg byte a +Statement [50] main::$13 = main::$9 + main::$31 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::$13 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] ( main:10 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::$13 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] { } ) always clobbers reg byte a +Statement [51] main::bankbeg#0 = (byte)main::$13 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] ( main:10 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] { } ) always clobbers reg byte a +Statement [52] main::$14 = > main::calcend#0 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::$14 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] ( main:10 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::$14 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] { } ) always clobbers reg byte a +Statement [53] main::$15 = main::$14 << 8 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::$15 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] ( main:10 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::$15 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] { } ) always clobbers reg byte a +Statement [55] main::$17 = < main::calcend#0 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::$16 main::$17 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] ( main:10 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::$16 main::$17 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] { } ) always clobbers reg byte a +Statement [57] main::$32 = (word)main::$16 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::$18 main::$32 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] ( main:10 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::$18 main::$32 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] { } ) always clobbers reg byte a +Statement [58] main::$19 = main::$32 | main::$18 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::$19 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] ( main:10 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::$19 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] { } ) always clobbers reg byte a +Statement [59] main::$20 = main::$19 >> 5 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::$20 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] ( main:10 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::$20 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] { } ) always clobbers reg byte a +Statement [60] main::$21 = > main::calcend#0 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::$20 main::$21 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] ( main:10 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::$20 main::$21 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] { } ) always clobbers reg byte a +Statement [61] main::$22 = main::$21 << 3 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::$20 main::$22 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] ( main:10 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::$20 main::$22 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] { } ) always clobbers reg byte a +Statement [63] main::$33 = (word)main::$23 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::$20 main::$33 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] ( main:10 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::$20 main::$33 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] { } ) always clobbers reg byte a +Statement [64] main::$24 = main::$20 + main::$33 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::$24 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] ( main:10 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::$24 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] { } ) always clobbers reg byte a +Statement [65] main::bankend#0 = (byte)main::$24 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::bankend#0 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] ( main:10 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::bankend#0 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] { } ) always clobbers reg byte a +Statement [66] main::$25 = < main::src1#10 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::bankend#0 main::$25 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] ( main:10 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::bankend#0 main::$25 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] { } ) always clobbers reg byte a +Statement [67] main::beg#0 = main::$25 & $1fff [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::bankend#0 main::beg#0 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] ( main:10 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::bankend#0 main::beg#0 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] { } ) always clobbers reg byte a +Statement [68] main::$27 = < main::calcend#0 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::bankend#0 main::beg#0 main::$27 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] ( main:10 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::bankend#0 main::beg#0 main::$27 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] { } ) always clobbers reg byte a +Statement [69] main::end#0 = main::$27 & $1fff [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::bankend#0 main::beg#0 main::end#0 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] ( main:10 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::bankend#0 main::beg#0 main::end#0 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] { } ) always clobbers reg byte a +Statement [70] main::beg#1 = main::beg#0 + main::borderbeg [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::bankend#0 main::end#0 main::beg#1 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] ( main:10 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::bankend#0 main::end#0 main::beg#1 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] { } ) always clobbers reg byte a +Statement [71] main::end#1 = main::end#0 + main::borderbeg [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] ( main:10 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] { } ) always clobbers reg byte a +Statement [73] printf_ulong::uvalue#0 = main::src1#10 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 printf_ulong::uvalue#0 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] ( main:10 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 printf_ulong::uvalue#0 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] { { printf_ulong::uvalue#0 = printf_ulong::uvalue#3 main::src1#10 } } ) always clobbers reg byte a +Statement [77] printf_ulong::uvalue#1 = main::num#10 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 printf_ulong::uvalue#1 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] ( main:10 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 printf_ulong::uvalue#1 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] { { printf_ulong::uvalue#1 = printf_ulong::uvalue#3 main::num#10 } } ) always clobbers reg byte a +Statement [81] printf_ulong::uvalue#2 = main::calcend#0 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 printf_ulong::uvalue#2 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] ( main:10 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 printf_ulong::uvalue#2 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] { { printf_ulong::uvalue#2 = printf_ulong::uvalue#3 main::calcend#0 } } ) always clobbers reg byte a +Statement [93] printf_uint::uvalue#0 = main::beg#1 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::end#1 printf_uint::uvalue#0 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] ( main:10 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 main::end#1 printf_uint::uvalue#0 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] { { printf_uint::uvalue#0 = printf_uint::uvalue#2 main::beg#1 } } ) always clobbers reg byte a +Statement [97] printf_uint::uvalue#1 = main::end#1 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 printf_uint::uvalue#1 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] ( main:10 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#10 printf_uint::uvalue#1 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] { { printf_uint::uvalue#1 = printf_uint::uvalue#2 main::end#1 } } ) always clobbers reg byte a +Statement [101] main::num#1 = main::num#10 + main::inc [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#1 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] ( main:10 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#10 main::num#1 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] { } ) always clobbers reg byte a +Statement [102] main::src1#1 = main::src1#10 + main::num#1 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#1 main::num#1 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] ( main:10 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip main::src1#1 main::num#1 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] { } ) always clobbers reg byte a +Statement [108] screensize::hscale#0 = *VERA_DC_HSCALE >> 7 [ screensize::hscale#0 ] ( screensize:15 [ conio_screen_width conio_screen_height conio_x16_init::line#0 screensize::hscale#0 ] { } conio_x16_init:8::screensize:15 [ printf_buffer conio_screen_width conio_screen_height conio_x16_init::line#0 screensize::hscale#0 ] { } ) always clobbers reg byte a +Statement [109] screensize::$1 = $28 << screensize::hscale#0 [ screensize::$1 ] ( screensize:15 [ conio_screen_width conio_screen_height conio_x16_init::line#0 screensize::$1 ] { } conio_x16_init:8::screensize:15 [ printf_buffer conio_screen_width conio_screen_height conio_x16_init::line#0 screensize::$1 ] { } ) always clobbers reg byte a +Statement [111] screensize::vscale#0 = *VERA_DC_VSCALE >> 7 [ screensize::vscale#0 ] ( screensize:15 [ conio_screen_width conio_screen_height conio_x16_init::line#0 screensize::vscale#0 ] { } conio_x16_init:8::screensize:15 [ printf_buffer conio_screen_width conio_screen_height conio_x16_init::line#0 screensize::vscale#0 ] { } ) always clobbers reg byte a +Statement [112] screensize::$3 = $1e << screensize::vscale#0 [ screensize::$3 ] ( screensize:15 [ conio_screen_width conio_screen_height conio_x16_init::line#0 screensize::$3 ] { } conio_x16_init:8::screensize:15 [ printf_buffer conio_screen_width conio_screen_height conio_x16_init::line#0 screensize::$3 ] { } ) always clobbers reg byte a +Statement [115] conio_screen_layer = screenlayer::layer#0 [ conio_screen_layer ] ( screenlayer:17 [ conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer ] { { vera_layer_get_mapbase_bank::layer#0 = conio_screen_layer } { vera_layer_get_mapbase_bank::return#0 = vera_layer_get_mapbase_bank::return#2 } } conio_x16_init:8::screenlayer:17 [ printf_buffer conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer ] { { vera_layer_get_mapbase_bank::layer#0 = conio_screen_layer } { vera_layer_get_mapbase_bank::return#0 = vera_layer_get_mapbase_bank::return#2 } } ) always clobbers reg byte a +Statement [122] vera_layer_get_mapbase_offset::return#2 = vera_layer_get_mapbase_offset::return#0 [ conio_screen_layer CONIO_SCREEN_BANK#10 vera_layer_get_mapbase_offset::return#2 ] ( screenlayer:17 [ conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer CONIO_SCREEN_BANK#10 vera_layer_get_mapbase_offset::return#2 ] { { vera_layer_get_mapbase_offset::layer#0 = conio_screen_layer } { vera_layer_get_mapbase_offset::return#0 = vera_layer_get_mapbase_offset::return#2 } } conio_x16_init:8::screenlayer:17 [ printf_buffer conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer CONIO_SCREEN_BANK#10 vera_layer_get_mapbase_offset::return#2 ] { { vera_layer_get_mapbase_offset::layer#0 = conio_screen_layer } { vera_layer_get_mapbase_offset::return#0 = vera_layer_get_mapbase_offset::return#2 } } ) always clobbers reg byte a +Statement [123] CONIO_SCREEN_TEXT#101 = vera_layer_get_mapbase_offset::return#2 [ conio_screen_layer CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 ] ( screenlayer:17 [ conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 ] { } conio_x16_init:8::screenlayer:17 [ printf_buffer conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 ] { } ) always clobbers reg byte a +Statement [125] screenlayer::vera_layer_get_width1_$2 = screenlayer::vera_layer_get_width1_layer#0 << 1 [ conio_screen_layer CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::vera_layer_get_width1_$2 ] ( screenlayer:17 [ conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::vera_layer_get_width1_$2 ] { } conio_x16_init:8::screenlayer:17 [ printf_buffer conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::vera_layer_get_width1_$2 ] { } ) always clobbers reg byte a +Statement [126] screenlayer::vera_layer_get_width1_config#0 = vera_layer_config[screenlayer::vera_layer_get_width1_$2] [ conio_screen_layer CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::vera_layer_get_width1_config#0 ] ( screenlayer:17 [ conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::vera_layer_get_width1_config#0 ] { } conio_x16_init:8::screenlayer:17 [ printf_buffer conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::vera_layer_get_width1_config#0 ] { } ) always clobbers reg byte a +Statement [127] screenlayer::vera_layer_get_width1_$0 = *screenlayer::vera_layer_get_width1_config#0 & VERA_LAYER_WIDTH_MASK [ conio_screen_layer CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::vera_layer_get_width1_$0 ] ( screenlayer:17 [ conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::vera_layer_get_width1_$0 ] { } conio_x16_init:8::screenlayer:17 [ printf_buffer conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::vera_layer_get_width1_$0 ] { } ) always clobbers reg byte a reg byte y +Statement [128] screenlayer::vera_layer_get_width1_$1 = screenlayer::vera_layer_get_width1_$0 >> 4 [ conio_screen_layer CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::vera_layer_get_width1_$1 ] ( screenlayer:17 [ conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::vera_layer_get_width1_$1 ] { } conio_x16_init:8::screenlayer:17 [ printf_buffer conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::vera_layer_get_width1_$1 ] { } ) always clobbers reg byte a +Statement [129] screenlayer::vera_layer_get_width1_$3 = screenlayer::vera_layer_get_width1_$1 << 1 [ conio_screen_layer CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::vera_layer_get_width1_$3 ] ( screenlayer:17 [ conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::vera_layer_get_width1_$3 ] { } conio_x16_init:8::screenlayer:17 [ printf_buffer conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::vera_layer_get_width1_$3 ] { } ) always clobbers reg byte a +Statement [130] screenlayer::vera_layer_get_width1_return#0 = VERA_LAYER_WIDTH[screenlayer::vera_layer_get_width1_$3] [ conio_screen_layer CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::vera_layer_get_width1_return#0 ] ( screenlayer:17 [ conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::vera_layer_get_width1_return#0 ] { } conio_x16_init:8::screenlayer:17 [ printf_buffer conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::vera_layer_get_width1_return#0 ] { } ) always clobbers reg byte a +Statement [131] screenlayer::vera_layer_get_width1_return#1 = screenlayer::vera_layer_get_width1_return#0 [ conio_screen_layer CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::vera_layer_get_width1_return#1 ] ( screenlayer:17 [ conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::vera_layer_get_width1_return#1 ] { } conio_x16_init:8::screenlayer:17 [ printf_buffer conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::vera_layer_get_width1_return#1 ] { } ) always clobbers reg byte a +Statement [132] screenlayer::$2 = screenlayer::vera_layer_get_width1_return#1 [ conio_screen_layer CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::$2 ] ( screenlayer:17 [ conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::$2 ] { { vera_layer_get_rowshift::layer#0 = conio_screen_layer } { vera_layer_get_rowshift::return#0 = vera_layer_get_rowshift::return#2 } } conio_x16_init:8::screenlayer:17 [ printf_buffer conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::$2 ] { { vera_layer_get_rowshift::layer#0 = conio_screen_layer } { vera_layer_get_rowshift::return#0 = vera_layer_get_rowshift::return#2 } } ) always clobbers reg byte a +Statement [133] conio_width = screenlayer::$2 [ conio_screen_layer conio_width CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 ] ( screenlayer:17 [ conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 ] { { vera_layer_get_rowshift::layer#0 = conio_screen_layer } { vera_layer_get_rowshift::return#0 = vera_layer_get_rowshift::return#2 } } conio_x16_init:8::screenlayer:17 [ printf_buffer conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 ] { { vera_layer_get_rowshift::layer#0 = conio_screen_layer } { vera_layer_get_rowshift::return#0 = vera_layer_get_rowshift::return#2 } } ) always clobbers reg byte a +Statement [141] vera_layer_get_rowskip::return#2 = vera_layer_get_rowskip::return#0 [ conio_screen_layer conio_width conio_rowshift CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 vera_layer_get_rowskip::return#2 ] ( screenlayer:17 [ conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width conio_rowshift CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 vera_layer_get_rowskip::return#2 ] { { vera_layer_get_rowskip::layer#0 = conio_screen_layer } { vera_layer_get_rowskip::return#0 = vera_layer_get_rowskip::return#2 } } conio_x16_init:8::screenlayer:17 [ printf_buffer conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width conio_rowshift CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 vera_layer_get_rowskip::return#2 ] { { vera_layer_get_rowskip::layer#0 = conio_screen_layer } { vera_layer_get_rowskip::return#0 = vera_layer_get_rowskip::return#2 } } ) always clobbers reg byte a +Statement [142] screenlayer::$4 = vera_layer_get_rowskip::return#2 [ conio_screen_layer conio_width conio_rowshift CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::$4 ] ( screenlayer:17 [ conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width conio_rowshift CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::$4 ] { } conio_x16_init:8::screenlayer:17 [ printf_buffer conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width conio_rowshift CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::$4 ] { } ) always clobbers reg byte a +Statement [143] conio_rowskip = screenlayer::$4 [ conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 ] ( screenlayer:17 [ conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 ] { } conio_x16_init:8::screenlayer:17 [ printf_buffer conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 ] { } ) always clobbers reg byte a +Statement [145] screenlayer::vera_layer_get_height1_$2 = screenlayer::vera_layer_get_height1_layer#0 << 1 [ conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::vera_layer_get_height1_$2 ] ( screenlayer:17 [ conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::vera_layer_get_height1_$2 ] { } conio_x16_init:8::screenlayer:17 [ printf_buffer conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::vera_layer_get_height1_$2 ] { } ) always clobbers reg byte a +Statement [146] screenlayer::vera_layer_get_height1_config#0 = vera_layer_config[screenlayer::vera_layer_get_height1_$2] [ conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::vera_layer_get_height1_config#0 ] ( screenlayer:17 [ conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::vera_layer_get_height1_config#0 ] { } conio_x16_init:8::screenlayer:17 [ printf_buffer conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::vera_layer_get_height1_config#0 ] { } ) always clobbers reg byte a +Statement [147] screenlayer::vera_layer_get_height1_$0 = *screenlayer::vera_layer_get_height1_config#0 & VERA_LAYER_HEIGHT_MASK [ conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::vera_layer_get_height1_$0 ] ( screenlayer:17 [ conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::vera_layer_get_height1_$0 ] { } conio_x16_init:8::screenlayer:17 [ printf_buffer conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::vera_layer_get_height1_$0 ] { } ) always clobbers reg byte a reg byte y +Statement [148] screenlayer::vera_layer_get_height1_$1 = screenlayer::vera_layer_get_height1_$0 >> 6 [ conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::vera_layer_get_height1_$1 ] ( screenlayer:17 [ conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::vera_layer_get_height1_$1 ] { } conio_x16_init:8::screenlayer:17 [ printf_buffer conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::vera_layer_get_height1_$1 ] { } ) always clobbers reg byte a +Statement [149] screenlayer::vera_layer_get_height1_$3 = screenlayer::vera_layer_get_height1_$1 << 1 [ conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::vera_layer_get_height1_$3 ] ( screenlayer:17 [ conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::vera_layer_get_height1_$3 ] { } conio_x16_init:8::screenlayer:17 [ printf_buffer conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::vera_layer_get_height1_$3 ] { } ) always clobbers reg byte a +Statement [150] screenlayer::vera_layer_get_height1_return#0 = VERA_LAYER_HEIGHT[screenlayer::vera_layer_get_height1_$3] [ conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::vera_layer_get_height1_return#0 ] ( screenlayer:17 [ conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::vera_layer_get_height1_return#0 ] { } conio_x16_init:8::screenlayer:17 [ printf_buffer conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::vera_layer_get_height1_return#0 ] { } ) always clobbers reg byte a +Statement [151] screenlayer::vera_layer_get_height1_return#1 = screenlayer::vera_layer_get_height1_return#0 [ conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::vera_layer_get_height1_return#1 ] ( screenlayer:17 [ conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::vera_layer_get_height1_return#1 ] { } conio_x16_init:8::screenlayer:17 [ printf_buffer conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::vera_layer_get_height1_return#1 ] { } ) always clobbers reg byte a +Statement [152] screenlayer::$5 = screenlayer::vera_layer_get_height1_return#1 [ conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::$5 ] ( screenlayer:17 [ conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::$5 ] { } conio_x16_init:8::screenlayer:17 [ printf_buffer conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 screenlayer::$5 ] { } ) always clobbers reg byte a +Statement [153] conio_height = screenlayer::$5 [ conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 ] ( screenlayer:17 [ conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 ] { } conio_x16_init:8::screenlayer:17 [ printf_buffer conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 ] { } ) always clobbers reg byte a +Statement [155] *(vera_layer_textcolor+vera_layer_set_textcolor::layer#0) = WHITE [ ] ( vera_layer_set_textcolor:19 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip conio_x16_init::line#0 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 ] { } conio_x16_init:8::vera_layer_set_textcolor:19 [ printf_buffer conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip conio_x16_init::line#0 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 ] { } ) always clobbers reg byte a +Statement [157] *(vera_layer_backcolor+vera_layer_set_backcolor::layer#0) = BLUE [ ] ( vera_layer_set_backcolor:21 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip conio_x16_init::line#0 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 ] { } conio_x16_init:8::vera_layer_set_backcolor:21 [ printf_buffer conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip conio_x16_init::line#0 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 ] { } ) always clobbers reg byte a +Statement [160] vera_layer_set_mapbase::$0 = vera_layer_set_mapbase::layer#3 << 1 [ vera_layer_set_mapbase::mapbase#3 vera_layer_set_mapbase::$0 ] ( vera_layer_set_mapbase:23 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip conio_x16_init::line#0 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 vera_layer_set_mapbase::mapbase#3 vera_layer_set_mapbase::$0 ] { } conio_x16_init:8::vera_layer_set_mapbase:23 [ printf_buffer conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip conio_x16_init::line#0 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 vera_layer_set_mapbase::mapbase#3 vera_layer_set_mapbase::$0 ] { } vera_layer_set_mapbase:25 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip conio_x16_init::line#0 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 vera_layer_set_mapbase::mapbase#3 vera_layer_set_mapbase::$0 ] { } conio_x16_init:8::vera_layer_set_mapbase:25 [ printf_buffer conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip conio_x16_init::line#0 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 vera_layer_set_mapbase::mapbase#3 vera_layer_set_mapbase::$0 ] { } vera_layer_mode_text:13::vera_layer_mode_tile:104::vera_layer_set_mapbase:214 [ conio_screen_width conio_screen_height conio_x16_init::line#0 vera_layer_set_mapbase::mapbase#3 vera_layer_set_mapbase::$0 ] { } conio_x16_init:8::vera_layer_mode_text:13::vera_layer_mode_tile:104::vera_layer_set_mapbase:214 [ printf_buffer conio_screen_width conio_screen_height conio_x16_init::line#0 vera_layer_set_mapbase::mapbase#3 vera_layer_set_mapbase::$0 ] { } ) always clobbers reg byte a +Statement [161] vera_layer_set_mapbase::addr#0 = vera_layer_mapbase[vera_layer_set_mapbase::$0] [ vera_layer_set_mapbase::mapbase#3 vera_layer_set_mapbase::addr#0 ] ( vera_layer_set_mapbase:23 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip conio_x16_init::line#0 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 vera_layer_set_mapbase::mapbase#3 vera_layer_set_mapbase::addr#0 ] { } conio_x16_init:8::vera_layer_set_mapbase:23 [ printf_buffer conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip conio_x16_init::line#0 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 vera_layer_set_mapbase::mapbase#3 vera_layer_set_mapbase::addr#0 ] { } vera_layer_set_mapbase:25 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip conio_x16_init::line#0 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 vera_layer_set_mapbase::mapbase#3 vera_layer_set_mapbase::addr#0 ] { } conio_x16_init:8::vera_layer_set_mapbase:25 [ printf_buffer conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip conio_x16_init::line#0 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 vera_layer_set_mapbase::mapbase#3 vera_layer_set_mapbase::addr#0 ] { } vera_layer_mode_text:13::vera_layer_mode_tile:104::vera_layer_set_mapbase:214 [ conio_screen_width conio_screen_height conio_x16_init::line#0 vera_layer_set_mapbase::mapbase#3 vera_layer_set_mapbase::addr#0 ] { } conio_x16_init:8::vera_layer_mode_text:13::vera_layer_mode_tile:104::vera_layer_set_mapbase:214 [ printf_buffer conio_screen_width conio_screen_height conio_x16_init::line#0 vera_layer_set_mapbase::mapbase#3 vera_layer_set_mapbase::addr#0 ] { } ) always clobbers reg byte a +Statement [162] *vera_layer_set_mapbase::addr#0 = vera_layer_set_mapbase::mapbase#3 [ ] ( vera_layer_set_mapbase:23 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip conio_x16_init::line#0 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 ] { } conio_x16_init:8::vera_layer_set_mapbase:23 [ printf_buffer conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip conio_x16_init::line#0 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 ] { } vera_layer_set_mapbase:25 [ conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip conio_x16_init::line#0 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 ] { } conio_x16_init:8::vera_layer_set_mapbase:25 [ printf_buffer conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip conio_x16_init::line#0 CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 ] { } vera_layer_mode_text:13::vera_layer_mode_tile:104::vera_layer_set_mapbase:214 [ conio_screen_width conio_screen_height conio_x16_init::line#0 ] { } conio_x16_init:8::vera_layer_mode_text:13::vera_layer_mode_tile:104::vera_layer_set_mapbase:214 [ printf_buffer conio_screen_width conio_screen_height conio_x16_init::line#0 ] { } ) always clobbers reg byte a reg byte y +Statement [165] if(gotoxy::y#3<=conio_screen_height) goto gotoxy::@4 [ conio_screen_width conio_screen_height conio_screen_layer conio_rowshift gotoxy::y#3 ] ( gotoxy:30 [ conio_width conio_height conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 conio_screen_width conio_screen_height conio_screen_layer conio_rowshift gotoxy::y#3 ] { { gotoxy::y#0 = gotoxy::y#3 conio_x16_init::line#3 } } conio_x16_init:8::gotoxy:30 [ printf_buffer conio_width conio_height conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 conio_screen_width conio_screen_height conio_screen_layer conio_rowshift gotoxy::y#3 ] { { gotoxy::y#0 = gotoxy::y#3 conio_x16_init::line#3 } } main:10::cputs:72::cputc:184::cputln:260::cscroll:358::gotoxy:389 [ main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 cputs::s#0 printf_buffer conio_width CONIO_SCREEN_BANK#10 conio_height conio_rowskip CONIO_SCREEN_TEXT#101 conio_screen_width conio_screen_height conio_screen_layer conio_rowshift gotoxy::y#3 ] { { cputc::c#0 = cputc::c#3 cputs::c#1 } { gotoxy::y#2 = gotoxy::y#3 } } main:10::cputs:76::cputc:184::cputln:260::cscroll:358::gotoxy:389 [ main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 cputs::s#0 printf_buffer conio_width CONIO_SCREEN_BANK#10 conio_height conio_rowskip CONIO_SCREEN_TEXT#101 conio_screen_width conio_screen_height conio_screen_layer conio_rowshift gotoxy::y#3 ] { { cputc::c#0 = cputc::c#3 cputs::c#1 } { gotoxy::y#2 = gotoxy::y#3 } } main:10::cputs:80::cputc:184::cputln:260::cscroll:358::gotoxy:389 [ main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 cputs::s#0 printf_buffer conio_width CONIO_SCREEN_BANK#10 conio_height conio_rowskip CONIO_SCREEN_TEXT#101 conio_screen_width conio_screen_height conio_screen_layer conio_rowshift gotoxy::y#3 ] { { cputc::c#0 = cputc::c#3 cputs::c#1 } { gotoxy::y#2 = gotoxy::y#3 } } main:10::cputs:84::cputc:184::cputln:260::cscroll:358::gotoxy:389 [ main::src1#10 main::num#10 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 cputs::s#0 printf_buffer conio_width CONIO_SCREEN_BANK#10 conio_height conio_rowskip CONIO_SCREEN_TEXT#101 conio_screen_width conio_screen_height conio_screen_layer conio_rowshift gotoxy::y#3 ] { { cputc::c#0 = cputc::c#3 cputs::c#1 } { gotoxy::y#2 = gotoxy::y#3 } } main:10::cputs:88::cputc:184::cputln:260::cscroll:358::gotoxy:389 [ main::src1#10 main::num#10 main::bankend#0 main::beg#1 main::end#1 cputs::s#0 printf_buffer conio_width CONIO_SCREEN_BANK#10 conio_height conio_rowskip CONIO_SCREEN_TEXT#101 conio_screen_width conio_screen_height conio_screen_layer conio_rowshift gotoxy::y#3 ] { { cputc::c#0 = cputc::c#3 cputs::c#1 } { gotoxy::y#2 = gotoxy::y#3 } } main:10::cputs:92::cputc:184::cputln:260::cscroll:358::gotoxy:389 [ main::src1#10 main::num#10 main::beg#1 main::end#1 cputs::s#0 printf_buffer conio_width CONIO_SCREEN_BANK#10 conio_height conio_rowskip CONIO_SCREEN_TEXT#101 conio_screen_width conio_screen_height conio_screen_layer conio_rowshift gotoxy::y#3 ] { { cputc::c#0 = cputc::c#3 cputs::c#1 } { gotoxy::y#2 = gotoxy::y#3 } } main:10::cputs:96::cputc:184::cputln:260::cscroll:358::gotoxy:389 [ main::src1#10 main::num#10 main::end#1 cputs::s#0 printf_buffer conio_width CONIO_SCREEN_BANK#10 conio_height conio_rowskip CONIO_SCREEN_TEXT#101 conio_screen_width conio_screen_height conio_screen_layer conio_rowshift gotoxy::y#3 ] { { cputc::c#0 = cputc::c#3 cputs::c#1 } { gotoxy::y#2 = gotoxy::y#3 } } main:10::cputs:100::cputc:184::cputln:260::cscroll:358::gotoxy:389 [ main::src1#10 main::num#10 cputs::s#0 printf_buffer conio_width CONIO_SCREEN_BANK#10 conio_height conio_rowskip CONIO_SCREEN_TEXT#101 conio_screen_width conio_screen_height conio_screen_layer conio_rowshift gotoxy::y#3 ] { { cputc::c#0 = cputc::c#3 cputs::c#1 } { gotoxy::y#2 = gotoxy::y#3 } } main:10::printf_ulong:74::printf_number_buffer:190::cputs:293::cputc:184::cputln:260::cscroll:358::gotoxy:389 [ main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 cputs::s#0 printf_buffer conio_width CONIO_SCREEN_BANK#10 conio_height conio_rowskip CONIO_SCREEN_TEXT#101 conio_screen_width conio_screen_height conio_screen_layer conio_rowshift gotoxy::y#3 ] { { printf_ulong::uvalue#0 = printf_ulong::uvalue#3 main::src1#10 } { printf_number_buffer::buffer_sign#0 = printf_number_buffer::buffer_sign#10 } { cputc::c#0 = cputc::c#3 cputs::c#1 } { gotoxy::y#2 = gotoxy::y#3 } } main:10::printf_ulong:78::printf_number_buffer:190::cputs:293::cputc:184::cputln:260::cscroll:358::gotoxy:389 [ main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 cputs::s#0 printf_buffer conio_width CONIO_SCREEN_BANK#10 conio_height conio_rowskip CONIO_SCREEN_TEXT#101 conio_screen_width conio_screen_height conio_screen_layer conio_rowshift gotoxy::y#3 ] { { printf_ulong::uvalue#1 = printf_ulong::uvalue#3 main::num#10 } { printf_number_buffer::buffer_sign#0 = printf_number_buffer::buffer_sign#10 } { cputc::c#0 = cputc::c#3 cputs::c#1 } { gotoxy::y#2 = gotoxy::y#3 } } main:10::printf_ulong:82::printf_number_buffer:190::cputs:293::cputc:184::cputln:260::cscroll:358::gotoxy:389 [ main::src1#10 main::num#10 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 cputs::s#0 printf_buffer conio_width CONIO_SCREEN_BANK#10 conio_height conio_rowskip CONIO_SCREEN_TEXT#101 conio_screen_width conio_screen_height conio_screen_layer conio_rowshift gotoxy::y#3 ] { { printf_ulong::uvalue#2 = printf_ulong::uvalue#3 main::calcend#0 } { printf_number_buffer::buffer_sign#0 = printf_number_buffer::buffer_sign#10 } { cputc::c#0 = cputc::c#3 cputs::c#1 } { gotoxy::y#2 = gotoxy::y#3 } } main:10::printf_uchar:86::printf_number_buffer:197::cputs:293::cputc:184::cputln:260::cscroll:358::gotoxy:389 [ main::src1#10 main::num#10 main::bankend#0 main::beg#1 main::end#1 cputs::s#0 printf_buffer conio_width CONIO_SCREEN_BANK#10 conio_height conio_rowskip CONIO_SCREEN_TEXT#101 conio_screen_width conio_screen_height conio_screen_layer conio_rowshift gotoxy::y#3 ] { { printf_uchar::uvalue#0 = printf_uchar::uvalue#2 main::bankbeg#0 } { printf_number_buffer::buffer_sign#10 = printf_number_buffer::buffer_sign#2 } { cputc::c#0 = cputc::c#3 cputs::c#1 } { gotoxy::y#2 = gotoxy::y#3 } } main:10::printf_uchar:90::printf_number_buffer:197::cputs:293::cputc:184::cputln:260::cscroll:358::gotoxy:389 [ main::src1#10 main::num#10 main::beg#1 main::end#1 cputs::s#0 printf_buffer conio_width CONIO_SCREEN_BANK#10 conio_height conio_rowskip CONIO_SCREEN_TEXT#101 conio_screen_width conio_screen_height conio_screen_layer conio_rowshift gotoxy::y#3 ] { { printf_uchar::uvalue#1 = printf_uchar::uvalue#2 main::bankend#0 } { printf_number_buffer::buffer_sign#10 = printf_number_buffer::buffer_sign#2 } { cputc::c#0 = cputc::c#3 cputs::c#1 } { gotoxy::y#2 = gotoxy::y#3 } } main:10::printf_uint:94::printf_number_buffer:204::cputs:293::cputc:184::cputln:260::cscroll:358::gotoxy:389 [ main::src1#10 main::num#10 main::end#1 cputs::s#0 printf_buffer conio_width CONIO_SCREEN_BANK#10 conio_height conio_rowskip CONIO_SCREEN_TEXT#101 conio_screen_width conio_screen_height conio_screen_layer conio_rowshift gotoxy::y#3 ] { { printf_uint::uvalue#0 = printf_uint::uvalue#2 main::beg#1 } { printf_number_buffer::buffer_sign#1 = printf_number_buffer::buffer_sign#10 } { cputc::c#0 = cputc::c#3 cputs::c#1 } { gotoxy::y#2 = gotoxy::y#3 } } main:10::printf_uint:98::printf_number_buffer:204::cputs:293::cputc:184::cputln:260::cscroll:358::gotoxy:389 [ main::src1#10 main::num#10 cputs::s#0 printf_buffer conio_width CONIO_SCREEN_BANK#10 conio_height conio_rowskip CONIO_SCREEN_TEXT#101 conio_screen_width conio_screen_height conio_screen_layer conio_rowshift gotoxy::y#3 ] { { printf_uint::uvalue#1 = printf_uint::uvalue#2 main::end#1 } { printf_number_buffer::buffer_sign#1 = printf_number_buffer::buffer_sign#10 } { cputc::c#0 = cputc::c#3 cputs::c#1 } { gotoxy::y#2 = gotoxy::y#3 } } main:10::printf_ulong:74::printf_number_buffer:190::cputc:291::cputln:260::cscroll:358::gotoxy:389 [ main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 printf_buffer conio_width CONIO_SCREEN_BANK#10 conio_height conio_rowskip CONIO_SCREEN_TEXT#101 conio_screen_width conio_screen_height conio_screen_layer conio_rowshift gotoxy::y#3 ] { { printf_ulong::uvalue#0 = printf_ulong::uvalue#3 main::src1#10 } { cputc::c#2 = cputc::c#3 printf_number_buffer::buffer_sign#10 printf_number_buffer::buffer_sign#0 } { gotoxy::y#2 = gotoxy::y#3 } } main:10::printf_ulong:78::printf_number_buffer:190::cputc:291::cputln:260::cscroll:358::gotoxy:389 [ main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 printf_buffer conio_width CONIO_SCREEN_BANK#10 conio_height conio_rowskip CONIO_SCREEN_TEXT#101 conio_screen_width conio_screen_height conio_screen_layer conio_rowshift gotoxy::y#3 ] { { printf_ulong::uvalue#1 = printf_ulong::uvalue#3 main::num#10 } { cputc::c#2 = cputc::c#3 printf_number_buffer::buffer_sign#10 printf_number_buffer::buffer_sign#0 } { gotoxy::y#2 = gotoxy::y#3 } } main:10::printf_ulong:82::printf_number_buffer:190::cputc:291::cputln:260::cscroll:358::gotoxy:389 [ main::src1#10 main::num#10 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 printf_buffer conio_width CONIO_SCREEN_BANK#10 conio_height conio_rowskip CONIO_SCREEN_TEXT#101 conio_screen_width conio_screen_height conio_screen_layer conio_rowshift gotoxy::y#3 ] { { printf_ulong::uvalue#2 = printf_ulong::uvalue#3 main::calcend#0 } { cputc::c#2 = cputc::c#3 printf_number_buffer::buffer_sign#10 printf_number_buffer::buffer_sign#0 } { gotoxy::y#2 = gotoxy::y#3 } } main:10::printf_uchar:86::printf_number_buffer:197::cputc:291::cputln:260::cscroll:358::gotoxy:389 [ main::src1#10 main::num#10 main::bankend#0 main::beg#1 main::end#1 printf_buffer conio_width CONIO_SCREEN_BANK#10 conio_height conio_rowskip CONIO_SCREEN_TEXT#101 conio_screen_width conio_screen_height conio_screen_layer conio_rowshift gotoxy::y#3 ] { { printf_uchar::uvalue#0 = printf_uchar::uvalue#2 main::bankbeg#0 } { cputc::c#2 = cputc::c#3 printf_number_buffer::buffer_sign#10 printf_number_buffer::buffer_sign#2 } { gotoxy::y#2 = gotoxy::y#3 } } main:10::printf_uchar:90::printf_number_buffer:197::cputc:291::cputln:260::cscroll:358::gotoxy:389 [ main::src1#10 main::num#10 main::beg#1 main::end#1 printf_buffer conio_width CONIO_SCREEN_BANK#10 conio_height conio_rowskip CONIO_SCREEN_TEXT#101 conio_screen_width conio_screen_height conio_screen_layer conio_rowshift gotoxy::y#3 ] { { printf_uchar::uvalue#1 = printf_uchar::uvalue#2 main::bankend#0 } { cputc::c#2 = cputc::c#3 printf_number_buffer::buffer_sign#10 printf_number_buffer::buffer_sign#2 } { gotoxy::y#2 = gotoxy::y#3 } } main:10::printf_uint:94::printf_number_buffer:204::cputc:291::cputln:260::cscroll:358::gotoxy:389 [ main::src1#10 main::num#10 main::end#1 printf_buffer conio_width CONIO_SCREEN_BANK#10 conio_height conio_rowskip CONIO_SCREEN_TEXT#101 conio_screen_width conio_screen_height conio_screen_layer conio_rowshift gotoxy::y#3 ] { { printf_uint::uvalue#0 = printf_uint::uvalue#2 main::beg#1 } { cputc::c#2 = cputc::c#3 printf_number_buffer::buffer_sign#10 printf_number_buffer::buffer_sign#1 } { gotoxy::y#2 = gotoxy::y#3 } } main:10::printf_uint:98::printf_number_buffer:204::cputc:291::cputln:260::cscroll:358::gotoxy:389 [ main::src1#10 main::num#10 printf_buffer conio_width CONIO_SCREEN_BANK#10 conio_height conio_rowskip CONIO_SCREEN_TEXT#101 conio_screen_width conio_screen_height conio_screen_layer conio_rowshift gotoxy::y#3 ] { { printf_uint::uvalue#1 = printf_uint::uvalue#2 main::end#1 } { cputc::c#2 = cputc::c#3 printf_number_buffer::buffer_sign#10 printf_number_buffer::buffer_sign#1 } { gotoxy::y#2 = gotoxy::y#3 } } main:10::cputs:72::cputc:184::cputln:264::cscroll:358::gotoxy:389 [ main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 cputs::s#0 printf_buffer conio_width CONIO_SCREEN_BANK#10 conio_height conio_rowskip CONIO_SCREEN_TEXT#101 conio_screen_width conio_screen_height conio_screen_layer conio_rowshift gotoxy::y#3 ] { { cputc::c#0 = cputc::c#3 cputs::c#1 } { gotoxy::y#2 = gotoxy::y#3 } } main:10::cputs:76::cputc:184::cputln:264::cscroll:358::gotoxy:389 [ main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 cputs::s#0 printf_buffer conio_width CONIO_SCREEN_BANK#10 conio_height conio_rowskip CONIO_SCREEN_TEXT#101 conio_screen_width conio_screen_height conio_screen_layer conio_rowshift gotoxy::y#3 ] { { cputc::c#0 = cputc::c#3 cputs::c#1 } { gotoxy::y#2 = gotoxy::y#3 } } main:10::cputs:80::cputc:184::cputln:264::cscroll:358::gotoxy:389 [ main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 cputs::s#0 printf_buffer conio_width CONIO_SCREEN_BANK#10 conio_height conio_rowskip CONIO_SCREEN_TEXT#101 conio_screen_width conio_screen_height conio_screen_layer conio_rowshift gotoxy::y#3 ] { { cputc::c#0 = cputc::c#3 cputs::c#1 } { gotoxy::y#2 = gotoxy::y#3 } } main:10::cputs:84::cputc:184::cputln:264::cscroll:358::gotoxy:389 [ main::src1#10 main::num#10 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 cputs::s#0 printf_buffer conio_width CONIO_SCREEN_BANK#10 conio_height conio_rowskip CONIO_SCREEN_TEXT#101 conio_screen_width conio_screen_height conio_screen_layer conio_rowshift gotoxy::y#3 ] { { cputc::c#0 = cputc::c#3 cputs::c#1 } { gotoxy::y#2 = gotoxy::y#3 } } main:10::cputs:88::cputc:184::cputln:264::cscroll:358::gotoxy:389 [ main::src1#10 main::num#10 main::bankend#0 main::beg#1 main::end#1 cputs::s#0 printf_buffer conio_width CONIO_SCREEN_BANK#10 conio_height conio_rowskip CONIO_SCREEN_TEXT#101 conio_screen_width conio_screen_height conio_screen_layer conio_rowshift gotoxy::y#3 ] { { cputc::c#0 = cputc::c#3 cputs::c#1 } { gotoxy::y#2 = gotoxy::y#3 } } main:10::cputs:92::cputc:184::cputln:264::cscroll:358::gotoxy:389 [ main::src1#10 main::num#10 main::beg#1 main::end#1 cputs::s#0 printf_buffer conio_width CONIO_SCREEN_BANK#10 conio_height conio_rowskip CONIO_SCREEN_TEXT#101 conio_screen_width conio_screen_height conio_screen_layer conio_rowshift gotoxy::y#3 ] { { cputc::c#0 = cputc::c#3 cputs::c#1 } { gotoxy::y#2 = gotoxy::y#3 } } main:10::cputs:96::cputc:184::cputln:264::cscroll:358::gotoxy:389 [ main::src1#10 main::num#10 main::end#1 cputs::s#0 printf_buffer conio_width CONIO_SCREEN_BANK#10 conio_height conio_rowskip CONIO_SCREEN_TEXT#101 conio_screen_width conio_screen_height conio_screen_layer conio_rowshift gotoxy::y#3 ] { { cputc::c#0 = cputc::c#3 cputs::c#1 } { gotoxy::y#2 = gotoxy::y#3 } } main:10::cputs:100::cputc:184::cputln:264::cscroll:358::gotoxy:389 [ main::src1#10 main::num#10 cputs::s#0 printf_buffer conio_width CONIO_SCREEN_BANK#10 conio_height conio_rowskip CONIO_SCREEN_TEXT#101 conio_screen_width conio_screen_height conio_screen_layer conio_rowshift gotoxy::y#3 ] { { cputc::c#0 = cputc::c#3 cputs::c#1 } { gotoxy::y#2 = gotoxy::y#3 } } main:10::printf_ulong:74::printf_number_buffer:190::cputs:293::cputc:184::cputln:264::cscroll:358::gotoxy:389 [ main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 cputs::s#0 printf_buffer conio_width CONIO_SCREEN_BANK#10 conio_height conio_rowskip CONIO_SCREEN_TEXT#101 conio_screen_width conio_screen_height conio_screen_layer conio_rowshift gotoxy::y#3 ] { { printf_ulong::uvalue#0 = printf_ulong::uvalue#3 main::src1#10 } { printf_number_buffer::buffer_sign#0 = printf_number_buffer::buffer_sign#10 } { cputc::c#0 = cputc::c#3 cputs::c#1 } { gotoxy::y#2 = gotoxy::y#3 } } main:10::printf_ulong:78::printf_number_buffer:190::cputs:293::cputc:184::cputln:264::cscroll:358::gotoxy:389 [ main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 cputs::s#0 printf_buffer conio_width CONIO_SCREEN_BANK#10 conio_height conio_rowskip CONIO_SCREEN_TEXT#101 conio_screen_width conio_screen_height conio_screen_layer conio_rowshift gotoxy::y#3 ] { { printf_ulong::uvalue#1 = printf_ulong::uvalue#3 main::num#10 } { printf_number_buffer::buffer_sign#0 = printf_number_buffer::buffer_sign#10 } { cputc::c#0 = cputc::c#3 cputs::c#1 } { gotoxy::y#2 = gotoxy::y#3 } } main:10::printf_ulong:82::printf_number_buffer:190::cputs:293::cputc:184::cputln:264::cscroll:358::gotoxy:389 [ main::src1#10 main::num#10 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 cputs::s#0 printf_buffer conio_width CONIO_SCREEN_BANK#10 conio_height conio_rowskip CONIO_SCREEN_TEXT#101 conio_screen_width conio_screen_height conio_screen_layer conio_rowshift gotoxy::y#3 ] { { printf_ulong::uvalue#2 = printf_ulong::uvalue#3 main::calcend#0 } { printf_number_buffer::buffer_sign#0 = printf_number_buffer::buffer_sign#10 } { cputc::c#0 = cputc::c#3 cputs::c#1 } { gotoxy::y#2 = gotoxy::y#3 } } main:10::printf_uchar:86::printf_number_buffer:197::cputs:293::cputc:184::cputln:264::cscroll:358::gotoxy:389 [ main::src1#10 main::num#10 main::bankend#0 main::beg#1 main::end#1 cputs::s#0 printf_buffer conio_width CONIO_SCREEN_BANK#10 conio_height conio_rowskip CONIO_SCREEN_TEXT#101 conio_screen_width conio_screen_height conio_screen_layer conio_rowshift gotoxy::y#3 ] { { printf_uchar::uvalue#0 = printf_uchar::uvalue#2 main::bankbeg#0 } { printf_number_buffer::buffer_sign#10 = printf_number_buffer::buffer_sign#2 } { cputc::c#0 = cputc::c#3 cputs::c#1 } { gotoxy::y#2 = gotoxy::y#3 } } main:10::printf_uchar:90::printf_number_buffer:197::cputs:293::cputc:184::cputln:264::cscroll:358::gotoxy:389 [ main::src1#10 main::num#10 main::beg#1 main::end#1 cputs::s#0 printf_buffer conio_width CONIO_SCREEN_BANK#10 conio_height conio_rowskip CONIO_SCREEN_TEXT#101 conio_screen_width conio_screen_height conio_screen_layer conio_rowshift gotoxy::y#3 ] { { printf_uchar::uvalue#1 = printf_uchar::uvalue#2 main::bankend#0 } { printf_number_buffer::buffer_sign#10 = printf_number_buffer::buffer_sign#2 } { cputc::c#0 = cputc::c#3 cputs::c#1 } { gotoxy::y#2 = gotoxy::y#3 } } main:10::printf_uint:94::printf_number_buffer:204::cputs:293::cputc:184::cputln:264::cscroll:358::gotoxy:389 [ main::src1#10 main::num#10 main::end#1 cputs::s#0 printf_buffer conio_width CONIO_SCREEN_BANK#10 conio_height conio_rowskip CONIO_SCREEN_TEXT#101 conio_screen_width conio_screen_height conio_screen_layer conio_rowshift gotoxy::y#3 ] { { printf_uint::uvalue#0 = printf_uint::uvalue#2 main::beg#1 } { printf_number_buffer::buffer_sign#1 = printf_number_buffer::buffer_sign#10 } { cputc::c#0 = cputc::c#3 cputs::c#1 } { gotoxy::y#2 = gotoxy::y#3 } } main:10::printf_uint:98::printf_number_buffer:204::cputs:293::cputc:184::cputln:264::cscroll:358::gotoxy:389 [ main::src1#10 main::num#10 cputs::s#0 printf_buffer conio_width CONIO_SCREEN_BANK#10 conio_height conio_rowskip CONIO_SCREEN_TEXT#101 conio_screen_width conio_screen_height conio_screen_layer conio_rowshift gotoxy::y#3 ] { { printf_uint::uvalue#1 = printf_uint::uvalue#2 main::end#1 } { printf_number_buffer::buffer_sign#1 = printf_number_buffer::buffer_sign#10 } { cputc::c#0 = cputc::c#3 cputs::c#1 } { gotoxy::y#2 = gotoxy::y#3 } } main:10::printf_ulong:74::printf_number_buffer:190::cputc:291::cputln:264::cscroll:358::gotoxy:389 [ main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 printf_buffer conio_width CONIO_SCREEN_BANK#10 conio_height conio_rowskip CONIO_SCREEN_TEXT#101 conio_screen_width conio_screen_height conio_screen_layer conio_rowshift gotoxy::y#3 ] { { printf_ulong::uvalue#0 = printf_ulong::uvalue#3 main::src1#10 } { cputc::c#2 = cputc::c#3 printf_number_buffer::buffer_sign#10 printf_number_buffer::buffer_sign#0 } { gotoxy::y#2 = gotoxy::y#3 } } main:10::printf_ulong:78::printf_number_buffer:190::cputc:291::cputln:264::cscroll:358::gotoxy:389 [ main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 printf_buffer conio_width CONIO_SCREEN_BANK#10 conio_height conio_rowskip CONIO_SCREEN_TEXT#101 conio_screen_width conio_screen_height conio_screen_layer conio_rowshift gotoxy::y#3 ] { { printf_ulong::uvalue#1 = printf_ulong::uvalue#3 main::num#10 } { cputc::c#2 = cputc::c#3 printf_number_buffer::buffer_sign#10 printf_number_buffer::buffer_sign#0 } { gotoxy::y#2 = gotoxy::y#3 } } main:10::printf_ulong:82::printf_number_buffer:190::cputc:291::cputln:264::cscroll:358::gotoxy:389 [ main::src1#10 main::num#10 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 printf_buffer conio_width CONIO_SCREEN_BANK#10 conio_height conio_rowskip CONIO_SCREEN_TEXT#101 conio_screen_width conio_screen_height conio_screen_layer conio_rowshift gotoxy::y#3 ] { { printf_ulong::uvalue#2 = printf_ulong::uvalue#3 main::calcend#0 } { cputc::c#2 = cputc::c#3 printf_number_buffer::buffer_sign#10 printf_number_buffer::buffer_sign#0 } { gotoxy::y#2 = gotoxy::y#3 } } main:10::printf_uchar:86::printf_number_buffer:197::cputc:291::cputln:264::cscroll:358::gotoxy:389 [ main::src1#10 main::num#10 main::bankend#0 main::beg#1 main::end#1 printf_buffer conio_width CONIO_SCREEN_BANK#10 conio_height conio_rowskip CONIO_SCREEN_TEXT#101 conio_screen_width conio_screen_height conio_screen_layer conio_rowshift gotoxy::y#3 ] { { printf_uchar::uvalue#0 = printf_uchar::uvalue#2 main::bankbeg#0 } { cputc::c#2 = cputc::c#3 printf_number_buffer::buffer_sign#10 printf_number_buffer::buffer_sign#2 } { gotoxy::y#2 = gotoxy::y#3 } } main:10::printf_uchar:90::printf_number_buffer:197::cputc:291::cputln:264::cscroll:358::gotoxy:389 [ main::src1#10 main::num#10 main::beg#1 main::end#1 printf_buffer conio_width CONIO_SCREEN_BANK#10 conio_height conio_rowskip CONIO_SCREEN_TEXT#101 conio_screen_width conio_screen_height conio_screen_layer conio_rowshift gotoxy::y#3 ] { { printf_uchar::uvalue#1 = printf_uchar::uvalue#2 main::bankend#0 } { cputc::c#2 = cputc::c#3 printf_number_buffer::buffer_sign#10 printf_number_buffer::buffer_sign#2 } { gotoxy::y#2 = gotoxy::y#3 } } main:10::printf_uint:94::printf_number_buffer:204::cputc:291::cputln:264::cscroll:358::gotoxy:389 [ main::src1#10 main::num#10 main::end#1 printf_buffer conio_width CONIO_SCREEN_BANK#10 conio_height conio_rowskip CONIO_SCREEN_TEXT#101 conio_screen_width conio_screen_height conio_screen_layer conio_rowshift gotoxy::y#3 ] { { printf_uint::uvalue#0 = printf_uint::uvalue#2 main::beg#1 } { cputc::c#2 = cputc::c#3 printf_number_buffer::buffer_sign#10 printf_number_buffer::buffer_sign#1 } { gotoxy::y#2 = gotoxy::y#3 } } main:10::printf_uint:98::printf_number_buffer:204::cputc:291::cputln:264::cscroll:358::gotoxy:389 [ main::src1#10 main::num#10 printf_buffer conio_width CONIO_SCREEN_BANK#10 conio_height conio_rowskip CONIO_SCREEN_TEXT#101 conio_screen_width conio_screen_height conio_screen_layer conio_rowshift gotoxy::y#3 ] { { printf_uint::uvalue#1 = printf_uint::uvalue#2 main::end#1 } { cputc::c#2 = cputc::c#3 printf_number_buffer::buffer_sign#10 printf_number_buffer::buffer_sign#1 } { gotoxy::y#2 = gotoxy::y#3 } } main:10::cputs:72::cputc:184::cputln:266::cscroll:358::gotoxy:389 [ main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 cputs::s#0 printf_buffer conio_width CONIO_SCREEN_BANK#10 conio_height conio_rowskip CONIO_SCREEN_TEXT#101 conio_screen_width conio_screen_height conio_screen_layer conio_rowshift gotoxy::y#3 ] { { cputc::c#0 = cputc::c#3 cputs::c#1 } { gotoxy::y#2 = gotoxy::y#3 } } main:10::cputs:76::cputc:184::cputln:266::cscroll:358::gotoxy:389 [ main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 cputs::s#0 printf_buffer conio_width CONIO_SCREEN_BANK#10 conio_height conio_rowskip CONIO_SCREEN_TEXT#101 conio_screen_width conio_screen_height conio_screen_layer conio_rowshift gotoxy::y#3 ] { { cputc::c#0 = cputc::c#3 cputs::c#1 } { gotoxy::y#2 = gotoxy::y#3 } } main:10::cputs:80::cputc:184::cputln:266::cscroll:358::gotoxy:389 [ main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 cputs::s#0 printf_buffer conio_width CONIO_SCREEN_BANK#10 conio_height conio_rowskip CONIO_SCREEN_TEXT#101 conio_screen_width conio_screen_height conio_screen_layer conio_rowshift gotoxy::y#3 ] { { cputc::c#0 = cputc::c#3 cputs::c#1 } { gotoxy::y#2 = gotoxy::y#3 } } main:10::cputs:84::cputc:184::cputln:266::cscroll:358::gotoxy:389 [ main::src1#10 main::num#10 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 cputs::s#0 printf_buffer conio_width CONIO_SCREEN_BANK#10 conio_height conio_rowskip CONIO_SCREEN_TEXT#101 conio_screen_width conio_screen_height conio_screen_layer conio_rowshift gotoxy::y#3 ] { { cputc::c#0 = cputc::c#3 cputs::c#1 } { gotoxy::y#2 = gotoxy::y#3 } } main:10::cputs:88::cputc:184::cputln:266::cscroll:358::gotoxy:389 [ main::src1#10 main::num#10 main::bankend#0 main::beg#1 main::end#1 cputs::s#0 printf_buffer conio_width CONIO_SCREEN_BANK#10 conio_height conio_rowskip CONIO_SCREEN_TEXT#101 conio_screen_width conio_screen_height conio_screen_layer conio_rowshift gotoxy::y#3 ] { { cputc::c#0 = cputc::c#3 cputs::c#1 } { gotoxy::y#2 = gotoxy::y#3 } } main:10::cputs:92::cputc:184::cputln:266::cscroll:358::gotoxy:389 [ main::src1#10 main::num#10 main::beg#1 main::end#1 cputs::s#0 printf_buffer conio_width CONIO_SCREEN_BANK#10 conio_height conio_rowskip CONIO_SCREEN_TEXT#101 conio_screen_width conio_screen_height conio_screen_layer conio_rowshift gotoxy::y#3 ] { { cputc::c#0 = cputc::c#3 cputs::c#1 } { gotoxy::y#2 = gotoxy::y#3 } } main:10::cputs:96::cputc:184::cputln:266::cscroll:358::gotoxy:389 [ main::src1#10 main::num#10 main::end#1 cputs::s#0 printf_buffer conio_width CONIO_SCREEN_BANK#10 conio_height conio_rowskip CONIO_SCREEN_TEXT#101 conio_screen_width conio_screen_height conio_screen_layer conio_rowshift gotoxy::y#3 ] { { cputc::c#0 = cputc::c#3 cputs::c#1 } { gotoxy::y#2 = gotoxy::y#3 } } main:10::cputs:100::cputc:184::cputln:266::cscroll:358::gotoxy:389 [ main::src1#10 main::num#10 cputs::s#0 printf_buffer conio_width CONIO_SCREEN_BANK#10 conio_height conio_rowskip CONIO_SCREEN_TEXT#101 conio_screen_width conio_screen_height conio_screen_layer conio_rowshift gotoxy::y#3 ] { { cputc::c#0 = cputc::c#3 cputs::c#1 } { gotoxy::y#2 = gotoxy::y#3 } } main:10::printf_ulong:74::printf_number_buffer:190::cputs:293::cputc:184::cputln:266::cscroll:358::gotoxy:389 [ main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 cputs::s#0 printf_buffer conio_width CONIO_SCREEN_BANK#10 conio_height conio_rowskip CONIO_SCREEN_TEXT#101 conio_screen_width conio_screen_height conio_screen_layer conio_rowshift gotoxy::y#3 ] { { printf_ulong::uvalue#0 = printf_ulong::uvalue#3 main::src1#10 } { printf_number_buffer::buffer_sign#0 = printf_number_buffer::buffer_sign#10 } { cputc::c#0 = cputc::c#3 cputs::c#1 } { gotoxy::y#2 = gotoxy::y#3 } } main:10::printf_ulong:78::printf_number_buffer:190::cputs:293::cputc:184::cputln:266::cscroll:358::gotoxy:389 [ main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 cputs::s#0 printf_buffer conio_width CONIO_SCREEN_BANK#10 conio_height conio_rowskip CONIO_SCREEN_TEXT#101 conio_screen_width conio_screen_height conio_screen_layer conio_rowshift gotoxy::y#3 ] { { printf_ulong::uvalue#1 = printf_ulong::uvalue#3 main::num#10 } { printf_number_buffer::buffer_sign#0 = printf_number_buffer::buffer_sign#10 } { cputc::c#0 = cputc::c#3 cputs::c#1 } { gotoxy::y#2 = gotoxy::y#3 } } main:10::printf_ulong:82::printf_number_buffer:190::cputs:293::cputc:184::cputln:266::cscroll:358::gotoxy:389 [ main::src1#10 main::num#10 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 cputs::s#0 printf_buffer conio_width CONIO_SCREEN_BANK#10 conio_height conio_rowskip CONIO_SCREEN_TEXT#101 conio_screen_width conio_screen_height conio_screen_layer conio_rowshift gotoxy::y#3 ] { { printf_ulong::uvalue#2 = printf_ulong::uvalue#3 main::calcend#0 } { printf_number_buffer::buffer_sign#0 = printf_number_buffer::buffer_sign#10 } { cputc::c#0 = cputc::c#3 cputs::c#1 } { gotoxy::y#2 = gotoxy::y#3 } } main:10::printf_uchar:86::printf_number_buffer:197::cputs:293::cputc:184::cputln:266::cscroll:358::gotoxy:389 [ main::src1#10 main::num#10 main::bankend#0 main::beg#1 main::end#1 cputs::s#0 printf_buffer conio_width CONIO_SCREEN_BANK#10 conio_height conio_rowskip CONIO_SCREEN_TEXT#101 conio_screen_width conio_screen_height conio_screen_layer conio_rowshift gotoxy::y#3 ] { { printf_uchar::uvalue#0 = printf_uchar::uvalue#2 main::bankbeg#0 } { printf_number_buffer::buffer_sign#10 = printf_number_buffer::buffer_sign#2 } { cputc::c#0 = cputc::c#3 cputs::c#1 } { gotoxy::y#2 = gotoxy::y#3 } } main:10::printf_uchar:90::printf_number_buffer:197::cputs:293::cputc:184::cputln:266::cscroll:358::gotoxy:389 [ main::src1#10 main::num#10 main::beg#1 main::end#1 cputs::s#0 printf_buffer conio_width CONIO_SCREEN_BANK#10 conio_height conio_rowskip CONIO_SCREEN_TEXT#101 conio_screen_width conio_screen_height conio_screen_layer conio_rowshift gotoxy::y#3 ] { { printf_uchar::uvalue#1 = printf_uchar::uvalue#2 main::bankend#0 } { printf_number_buffer::buffer_sign#10 = printf_number_buffer::buffer_sign#2 } { cputc::c#0 = cputc::c#3 cputs::c#1 } { gotoxy::y#2 = gotoxy::y#3 } } main:10::printf_uint:94::printf_number_buffer:204::cputs:293::cputc:184::cputln:266::cscroll:358::gotoxy:389 [ main::src1#10 main::num#10 main::end#1 cputs::s#0 printf_buffer conio_width CONIO_SCREEN_BANK#10 conio_height conio_rowskip CONIO_SCREEN_TEXT#101 conio_screen_width conio_screen_height conio_screen_layer conio_rowshift gotoxy::y#3 ] { { printf_uint::uvalue#0 = printf_uint::uvalue#2 main::beg#1 } { printf_number_buffer::buffer_sign#1 = printf_number_buffer::buffer_sign#10 } { cputc::c#0 = cputc::c#3 cputs::c#1 } { gotoxy::y#2 = gotoxy::y#3 } } main:10::printf_uint:98::printf_number_buffer:204::cputs:293::cputc:184::cputln:266::cscroll:358::gotoxy:389 [ main::src1#10 main::num#10 cputs::s#0 printf_buffer conio_width CONIO_SCREEN_BANK#10 conio_height conio_rowskip CONIO_SCREEN_TEXT#101 conio_screen_width conio_screen_height conio_screen_layer conio_rowshift gotoxy::y#3 ] { { printf_uint::uvalue#1 = printf_uint::uvalue#2 main::end#1 } { printf_number_buffer::buffer_sign#1 = printf_number_buffer::buffer_sign#10 } { cputc::c#0 = cputc::c#3 cputs::c#1 } { gotoxy::y#2 = gotoxy::y#3 } } main:10::printf_ulong:74::printf_number_buffer:190::cputc:291::cputln:266::cscroll:358::gotoxy:389 [ main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 printf_buffer conio_width CONIO_SCREEN_BANK#10 conio_height conio_rowskip CONIO_SCREEN_TEXT#101 conio_screen_width conio_screen_height conio_screen_layer conio_rowshift gotoxy::y#3 ] { { printf_ulong::uvalue#0 = printf_ulong::uvalue#3 main::src1#10 } { cputc::c#2 = cputc::c#3 printf_number_buffer::buffer_sign#10 printf_number_buffer::buffer_sign#0 } { gotoxy::y#2 = gotoxy::y#3 } } main:10::printf_ulong:78::printf_number_buffer:190::cputc:291::cputln:266::cscroll:358::gotoxy:389 [ main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 printf_buffer conio_width CONIO_SCREEN_BANK#10 conio_height conio_rowskip CONIO_SCREEN_TEXT#101 conio_screen_width conio_screen_height conio_screen_layer conio_rowshift gotoxy::y#3 ] { { printf_ulong::uvalue#1 = printf_ulong::uvalue#3 main::num#10 } { cputc::c#2 = cputc::c#3 printf_number_buffer::buffer_sign#10 printf_number_buffer::buffer_sign#0 } { gotoxy::y#2 = gotoxy::y#3 } } main:10::printf_ulong:82::printf_number_buffer:190::cputc:291::cputln:266::cscroll:358::gotoxy:389 [ main::src1#10 main::num#10 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 printf_buffer conio_width CONIO_SCREEN_BANK#10 conio_height conio_rowskip CONIO_SCREEN_TEXT#101 conio_screen_width conio_screen_height conio_screen_layer conio_rowshift gotoxy::y#3 ] { { printf_ulong::uvalue#2 = printf_ulong::uvalue#3 main::calcend#0 } { cputc::c#2 = cputc::c#3 printf_number_buffer::buffer_sign#10 printf_number_buffer::buffer_sign#0 } { gotoxy::y#2 = gotoxy::y#3 } } main:10::printf_uchar:86::printf_number_buffer:197::cputc:291::cputln:266::cscroll:358::gotoxy:389 [ main::src1#10 main::num#10 main::bankend#0 main::beg#1 main::end#1 printf_buffer conio_width CONIO_SCREEN_BANK#10 conio_height conio_rowskip CONIO_SCREEN_TEXT#101 conio_screen_width conio_screen_height conio_screen_layer conio_rowshift gotoxy::y#3 ] { { printf_uchar::uvalue#0 = printf_uchar::uvalue#2 main::bankbeg#0 } { cputc::c#2 = cputc::c#3 printf_number_buffer::buffer_sign#10 printf_number_buffer::buffer_sign#2 } { gotoxy::y#2 = gotoxy::y#3 } } main:10::printf_uchar:90::printf_number_buffer:197::cputc:291::cputln:266::cscroll:358::gotoxy:389 [ main::src1#10 main::num#10 main::beg#1 main::end#1 printf_buffer conio_width CONIO_SCREEN_BANK#10 conio_height conio_rowskip CONIO_SCREEN_TEXT#101 conio_screen_width conio_screen_height conio_screen_layer conio_rowshift gotoxy::y#3 ] { { printf_uchar::uvalue#1 = printf_uchar::uvalue#2 main::bankend#0 } { cputc::c#2 = cputc::c#3 printf_number_buffer::buffer_sign#10 printf_number_buffer::buffer_sign#2 } { gotoxy::y#2 = gotoxy::y#3 } } main:10::printf_uint:94::printf_number_buffer:204::cputc:291::cputln:266::cscroll:358::gotoxy:389 [ main::src1#10 main::num#10 main::end#1 printf_buffer conio_width CONIO_SCREEN_BANK#10 conio_height conio_rowskip CONIO_SCREEN_TEXT#101 conio_screen_width conio_screen_height conio_screen_layer conio_rowshift gotoxy::y#3 ] { { printf_uint::uvalue#0 = printf_uint::uvalue#2 main::beg#1 } { cputc::c#2 = cputc::c#3 printf_number_buffer::buffer_sign#10 printf_number_buffer::buffer_sign#1 } { gotoxy::y#2 = gotoxy::y#3 } } main:10::printf_uint:98::printf_number_buffer:204::cputc:291::cputln:266::cscroll:358::gotoxy:389 [ main::src1#10 main::num#10 printf_buffer conio_width CONIO_SCREEN_BANK#10 conio_height conio_rowskip CONIO_SCREEN_TEXT#101 conio_screen_width conio_screen_height conio_screen_layer conio_rowshift gotoxy::y#3 ] { { printf_uint::uvalue#1 = printf_uint::uvalue#2 main::end#1 } { cputc::c#2 = cputc::c#3 printf_number_buffer::buffer_sign#10 printf_number_buffer::buffer_sign#1 } { gotoxy::y#2 = gotoxy::y#3 } } ) always clobbers reg byte a +Statement [168] if(0=ultoa::digit_value#0) goto ultoa::@5 [ printf_buffer ultoa::digit#2 ultoa::value#2 ultoa::started#2 ultoa::buffer#11 ultoa::digit_value#0 ] ( main:10::printf_ulong:74::ultoa:188 [ main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ultoa::digit#2 ultoa::value#2 ultoa::started#2 ultoa::buffer#11 ultoa::digit_value#0 ] { { printf_ulong::uvalue#0 = printf_ulong::uvalue#3 main::src1#10 ultoa::value#1 } } main:10::printf_ulong:78::ultoa:188 [ main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ultoa::digit#2 ultoa::value#2 ultoa::started#2 ultoa::buffer#11 ultoa::digit_value#0 ] { { printf_ulong::uvalue#1 = printf_ulong::uvalue#3 main::num#10 ultoa::value#1 } } main:10::printf_ulong:82::ultoa:188 [ main::src1#10 main::num#10 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ultoa::digit#2 ultoa::value#2 ultoa::started#2 ultoa::buffer#11 ultoa::digit_value#0 ] { { printf_ulong::uvalue#2 = printf_ulong::uvalue#3 main::calcend#0 ultoa::value#1 } } ) always clobbers reg byte a +Statement [281] ultoa_append::buffer#0 = ultoa::buffer#11 [ printf_buffer ultoa::digit#2 ultoa::value#2 ultoa::buffer#11 ultoa::digit_value#0 ultoa_append::buffer#0 ] ( main:10::printf_ulong:74::ultoa:188 [ main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ultoa::digit#2 ultoa::value#2 ultoa::buffer#11 ultoa::digit_value#0 ultoa_append::buffer#0 ] { { printf_ulong::uvalue#0 = printf_ulong::uvalue#3 main::src1#10 ultoa::value#1 } { ultoa_append::buffer#0 = ultoa::buffer#11 } { ultoa_append::value#0 = ultoa::value#2 } { ultoa_append::sub#0 = ultoa::digit_value#0 } { ultoa_append::return#0 = ultoa_append::value#2 } } main:10::printf_ulong:78::ultoa:188 [ main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ultoa::digit#2 ultoa::value#2 ultoa::buffer#11 ultoa::digit_value#0 ultoa_append::buffer#0 ] { { printf_ulong::uvalue#1 = printf_ulong::uvalue#3 main::num#10 ultoa::value#1 } { ultoa_append::buffer#0 = ultoa::buffer#11 } { ultoa_append::value#0 = ultoa::value#2 } { ultoa_append::sub#0 = ultoa::digit_value#0 } { ultoa_append::return#0 = ultoa_append::value#2 } } main:10::printf_ulong:82::ultoa:188 [ main::src1#10 main::num#10 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ultoa::digit#2 ultoa::value#2 ultoa::buffer#11 ultoa::digit_value#0 ultoa_append::buffer#0 ] { { printf_ulong::uvalue#2 = printf_ulong::uvalue#3 main::calcend#0 ultoa::value#1 } { ultoa_append::buffer#0 = ultoa::buffer#11 } { ultoa_append::value#0 = ultoa::value#2 } { ultoa_append::sub#0 = ultoa::digit_value#0 } { ultoa_append::return#0 = ultoa_append::value#2 } } ) always clobbers reg byte a +Statement [282] ultoa_append::value#0 = ultoa::value#2 [ printf_buffer ultoa::digit#2 ultoa::buffer#11 ultoa::digit_value#0 ultoa_append::buffer#0 ultoa_append::value#0 ] ( main:10::printf_ulong:74::ultoa:188 [ main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ultoa::digit#2 ultoa::buffer#11 ultoa::digit_value#0 ultoa_append::buffer#0 ultoa_append::value#0 ] { { printf_ulong::uvalue#0 = printf_ulong::uvalue#3 main::src1#10 ultoa::value#1 } { ultoa_append::buffer#0 = ultoa::buffer#11 } { ultoa_append::value#0 = ultoa::value#2 } { ultoa_append::sub#0 = ultoa::digit_value#0 } { ultoa_append::return#0 = ultoa_append::value#2 } } main:10::printf_ulong:78::ultoa:188 [ main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ultoa::digit#2 ultoa::buffer#11 ultoa::digit_value#0 ultoa_append::buffer#0 ultoa_append::value#0 ] { { printf_ulong::uvalue#1 = printf_ulong::uvalue#3 main::num#10 ultoa::value#1 } { ultoa_append::buffer#0 = ultoa::buffer#11 } { ultoa_append::value#0 = ultoa::value#2 } { ultoa_append::sub#0 = ultoa::digit_value#0 } { ultoa_append::return#0 = ultoa_append::value#2 } } main:10::printf_ulong:82::ultoa:188 [ main::src1#10 main::num#10 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ultoa::digit#2 ultoa::buffer#11 ultoa::digit_value#0 ultoa_append::buffer#0 ultoa_append::value#0 ] { { printf_ulong::uvalue#2 = printf_ulong::uvalue#3 main::calcend#0 ultoa::value#1 } { ultoa_append::buffer#0 = ultoa::buffer#11 } { ultoa_append::value#0 = ultoa::value#2 } { ultoa_append::sub#0 = ultoa::digit_value#0 } { ultoa_append::return#0 = ultoa_append::value#2 } } ) always clobbers reg byte a +Statement [283] ultoa_append::sub#0 = ultoa::digit_value#0 [ printf_buffer ultoa::digit#2 ultoa::buffer#11 ultoa_append::buffer#0 ultoa_append::value#0 ultoa_append::sub#0 ] ( main:10::printf_ulong:74::ultoa:188 [ main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ultoa::digit#2 ultoa::buffer#11 ultoa_append::buffer#0 ultoa_append::value#0 ultoa_append::sub#0 ] { { printf_ulong::uvalue#0 = printf_ulong::uvalue#3 main::src1#10 ultoa::value#1 } { ultoa_append::buffer#0 = ultoa::buffer#11 } { ultoa_append::value#0 = ultoa::value#2 } { ultoa_append::sub#0 = ultoa::digit_value#0 } { ultoa_append::return#0 = ultoa_append::value#2 } } main:10::printf_ulong:78::ultoa:188 [ main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ultoa::digit#2 ultoa::buffer#11 ultoa_append::buffer#0 ultoa_append::value#0 ultoa_append::sub#0 ] { { printf_ulong::uvalue#1 = printf_ulong::uvalue#3 main::num#10 ultoa::value#1 } { ultoa_append::buffer#0 = ultoa::buffer#11 } { ultoa_append::value#0 = ultoa::value#2 } { ultoa_append::sub#0 = ultoa::digit_value#0 } { ultoa_append::return#0 = ultoa_append::value#2 } } main:10::printf_ulong:82::ultoa:188 [ main::src1#10 main::num#10 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ultoa::digit#2 ultoa::buffer#11 ultoa_append::buffer#0 ultoa_append::value#0 ultoa_append::sub#0 ] { { printf_ulong::uvalue#2 = printf_ulong::uvalue#3 main::calcend#0 ultoa::value#1 } { ultoa_append::buffer#0 = ultoa::buffer#11 } { ultoa_append::value#0 = ultoa::value#2 } { ultoa_append::sub#0 = ultoa::digit_value#0 } { ultoa_append::return#0 = ultoa_append::value#2 } } ) always clobbers reg byte a +Statement [285] ultoa_append::return#0 = ultoa_append::value#2 [ printf_buffer ultoa::digit#2 ultoa::buffer#11 ultoa_append::return#0 ] ( main:10::printf_ulong:74::ultoa:188 [ main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ultoa::digit#2 ultoa::buffer#11 ultoa_append::return#0 ] { { printf_ulong::uvalue#0 = printf_ulong::uvalue#3 main::src1#10 ultoa::value#1 } { ultoa_append::buffer#0 = ultoa::buffer#11 } { ultoa_append::value#0 = ultoa::value#2 } { ultoa_append::sub#0 = ultoa::digit_value#0 } { ultoa_append::return#0 = ultoa_append::value#2 } } main:10::printf_ulong:78::ultoa:188 [ main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ultoa::digit#2 ultoa::buffer#11 ultoa_append::return#0 ] { { printf_ulong::uvalue#1 = printf_ulong::uvalue#3 main::num#10 ultoa::value#1 } { ultoa_append::buffer#0 = ultoa::buffer#11 } { ultoa_append::value#0 = ultoa::value#2 } { ultoa_append::sub#0 = ultoa::digit_value#0 } { ultoa_append::return#0 = ultoa_append::value#2 } } main:10::printf_ulong:82::ultoa:188 [ main::src1#10 main::num#10 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ultoa::digit#2 ultoa::buffer#11 ultoa_append::return#0 ] { { printf_ulong::uvalue#2 = printf_ulong::uvalue#3 main::calcend#0 ultoa::value#1 } { ultoa_append::buffer#0 = ultoa::buffer#11 } { ultoa_append::value#0 = ultoa::value#2 } { ultoa_append::sub#0 = ultoa::digit_value#0 } { ultoa_append::return#0 = ultoa_append::value#2 } } ) always clobbers reg byte a +Statement [286] ultoa::value#0 = ultoa_append::return#0 [ printf_buffer ultoa::digit#2 ultoa::buffer#11 ultoa::value#0 ] ( main:10::printf_ulong:74::ultoa:188 [ main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ultoa::digit#2 ultoa::buffer#11 ultoa::value#0 ] { { printf_ulong::uvalue#0 = printf_ulong::uvalue#3 main::src1#10 ultoa::value#1 } } main:10::printf_ulong:78::ultoa:188 [ main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ultoa::digit#2 ultoa::buffer#11 ultoa::value#0 ] { { printf_ulong::uvalue#1 = printf_ulong::uvalue#3 main::num#10 ultoa::value#1 } } main:10::printf_ulong:82::ultoa:188 [ main::src1#10 main::num#10 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ultoa::digit#2 ultoa::buffer#11 ultoa::value#0 ] { { printf_ulong::uvalue#2 = printf_ulong::uvalue#3 main::calcend#0 ultoa::value#1 } } ) always clobbers reg byte a +Statement [298] *uctoa::buffer#11 = DIGITS[uctoa::value#2] [ printf_buffer uctoa::buffer#11 ] ( main:10::printf_uchar:86::uctoa:195 [ main::src1#10 main::num#10 main::bankend#0 main::beg#1 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer uctoa::buffer#11 ] { { printf_uchar::uvalue#0 = printf_uchar::uvalue#2 main::bankbeg#0 uctoa::value#1 } } main:10::printf_uchar:90::uctoa:195 [ main::src1#10 main::num#10 main::beg#1 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer uctoa::buffer#11 ] { { printf_uchar::uvalue#1 = printf_uchar::uvalue#2 main::bankend#0 uctoa::value#1 } } ) always clobbers reg byte a reg byte y +Statement [299] uctoa::buffer#3 = ++ uctoa::buffer#11 [ printf_buffer uctoa::buffer#3 ] ( main:10::printf_uchar:86::uctoa:195 [ main::src1#10 main::num#10 main::bankend#0 main::beg#1 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer uctoa::buffer#3 ] { { printf_uchar::uvalue#0 = printf_uchar::uvalue#2 main::bankbeg#0 uctoa::value#1 } } main:10::printf_uchar:90::uctoa:195 [ main::src1#10 main::num#10 main::beg#1 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer uctoa::buffer#3 ] { { printf_uchar::uvalue#1 = printf_uchar::uvalue#2 main::bankend#0 uctoa::value#1 } } ) always clobbers reg byte a +Statement [300] *uctoa::buffer#3 = 0 [ printf_buffer ] ( main:10::printf_uchar:86::uctoa:195 [ main::src1#10 main::num#10 main::bankend#0 main::beg#1 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] { { printf_uchar::uvalue#0 = printf_uchar::uvalue#2 main::bankbeg#0 uctoa::value#1 } } main:10::printf_uchar:90::uctoa:195 [ main::src1#10 main::num#10 main::beg#1 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] { { printf_uchar::uvalue#1 = printf_uchar::uvalue#2 main::bankend#0 uctoa::value#1 } } ) always clobbers reg byte a reg byte y +Statement [307] uctoa_append::buffer#0 = uctoa::buffer#11 [ printf_buffer uctoa::digit#2 uctoa::value#2 uctoa::buffer#11 uctoa::digit_value#0 uctoa_append::buffer#0 ] ( main:10::printf_uchar:86::uctoa:195 [ main::src1#10 main::num#10 main::bankend#0 main::beg#1 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer uctoa::digit#2 uctoa::value#2 uctoa::buffer#11 uctoa::digit_value#0 uctoa_append::buffer#0 ] { { printf_uchar::uvalue#0 = printf_uchar::uvalue#2 main::bankbeg#0 uctoa::value#1 } { uctoa_append::buffer#0 = uctoa::buffer#11 } { uctoa_append::value#0 = uctoa::value#2 } { uctoa_append::sub#0 = uctoa::digit_value#0 } { uctoa_append::return#0 = uctoa_append::value#2 } } main:10::printf_uchar:90::uctoa:195 [ main::src1#10 main::num#10 main::beg#1 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer uctoa::digit#2 uctoa::value#2 uctoa::buffer#11 uctoa::digit_value#0 uctoa_append::buffer#0 ] { { printf_uchar::uvalue#1 = printf_uchar::uvalue#2 main::bankend#0 uctoa::value#1 } { uctoa_append::buffer#0 = uctoa::buffer#11 } { uctoa_append::value#0 = uctoa::value#2 } { uctoa_append::sub#0 = uctoa::digit_value#0 } { uctoa_append::return#0 = uctoa_append::value#2 } } ) always clobbers reg byte a +Statement [317] utoa::$11 = (byte)utoa::value#2 [ printf_buffer utoa::buffer#11 utoa::$11 ] ( main:10::printf_uint:94::utoa:202 [ main::src1#10 main::num#10 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer utoa::buffer#11 utoa::$11 ] { { printf_uint::uvalue#0 = printf_uint::uvalue#2 main::beg#1 utoa::value#1 } } main:10::printf_uint:98::utoa:202 [ main::src1#10 main::num#10 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer utoa::buffer#11 utoa::$11 ] { { printf_uint::uvalue#1 = printf_uint::uvalue#2 main::end#1 utoa::value#1 } } ) always clobbers reg byte a +Statement [318] *utoa::buffer#11 = DIGITS[utoa::$11] [ printf_buffer utoa::buffer#11 ] ( main:10::printf_uint:94::utoa:202 [ main::src1#10 main::num#10 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer utoa::buffer#11 ] { { printf_uint::uvalue#0 = printf_uint::uvalue#2 main::beg#1 utoa::value#1 } } main:10::printf_uint:98::utoa:202 [ main::src1#10 main::num#10 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer utoa::buffer#11 ] { { printf_uint::uvalue#1 = printf_uint::uvalue#2 main::end#1 utoa::value#1 } } ) always clobbers reg byte a reg byte y +Statement [319] utoa::buffer#3 = ++ utoa::buffer#11 [ printf_buffer utoa::buffer#3 ] ( main:10::printf_uint:94::utoa:202 [ main::src1#10 main::num#10 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer utoa::buffer#3 ] { { printf_uint::uvalue#0 = printf_uint::uvalue#2 main::beg#1 utoa::value#1 } } main:10::printf_uint:98::utoa:202 [ main::src1#10 main::num#10 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer utoa::buffer#3 ] { { printf_uint::uvalue#1 = printf_uint::uvalue#2 main::end#1 utoa::value#1 } } ) always clobbers reg byte a +Statement [320] *utoa::buffer#3 = 0 [ printf_buffer ] ( main:10::printf_uint:94::utoa:202 [ main::src1#10 main::num#10 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] { { printf_uint::uvalue#0 = printf_uint::uvalue#2 main::beg#1 utoa::value#1 } } main:10::printf_uint:98::utoa:202 [ main::src1#10 main::num#10 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ] { { printf_uint::uvalue#1 = printf_uint::uvalue#2 main::end#1 utoa::value#1 } } ) always clobbers reg byte a reg byte y +Statement [322] utoa::$10 = utoa::digit#2 << 1 [ printf_buffer utoa::digit#2 utoa::value#2 utoa::started#2 utoa::buffer#11 utoa::$10 ] ( main:10::printf_uint:94::utoa:202 [ main::src1#10 main::num#10 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer utoa::digit#2 utoa::value#2 utoa::started#2 utoa::buffer#11 utoa::$10 ] { { printf_uint::uvalue#0 = printf_uint::uvalue#2 main::beg#1 utoa::value#1 } } main:10::printf_uint:98::utoa:202 [ main::src1#10 main::num#10 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer utoa::digit#2 utoa::value#2 utoa::started#2 utoa::buffer#11 utoa::$10 ] { { printf_uint::uvalue#1 = printf_uint::uvalue#2 main::end#1 utoa::value#1 } } ) always clobbers reg byte a +Statement [323] utoa::digit_value#0 = RADIX_HEXADECIMAL_VALUES[utoa::$10] [ printf_buffer utoa::digit#2 utoa::value#2 utoa::started#2 utoa::buffer#11 utoa::digit_value#0 ] ( main:10::printf_uint:94::utoa:202 [ main::src1#10 main::num#10 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer utoa::digit#2 utoa::value#2 utoa::started#2 utoa::buffer#11 utoa::digit_value#0 ] { { printf_uint::uvalue#0 = printf_uint::uvalue#2 main::beg#1 utoa::value#1 } } main:10::printf_uint:98::utoa:202 [ main::src1#10 main::num#10 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer utoa::digit#2 utoa::value#2 utoa::started#2 utoa::buffer#11 utoa::digit_value#0 ] { { printf_uint::uvalue#1 = printf_uint::uvalue#2 main::end#1 utoa::value#1 } } ) always clobbers reg byte a +Statement [325] if(utoa::value#2>=utoa::digit_value#0) goto utoa::@5 [ printf_buffer utoa::digit#2 utoa::value#2 utoa::started#2 utoa::buffer#11 utoa::digit_value#0 ] ( main:10::printf_uint:94::utoa:202 [ main::src1#10 main::num#10 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer utoa::digit#2 utoa::value#2 utoa::started#2 utoa::buffer#11 utoa::digit_value#0 ] { { printf_uint::uvalue#0 = printf_uint::uvalue#2 main::beg#1 utoa::value#1 } } main:10::printf_uint:98::utoa:202 [ main::src1#10 main::num#10 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer utoa::digit#2 utoa::value#2 utoa::started#2 utoa::buffer#11 utoa::digit_value#0 ] { { printf_uint::uvalue#1 = printf_uint::uvalue#2 main::end#1 utoa::value#1 } } ) always clobbers reg byte a +Statement [328] utoa_append::buffer#0 = utoa::buffer#11 [ printf_buffer utoa::digit#2 utoa::value#2 utoa::buffer#11 utoa::digit_value#0 utoa_append::buffer#0 ] ( main:10::printf_uint:94::utoa:202 [ main::src1#10 main::num#10 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer utoa::digit#2 utoa::value#2 utoa::buffer#11 utoa::digit_value#0 utoa_append::buffer#0 ] { { printf_uint::uvalue#0 = printf_uint::uvalue#2 main::beg#1 utoa::value#1 } { utoa_append::buffer#0 = utoa::buffer#11 } { utoa_append::value#0 = utoa::value#2 } { utoa_append::sub#0 = utoa::digit_value#0 } { utoa_append::return#0 = utoa_append::value#2 } } main:10::printf_uint:98::utoa:202 [ main::src1#10 main::num#10 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer utoa::digit#2 utoa::value#2 utoa::buffer#11 utoa::digit_value#0 utoa_append::buffer#0 ] { { printf_uint::uvalue#1 = printf_uint::uvalue#2 main::end#1 utoa::value#1 } { utoa_append::buffer#0 = utoa::buffer#11 } { utoa_append::value#0 = utoa::value#2 } { utoa_append::sub#0 = utoa::digit_value#0 } { utoa_append::return#0 = utoa_append::value#2 } } ) always clobbers reg byte a +Statement [329] utoa_append::value#0 = utoa::value#2 [ printf_buffer utoa::digit#2 utoa::buffer#11 utoa::digit_value#0 utoa_append::buffer#0 utoa_append::value#0 ] ( main:10::printf_uint:94::utoa:202 [ main::src1#10 main::num#10 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer utoa::digit#2 utoa::buffer#11 utoa::digit_value#0 utoa_append::buffer#0 utoa_append::value#0 ] { { printf_uint::uvalue#0 = printf_uint::uvalue#2 main::beg#1 utoa::value#1 } { utoa_append::buffer#0 = utoa::buffer#11 } { utoa_append::value#0 = utoa::value#2 } { utoa_append::sub#0 = utoa::digit_value#0 } { utoa_append::return#0 = utoa_append::value#2 } } main:10::printf_uint:98::utoa:202 [ main::src1#10 main::num#10 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer utoa::digit#2 utoa::buffer#11 utoa::digit_value#0 utoa_append::buffer#0 utoa_append::value#0 ] { { printf_uint::uvalue#1 = printf_uint::uvalue#2 main::end#1 utoa::value#1 } { utoa_append::buffer#0 = utoa::buffer#11 } { utoa_append::value#0 = utoa::value#2 } { utoa_append::sub#0 = utoa::digit_value#0 } { utoa_append::return#0 = utoa_append::value#2 } } ) always clobbers reg byte a +Statement [330] utoa_append::sub#0 = utoa::digit_value#0 [ printf_buffer utoa::digit#2 utoa::buffer#11 utoa_append::buffer#0 utoa_append::value#0 utoa_append::sub#0 ] ( main:10::printf_uint:94::utoa:202 [ main::src1#10 main::num#10 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer utoa::digit#2 utoa::buffer#11 utoa_append::buffer#0 utoa_append::value#0 utoa_append::sub#0 ] { { printf_uint::uvalue#0 = printf_uint::uvalue#2 main::beg#1 utoa::value#1 } { utoa_append::buffer#0 = utoa::buffer#11 } { utoa_append::value#0 = utoa::value#2 } { utoa_append::sub#0 = utoa::digit_value#0 } { utoa_append::return#0 = utoa_append::value#2 } } main:10::printf_uint:98::utoa:202 [ main::src1#10 main::num#10 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer utoa::digit#2 utoa::buffer#11 utoa_append::buffer#0 utoa_append::value#0 utoa_append::sub#0 ] { { printf_uint::uvalue#1 = printf_uint::uvalue#2 main::end#1 utoa::value#1 } { utoa_append::buffer#0 = utoa::buffer#11 } { utoa_append::value#0 = utoa::value#2 } { utoa_append::sub#0 = utoa::digit_value#0 } { utoa_append::return#0 = utoa_append::value#2 } } ) always clobbers reg byte a +Statement [332] utoa_append::return#0 = utoa_append::value#2 [ printf_buffer utoa::digit#2 utoa::buffer#11 utoa_append::return#0 ] ( main:10::printf_uint:94::utoa:202 [ main::src1#10 main::num#10 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer utoa::digit#2 utoa::buffer#11 utoa_append::return#0 ] { { printf_uint::uvalue#0 = printf_uint::uvalue#2 main::beg#1 utoa::value#1 } { utoa_append::buffer#0 = utoa::buffer#11 } { utoa_append::value#0 = utoa::value#2 } { utoa_append::sub#0 = utoa::digit_value#0 } { utoa_append::return#0 = utoa_append::value#2 } } main:10::printf_uint:98::utoa:202 [ main::src1#10 main::num#10 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer utoa::digit#2 utoa::buffer#11 utoa_append::return#0 ] { { printf_uint::uvalue#1 = printf_uint::uvalue#2 main::end#1 utoa::value#1 } { utoa_append::buffer#0 = utoa::buffer#11 } { utoa_append::value#0 = utoa::value#2 } { utoa_append::sub#0 = utoa::digit_value#0 } { utoa_append::return#0 = utoa_append::value#2 } } ) always clobbers reg byte a +Statement [333] utoa::value#0 = utoa_append::return#0 [ printf_buffer utoa::digit#2 utoa::buffer#11 utoa::value#0 ] ( main:10::printf_uint:94::utoa:202 [ main::src1#10 main::num#10 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer utoa::digit#2 utoa::buffer#11 utoa::value#0 ] { { printf_uint::uvalue#0 = printf_uint::uvalue#2 main::beg#1 utoa::value#1 } } main:10::printf_uint:98::utoa:202 [ main::src1#10 main::num#10 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer utoa::digit#2 utoa::buffer#11 utoa::value#0 ] { { printf_uint::uvalue#1 = printf_uint::uvalue#2 main::end#1 utoa::value#1 } } ) always clobbers reg byte a +Statement [335] vera_layer_set_config::addr#0 = *(vera_layer_config+vera_layer_mode_text::layer#0*SIZEOF_POINTER) [ vera_layer_set_config::addr#0 ] ( vera_layer_mode_text:13::vera_layer_mode_tile:104::vera_layer_set_config:210 [ conio_screen_width conio_screen_height conio_x16_init::line#0 vera_layer_set_config::addr#0 ] { } conio_x16_init:8::vera_layer_mode_text:13::vera_layer_mode_tile:104::vera_layer_set_config:210 [ printf_buffer conio_screen_width conio_screen_height conio_x16_init::line#0 vera_layer_set_config::addr#0 ] { } ) always clobbers reg byte a +Statement [336] *vera_layer_set_config::addr#0 = vera_layer_mode_tile::config#10 [ ] ( vera_layer_mode_text:13::vera_layer_mode_tile:104::vera_layer_set_config:210 [ conio_screen_width conio_screen_height conio_x16_init::line#0 ] { } conio_x16_init:8::vera_layer_mode_text:13::vera_layer_mode_tile:104::vera_layer_set_config:210 [ printf_buffer conio_screen_width conio_screen_height conio_x16_init::line#0 ] { } ) always clobbers reg byte a reg byte y +Statement [338] vera_layer_set_tilebase::addr#0 = *(vera_layer_tilebase+vera_layer_mode_text::layer#0*SIZEOF_POINTER) [ vera_layer_set_tilebase::addr#0 ] ( vera_layer_mode_text:13::vera_layer_mode_tile:104::vera_layer_set_tilebase:219 [ conio_screen_width conio_screen_height conio_x16_init::line#0 vera_layer_set_tilebase::addr#0 ] { } conio_x16_init:8::vera_layer_mode_text:13::vera_layer_mode_tile:104::vera_layer_set_tilebase:219 [ printf_buffer conio_screen_width conio_screen_height conio_x16_init::line#0 vera_layer_set_tilebase::addr#0 ] { } ) always clobbers reg byte a +Statement [339] *vera_layer_set_tilebase::addr#0 = >=ultoa_append::sub#0) goto ultoa_append::@2 [ ultoa_append::buffer#0 ultoa_append::sub#0 ultoa_append::value#2 ultoa_append::digit#2 ] ( main:10::printf_ulong:74::ultoa:188::ultoa_append:284 [ main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ultoa::digit#2 ultoa::buffer#11 ultoa_append::buffer#0 ultoa_append::sub#0 ultoa_append::value#2 ultoa_append::digit#2 ] { { printf_ulong::uvalue#0 = printf_ulong::uvalue#3 main::src1#10 ultoa::value#1 } { ultoa_append::buffer#0 = ultoa::buffer#11 } { ultoa_append::value#0 = ultoa::value#2 } { ultoa_append::sub#0 = ultoa::digit_value#0 } { ultoa_append::return#0 = ultoa_append::value#2 } } main:10::printf_ulong:78::ultoa:188::ultoa_append:284 [ main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ultoa::digit#2 ultoa::buffer#11 ultoa_append::buffer#0 ultoa_append::sub#0 ultoa_append::value#2 ultoa_append::digit#2 ] { { printf_ulong::uvalue#1 = printf_ulong::uvalue#3 main::num#10 ultoa::value#1 } { ultoa_append::buffer#0 = ultoa::buffer#11 } { ultoa_append::value#0 = ultoa::value#2 } { ultoa_append::sub#0 = ultoa::digit_value#0 } { ultoa_append::return#0 = ultoa_append::value#2 } } main:10::printf_ulong:82::ultoa:188::ultoa_append:284 [ main::src1#10 main::num#10 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ultoa::digit#2 ultoa::buffer#11 ultoa_append::buffer#0 ultoa_append::sub#0 ultoa_append::value#2 ultoa_append::digit#2 ] { { printf_ulong::uvalue#2 = printf_ulong::uvalue#3 main::calcend#0 ultoa::value#1 } { ultoa_append::buffer#0 = ultoa::buffer#11 } { ultoa_append::value#0 = ultoa::value#2 } { ultoa_append::sub#0 = ultoa::digit_value#0 } { ultoa_append::return#0 = ultoa_append::value#2 } } ) always clobbers reg byte a +Statement [363] *ultoa_append::buffer#0 = DIGITS[ultoa_append::digit#2] [ ultoa_append::value#2 ] ( main:10::printf_ulong:74::ultoa:188::ultoa_append:284 [ main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ultoa::digit#2 ultoa::buffer#11 ultoa_append::value#2 ] { { printf_ulong::uvalue#0 = printf_ulong::uvalue#3 main::src1#10 ultoa::value#1 } { ultoa_append::buffer#0 = ultoa::buffer#11 } { ultoa_append::value#0 = ultoa::value#2 } { ultoa_append::sub#0 = ultoa::digit_value#0 } { ultoa_append::return#0 = ultoa_append::value#2 } } main:10::printf_ulong:78::ultoa:188::ultoa_append:284 [ main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ultoa::digit#2 ultoa::buffer#11 ultoa_append::value#2 ] { { printf_ulong::uvalue#1 = printf_ulong::uvalue#3 main::num#10 ultoa::value#1 } { ultoa_append::buffer#0 = ultoa::buffer#11 } { ultoa_append::value#0 = ultoa::value#2 } { ultoa_append::sub#0 = ultoa::digit_value#0 } { ultoa_append::return#0 = ultoa_append::value#2 } } main:10::printf_ulong:82::ultoa:188::ultoa_append:284 [ main::src1#10 main::num#10 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ultoa::digit#2 ultoa::buffer#11 ultoa_append::value#2 ] { { printf_ulong::uvalue#2 = printf_ulong::uvalue#3 main::calcend#0 ultoa::value#1 } { ultoa_append::buffer#0 = ultoa::buffer#11 } { ultoa_append::value#0 = ultoa::value#2 } { ultoa_append::sub#0 = ultoa::digit_value#0 } { ultoa_append::return#0 = ultoa_append::value#2 } } ) always clobbers reg byte a reg byte y +Statement [366] ultoa_append::value#1 = ultoa_append::value#2 - ultoa_append::sub#0 [ ultoa_append::buffer#0 ultoa_append::sub#0 ultoa_append::value#1 ultoa_append::digit#1 ] ( main:10::printf_ulong:74::ultoa:188::ultoa_append:284 [ main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ultoa::digit#2 ultoa::buffer#11 ultoa_append::buffer#0 ultoa_append::sub#0 ultoa_append::value#1 ultoa_append::digit#1 ] { { printf_ulong::uvalue#0 = printf_ulong::uvalue#3 main::src1#10 ultoa::value#1 } { ultoa_append::buffer#0 = ultoa::buffer#11 } { ultoa_append::value#0 = ultoa::value#2 } { ultoa_append::sub#0 = ultoa::digit_value#0 } { ultoa_append::return#0 = ultoa_append::value#2 } } main:10::printf_ulong:78::ultoa:188::ultoa_append:284 [ main::src1#10 main::num#10 main::calcend#0 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ultoa::digit#2 ultoa::buffer#11 ultoa_append::buffer#0 ultoa_append::sub#0 ultoa_append::value#1 ultoa_append::digit#1 ] { { printf_ulong::uvalue#1 = printf_ulong::uvalue#3 main::num#10 ultoa::value#1 } { ultoa_append::buffer#0 = ultoa::buffer#11 } { ultoa_append::value#0 = ultoa::value#2 } { ultoa_append::sub#0 = ultoa::digit_value#0 } { ultoa_append::return#0 = ultoa_append::value#2 } } main:10::printf_ulong:82::ultoa:188::ultoa_append:284 [ main::src1#10 main::num#10 main::bankbeg#0 main::bankend#0 main::beg#1 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer ultoa::digit#2 ultoa::buffer#11 ultoa_append::buffer#0 ultoa_append::sub#0 ultoa_append::value#1 ultoa_append::digit#1 ] { { printf_ulong::uvalue#2 = printf_ulong::uvalue#3 main::calcend#0 ultoa::value#1 } { ultoa_append::buffer#0 = ultoa::buffer#11 } { ultoa_append::value#0 = ultoa::value#2 } { ultoa_append::sub#0 = ultoa::digit_value#0 } { ultoa_append::return#0 = ultoa_append::value#2 } } ) always clobbers reg byte a +Statement [370] *uctoa_append::buffer#0 = DIGITS[uctoa_append::digit#2] [ uctoa_append::value#2 ] ( main:10::printf_uchar:86::uctoa:195::uctoa_append:310 [ main::src1#10 main::num#10 main::bankend#0 main::beg#1 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer uctoa::digit#2 uctoa::buffer#11 uctoa_append::value#2 ] { { printf_uchar::uvalue#0 = printf_uchar::uvalue#2 main::bankbeg#0 uctoa::value#1 } { uctoa_append::buffer#0 = uctoa::buffer#11 } { uctoa_append::value#0 = uctoa::value#2 } { uctoa_append::sub#0 = uctoa::digit_value#0 } { uctoa_append::return#0 = uctoa_append::value#2 } } main:10::printf_uchar:90::uctoa:195::uctoa_append:310 [ main::src1#10 main::num#10 main::beg#1 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer uctoa::digit#2 uctoa::buffer#11 uctoa_append::value#2 ] { { printf_uchar::uvalue#1 = printf_uchar::uvalue#2 main::bankend#0 uctoa::value#1 } { uctoa_append::buffer#0 = uctoa::buffer#11 } { uctoa_append::value#0 = uctoa::value#2 } { uctoa_append::sub#0 = uctoa::digit_value#0 } { uctoa_append::return#0 = uctoa_append::value#2 } } ) always clobbers reg byte a reg byte y +Statement [373] uctoa_append::value#1 = uctoa_append::value#2 - uctoa_append::sub#0 [ uctoa_append::buffer#0 uctoa_append::sub#0 uctoa_append::value#1 uctoa_append::digit#1 ] ( main:10::printf_uchar:86::uctoa:195::uctoa_append:310 [ main::src1#10 main::num#10 main::bankend#0 main::beg#1 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer uctoa::digit#2 uctoa::buffer#11 uctoa_append::buffer#0 uctoa_append::sub#0 uctoa_append::value#1 uctoa_append::digit#1 ] { { printf_uchar::uvalue#0 = printf_uchar::uvalue#2 main::bankbeg#0 uctoa::value#1 } { uctoa_append::buffer#0 = uctoa::buffer#11 } { uctoa_append::value#0 = uctoa::value#2 } { uctoa_append::sub#0 = uctoa::digit_value#0 } { uctoa_append::return#0 = uctoa_append::value#2 } } main:10::printf_uchar:90::uctoa:195::uctoa_append:310 [ main::src1#10 main::num#10 main::beg#1 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer uctoa::digit#2 uctoa::buffer#11 uctoa_append::buffer#0 uctoa_append::sub#0 uctoa_append::value#1 uctoa_append::digit#1 ] { { printf_uchar::uvalue#1 = printf_uchar::uvalue#2 main::bankend#0 uctoa::value#1 } { uctoa_append::buffer#0 = uctoa::buffer#11 } { uctoa_append::value#0 = uctoa::value#2 } { uctoa_append::sub#0 = uctoa::digit_value#0 } { uctoa_append::return#0 = uctoa_append::value#2 } } ) always clobbers reg byte a +Statement [376] if(utoa_append::value#2>=utoa_append::sub#0) goto utoa_append::@2 [ utoa_append::buffer#0 utoa_append::sub#0 utoa_append::value#2 utoa_append::digit#2 ] ( main:10::printf_uint:94::utoa:202::utoa_append:331 [ main::src1#10 main::num#10 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer utoa::digit#2 utoa::buffer#11 utoa_append::buffer#0 utoa_append::sub#0 utoa_append::value#2 utoa_append::digit#2 ] { { printf_uint::uvalue#0 = printf_uint::uvalue#2 main::beg#1 utoa::value#1 } { utoa_append::buffer#0 = utoa::buffer#11 } { utoa_append::value#0 = utoa::value#2 } { utoa_append::sub#0 = utoa::digit_value#0 } { utoa_append::return#0 = utoa_append::value#2 } } main:10::printf_uint:98::utoa:202::utoa_append:331 [ main::src1#10 main::num#10 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer utoa::digit#2 utoa::buffer#11 utoa_append::buffer#0 utoa_append::sub#0 utoa_append::value#2 utoa_append::digit#2 ] { { printf_uint::uvalue#1 = printf_uint::uvalue#2 main::end#1 utoa::value#1 } { utoa_append::buffer#0 = utoa::buffer#11 } { utoa_append::value#0 = utoa::value#2 } { utoa_append::sub#0 = utoa::digit_value#0 } { utoa_append::return#0 = utoa_append::value#2 } } ) always clobbers reg byte a +Statement [377] *utoa_append::buffer#0 = DIGITS[utoa_append::digit#2] [ utoa_append::value#2 ] ( main:10::printf_uint:94::utoa:202::utoa_append:331 [ main::src1#10 main::num#10 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer utoa::digit#2 utoa::buffer#11 utoa_append::value#2 ] { { printf_uint::uvalue#0 = printf_uint::uvalue#2 main::beg#1 utoa::value#1 } { utoa_append::buffer#0 = utoa::buffer#11 } { utoa_append::value#0 = utoa::value#2 } { utoa_append::sub#0 = utoa::digit_value#0 } { utoa_append::return#0 = utoa_append::value#2 } } main:10::printf_uint:98::utoa:202::utoa_append:331 [ main::src1#10 main::num#10 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer utoa::digit#2 utoa::buffer#11 utoa_append::value#2 ] { { printf_uint::uvalue#1 = printf_uint::uvalue#2 main::end#1 utoa::value#1 } { utoa_append::buffer#0 = utoa::buffer#11 } { utoa_append::value#0 = utoa::value#2 } { utoa_append::sub#0 = utoa::digit_value#0 } { utoa_append::return#0 = utoa_append::value#2 } } ) always clobbers reg byte a reg byte y +Statement [380] utoa_append::value#1 = utoa_append::value#2 - utoa_append::sub#0 [ utoa_append::buffer#0 utoa_append::sub#0 utoa_append::value#1 utoa_append::digit#1 ] ( main:10::printf_uint:94::utoa:202::utoa_append:331 [ main::src1#10 main::num#10 main::end#1 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer utoa::digit#2 utoa::buffer#11 utoa_append::buffer#0 utoa_append::sub#0 utoa_append::value#1 utoa_append::digit#1 ] { { printf_uint::uvalue#0 = printf_uint::uvalue#2 main::beg#1 utoa::value#1 } { utoa_append::buffer#0 = utoa::buffer#11 } { utoa_append::value#0 = utoa::value#2 } { utoa_append::sub#0 = utoa::digit_value#0 } { utoa_append::return#0 = utoa_append::value#2 } } main:10::printf_uint:98::utoa:202::utoa_append:331 [ main::src1#10 main::num#10 conio_screen_width conio_screen_height conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#10 CONIO_SCREEN_TEXT#101 printf_buffer utoa::digit#2 utoa::buffer#11 utoa_append::buffer#0 utoa_append::sub#0 utoa_append::value#1 utoa_append::digit#1 ] { { printf_uint::uvalue#1 = printf_uint::uvalue#2 main::end#1 utoa::value#1 } { utoa_append::buffer#0 = utoa::buffer#11 } { utoa_append::value#0 = utoa::value#2 } { utoa_append::sub#0 = utoa::digit_value#0 } { utoa_append::return#0 = utoa_append::value#2 } } ) always clobbers reg byte a +Statement [381] if(conio_cursor_y[conio_screen_layer]0 + sta.z conio_width+1 + // [5] conio_height = 0 -- vwuz1=vwuc1 + lda #<0 + sta.z conio_height + lda #>0 + sta.z conio_height+1 + // [6] conio_rowshift = 0 -- vbuz1=vbuc1 + lda #0 + sta.z conio_rowshift + // [7] conio_rowskip = 0 -- vwuz1=vwuc1 + lda #<0 + sta.z conio_rowskip + lda #>0 + sta.z conio_rowskip+1 + // [8] call conio_x16_init + jsr conio_x16_init + // [9] phi from __start::__init1 to __start::@1 [phi:__start::__init1->__start::@1] + __b1_from___init1: + jmp __b1 + // __start::@1 + __b1: + // [10] call main + // [32] phi from __start::@1 to main [phi:__start::@1->main] + main_from___b1: + jsr main + jmp __breturn + // __start::@return + __breturn: + // [11] return + rts +} + // conio_x16_init +// Set initial cursor position +conio_x16_init: { + // Position cursor at current line + .label BASIC_CURSOR_LINE = $d6 + .label line = 2 + // [12] conio_x16_init::line#0 = *conio_x16_init::BASIC_CURSOR_LINE -- vbuz1=_deref_pbuc1 + lda BASIC_CURSOR_LINE + sta.z line + // [13] call vera_layer_mode_text + // [103] phi from conio_x16_init to vera_layer_mode_text [phi:conio_x16_init->vera_layer_mode_text] + vera_layer_mode_text_from_conio_x16_init: + jsr vera_layer_mode_text + // [14] phi from conio_x16_init to conio_x16_init::@3 [phi:conio_x16_init->conio_x16_init::@3] + __b3_from_conio_x16_init: + jmp __b3 + // conio_x16_init::@3 + __b3: + // [15] call screensize + jsr screensize + // [16] phi from conio_x16_init::@3 to conio_x16_init::@4 [phi:conio_x16_init::@3->conio_x16_init::@4] + __b4_from___b3: + jmp __b4 + // conio_x16_init::@4 + __b4: + // [17] call screenlayer + jsr screenlayer + // [18] phi from conio_x16_init::@4 to conio_x16_init::@5 [phi:conio_x16_init::@4->conio_x16_init::@5] + __b5_from___b4: + jmp __b5 + // conio_x16_init::@5 + __b5: + // [19] call vera_layer_set_textcolor + jsr vera_layer_set_textcolor + // [20] phi from conio_x16_init::@5 to conio_x16_init::@6 [phi:conio_x16_init::@5->conio_x16_init::@6] + __b6_from___b5: + jmp __b6 + // conio_x16_init::@6 + __b6: + // [21] call vera_layer_set_backcolor + jsr vera_layer_set_backcolor + // [22] phi from conio_x16_init::@6 to conio_x16_init::@7 [phi:conio_x16_init::@6->conio_x16_init::@7] + __b7_from___b6: + jmp __b7 + // conio_x16_init::@7 + __b7: + // [23] call vera_layer_set_mapbase + // [159] phi from conio_x16_init::@7 to vera_layer_set_mapbase [phi:conio_x16_init::@7->vera_layer_set_mapbase] + vera_layer_set_mapbase_from___b7: + // [159] phi vera_layer_set_mapbase::mapbase#3 = $20 [phi:conio_x16_init::@7->vera_layer_set_mapbase#0] -- vbuxx=vbuc1 + ldx #$20 + // [159] phi vera_layer_set_mapbase::layer#3 = 0 [phi:conio_x16_init::@7->vera_layer_set_mapbase#1] -- vbuaa=vbuc1 + lda #0 + jsr vera_layer_set_mapbase + // [24] phi from conio_x16_init::@7 to conio_x16_init::@8 [phi:conio_x16_init::@7->conio_x16_init::@8] + __b8_from___b7: + jmp __b8 + // conio_x16_init::@8 + __b8: + // [25] call vera_layer_set_mapbase + // [159] phi from conio_x16_init::@8 to vera_layer_set_mapbase [phi:conio_x16_init::@8->vera_layer_set_mapbase] + vera_layer_set_mapbase_from___b8: + // [159] phi vera_layer_set_mapbase::mapbase#3 = 0 [phi:conio_x16_init::@8->vera_layer_set_mapbase#0] -- vbuxx=vbuc1 + ldx #0 + // [159] phi vera_layer_set_mapbase::layer#3 = 1 [phi:conio_x16_init::@8->vera_layer_set_mapbase#1] -- vbuaa=vbuc1 + lda #1 + jsr vera_layer_set_mapbase + jmp __b9 + // conio_x16_init::@9 + __b9: + // [26] if(conio_x16_init::line#0conio_x16_init::@1] + __b1_from___b2: + __b1_from___b9: + // [28] phi conio_x16_init::line#3 = conio_x16_init::line#1 [phi:conio_x16_init::@2/conio_x16_init::@9->conio_x16_init::@1#0] -- register_copy + jmp __b1 + // conio_x16_init::@1 + __b1: + // [29] gotoxy::y#0 = conio_x16_init::line#3 -- vbuxx=vbuz1 + ldx.z line + // [30] call gotoxy + // [164] phi from conio_x16_init::@1 to gotoxy [phi:conio_x16_init::@1->gotoxy] + gotoxy_from___b1: + // [164] phi gotoxy::y#3 = gotoxy::y#0 [phi:conio_x16_init::@1->gotoxy#0] -- register_copy + jsr gotoxy + jmp __breturn + // conio_x16_init::@return + __breturn: + // [31] return + rts +} + // main +// Functions for performing input and output. +main: { + .const borderbeg = $a000 + .const inc = $123 + .label __1 = $1c + .label __3 = $20 + .label __4 = $20 + .label __6 = $22 + .label __8 = $24 + .label __9 = $24 + .label __10 = $26 + .label __11 = $26 + .label __13 = $24 + .label __14 = $2b + .label __15 = $2b + .label __17 = $2d + .label __19 = $2f + .label __20 = $2f + .label __21 = $31 + .label __22 = $31 + .label __24 = $2f + .label __25 = $f + .label __27 = $36 + .label __30 = $24 + .label __31 = $28 + .label __32 = $2f + .label __33 = $33 + .label calcend = $1c + .label bankbeg = $2a + .label bankend = $35 + .label beg = $f + .label end = $36 + .label num = 7 + .label src1 = 3 + // [33] phi from main to main::@1 [phi:main->main::@1] + __b1_from_main: + // [33] phi main::num#10 = (dword)$40*$40*2 [phi:main->main::@1#0] -- vduz1=vduc1 + lda #<$40*$40*2 + sta.z num + lda #>$40*$40*2 + sta.z num+1 + lda #<$40*$40*2>>$10 + sta.z num+2 + lda #>$40*$40*2>>$10 + sta.z num+3 + // [33] phi main::src1#10 = 0 [phi:main->main::@1#1] -- vduz1=vduc1 + lda #<0 + sta.z src1 + lda #>0 + sta.z src1+1 + lda #<0>>$10 + sta.z src1+2 + lda #>0>>$10 + sta.z src1+3 + jmp __b1 + // main::@1 + __b1: + // [34] if(main::src1#10<$3f000) goto main::@2 -- vduz1_lt_vduc1_then_la1 + lda.z src1+3 + cmp #>$3f000>>$10 + bcc __b2 + bne !+ + lda.z src1+2 + cmp #<$3f000>>$10 + bcc __b2 + bne !+ + lda.z src1+1 + cmp #>$3f000 + bcc __b2 + bne !+ + lda.z src1 + cmp #<$3f000 + bcc __b2 + !: + jmp __breturn + // main::@return + __breturn: + // [35] return + rts + // main::@2 + __b2: + // [36] main::$1 = main::src1#10 + main::num#10 -- vduz1=vduz2_plus_vduz3 + lda.z src1 + clc + adc.z num + sta.z __1 + lda.z src1+1 + adc.z num+1 + sta.z __1+1 + lda.z src1+2 + adc.z num+2 + sta.z __1+2 + lda.z src1+3 + adc.z num+3 + sta.z __1+3 + // [37] main::calcend#0 = main::$1 + -1 -- vduz1=vduz1_plus_vbuc1 + lda.z calcend + clc + adc #-1 + sta.z calcend + bcc !+ + inc.z calcend+1 + bne !+ + inc.z calcend+2 + bne !+ + inc.z calcend+3 + !: + // [38] main::$3 = > main::src1#10 -- vwuz1=_hi_vduz2 + lda.z src1+2 + sta.z __3 + lda.z src1+3 + sta.z __3+1 + // [39] main::$4 = main::$3 << 8 -- vwuz1=vwuz1_rol_8 + lda.z __4 + sta.z __4+1 + lda #0 + sta.z __4 + // [40] main::$5 = < main::$4 -- vbuyy=_lo_vwuz1 + ldy.z __4 + // [41] main::$6 = < main::src1#10 -- vwuz1=_lo_vduz2 + lda.z src1 + sta.z __6 + lda.z src1+1 + sta.z __6+1 + // [42] main::$7 = > main::$6 -- vbuxx=_hi_vwuz1 + ldx.z __6+1 + // [43] main::$30 = (word)main::$5 -- vwuz1=_word_vbuyy + tya + sta.z __30 + lda #0 + sta.z __30+1 + // [44] main::$8 = main::$30 | main::$7 -- vwuz1=vwuz1_bor_vbuxx + txa + ora.z __8 + sta.z __8 + // [45] main::$9 = main::$8 >> 5 -- vwuz1=vwuz1_ror_5 + lsr.z __9+1 + ror.z __9 + lsr.z __9+1 + ror.z __9 + lsr.z __9+1 + ror.z __9 + lsr.z __9+1 + ror.z __9 + lsr.z __9+1 + ror.z __9 + // [46] main::$10 = > main::src1#10 -- vwuz1=_hi_vduz2 + lda.z src1+2 + sta.z __10 + lda.z src1+3 + sta.z __10+1 + // [47] main::$11 = main::$10 << 3 -- vwuz1=vwuz1_rol_3 + asl.z __11 + rol.z __11+1 + asl.z __11 + rol.z __11+1 + asl.z __11 + rol.z __11+1 + // [48] main::$12 = < main::$11 -- vbuaa=_lo_vwuz1 + lda.z __11 + // [49] main::$31 = (word)main::$12 -- vwuz1=_word_vbuaa + sta.z __31 + lda #0 + sta.z __31+1 + // [50] main::$13 = main::$9 + main::$31 -- vwuz1=vwuz1_plus_vwuz2 + lda.z __13 + clc + adc.z __31 + sta.z __13 + lda.z __13+1 + adc.z __31+1 + sta.z __13+1 + // [51] main::bankbeg#0 = (byte)main::$13 -- vbuz1=_byte_vwuz2 + lda.z __13 + sta.z bankbeg + // [52] main::$14 = > main::calcend#0 -- vwuz1=_hi_vduz2 + lda.z calcend+2 + sta.z __14 + lda.z calcend+3 + sta.z __14+1 + // [53] main::$15 = main::$14 << 8 -- vwuz1=vwuz1_rol_8 + lda.z __15 + sta.z __15+1 + lda #0 + sta.z __15 + // [54] main::$16 = < main::$15 -- vbuyy=_lo_vwuz1 + ldy.z __15 + // [55] main::$17 = < main::calcend#0 -- vwuz1=_lo_vduz2 + lda.z calcend + sta.z __17 + lda.z calcend+1 + sta.z __17+1 + // [56] main::$18 = > main::$17 -- vbuxx=_hi_vwuz1 + ldx.z __17+1 + // [57] main::$32 = (word)main::$16 -- vwuz1=_word_vbuyy + tya + sta.z __32 + lda #0 + sta.z __32+1 + // [58] main::$19 = main::$32 | main::$18 -- vwuz1=vwuz1_bor_vbuxx + txa + ora.z __19 + sta.z __19 + // [59] main::$20 = main::$19 >> 5 -- vwuz1=vwuz1_ror_5 + lsr.z __20+1 + ror.z __20 + lsr.z __20+1 + ror.z __20 + lsr.z __20+1 + ror.z __20 + lsr.z __20+1 + ror.z __20 + lsr.z __20+1 + ror.z __20 + // [60] main::$21 = > main::calcend#0 -- vwuz1=_hi_vduz2 + lda.z calcend+2 + sta.z __21 + lda.z calcend+3 + sta.z __21+1 + // [61] main::$22 = main::$21 << 3 -- vwuz1=vwuz1_rol_3 + asl.z __22 + rol.z __22+1 + asl.z __22 + rol.z __22+1 + asl.z __22 + rol.z __22+1 + // [62] main::$23 = < main::$22 -- vbuaa=_lo_vwuz1 + lda.z __22 + // [63] main::$33 = (word)main::$23 -- vwuz1=_word_vbuaa + sta.z __33 + lda #0 + sta.z __33+1 + // [64] main::$24 = main::$20 + main::$33 -- vwuz1=vwuz1_plus_vwuz2 + lda.z __24 + clc + adc.z __33 + sta.z __24 + lda.z __24+1 + adc.z __33+1 + sta.z __24+1 + // [65] main::bankend#0 = (byte)main::$24 -- vbuz1=_byte_vwuz2 + lda.z __24 + sta.z bankend + // [66] main::$25 = < main::src1#10 -- vwuz1=_lo_vduz2 + lda.z src1 + sta.z __25 + lda.z src1+1 + sta.z __25+1 + // [67] main::beg#0 = main::$25 & $1fff -- vwuz1=vwuz1_band_vwuc1 + lda.z beg + and #<$1fff + sta.z beg + lda.z beg+1 + and #>$1fff + sta.z beg+1 + // [68] main::$27 = < main::calcend#0 -- vwuz1=_lo_vduz2 + lda.z calcend + sta.z __27 + lda.z calcend+1 + sta.z __27+1 + // [69] main::end#0 = main::$27 & $1fff -- vwuz1=vwuz1_band_vwuc1 + lda.z end + and #<$1fff + sta.z end + lda.z end+1 + and #>$1fff + sta.z end+1 + // [70] main::beg#1 = main::beg#0 + main::borderbeg -- vwuz1=vwuz1_plus_vwuc1 + // same for the end; + clc + lda.z beg + adc #borderbeg + sta.z beg+1 + // [71] main::end#1 = main::end#0 + main::borderbeg -- vwuz1=vwuz1_plus_vwuc1 + clc + lda.z end + adc #borderbeg + sta.z end+1 + // [72] call cputs + // [177] phi from main::@2 to cputs [phi:main::@2->cputs] + cputs_from___b2: + // [177] phi cputs::s#11 = main::s [phi:main::@2->cputs#0] -- pbuz1=pbuc1 + lda #s + sta.z cputs.s+1 + jsr cputs + jmp __b3 + // main::@3 + __b3: + // [73] printf_ulong::uvalue#0 = main::src1#10 -- vduz1=vduz2 + lda.z src1 + sta.z printf_ulong.uvalue + lda.z src1+1 + sta.z printf_ulong.uvalue+1 + lda.z src1+2 + sta.z printf_ulong.uvalue+2 + lda.z src1+3 + sta.z printf_ulong.uvalue+3 + // [74] call printf_ulong + // [185] phi from main::@3 to printf_ulong [phi:main::@3->printf_ulong] + printf_ulong_from___b3: + // [185] phi printf_ulong::uvalue#3 = printf_ulong::uvalue#0 [phi:main::@3->printf_ulong#0] -- register_copy + jsr printf_ulong + // [75] phi from main::@3 to main::@4 [phi:main::@3->main::@4] + __b4_from___b3: + jmp __b4 + // main::@4 + __b4: + // [76] call cputs + // [177] phi from main::@4 to cputs [phi:main::@4->cputs] + cputs_from___b4: + // [177] phi cputs::s#11 = main::s1 [phi:main::@4->cputs#0] -- pbuz1=pbuc1 + lda #s1 + sta.z cputs.s+1 + jsr cputs + jmp __b5 + // main::@5 + __b5: + // [77] printf_ulong::uvalue#1 = main::num#10 -- vduz1=vduz2 + lda.z num + sta.z printf_ulong.uvalue + lda.z num+1 + sta.z printf_ulong.uvalue+1 + lda.z num+2 + sta.z printf_ulong.uvalue+2 + lda.z num+3 + sta.z printf_ulong.uvalue+3 + // [78] call printf_ulong + // [185] phi from main::@5 to printf_ulong [phi:main::@5->printf_ulong] + printf_ulong_from___b5: + // [185] phi printf_ulong::uvalue#3 = printf_ulong::uvalue#1 [phi:main::@5->printf_ulong#0] -- register_copy + jsr printf_ulong + // [79] phi from main::@5 to main::@6 [phi:main::@5->main::@6] + __b6_from___b5: + jmp __b6 + // main::@6 + __b6: + // [80] call cputs + // [177] phi from main::@6 to cputs [phi:main::@6->cputs] + cputs_from___b6: + // [177] phi cputs::s#11 = main::s2 [phi:main::@6->cputs#0] -- pbuz1=pbuc1 + lda #s2 + sta.z cputs.s+1 + jsr cputs + jmp __b7 + // main::@7 + __b7: + // [81] printf_ulong::uvalue#2 = main::calcend#0 -- vduz1=vduz2 + lda.z calcend + sta.z printf_ulong.uvalue + lda.z calcend+1 + sta.z printf_ulong.uvalue+1 + lda.z calcend+2 + sta.z printf_ulong.uvalue+2 + lda.z calcend+3 + sta.z printf_ulong.uvalue+3 + // [82] call printf_ulong + // [185] phi from main::@7 to printf_ulong [phi:main::@7->printf_ulong] + printf_ulong_from___b7: + // [185] phi printf_ulong::uvalue#3 = printf_ulong::uvalue#2 [phi:main::@7->printf_ulong#0] -- register_copy + jsr printf_ulong + // [83] phi from main::@7 to main::@8 [phi:main::@7->main::@8] + __b8_from___b7: + jmp __b8 + // main::@8 + __b8: + // [84] call cputs + // [177] phi from main::@8 to cputs [phi:main::@8->cputs] + cputs_from___b8: + // [177] phi cputs::s#11 = main::s3 [phi:main::@8->cputs#0] -- pbuz1=pbuc1 + lda #s3 + sta.z cputs.s+1 + jsr cputs + jmp __b9 + // main::@9 + __b9: + // [85] printf_uchar::uvalue#0 = main::bankbeg#0 -- vbuxx=vbuz1 + ldx.z bankbeg + // [86] call printf_uchar + // [192] phi from main::@9 to printf_uchar [phi:main::@9->printf_uchar] + printf_uchar_from___b9: + // [192] phi printf_uchar::uvalue#2 = printf_uchar::uvalue#0 [phi:main::@9->printf_uchar#0] -- register_copy + jsr printf_uchar + // [87] phi from main::@9 to main::@10 [phi:main::@9->main::@10] + __b10_from___b9: + jmp __b10 + // main::@10 + __b10: + // [88] call cputs + // [177] phi from main::@10 to cputs [phi:main::@10->cputs] + cputs_from___b10: + // [177] phi cputs::s#11 = main::s4 [phi:main::@10->cputs#0] -- pbuz1=pbuc1 + lda #s4 + sta.z cputs.s+1 + jsr cputs + jmp __b11 + // main::@11 + __b11: + // [89] printf_uchar::uvalue#1 = main::bankend#0 -- vbuxx=vbuz1 + ldx.z bankend + // [90] call printf_uchar + // [192] phi from main::@11 to printf_uchar [phi:main::@11->printf_uchar] + printf_uchar_from___b11: + // [192] phi printf_uchar::uvalue#2 = printf_uchar::uvalue#1 [phi:main::@11->printf_uchar#0] -- register_copy + jsr printf_uchar + // [91] phi from main::@11 to main::@12 [phi:main::@11->main::@12] + __b12_from___b11: + jmp __b12 + // main::@12 + __b12: + // [92] call cputs + // [177] phi from main::@12 to cputs [phi:main::@12->cputs] + cputs_from___b12: + // [177] phi cputs::s#11 = main::s5 [phi:main::@12->cputs#0] -- pbuz1=pbuc1 + lda #s5 + sta.z cputs.s+1 + jsr cputs + jmp __b13 + // main::@13 + __b13: + // [93] printf_uint::uvalue#0 = main::beg#1 + // [94] call printf_uint + // [199] phi from main::@13 to printf_uint [phi:main::@13->printf_uint] + printf_uint_from___b13: + // [199] phi printf_uint::uvalue#2 = printf_uint::uvalue#0 [phi:main::@13->printf_uint#0] -- register_copy + jsr printf_uint + // [95] phi from main::@13 to main::@14 [phi:main::@13->main::@14] + __b14_from___b13: + jmp __b14 + // main::@14 + __b14: + // [96] call cputs + // [177] phi from main::@14 to cputs [phi:main::@14->cputs] + cputs_from___b14: + // [177] phi cputs::s#11 = main::s6 [phi:main::@14->cputs#0] -- pbuz1=pbuc1 + lda #s6 + sta.z cputs.s+1 + jsr cputs + jmp __b15 + // main::@15 + __b15: + // [97] printf_uint::uvalue#1 = main::end#1 -- vwuz1=vwuz2 + lda.z end + sta.z printf_uint.uvalue + lda.z end+1 + sta.z printf_uint.uvalue+1 + // [98] call printf_uint + // [199] phi from main::@15 to printf_uint [phi:main::@15->printf_uint] + printf_uint_from___b15: + // [199] phi printf_uint::uvalue#2 = printf_uint::uvalue#1 [phi:main::@15->printf_uint#0] -- register_copy + jsr printf_uint + // [99] phi from main::@15 to main::@16 [phi:main::@15->main::@16] + __b16_from___b15: + jmp __b16 + // main::@16 + __b16: + // [100] call cputs + // [177] phi from main::@16 to cputs [phi:main::@16->cputs] + cputs_from___b16: + // [177] phi cputs::s#11 = main::s7 [phi:main::@16->cputs#0] -- pbuz1=pbuc1 + lda #s7 + sta.z cputs.s+1 + jsr cputs + jmp __b17 + // main::@17 + __b17: + // [101] main::num#1 = main::num#10 + main::inc -- vduz1=vduz1_plus_vwuc1 + lda.z num + clc + adc #inc + sta.z num+1 + lda.z num+2 + adc #0 + sta.z num+2 + lda.z num+3 + adc #0 + sta.z num+3 + // [102] main::src1#1 = main::src1#10 + main::num#1 -- vduz1=vduz1_plus_vduz2 + lda.z src1 + clc + adc.z num + sta.z src1 + lda.z src1+1 + adc.z num+1 + sta.z src1+1 + lda.z src1+2 + adc.z num+2 + sta.z src1+2 + lda.z src1+3 + adc.z num+3 + sta.z src1+3 + // [33] phi from main::@17 to main::@1 [phi:main::@17->main::@1] + __b1_from___b17: + // [33] phi main::num#10 = main::num#1 [phi:main::@17->main::@1#0] -- register_copy + // [33] phi main::src1#10 = main::src1#1 [phi:main::@17->main::@1#1] -- register_copy + jmp __b1 + .segment Data + s: .text "cbeg=" + .byte 0 + s1: .text ", add=" + .byte 0 + s2: .text ", cend=" + .byte 0 + s3: .text ", bbeg=" + .byte 0 + s4: .text ", bend=" + .byte 0 + s5: .text ", beg=" + .byte 0 + s6: .text ", end=" + .byte 0 + s7: .text @"\n" + .byte 0 +} +.segment Code + // vera_layer_mode_text +// Set a vera layer in text mode and configure the: +// - layer: Value of 0 or 1. +// - mapbase_address: A dword typed address (4 bytes), that specifies the full address of the map base. +// The function does the translation from the dword that contains the 17 bit address, +// to the respective mapbase vera register. +// Note that the register only specifies bits 16:9 of the address, +// so the resulting address in the VERA VRAM is always aligned to a multiple of 512 bytes. +// - tilebase_address: A dword typed address (4 bytes), that specifies the base address of the tile map. +// The function does the translation from the dword that contains the 17 bit address, +// to the respective tilebase vera register. +// Note that the resulting vera register holds only specifies bits 16:11 of the address, +// so the resulting address in the VERA VRAM is always aligned to a multiple of 2048 bytes! +// - mapwidth: The width of the map in number of tiles. +// - mapheight: The height of the map in number of tiles. +// - tilewidth: The width of a tile, which can be 8 or 16 pixels. +// - tileheight: The height of a tile, which can be 8 or 16 pixels. +// - color_mode: The color mode, which can be 16 or 256. +vera_layer_mode_text: { + .label layer = 1 + .label mapbase_address = 0 + .label tilebase_address = $f800 + // [104] call vera_layer_mode_tile + // [206] phi from vera_layer_mode_text to vera_layer_mode_tile [phi:vera_layer_mode_text->vera_layer_mode_tile] + vera_layer_mode_tile_from_vera_layer_mode_text: + jsr vera_layer_mode_tile + // [105] phi from vera_layer_mode_text to vera_layer_mode_text::@1 [phi:vera_layer_mode_text->vera_layer_mode_text::@1] + __b1_from_vera_layer_mode_text: + jmp __b1 + // vera_layer_mode_text::@1 + __b1: + // [106] call vera_layer_set_text_color_mode + jsr vera_layer_set_text_color_mode + jmp __breturn + // vera_layer_mode_text::@return + __breturn: + // [107] return + rts +} + // screensize +// Return the current screen size. +screensize: { + .label x = conio_screen_width + .label y = conio_screen_height + // [108] screensize::hscale#0 = *VERA_DC_HSCALE >> 7 -- vbuaa=_deref_pbuc1_ror_7 + lda VERA_DC_HSCALE + rol + rol + and #1 + // [109] screensize::$1 = $28 << screensize::hscale#0 -- vbuaa=vbuc1_rol_vbuaa + tay + lda #$28 + cpy #0 + beq !e+ + !: + asl + dey + bne !- + !e: + // [110] *screensize::x#0 = screensize::$1 -- _deref_pbuc1=vbuaa + sta.z x + // [111] screensize::vscale#0 = *VERA_DC_VSCALE >> 7 -- vbuaa=_deref_pbuc1_ror_7 + lda VERA_DC_VSCALE + rol + rol + and #1 + // [112] screensize::$3 = $1e << screensize::vscale#0 -- vbuaa=vbuc1_rol_vbuaa + tay + lda #$1e + cpy #0 + beq !e+ + !: + asl + dey + bne !- + !e: + // [113] *screensize::y#0 = screensize::$3 -- _deref_pbuc1=vbuaa + sta.z y + jmp __breturn + // screensize::@return + __breturn: + // [114] return + rts +} + // screenlayer +// Set the layer with which the conio will interact. +// - layer: value of 0 or 1. +screenlayer: { + .const layer = 1 + .label __2 = $3b + .label __4 = $3d + .label __5 = $49 + .label vera_layer_get_width1_config = $4b + .label vera_layer_get_width1_return = $3b + .label vera_layer_get_height1_config = $3f + .label vera_layer_get_height1_return = $49 + // [115] conio_screen_layer = screenlayer::layer#0 -- vbuz1=vbuc1 + lda #layer + sta.z conio_screen_layer + // [116] vera_layer_get_mapbase_bank::layer#0 = conio_screen_layer -- vbuxx=vbuz1 + ldx.z conio_screen_layer + // [117] call vera_layer_get_mapbase_bank + jsr vera_layer_get_mapbase_bank + // [118] vera_layer_get_mapbase_bank::return#2 = vera_layer_get_mapbase_bank::return#0 + jmp __b3 + // screenlayer::@3 + __b3: + // [119] CONIO_SCREEN_BANK#10 = vera_layer_get_mapbase_bank::return#2 -- vbuz1=vbuaa + sta.z CONIO_SCREEN_BANK + // [120] vera_layer_get_mapbase_offset::layer#0 = conio_screen_layer -- vbuaa=vbuz1 + lda.z conio_screen_layer + // [121] call vera_layer_get_mapbase_offset + jsr vera_layer_get_mapbase_offset + // [122] vera_layer_get_mapbase_offset::return#2 = vera_layer_get_mapbase_offset::return#0 + jmp __b4 + // screenlayer::@4 + __b4: + // [123] CONIO_SCREEN_TEXT#101 = vera_layer_get_mapbase_offset::return#2 -- vwuz1=vwuz2 + lda.z vera_layer_get_mapbase_offset.return + sta.z CONIO_SCREEN_TEXT + lda.z vera_layer_get_mapbase_offset.return+1 + sta.z CONIO_SCREEN_TEXT+1 + // [124] screenlayer::vera_layer_get_width1_layer#0 = conio_screen_layer -- vbuaa=vbuz1 + lda.z conio_screen_layer + jmp vera_layer_get_width1 + // screenlayer::vera_layer_get_width1 + vera_layer_get_width1: + // [125] screenlayer::vera_layer_get_width1_$2 = screenlayer::vera_layer_get_width1_layer#0 << 1 -- vbuaa=vbuaa_rol_1 + asl + // [126] screenlayer::vera_layer_get_width1_config#0 = vera_layer_config[screenlayer::vera_layer_get_width1_$2] -- pbuz1=qbuc1_derefidx_vbuaa + tay + lda vera_layer_config,y + sta.z vera_layer_get_width1_config + lda vera_layer_config+1,y + sta.z vera_layer_get_width1_config+1 + // [127] screenlayer::vera_layer_get_width1_$0 = *screenlayer::vera_layer_get_width1_config#0 & VERA_LAYER_WIDTH_MASK -- vbuaa=_deref_pbuz1_band_vbuc1 + lda #VERA_LAYER_WIDTH_MASK + ldy #0 + and (vera_layer_get_width1_config),y + // [128] screenlayer::vera_layer_get_width1_$1 = screenlayer::vera_layer_get_width1_$0 >> 4 -- vbuaa=vbuaa_ror_4 + lsr + lsr + lsr + lsr + // [129] screenlayer::vera_layer_get_width1_$3 = screenlayer::vera_layer_get_width1_$1 << 1 -- vbuaa=vbuaa_rol_1 + asl + // [130] screenlayer::vera_layer_get_width1_return#0 = VERA_LAYER_WIDTH[screenlayer::vera_layer_get_width1_$3] -- vwuz1=pwuc1_derefidx_vbuaa + tay + lda VERA_LAYER_WIDTH,y + sta.z vera_layer_get_width1_return + lda VERA_LAYER_WIDTH+1,y + sta.z vera_layer_get_width1_return+1 + jmp vera_layer_get_width1___breturn + // screenlayer::vera_layer_get_width1_@return + vera_layer_get_width1___breturn: + // [131] screenlayer::vera_layer_get_width1_return#1 = screenlayer::vera_layer_get_width1_return#0 + jmp __b1 + // screenlayer::@1 + __b1: + // [132] screenlayer::$2 = screenlayer::vera_layer_get_width1_return#1 + // [133] conio_width = screenlayer::$2 -- vwuz1=vwuz2 + lda.z __2 + sta.z conio_width + lda.z __2+1 + sta.z conio_width+1 + // [134] vera_layer_get_rowshift::layer#0 = conio_screen_layer -- vbuxx=vbuz1 + ldx.z conio_screen_layer + // [135] call vera_layer_get_rowshift + jsr vera_layer_get_rowshift + // [136] vera_layer_get_rowshift::return#2 = vera_layer_get_rowshift::return#0 + jmp __b5 + // screenlayer::@5 + __b5: + // [137] screenlayer::$3 = vera_layer_get_rowshift::return#2 + // [138] conio_rowshift = screenlayer::$3 -- vbuz1=vbuaa + sta.z conio_rowshift + // [139] vera_layer_get_rowskip::layer#0 = conio_screen_layer -- vbuaa=vbuz1 + lda.z conio_screen_layer + // [140] call vera_layer_get_rowskip + jsr vera_layer_get_rowskip + // [141] vera_layer_get_rowskip::return#2 = vera_layer_get_rowskip::return#0 + jmp __b6 + // screenlayer::@6 + __b6: + // [142] screenlayer::$4 = vera_layer_get_rowskip::return#2 + // [143] conio_rowskip = screenlayer::$4 -- vwuz1=vwuz2 + lda.z __4 + sta.z conio_rowskip + lda.z __4+1 + sta.z conio_rowskip+1 + // [144] screenlayer::vera_layer_get_height1_layer#0 = conio_screen_layer -- vbuaa=vbuz1 + lda.z conio_screen_layer + jmp vera_layer_get_height1 + // screenlayer::vera_layer_get_height1 + vera_layer_get_height1: + // [145] screenlayer::vera_layer_get_height1_$2 = screenlayer::vera_layer_get_height1_layer#0 << 1 -- vbuaa=vbuaa_rol_1 + asl + // [146] screenlayer::vera_layer_get_height1_config#0 = vera_layer_config[screenlayer::vera_layer_get_height1_$2] -- pbuz1=qbuc1_derefidx_vbuaa + tay + lda vera_layer_config,y + sta.z vera_layer_get_height1_config + lda vera_layer_config+1,y + sta.z vera_layer_get_height1_config+1 + // [147] screenlayer::vera_layer_get_height1_$0 = *screenlayer::vera_layer_get_height1_config#0 & VERA_LAYER_HEIGHT_MASK -- vbuaa=_deref_pbuz1_band_vbuc1 + lda #VERA_LAYER_HEIGHT_MASK + ldy #0 + and (vera_layer_get_height1_config),y + // [148] screenlayer::vera_layer_get_height1_$1 = screenlayer::vera_layer_get_height1_$0 >> 6 -- vbuaa=vbuaa_ror_6 + rol + rol + rol + and #3 + // [149] screenlayer::vera_layer_get_height1_$3 = screenlayer::vera_layer_get_height1_$1 << 1 -- vbuaa=vbuaa_rol_1 + asl + // [150] screenlayer::vera_layer_get_height1_return#0 = VERA_LAYER_HEIGHT[screenlayer::vera_layer_get_height1_$3] -- vwuz1=pwuc1_derefidx_vbuaa + tay + lda VERA_LAYER_HEIGHT,y + sta.z vera_layer_get_height1_return + lda VERA_LAYER_HEIGHT+1,y + sta.z vera_layer_get_height1_return+1 + jmp vera_layer_get_height1___breturn + // screenlayer::vera_layer_get_height1_@return + vera_layer_get_height1___breturn: + // [151] screenlayer::vera_layer_get_height1_return#1 = screenlayer::vera_layer_get_height1_return#0 + jmp __b2 + // screenlayer::@2 + __b2: + // [152] screenlayer::$5 = screenlayer::vera_layer_get_height1_return#1 + // [153] conio_height = screenlayer::$5 -- vwuz1=vwuz2 + lda.z __5 + sta.z conio_height + lda.z __5+1 + sta.z conio_height+1 + jmp __breturn + // screenlayer::@return + __breturn: + // [154] return + rts +} + // vera_layer_set_textcolor +// Set the front color for text output. The old front text color setting is returned. +// - layer: Value of 0 or 1. +// - color: a 4 bit value ( decimal between 0 and 15) when the VERA works in 16x16 color text mode. +// An 8 bit value (decimal between 0 and 255) when the VERA works in 256 text mode. +// Note that on the VERA, the transparent color has value 0. +vera_layer_set_textcolor: { + .const layer = 1 + // [155] *(vera_layer_textcolor+vera_layer_set_textcolor::layer#0) = WHITE -- _deref_pbuc1=vbuc2 + lda #WHITE + sta vera_layer_textcolor+layer + jmp __breturn + // vera_layer_set_textcolor::@return + __breturn: + // [156] return + rts +} + // vera_layer_set_backcolor +// Set the back color for text output. The old back text color setting is returned. +// - layer: Value of 0 or 1. +// - color: a 4 bit value ( decimal between 0 and 15). +// This will only work when the VERA is in 16 color mode! +// Note that on the VERA, the transparent color has value 0. +vera_layer_set_backcolor: { + .const layer = 1 + // [157] *(vera_layer_backcolor+vera_layer_set_backcolor::layer#0) = BLUE -- _deref_pbuc1=vbuc2 + lda #BLUE + sta vera_layer_backcolor+layer + jmp __breturn + // vera_layer_set_backcolor::@return + __breturn: + // [158] return + rts +} + // vera_layer_set_mapbase +// Set the base of the map layer with which the conio will interact. +// - layer: Value of 0 or 1. +// - mapbase: Specifies the base address of the tile map. +// Note that the register only specifies bits 16:9 of the address, +// so the resulting address in the VERA VRAM is always aligned to a multiple of 512 bytes. +// vera_layer_set_mapbase(byte register(A) layer, byte register(X) mapbase) +vera_layer_set_mapbase: { + .label addr = $3b + // [160] vera_layer_set_mapbase::$0 = vera_layer_set_mapbase::layer#3 << 1 -- vbuaa=vbuaa_rol_1 + asl + // [161] vera_layer_set_mapbase::addr#0 = vera_layer_mapbase[vera_layer_set_mapbase::$0] -- pbuz1=qbuc1_derefidx_vbuaa + tay + lda vera_layer_mapbase,y + sta.z addr + lda vera_layer_mapbase+1,y + sta.z addr+1 + // [162] *vera_layer_set_mapbase::addr#0 = vera_layer_set_mapbase::mapbase#3 -- _deref_pbuz1=vbuxx + txa + ldy #0 + sta (addr),y + jmp __breturn + // vera_layer_set_mapbase::@return + __breturn: + // [163] return + rts +} + // gotoxy +// Set the cursor to the specified position +// gotoxy(byte register(X) y) +gotoxy: { + .label __6 = $3d + .label line_offset = $3d + // [165] if(gotoxy::y#3<=conio_screen_height) goto gotoxy::@4 -- vbuxx_le_vbuz1_then_la1 + lda.z conio_screen_height + stx.z $ff + cmp.z $ff + bcs __b4_from_gotoxy + // [167] phi from gotoxy to gotoxy::@1 [phi:gotoxy->gotoxy::@1] + __b1_from_gotoxy: + // [167] phi gotoxy::y#4 = 0 [phi:gotoxy->gotoxy::@1#0] -- vbuxx=vbuc1 + ldx #0 + jmp __b1 + // [166] phi from gotoxy to gotoxy::@4 [phi:gotoxy->gotoxy::@4] + __b4_from_gotoxy: + jmp __b4 + // gotoxy::@4 + __b4: + // [167] phi from gotoxy::@4 to gotoxy::@1 [phi:gotoxy::@4->gotoxy::@1] + __b1_from___b4: + // [167] phi gotoxy::y#4 = gotoxy::y#3 [phi:gotoxy::@4->gotoxy::@1#0] -- register_copy + jmp __b1 + // gotoxy::@1 + __b1: + // [168] if(0gotoxy::@3] + __b3_from___b1: + jmp __b3 + // gotoxy::@3 + __b3: + jmp __b2 + // gotoxy::@2 + __b2: + // [170] conio_cursor_x[conio_screen_layer] = 0 -- pbuc1_derefidx_vbuz1=vbuc2 + lda #0 + ldy.z conio_screen_layer + sta conio_cursor_x,y + // [171] conio_cursor_y[conio_screen_layer] = gotoxy::y#4 -- pbuc1_derefidx_vbuz1=vbuxx + ldy.z conio_screen_layer + txa + sta conio_cursor_y,y + // [172] gotoxy::$6 = (word)gotoxy::y#4 -- vwuz1=_word_vbuxx + txa + sta.z __6 + lda #0 + sta.z __6+1 + // [173] gotoxy::line_offset#0 = gotoxy::$6 << conio_rowshift -- vwuz1=vwuz1_rol_vbuz2 + ldy.z conio_rowshift + beq !e+ + !: + asl.z line_offset + rol.z line_offset+1 + dey + bne !- + !e: + // [174] gotoxy::$5 = conio_screen_layer << 1 -- vbuaa=vbuz1_rol_1 + lda.z conio_screen_layer + asl + // [175] conio_line_text[gotoxy::$5] = gotoxy::line_offset#0 -- pwuc1_derefidx_vbuaa=vwuz1 + tay + lda.z line_offset + sta conio_line_text,y + lda.z line_offset+1 + sta conio_line_text+1,y + jmp __breturn + // gotoxy::@return + __breturn: + // [176] return + rts +} + // cputs +// Output a NUL-terminated string at the current cursor position +// cputs(byte* zp($22) s) +cputs: { + .label s = $22 + // [178] phi from cputs cputs::@2 to cputs::@1 [phi:cputs/cputs::@2->cputs::@1] + __b1_from_cputs: + __b1_from___b2: + // [178] phi cputs::s#10 = cputs::s#11 [phi:cputs/cputs::@2->cputs::@1#0] -- register_copy + jmp __b1 + // cputs::@1 + __b1: + // [179] cputs::c#1 = *cputs::s#10 -- vbuaa=_deref_pbuz1 + ldy #0 + lda (s),y + // [180] cputs::s#0 = ++ cputs::s#10 -- pbuz1=_inc_pbuz1 + inc.z s + bne !+ + inc.z s+1 + !: + // [181] if(0!=cputs::c#1) goto cputs::@2 -- 0_neq_vbuaa_then_la1 + cmp #0 + bne __b2 + jmp __breturn + // cputs::@return + __breturn: + // [182] return + rts + // cputs::@2 + __b2: + // [183] cputc::c#0 = cputs::c#1 -- vbuz1=vbuaa + sta.z cputc.c + // [184] call cputc + // [235] phi from cputs::@2 to cputc [phi:cputs::@2->cputc] + cputc_from___b2: + // [235] phi cputc::c#3 = cputc::c#0 [phi:cputs::@2->cputc#0] -- register_copy + jsr cputc + jmp __b1_from___b2 +} + // printf_ulong +// Print an unsigned int using a specific format +// printf_ulong(dword zp($b) uvalue) +printf_ulong: { + .label uvalue = $b + jmp __b1 + // printf_ulong::@1 + __b1: + // [186] *((byte*)&printf_buffer) = 0 -- _deref_pbuc1=vbuc2 + // Handle any sign + lda #0 + sta printf_buffer + // [187] ultoa::value#1 = printf_ulong::uvalue#3 + // [188] call ultoa + // Format number into buffer + // [267] phi from printf_ulong::@1 to ultoa [phi:printf_ulong::@1->ultoa] + ultoa_from___b1: + jsr ultoa + jmp __b2 + // printf_ulong::@2 + __b2: + // [189] printf_number_buffer::buffer_sign#0 = *((byte*)&printf_buffer) -- vbuaa=_deref_pbuc1 + lda printf_buffer + // [190] call printf_number_buffer + // Print using format + // [288] phi from printf_ulong::@2 to printf_number_buffer [phi:printf_ulong::@2->printf_number_buffer] + printf_number_buffer_from___b2: + // [288] phi printf_number_buffer::buffer_sign#10 = printf_number_buffer::buffer_sign#0 [phi:printf_ulong::@2->printf_number_buffer#0] -- register_copy + jsr printf_number_buffer + jmp __breturn + // printf_ulong::@return + __breturn: + // [191] return + rts +} + // printf_uchar +// Print an unsigned char using a specific format +// printf_uchar(byte register(X) uvalue) +printf_uchar: { + jmp __b1 + // printf_uchar::@1 + __b1: + // [193] *((byte*)&printf_buffer) = 0 -- _deref_pbuc1=vbuc2 + // Handle any sign + lda #0 + sta printf_buffer + // [194] uctoa::value#1 = printf_uchar::uvalue#2 + // [195] call uctoa + // Format number into buffer + // [295] phi from printf_uchar::@1 to uctoa [phi:printf_uchar::@1->uctoa] + uctoa_from___b1: + jsr uctoa + jmp __b2 + // printf_uchar::@2 + __b2: + // [196] printf_number_buffer::buffer_sign#2 = *((byte*)&printf_buffer) -- vbuaa=_deref_pbuc1 + lda printf_buffer + // [197] call printf_number_buffer + // Print using format + // [288] phi from printf_uchar::@2 to printf_number_buffer [phi:printf_uchar::@2->printf_number_buffer] + printf_number_buffer_from___b2: + // [288] phi printf_number_buffer::buffer_sign#10 = printf_number_buffer::buffer_sign#2 [phi:printf_uchar::@2->printf_number_buffer#0] -- register_copy + jsr printf_number_buffer + jmp __breturn + // printf_uchar::@return + __breturn: + // [198] return + rts +} + // printf_uint +// Print an unsigned int using a specific format +// printf_uint(word zp($f) uvalue) +printf_uint: { + .label uvalue = $f + jmp __b1 + // printf_uint::@1 + __b1: + // [200] *((byte*)&printf_buffer) = 0 -- _deref_pbuc1=vbuc2 + // Handle any sign + lda #0 + sta printf_buffer + // [201] utoa::value#1 = printf_uint::uvalue#2 + // [202] call utoa + // Format number into buffer + // [314] phi from printf_uint::@1 to utoa [phi:printf_uint::@1->utoa] + utoa_from___b1: + jsr utoa + jmp __b2 + // printf_uint::@2 + __b2: + // [203] printf_number_buffer::buffer_sign#1 = *((byte*)&printf_buffer) -- vbuaa=_deref_pbuc1 + lda printf_buffer + // [204] call printf_number_buffer + // Print using format + // [288] phi from printf_uint::@2 to printf_number_buffer [phi:printf_uint::@2->printf_number_buffer] + printf_number_buffer_from___b2: + // [288] phi printf_number_buffer::buffer_sign#10 = printf_number_buffer::buffer_sign#1 [phi:printf_uint::@2->printf_number_buffer#0] -- register_copy + jsr printf_number_buffer + jmp __breturn + // printf_uint::@return + __breturn: + // [205] return + rts +} + // vera_layer_mode_tile +// Set a vera layer in tile mode and configure the: +// - layer: Value of 0 or 1. +// - mapbase_address: A dword typed address (4 bytes), that specifies the full address of the map base. +// The function does the translation from the dword that contains the 17 bit address, +// to the respective mapbase vera register. +// Note that the register only specifies bits 16:9 of the address, +// so the resulting address in the VERA VRAM is always aligned to a multiple of 512 bytes. +// - tilebase_address: A dword typed address (4 bytes), that specifies the base address of the tile map. +// The function does the translation from the dword that contains the 17 bit address, +// to the respective tilebase vera register. +// Note that the resulting vera register holds only specifies bits 16:11 of the address, +// so the resulting address in the VERA VRAM is always aligned to a multiple of 2048 bytes! +// - mapwidth: The width of the map in number of tiles. +// - mapheight: The height of the map in number of tiles. +// - tilewidth: The width of a tile, which can be 8 or 16 pixels. +// - tileheight: The height of a tile, which can be 8 or 16 pixels. +// - color_depth: The color depth in bits per pixel (BPP), which can be 1, 2, 4 or 8. +vera_layer_mode_tile: { + .const mapbase = 0 + .label tilebase_address = vera_layer_mode_text.tilebase_address>>1 + // config + .label config = VERA_LAYER_WIDTH_128|VERA_LAYER_HEIGHT_64 + jmp __b1 + // vera_layer_mode_tile::@1 + __b1: + // [207] *(vera_layer_rowshift+vera_layer_mode_text::layer#0) = 8 -- _deref_pbuc1=vbuc2 + lda #8 + sta vera_layer_rowshift+vera_layer_mode_text.layer + // [208] *(vera_layer_rowskip+vera_layer_mode_text::layer#0*SIZEOF_WORD) = $100 -- _deref_pwuc1=vwuc2 + lda #<$100 + sta vera_layer_rowskip+vera_layer_mode_text.layer*SIZEOF_WORD + lda #>$100 + sta vera_layer_rowskip+vera_layer_mode_text.layer*SIZEOF_WORD+1 + // [209] phi from vera_layer_mode_tile::@1 to vera_layer_mode_tile::@2 [phi:vera_layer_mode_tile::@1->vera_layer_mode_tile::@2] + __b2_from___b1: + jmp __b2 + // vera_layer_mode_tile::@2 + __b2: + // [210] call vera_layer_set_config + jsr vera_layer_set_config + jmp __b4 + // vera_layer_mode_tile::@4 + __b4: + // [211] *(vera_mapbase_offset+vera_layer_mode_text::layer#0*SIZEOF_WORD) = 0 -- _deref_pwuc1=vwuc2 + // mapbase + lda #<0 + sta vera_mapbase_offset+vera_layer_mode_text.layer*SIZEOF_WORD + lda #>0 + sta vera_mapbase_offset+vera_layer_mode_text.layer*SIZEOF_WORD+1 + // [212] *(vera_mapbase_bank+vera_layer_mode_text::layer#0) = 0 -- _deref_pbuc1=vbuc2 + lda #0 + sta vera_mapbase_bank+vera_layer_mode_text.layer + // [213] *(vera_mapbase_address+vera_layer_mode_text::layer#0*SIZEOF_DWORD) = vera_layer_mode_text::mapbase_address#0 -- _deref_pduc1=vduc2 + lda #vera_layer_mode_text.mapbase_address + sta vera_mapbase_address+vera_layer_mode_text.layer*SIZEOF_DWORD+1 + lda #>$10 + sta vera_mapbase_address+vera_layer_mode_text.layer*SIZEOF_DWORD+2 + lda #>vera_layer_mode_text.mapbase_address>>$10 + sta vera_mapbase_address+vera_layer_mode_text.layer*SIZEOF_DWORD+3 + // [214] call vera_layer_set_mapbase + // [159] phi from vera_layer_mode_tile::@4 to vera_layer_set_mapbase [phi:vera_layer_mode_tile::@4->vera_layer_set_mapbase] + vera_layer_set_mapbase_from___b4: + // [159] phi vera_layer_set_mapbase::mapbase#3 = vera_layer_mode_tile::mapbase#0 [phi:vera_layer_mode_tile::@4->vera_layer_set_mapbase#0] -- vbuxx=vbuc1 + ldx #mapbase + // [159] phi vera_layer_set_mapbase::layer#3 = vera_layer_mode_text::layer#0 [phi:vera_layer_mode_tile::@4->vera_layer_set_mapbase#1] -- vbuaa=vbuc1 + lda #vera_layer_mode_text.layer + jsr vera_layer_set_mapbase + jmp __b5 + // vera_layer_mode_tile::@5 + __b5: + // [215] *(vera_tilebase_offset+vera_layer_mode_text::layer#0*SIZEOF_WORD) = vera_layer_mode_text.tilebase_address&$ffff + sta vera_tilebase_offset+vera_layer_mode_text.layer*SIZEOF_WORD+1 + // [216] *(vera_tilebase_bank+vera_layer_mode_text::layer#0) = 0 -- _deref_pbuc1=vbuc2 + lda #0 + sta vera_tilebase_bank+vera_layer_mode_text.layer + // [217] *(vera_tilebase_address+vera_layer_mode_text::layer#0*SIZEOF_DWORD) = vera_layer_mode_text::tilebase_address#0 -- _deref_pduc1=vduc2 + lda #vera_layer_mode_text.tilebase_address + sta vera_tilebase_address+vera_layer_mode_text.layer*SIZEOF_DWORD+1 + lda #>$10 + sta vera_tilebase_address+vera_layer_mode_text.layer*SIZEOF_DWORD+2 + lda #>vera_layer_mode_text.tilebase_address>>$10 + sta vera_tilebase_address+vera_layer_mode_text.layer*SIZEOF_DWORD+3 + // [218] phi from vera_layer_mode_tile::@5 to vera_layer_mode_tile::@3 [phi:vera_layer_mode_tile::@5->vera_layer_mode_tile::@3] + __b3_from___b5: + jmp __b3 + // vera_layer_mode_tile::@3 + __b3: + // [219] call vera_layer_set_tilebase + jsr vera_layer_set_tilebase + jmp __breturn + // vera_layer_mode_tile::@return + __breturn: + // [220] return + rts +} + // vera_layer_set_text_color_mode +// Set the configuration of the layer text color mode. +// - layer: Value of 0 or 1. +// - color_mode: Specifies the color mode to be VERA_LAYER_CONFIG_16 or VERA_LAYER_CONFIG_256 for text mode. +vera_layer_set_text_color_mode: { + .label addr = $3f + // [221] vera_layer_set_text_color_mode::addr#0 = *(vera_layer_config+vera_layer_mode_text::layer#0*SIZEOF_POINTER) -- pbuz1=_deref_qbuc1 + lda vera_layer_config+vera_layer_mode_text.layer*SIZEOF_POINTER + sta.z addr + lda vera_layer_config+vera_layer_mode_text.layer*SIZEOF_POINTER+1 + sta.z addr+1 + // [222] *vera_layer_set_text_color_mode::addr#0 = *vera_layer_set_text_color_mode::addr#0 & ~VERA_LAYER_CONFIG_256C -- _deref_pbuz1=_deref_pbuz1_band_vbuc1 + lda #VERA_LAYER_CONFIG_256C^$ff + ldy #0 + and (addr),y + ldy #0 + sta (addr),y + // [223] *vera_layer_set_text_color_mode::addr#0 = *vera_layer_set_text_color_mode::addr#0 -- _deref_pbuz1=_deref_pbuz1 + ldy #0 + lda (addr),y + ldy #0 + sta (addr),y + jmp __breturn + // vera_layer_set_text_color_mode::@return + __breturn: + // [224] return + rts +} + // vera_layer_get_mapbase_bank +// Get the map base bank of the tiles for the layer. +// - layer: Value of 0 or 1. +// - return: Bank in vera vram. +// vera_layer_get_mapbase_bank(byte register(X) layer) +vera_layer_get_mapbase_bank: { + // [225] vera_layer_get_mapbase_bank::return#0 = vera_mapbase_bank[vera_layer_get_mapbase_bank::layer#0] -- vbuaa=pbuc1_derefidx_vbuxx + lda vera_mapbase_bank,x + jmp __breturn + // vera_layer_get_mapbase_bank::@return + __breturn: + // [226] return + rts +} + // vera_layer_get_mapbase_offset +// Get the map base lower 16-bit address (offset) of the tiles for the layer. +// - layer: Value of 0 or 1. +// - return: Offset in vera vram of the specified bank. +// vera_layer_get_mapbase_offset(byte register(A) layer) +vera_layer_get_mapbase_offset: { + .label return = $4b + // [227] vera_layer_get_mapbase_offset::$0 = vera_layer_get_mapbase_offset::layer#0 << 1 -- vbuaa=vbuaa_rol_1 + asl + // [228] vera_layer_get_mapbase_offset::return#0 = vera_mapbase_offset[vera_layer_get_mapbase_offset::$0] -- vwuz1=pwuc1_derefidx_vbuaa + tay + lda vera_mapbase_offset,y + sta.z return + lda vera_mapbase_offset+1,y + sta.z return+1 + jmp __breturn + // vera_layer_get_mapbase_offset::@return + __breturn: + // [229] return + rts +} + // vera_layer_get_rowshift +// Get the bit shift value required to skip a whole line fast. +// - layer: Value of 0 or 1. +// - return: Rowshift value to calculate fast from a y value to line offset in tile mode. +// vera_layer_get_rowshift(byte register(X) layer) +vera_layer_get_rowshift: { + // [230] vera_layer_get_rowshift::return#0 = vera_layer_rowshift[vera_layer_get_rowshift::layer#0] -- vbuaa=pbuc1_derefidx_vbuxx + lda vera_layer_rowshift,x + jmp __breturn + // vera_layer_get_rowshift::@return + __breturn: + // [231] return + rts +} + // vera_layer_get_rowskip +// Get the value required to skip a whole line fast. +// - layer: Value of 0 or 1. +// - return: Skip value to calculate fast from a y value to line offset in tile mode. +// vera_layer_get_rowskip(byte register(A) layer) +vera_layer_get_rowskip: { + .label return = $3d + // [232] vera_layer_get_rowskip::$0 = vera_layer_get_rowskip::layer#0 << 1 -- vbuaa=vbuaa_rol_1 + asl + // [233] vera_layer_get_rowskip::return#0 = vera_layer_rowskip[vera_layer_get_rowskip::$0] -- vwuz1=pwuc1_derefidx_vbuaa + tay + lda vera_layer_rowskip,y + sta.z return + lda vera_layer_rowskip+1,y + sta.z return+1 + jmp __breturn + // vera_layer_get_rowskip::@return + __breturn: + // [234] return + rts +} + // cputc +// Output one character at the current cursor position +// Moves the cursor forward. Scrolls the entire screen if needed +// cputc(byte zp($11) c) +cputc: { + .label __16 = $41 + .label conio_addr = $47 + .label c = $11 + // [236] vera_layer_get_color::layer#0 = conio_screen_layer -- vbuxx=vbuz1 + ldx.z conio_screen_layer + // [237] call vera_layer_get_color + // [341] phi from cputc to vera_layer_get_color [phi:cputc->vera_layer_get_color] + vera_layer_get_color_from_cputc: + // [341] phi vera_layer_get_color::layer#2 = vera_layer_get_color::layer#0 [phi:cputc->vera_layer_get_color#0] -- register_copy + jsr vera_layer_get_color + // [238] vera_layer_get_color::return#3 = vera_layer_get_color::return#2 + jmp __b7 + // cputc::@7 + __b7: + // [239] cputc::color#0 = vera_layer_get_color::return#3 -- vbuxx=vbuaa + tax + // [240] cputc::$15 = conio_screen_layer << 1 -- vbuaa=vbuz1_rol_1 + lda.z conio_screen_layer + asl + // [241] cputc::conio_addr#0 = (byte*)CONIO_SCREEN_TEXT#101 + conio_line_text[cputc::$15] -- pbuz1=pbuz2_plus_pwuc1_derefidx_vbuaa + tay + clc + lda.z CONIO_SCREEN_TEXT + adc conio_line_text,y + sta.z conio_addr + lda.z CONIO_SCREEN_TEXT+1 + adc conio_line_text+1,y + sta.z conio_addr+1 + // [242] cputc::$2 = conio_cursor_x[conio_screen_layer] << 1 -- vbuaa=pbuc1_derefidx_vbuz1_rol_1 + ldy.z conio_screen_layer + lda conio_cursor_x,y + asl + // [243] cputc::conio_addr#1 = cputc::conio_addr#0 + cputc::$2 -- pbuz1=pbuz1_plus_vbuaa + clc + adc.z conio_addr + sta.z conio_addr + bcc !+ + inc.z conio_addr+1 + !: + // [244] if(cputc::c#3==' ') goto cputc::@1 -- vbuz1_eq_vbuc1_then_la1 + lda #'\n' + cmp.z c + beq __b1_from___b7 + jmp __b2 + // cputc::@2 + __b2: + // [245] *VERA_CTRL = *VERA_CTRL & ~VERA_ADDRSEL -- _deref_pbuc1=_deref_pbuc1_band_vbuc2 + // Select DATA0 + lda #VERA_ADDRSEL^$ff + and VERA_CTRL + sta VERA_CTRL + // [246] cputc::$4 = < cputc::conio_addr#1 -- vbuaa=_lo_pbuz1 + lda.z conio_addr + // [247] *VERA_ADDRX_L = cputc::$4 -- _deref_pbuc1=vbuaa + // Set address + sta VERA_ADDRX_L + // [248] cputc::$5 = > cputc::conio_addr#1 -- vbuaa=_hi_pbuz1 + lda.z conio_addr+1 + // [249] *VERA_ADDRX_M = cputc::$5 -- _deref_pbuc1=vbuaa + sta VERA_ADDRX_M + // [250] cputc::$6 = CONIO_SCREEN_BANK#10 | VERA_INC_1 -- vbuaa=vbuz1_bor_vbuc1 + lda #VERA_INC_1 + ora.z CONIO_SCREEN_BANK + // [251] *VERA_ADDRX_H = cputc::$6 -- _deref_pbuc1=vbuaa + sta VERA_ADDRX_H + // [252] *VERA_DATA0 = cputc::c#3 -- _deref_pbuc1=vbuz1 + lda.z c + sta VERA_DATA0 + // [253] *VERA_DATA0 = cputc::color#0 -- _deref_pbuc1=vbuxx + stx VERA_DATA0 + // [254] conio_cursor_x[conio_screen_layer] = ++ conio_cursor_x[conio_screen_layer] -- pbuc1_derefidx_vbuz1=_inc_pbuc1_derefidx_vbuz1 + ldx.z conio_screen_layer + inc conio_cursor_x,x + // [255] cputc::scroll_enable#0 = conio_scroll_enable[conio_screen_layer] -- vbuaa=pbuc1_derefidx_vbuz1 + ldy.z conio_screen_layer + lda conio_scroll_enable,y + // [256] if(0!=cputc::scroll_enable#0) goto cputc::@5 -- 0_neq_vbuaa_then_la1 + cmp #0 + bne __b5 + jmp __b3 + // cputc::@3 + __b3: + // [257] cputc::$16 = (word)conio_cursor_x[conio_screen_layer] -- vwuz1=_word_pbuc1_derefidx_vbuz2 + ldy.z conio_screen_layer + lda conio_cursor_x,y + sta.z __16 + lda #0 + sta.z __16+1 + // [258] if(cputc::$16!=conio_width) goto cputc::@return -- vwuz1_neq_vwuz2_then_la1 + lda.z __16+1 + cmp.z conio_width+1 + bne __breturn + lda.z __16 + cmp.z conio_width + bne __breturn + // [259] phi from cputc::@3 to cputc::@4 [phi:cputc::@3->cputc::@4] + __b4_from___b3: + jmp __b4 + // cputc::@4 + __b4: + // [260] call cputln + jsr cputln + jmp __breturn + // cputc::@return + __breturn: + // [261] return + rts + // cputc::@5 + __b5: + // [262] if(conio_cursor_x[conio_screen_layer]!=conio_screen_width) goto cputc::@return -- pbuc1_derefidx_vbuz1_neq_vbuz2_then_la1 + lda.z conio_screen_width + ldy.z conio_screen_layer + cmp conio_cursor_x,y + bne __breturn + // [263] phi from cputc::@5 to cputc::@6 [phi:cputc::@5->cputc::@6] + __b6_from___b5: + jmp __b6 + // cputc::@6 + __b6: + // [264] call cputln + jsr cputln + jmp __breturn + // [265] phi from cputc::@7 to cputc::@1 [phi:cputc::@7->cputc::@1] + __b1_from___b7: + jmp __b1 + // cputc::@1 + __b1: + // [266] call cputln + jsr cputln + jmp __breturn +} + // ultoa +// Converts unsigned number value to a string representing it in RADIX format. +// If the leading digits are zero they are not included in the string. +// - value : The number to be converted to RADIX +// - buffer : receives the string representing the number and zero-termination. +// - radix : The radix to convert the number to (from the enum RADIX) +// ultoa(dword zp($b) value, byte* zp($22) buffer) +ultoa: { + .label digit_value = $43 + .label buffer = $22 + .label digit = $11 + .label value = $b + // [268] phi from ultoa to ultoa::@1 [phi:ultoa->ultoa::@1] + __b1_from_ultoa: + // [268] phi ultoa::buffer#11 = (byte*)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS [phi:ultoa->ultoa::@1#0] -- pbuz1=pbuc1 + lda #printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS + sta.z buffer+1 + // [268] phi ultoa::started#2 = 0 [phi:ultoa->ultoa::@1#1] -- vbuxx=vbuc1 + ldx #0 + // [268] phi ultoa::value#2 = ultoa::value#1 [phi:ultoa->ultoa::@1#2] -- register_copy + // [268] phi ultoa::digit#2 = 0 [phi:ultoa->ultoa::@1#3] -- vbuz1=vbuc1 + lda #0 + sta.z digit + jmp __b1 + // ultoa::@1 + __b1: + // [269] if(ultoa::digit#2<8-1) goto ultoa::@2 -- vbuz1_lt_vbuc1_then_la1 + lda.z digit + cmp #8-1 + bcc __b2 + jmp __b3 + // ultoa::@3 + __b3: + // [270] ultoa::$11 = (byte)ultoa::value#2 -- vbuaa=_byte_vduz1 + lda.z value + // [271] *ultoa::buffer#11 = DIGITS[ultoa::$11] -- _deref_pbuz1=pbuc1_derefidx_vbuaa + tay + lda DIGITS,y + ldy #0 + sta (buffer),y + // [272] ultoa::buffer#3 = ++ ultoa::buffer#11 -- pbuz1=_inc_pbuz1 + inc.z buffer + bne !+ + inc.z buffer+1 + !: + // [273] *ultoa::buffer#3 = 0 -- _deref_pbuz1=vbuc1 + lda #0 + ldy #0 + sta (buffer),y + jmp __breturn + // ultoa::@return + __breturn: + // [274] return + rts + // ultoa::@2 + __b2: + // [275] ultoa::$10 = ultoa::digit#2 << 2 -- vbuaa=vbuz1_rol_2 + lda.z digit + asl + asl + // [276] ultoa::digit_value#0 = RADIX_HEXADECIMAL_VALUES_LONG[ultoa::$10] -- vduz1=pduc1_derefidx_vbuaa + tay + lda RADIX_HEXADECIMAL_VALUES_LONG,y + sta.z digit_value + lda RADIX_HEXADECIMAL_VALUES_LONG+1,y + sta.z digit_value+1 + lda RADIX_HEXADECIMAL_VALUES_LONG+2,y + sta.z digit_value+2 + lda RADIX_HEXADECIMAL_VALUES_LONG+3,y + sta.z digit_value+3 + // [277] if(0!=ultoa::started#2) goto ultoa::@5 -- 0_neq_vbuxx_then_la1 + cpx #0 + bne __b5 + jmp __b7 + // ultoa::@7 + __b7: + // [278] if(ultoa::value#2>=ultoa::digit_value#0) goto ultoa::@5 -- vduz1_ge_vduz2_then_la1 + lda.z value+3 + cmp.z digit_value+3 + bcc !+ + bne __b5 + lda.z value+2 + cmp.z digit_value+2 + bcc !+ + bne __b5 + lda.z value+1 + cmp.z digit_value+1 + bcc !+ + bne __b5 + lda.z value + cmp.z digit_value + bcs __b5 + !: + // [279] phi from ultoa::@7 to ultoa::@4 [phi:ultoa::@7->ultoa::@4] + __b4_from___b7: + // [279] phi ultoa::buffer#14 = ultoa::buffer#11 [phi:ultoa::@7->ultoa::@4#0] -- register_copy + // [279] phi ultoa::started#4 = ultoa::started#2 [phi:ultoa::@7->ultoa::@4#1] -- register_copy + // [279] phi ultoa::value#6 = ultoa::value#2 [phi:ultoa::@7->ultoa::@4#2] -- register_copy + jmp __b4 + // ultoa::@4 + __b4: + // [280] ultoa::digit#1 = ++ ultoa::digit#2 -- vbuz1=_inc_vbuz1 + inc.z digit + // [268] phi from ultoa::@4 to ultoa::@1 [phi:ultoa::@4->ultoa::@1] + __b1_from___b4: + // [268] phi ultoa::buffer#11 = ultoa::buffer#14 [phi:ultoa::@4->ultoa::@1#0] -- register_copy + // [268] phi ultoa::started#2 = ultoa::started#4 [phi:ultoa::@4->ultoa::@1#1] -- register_copy + // [268] phi ultoa::value#2 = ultoa::value#6 [phi:ultoa::@4->ultoa::@1#2] -- register_copy + // [268] phi ultoa::digit#2 = ultoa::digit#1 [phi:ultoa::@4->ultoa::@1#3] -- register_copy + jmp __b1 + // ultoa::@5 + __b5: + // [281] ultoa_append::buffer#0 = ultoa::buffer#11 + // [282] ultoa_append::value#0 = ultoa::value#2 + // [283] ultoa_append::sub#0 = ultoa::digit_value#0 + // [284] call ultoa_append + // [360] phi from ultoa::@5 to ultoa_append [phi:ultoa::@5->ultoa_append] + ultoa_append_from___b5: + jsr ultoa_append + // [285] ultoa_append::return#0 = ultoa_append::value#2 + jmp __b6 + // ultoa::@6 + __b6: + // [286] ultoa::value#0 = ultoa_append::return#0 + // [287] ultoa::buffer#4 = ++ ultoa::buffer#11 -- pbuz1=_inc_pbuz1 + inc.z buffer + bne !+ + inc.z buffer+1 + !: + // [279] phi from ultoa::@6 to ultoa::@4 [phi:ultoa::@6->ultoa::@4] + __b4_from___b6: + // [279] phi ultoa::buffer#14 = ultoa::buffer#4 [phi:ultoa::@6->ultoa::@4#0] -- register_copy + // [279] phi ultoa::started#4 = 1 [phi:ultoa::@6->ultoa::@4#1] -- vbuxx=vbuc1 + ldx #1 + // [279] phi ultoa::value#6 = ultoa::value#0 [phi:ultoa::@6->ultoa::@4#2] -- register_copy + jmp __b4 +} + // printf_number_buffer +// Print the contents of the number buffer using a specific format. +// This handles minimum length, zero-filling, and left/right justification from the format +// printf_number_buffer(byte register(A) buffer_sign) +printf_number_buffer: { + jmp __b1 + // printf_number_buffer::@1 + __b1: + // [289] if(0==printf_number_buffer::buffer_sign#10) goto printf_number_buffer::@2 -- 0_eq_vbuaa_then_la1 + cmp #0 + beq __b2_from___b1 + jmp __b3 + // printf_number_buffer::@3 + __b3: + // [290] cputc::c#2 = printf_number_buffer::buffer_sign#10 -- vbuz1=vbuaa + sta.z cputc.c + // [291] call cputc + // [235] phi from printf_number_buffer::@3 to cputc [phi:printf_number_buffer::@3->cputc] + cputc_from___b3: + // [235] phi cputc::c#3 = cputc::c#2 [phi:printf_number_buffer::@3->cputc#0] -- register_copy + jsr cputc + // [292] phi from printf_number_buffer::@1 printf_number_buffer::@3 to printf_number_buffer::@2 [phi:printf_number_buffer::@1/printf_number_buffer::@3->printf_number_buffer::@2] + __b2_from___b1: + __b2_from___b3: + jmp __b2 + // printf_number_buffer::@2 + __b2: + // [293] call cputs + // [177] phi from printf_number_buffer::@2 to cputs [phi:printf_number_buffer::@2->cputs] + cputs_from___b2: + // [177] phi cputs::s#11 = (byte*)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS [phi:printf_number_buffer::@2->cputs#0] -- pbuz1=pbuc1 + lda #printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS + sta.z cputs.s+1 + jsr cputs + jmp __breturn + // printf_number_buffer::@return + __breturn: + // [294] return + rts +} + // uctoa +// Converts unsigned number value to a string representing it in RADIX format. +// If the leading digits are zero they are not included in the string. +// - value : The number to be converted to RADIX +// - buffer : receives the string representing the number and zero-termination. +// - radix : The radix to convert the number to (from the enum RADIX) +// uctoa(byte register(X) value, byte* zp($22) buffer) +uctoa: { + .label digit_value = $4f + .label buffer = $22 + .label digit = $11 + .label started = $2a + // [296] phi from uctoa to uctoa::@1 [phi:uctoa->uctoa::@1] + __b1_from_uctoa: + // [296] phi uctoa::buffer#11 = (byte*)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS [phi:uctoa->uctoa::@1#0] -- pbuz1=pbuc1 + lda #printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS + sta.z buffer+1 + // [296] phi uctoa::started#2 = 0 [phi:uctoa->uctoa::@1#1] -- vbuz1=vbuc1 + lda #0 + sta.z started + // [296] phi uctoa::value#2 = uctoa::value#1 [phi:uctoa->uctoa::@1#2] -- register_copy + // [296] phi uctoa::digit#2 = 0 [phi:uctoa->uctoa::@1#3] -- vbuz1=vbuc1 + lda #0 + sta.z digit + jmp __b1 + // uctoa::@1 + __b1: + // [297] if(uctoa::digit#2<2-1) goto uctoa::@2 -- vbuz1_lt_vbuc1_then_la1 + lda.z digit + cmp #2-1 + bcc __b2 + jmp __b3 + // uctoa::@3 + __b3: + // [298] *uctoa::buffer#11 = DIGITS[uctoa::value#2] -- _deref_pbuz1=pbuc1_derefidx_vbuxx + lda DIGITS,x + ldy #0 + sta (buffer),y + // [299] uctoa::buffer#3 = ++ uctoa::buffer#11 -- pbuz1=_inc_pbuz1 + inc.z buffer + bne !+ + inc.z buffer+1 + !: + // [300] *uctoa::buffer#3 = 0 -- _deref_pbuz1=vbuc1 + lda #0 + ldy #0 + sta (buffer),y + jmp __breturn + // uctoa::@return + __breturn: + // [301] return + rts + // uctoa::@2 + __b2: + // [302] uctoa::digit_value#0 = RADIX_HEXADECIMAL_VALUES_CHAR[uctoa::digit#2] -- vbuz1=pbuc1_derefidx_vbuz2 + ldy.z digit + lda RADIX_HEXADECIMAL_VALUES_CHAR,y + sta.z digit_value + // [303] if(0!=uctoa::started#2) goto uctoa::@5 -- 0_neq_vbuz1_then_la1 + lda.z started + cmp #0 + bne __b5 + jmp __b7 + // uctoa::@7 + __b7: + // [304] if(uctoa::value#2>=uctoa::digit_value#0) goto uctoa::@5 -- vbuxx_ge_vbuz1_then_la1 + cpx.z digit_value + bcs __b5 + // [305] phi from uctoa::@7 to uctoa::@4 [phi:uctoa::@7->uctoa::@4] + __b4_from___b7: + // [305] phi uctoa::buffer#14 = uctoa::buffer#11 [phi:uctoa::@7->uctoa::@4#0] -- register_copy + // [305] phi uctoa::started#4 = uctoa::started#2 [phi:uctoa::@7->uctoa::@4#1] -- register_copy + // [305] phi uctoa::value#6 = uctoa::value#2 [phi:uctoa::@7->uctoa::@4#2] -- register_copy + jmp __b4 + // uctoa::@4 + __b4: + // [306] uctoa::digit#1 = ++ uctoa::digit#2 -- vbuz1=_inc_vbuz1 + inc.z digit + // [296] phi from uctoa::@4 to uctoa::@1 [phi:uctoa::@4->uctoa::@1] + __b1_from___b4: + // [296] phi uctoa::buffer#11 = uctoa::buffer#14 [phi:uctoa::@4->uctoa::@1#0] -- register_copy + // [296] phi uctoa::started#2 = uctoa::started#4 [phi:uctoa::@4->uctoa::@1#1] -- register_copy + // [296] phi uctoa::value#2 = uctoa::value#6 [phi:uctoa::@4->uctoa::@1#2] -- register_copy + // [296] phi uctoa::digit#2 = uctoa::digit#1 [phi:uctoa::@4->uctoa::@1#3] -- register_copy + jmp __b1 + // uctoa::@5 + __b5: + // [307] uctoa_append::buffer#0 = uctoa::buffer#11 + // [308] uctoa_append::value#0 = uctoa::value#2 + // [309] uctoa_append::sub#0 = uctoa::digit_value#0 + // [310] call uctoa_append + // [367] phi from uctoa::@5 to uctoa_append [phi:uctoa::@5->uctoa_append] + uctoa_append_from___b5: + jsr uctoa_append + // [311] uctoa_append::return#0 = uctoa_append::value#2 + jmp __b6 + // uctoa::@6 + __b6: + // [312] uctoa::value#0 = uctoa_append::return#0 + // [313] uctoa::buffer#4 = ++ uctoa::buffer#11 -- pbuz1=_inc_pbuz1 + inc.z buffer + bne !+ + inc.z buffer+1 + !: + // [305] phi from uctoa::@6 to uctoa::@4 [phi:uctoa::@6->uctoa::@4] + __b4_from___b6: + // [305] phi uctoa::buffer#14 = uctoa::buffer#4 [phi:uctoa::@6->uctoa::@4#0] -- register_copy + // [305] phi uctoa::started#4 = 1 [phi:uctoa::@6->uctoa::@4#1] -- vbuz1=vbuc1 + lda #1 + sta.z started + // [305] phi uctoa::value#6 = uctoa::value#0 [phi:uctoa::@6->uctoa::@4#2] -- register_copy + jmp __b4 +} + // utoa +// Converts unsigned number value to a string representing it in RADIX format. +// If the leading digits are zero they are not included in the string. +// - value : The number to be converted to RADIX +// - buffer : receives the string representing the number and zero-termination. +// - radix : The radix to convert the number to (from the enum RADIX) +// utoa(word zp($f) value, byte* zp($22) buffer) +utoa: { + .label digit_value = $47 + .label buffer = $22 + .label digit = $11 + .label value = $f + // [315] phi from utoa to utoa::@1 [phi:utoa->utoa::@1] + __b1_from_utoa: + // [315] phi utoa::buffer#11 = (byte*)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS [phi:utoa->utoa::@1#0] -- pbuz1=pbuc1 + lda #printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS + sta.z buffer+1 + // [315] phi utoa::started#2 = 0 [phi:utoa->utoa::@1#1] -- vbuxx=vbuc1 + ldx #0 + // [315] phi utoa::value#2 = utoa::value#1 [phi:utoa->utoa::@1#2] -- register_copy + // [315] phi utoa::digit#2 = 0 [phi:utoa->utoa::@1#3] -- vbuz1=vbuc1 + lda #0 + sta.z digit + jmp __b1 + // utoa::@1 + __b1: + // [316] if(utoa::digit#2<4-1) goto utoa::@2 -- vbuz1_lt_vbuc1_then_la1 + lda.z digit + cmp #4-1 + bcc __b2 + jmp __b3 + // utoa::@3 + __b3: + // [317] utoa::$11 = (byte)utoa::value#2 -- vbuaa=_byte_vwuz1 + lda.z value + // [318] *utoa::buffer#11 = DIGITS[utoa::$11] -- _deref_pbuz1=pbuc1_derefidx_vbuaa + tay + lda DIGITS,y + ldy #0 + sta (buffer),y + // [319] utoa::buffer#3 = ++ utoa::buffer#11 -- pbuz1=_inc_pbuz1 + inc.z buffer + bne !+ + inc.z buffer+1 + !: + // [320] *utoa::buffer#3 = 0 -- _deref_pbuz1=vbuc1 + lda #0 + ldy #0 + sta (buffer),y + jmp __breturn + // utoa::@return + __breturn: + // [321] return + rts + // utoa::@2 + __b2: + // [322] utoa::$10 = utoa::digit#2 << 1 -- vbuaa=vbuz1_rol_1 + lda.z digit + asl + // [323] utoa::digit_value#0 = RADIX_HEXADECIMAL_VALUES[utoa::$10] -- vwuz1=pwuc1_derefidx_vbuaa + tay + lda RADIX_HEXADECIMAL_VALUES,y + sta.z digit_value + lda RADIX_HEXADECIMAL_VALUES+1,y + sta.z digit_value+1 + // [324] if(0!=utoa::started#2) goto utoa::@5 -- 0_neq_vbuxx_then_la1 + cpx #0 + bne __b5 + jmp __b7 + // utoa::@7 + __b7: + // [325] if(utoa::value#2>=utoa::digit_value#0) goto utoa::@5 -- vwuz1_ge_vwuz2_then_la1 + lda.z digit_value+1 + cmp.z value+1 + bne !+ + lda.z digit_value + cmp.z value + beq __b5 + !: + bcc __b5 + // [326] phi from utoa::@7 to utoa::@4 [phi:utoa::@7->utoa::@4] + __b4_from___b7: + // [326] phi utoa::buffer#14 = utoa::buffer#11 [phi:utoa::@7->utoa::@4#0] -- register_copy + // [326] phi utoa::started#4 = utoa::started#2 [phi:utoa::@7->utoa::@4#1] -- register_copy + // [326] phi utoa::value#6 = utoa::value#2 [phi:utoa::@7->utoa::@4#2] -- register_copy + jmp __b4 + // utoa::@4 + __b4: + // [327] utoa::digit#1 = ++ utoa::digit#2 -- vbuz1=_inc_vbuz1 + inc.z digit + // [315] phi from utoa::@4 to utoa::@1 [phi:utoa::@4->utoa::@1] + __b1_from___b4: + // [315] phi utoa::buffer#11 = utoa::buffer#14 [phi:utoa::@4->utoa::@1#0] -- register_copy + // [315] phi utoa::started#2 = utoa::started#4 [phi:utoa::@4->utoa::@1#1] -- register_copy + // [315] phi utoa::value#2 = utoa::value#6 [phi:utoa::@4->utoa::@1#2] -- register_copy + // [315] phi utoa::digit#2 = utoa::digit#1 [phi:utoa::@4->utoa::@1#3] -- register_copy + jmp __b1 + // utoa::@5 + __b5: + // [328] utoa_append::buffer#0 = utoa::buffer#11 + // [329] utoa_append::value#0 = utoa::value#2 + // [330] utoa_append::sub#0 = utoa::digit_value#0 + // [331] call utoa_append + // [374] phi from utoa::@5 to utoa_append [phi:utoa::@5->utoa_append] + utoa_append_from___b5: + jsr utoa_append + // [332] utoa_append::return#0 = utoa_append::value#2 + jmp __b6 + // utoa::@6 + __b6: + // [333] utoa::value#0 = utoa_append::return#0 + // [334] utoa::buffer#4 = ++ utoa::buffer#11 -- pbuz1=_inc_pbuz1 + inc.z buffer + bne !+ + inc.z buffer+1 + !: + // [326] phi from utoa::@6 to utoa::@4 [phi:utoa::@6->utoa::@4] + __b4_from___b6: + // [326] phi utoa::buffer#14 = utoa::buffer#4 [phi:utoa::@6->utoa::@4#0] -- register_copy + // [326] phi utoa::started#4 = 1 [phi:utoa::@6->utoa::@4#1] -- vbuxx=vbuc1 + ldx #1 + // [326] phi utoa::value#6 = utoa::value#0 [phi:utoa::@6->utoa::@4#2] -- register_copy + jmp __b4 +} + // vera_layer_set_config +// Set the configuration of the layer. +// - layer: Value of 0 or 1. +// - config: Specifies the modes which are specified using T256C / 'Bitmap Mode' / 'Color Depth'. +vera_layer_set_config: { + .label addr = $49 + // [335] vera_layer_set_config::addr#0 = *(vera_layer_config+vera_layer_mode_text::layer#0*SIZEOF_POINTER) -- pbuz1=_deref_qbuc1 + lda vera_layer_config+vera_layer_mode_text.layer*SIZEOF_POINTER + sta.z addr + lda vera_layer_config+vera_layer_mode_text.layer*SIZEOF_POINTER+1 + sta.z addr+1 + // [336] *vera_layer_set_config::addr#0 = vera_layer_mode_tile::config#10 -- _deref_pbuz1=vbuc1 + lda #vera_layer_mode_tile.config + ldy #0 + sta (addr),y + jmp __breturn + // vera_layer_set_config::@return + __breturn: + // [337] return + rts +} + // vera_layer_set_tilebase +// Set the base of the tiles for the layer with which the conio will interact. +// - layer: Value of 0 or 1. +// - tilebase: Specifies the base address of the tile map. +// Note that the register only specifies bits 16:11 of the address, +// so the resulting address in the VERA VRAM is always aligned to a multiple of 2048 bytes! +vera_layer_set_tilebase: { + .label addr = $4b + // [338] vera_layer_set_tilebase::addr#0 = *(vera_layer_tilebase+vera_layer_mode_text::layer#0*SIZEOF_POINTER) -- pbuz1=_deref_qbuc1 + lda vera_layer_tilebase+vera_layer_mode_text.layer*SIZEOF_POINTER + sta.z addr + lda vera_layer_tilebase+vera_layer_mode_text.layer*SIZEOF_POINTER+1 + sta.z addr+1 + // [339] *vera_layer_set_tilebase::addr#0 = >(vera_layer_mode_tile.tilebase_address&$ffff))&VERA_LAYER_TILEBASE_MASK + ldy #0 + sta (addr),y + jmp __breturn + // vera_layer_set_tilebase::@return + __breturn: + // [340] return + rts +} + // vera_layer_get_color +// Get the text and back color for text output in 16 color mode. +// - layer: Value of 0 or 1. +// - return: an 8 bit value with bit 7:4 containing the back color and bit 3:0 containing the front color. +// This will only work when the VERA is in 16 color mode! +// Note that on the VERA, the transparent color has value 0. +// vera_layer_get_color(byte register(X) layer) +vera_layer_get_color: { + .label addr = $4d + // [342] vera_layer_get_color::$3 = vera_layer_get_color::layer#2 << 1 -- vbuaa=vbuxx_rol_1 + txa + asl + // [343] vera_layer_get_color::addr#0 = vera_layer_config[vera_layer_get_color::$3] -- pbuz1=qbuc1_derefidx_vbuaa + tay + lda vera_layer_config,y + sta.z addr + lda vera_layer_config+1,y + sta.z addr+1 + // [344] vera_layer_get_color::$0 = *vera_layer_get_color::addr#0 & VERA_LAYER_CONFIG_256C -- vbuaa=_deref_pbuz1_band_vbuc1 + lda #VERA_LAYER_CONFIG_256C + ldy #0 + and (addr),y + // [345] if(0!=vera_layer_get_color::$0) goto vera_layer_get_color::@1 -- 0_neq_vbuaa_then_la1 + cmp #0 + bne __b1 + jmp __b2 + // vera_layer_get_color::@2 + __b2: + // [346] vera_layer_get_color::$1 = vera_layer_backcolor[vera_layer_get_color::layer#2] << 4 -- vbuaa=pbuc1_derefidx_vbuxx_rol_4 + lda vera_layer_backcolor,x + asl + asl + asl + asl + // [347] vera_layer_get_color::return#1 = vera_layer_get_color::$1 | vera_layer_textcolor[vera_layer_get_color::layer#2] -- vbuaa=vbuaa_bor_pbuc1_derefidx_vbuxx + ora vera_layer_textcolor,x + // [348] phi from vera_layer_get_color::@1 vera_layer_get_color::@2 to vera_layer_get_color::@return [phi:vera_layer_get_color::@1/vera_layer_get_color::@2->vera_layer_get_color::@return] + __breturn_from___b1: + __breturn_from___b2: + // [348] phi vera_layer_get_color::return#2 = vera_layer_get_color::return#0 [phi:vera_layer_get_color::@1/vera_layer_get_color::@2->vera_layer_get_color::@return#0] -- register_copy + jmp __breturn + // vera_layer_get_color::@return + __breturn: + // [349] return + rts + // vera_layer_get_color::@1 + __b1: + // [350] vera_layer_get_color::return#0 = vera_layer_textcolor[vera_layer_get_color::layer#2] -- vbuaa=pbuc1_derefidx_vbuxx + lda vera_layer_textcolor,x + jmp __breturn_from___b1 +} + // cputln +// Print a newline +cputln: { + .label temp = $4d + // [351] cputln::$2 = conio_screen_layer << 1 -- vbuaa=vbuz1_rol_1 + lda.z conio_screen_layer + asl + // [352] cputln::temp#0 = conio_line_text[cputln::$2] -- vwuz1=pwuc1_derefidx_vbuaa + // TODO: This needs to be optimized! other variations don't compile because of sections not available! + tay + lda conio_line_text,y + sta.z temp + lda conio_line_text+1,y + sta.z temp+1 + // [353] cputln::temp#1 = cputln::temp#0 + conio_rowskip -- vwuz1=vwuz1_plus_vwuz2 + lda.z temp + clc + adc.z conio_rowskip + sta.z temp + lda.z temp+1 + adc.z conio_rowskip+1 + sta.z temp+1 + // [354] cputln::$3 = conio_screen_layer << 1 -- vbuaa=vbuz1_rol_1 + lda.z conio_screen_layer + asl + // [355] conio_line_text[cputln::$3] = cputln::temp#1 -- pwuc1_derefidx_vbuaa=vwuz1 + tay + lda.z temp + sta conio_line_text,y + lda.z temp+1 + sta conio_line_text+1,y + // [356] conio_cursor_x[conio_screen_layer] = 0 -- pbuc1_derefidx_vbuz1=vbuc2 + lda #0 + ldy.z conio_screen_layer + sta conio_cursor_x,y + // [357] conio_cursor_y[conio_screen_layer] = ++ conio_cursor_y[conio_screen_layer] -- pbuc1_derefidx_vbuz1=_inc_pbuc1_derefidx_vbuz1 + ldx.z conio_screen_layer + inc conio_cursor_y,x + // [358] call cscroll + jsr cscroll + jmp __breturn + // cputln::@return + __breturn: + // [359] return + rts +} + // ultoa_append +// Used to convert a single digit of an unsigned number value to a string representation +// Counts a single digit up from '0' as long as the value is larger than sub. +// Each time the digit is increased sub is subtracted from value. +// - buffer : pointer to the char that receives the digit +// - value : The value where the digit will be derived from +// - sub : the value of a '1' in the digit. Subtracted continually while the digit is increased. +// (For decimal the subs used are 10000, 1000, 100, 10, 1) +// returns : the value reduced by sub * digit so that it is less than sub. +// ultoa_append(byte* zp($22) buffer, dword zp($b) value, dword zp($43) sub) +ultoa_append: { + .label buffer = $22 + .label value = $b + .label sub = $43 + .label return = $b + // [361] phi from ultoa_append to ultoa_append::@1 [phi:ultoa_append->ultoa_append::@1] + __b1_from_ultoa_append: + // [361] phi ultoa_append::digit#2 = 0 [phi:ultoa_append->ultoa_append::@1#0] -- vbuxx=vbuc1 + ldx #0 + // [361] phi ultoa_append::value#2 = ultoa_append::value#0 [phi:ultoa_append->ultoa_append::@1#1] -- register_copy + jmp __b1 + // ultoa_append::@1 + __b1: + // [362] if(ultoa_append::value#2>=ultoa_append::sub#0) goto ultoa_append::@2 -- vduz1_ge_vduz2_then_la1 + lda.z value+3 + cmp.z sub+3 + bcc !+ + bne __b2 + lda.z value+2 + cmp.z sub+2 + bcc !+ + bne __b2 + lda.z value+1 + cmp.z sub+1 + bcc !+ + bne __b2 + lda.z value + cmp.z sub + bcs __b2 + !: + jmp __b3 + // ultoa_append::@3 + __b3: + // [363] *ultoa_append::buffer#0 = DIGITS[ultoa_append::digit#2] -- _deref_pbuz1=pbuc1_derefidx_vbuxx + lda DIGITS,x + ldy #0 + sta (buffer),y + jmp __breturn + // ultoa_append::@return + __breturn: + // [364] return + rts + // ultoa_append::@2 + __b2: + // [365] ultoa_append::digit#1 = ++ ultoa_append::digit#2 -- vbuxx=_inc_vbuxx + inx + // [366] ultoa_append::value#1 = ultoa_append::value#2 - ultoa_append::sub#0 -- vduz1=vduz1_minus_vduz2 + lda.z value + sec + sbc.z sub + sta.z value + lda.z value+1 + sbc.z sub+1 + sta.z value+1 + lda.z value+2 + sbc.z sub+2 + sta.z value+2 + lda.z value+3 + sbc.z sub+3 + sta.z value+3 + // [361] phi from ultoa_append::@2 to ultoa_append::@1 [phi:ultoa_append::@2->ultoa_append::@1] + __b1_from___b2: + // [361] phi ultoa_append::digit#2 = ultoa_append::digit#1 [phi:ultoa_append::@2->ultoa_append::@1#0] -- register_copy + // [361] phi ultoa_append::value#2 = ultoa_append::value#1 [phi:ultoa_append::@2->ultoa_append::@1#1] -- register_copy + jmp __b1 +} + // uctoa_append +// Used to convert a single digit of an unsigned number value to a string representation +// Counts a single digit up from '0' as long as the value is larger than sub. +// Each time the digit is increased sub is subtracted from value. +// - buffer : pointer to the char that receives the digit +// - value : The value where the digit will be derived from +// - sub : the value of a '1' in the digit. Subtracted continually while the digit is increased. +// (For decimal the subs used are 10000, 1000, 100, 10, 1) +// returns : the value reduced by sub * digit so that it is less than sub. +// uctoa_append(byte* zp($22) buffer, byte register(X) value, byte zp($4f) sub) +uctoa_append: { + .label buffer = $22 + .label sub = $4f + // [368] phi from uctoa_append to uctoa_append::@1 [phi:uctoa_append->uctoa_append::@1] + __b1_from_uctoa_append: + // [368] phi uctoa_append::digit#2 = 0 [phi:uctoa_append->uctoa_append::@1#0] -- vbuyy=vbuc1 + ldy #0 + // [368] phi uctoa_append::value#2 = uctoa_append::value#0 [phi:uctoa_append->uctoa_append::@1#1] -- register_copy + jmp __b1 + // uctoa_append::@1 + __b1: + // [369] if(uctoa_append::value#2>=uctoa_append::sub#0) goto uctoa_append::@2 -- vbuxx_ge_vbuz1_then_la1 + cpx.z sub + bcs __b2 + jmp __b3 + // uctoa_append::@3 + __b3: + // [370] *uctoa_append::buffer#0 = DIGITS[uctoa_append::digit#2] -- _deref_pbuz1=pbuc1_derefidx_vbuyy + lda DIGITS,y + ldy #0 + sta (buffer),y + jmp __breturn + // uctoa_append::@return + __breturn: + // [371] return + rts + // uctoa_append::@2 + __b2: + // [372] uctoa_append::digit#1 = ++ uctoa_append::digit#2 -- vbuyy=_inc_vbuyy + iny + // [373] uctoa_append::value#1 = uctoa_append::value#2 - uctoa_append::sub#0 -- vbuxx=vbuxx_minus_vbuz1 + txa + sec + sbc.z sub + tax + // [368] phi from uctoa_append::@2 to uctoa_append::@1 [phi:uctoa_append::@2->uctoa_append::@1] + __b1_from___b2: + // [368] phi uctoa_append::digit#2 = uctoa_append::digit#1 [phi:uctoa_append::@2->uctoa_append::@1#0] -- register_copy + // [368] phi uctoa_append::value#2 = uctoa_append::value#1 [phi:uctoa_append::@2->uctoa_append::@1#1] -- register_copy + jmp __b1 +} + // utoa_append +// Used to convert a single digit of an unsigned number value to a string representation +// Counts a single digit up from '0' as long as the value is larger than sub. +// Each time the digit is increased sub is subtracted from value. +// - buffer : pointer to the char that receives the digit +// - value : The value where the digit will be derived from +// - sub : the value of a '1' in the digit. Subtracted continually while the digit is increased. +// (For decimal the subs used are 10000, 1000, 100, 10, 1) +// returns : the value reduced by sub * digit so that it is less than sub. +// utoa_append(byte* zp($22) buffer, word zp($f) value, word zp($47) sub) +utoa_append: { + .label buffer = $22 + .label value = $f + .label sub = $47 + .label return = $f + // [375] phi from utoa_append to utoa_append::@1 [phi:utoa_append->utoa_append::@1] + __b1_from_utoa_append: + // [375] phi utoa_append::digit#2 = 0 [phi:utoa_append->utoa_append::@1#0] -- vbuxx=vbuc1 + ldx #0 + // [375] phi utoa_append::value#2 = utoa_append::value#0 [phi:utoa_append->utoa_append::@1#1] -- register_copy + jmp __b1 + // utoa_append::@1 + __b1: + // [376] if(utoa_append::value#2>=utoa_append::sub#0) goto utoa_append::@2 -- vwuz1_ge_vwuz2_then_la1 + lda.z sub+1 + cmp.z value+1 + bne !+ + lda.z sub + cmp.z value + beq __b2 + !: + bcc __b2 + jmp __b3 + // utoa_append::@3 + __b3: + // [377] *utoa_append::buffer#0 = DIGITS[utoa_append::digit#2] -- _deref_pbuz1=pbuc1_derefidx_vbuxx + lda DIGITS,x + ldy #0 + sta (buffer),y + jmp __breturn + // utoa_append::@return + __breturn: + // [378] return + rts + // utoa_append::@2 + __b2: + // [379] utoa_append::digit#1 = ++ utoa_append::digit#2 -- vbuxx=_inc_vbuxx + inx + // [380] utoa_append::value#1 = utoa_append::value#2 - utoa_append::sub#0 -- vwuz1=vwuz1_minus_vwuz2 + lda.z value + sec + sbc.z sub + sta.z value + lda.z value+1 + sbc.z sub+1 + sta.z value+1 + // [375] phi from utoa_append::@2 to utoa_append::@1 [phi:utoa_append::@2->utoa_append::@1] + __b1_from___b2: + // [375] phi utoa_append::digit#2 = utoa_append::digit#1 [phi:utoa_append::@2->utoa_append::@1#0] -- register_copy + // [375] phi utoa_append::value#2 = utoa_append::value#1 [phi:utoa_append::@2->utoa_append::@1#1] -- register_copy + jmp __b1 +} + // cscroll +// Scroll the entire screen if the cursor is beyond the last line +cscroll: { + // [381] if(conio_cursor_y[conio_screen_layer]cscroll::@3] + __b3_from___b2: + jmp __b3 + // cscroll::@3 + __b3: + jmp __breturn + // cscroll::@return + __breturn: + // [385] return + rts + // [386] phi from cscroll::@1 to cscroll::@4 [phi:cscroll::@1->cscroll::@4] + __b4_from___b1: + jmp __b4 + // cscroll::@4 + __b4: + // [387] call insertup + jsr insertup + jmp __b5 + // cscroll::@5 + __b5: + // [388] gotoxy::y#2 = conio_screen_height - 1 -- vbuxx=vbuz1_minus_1 + ldx.z conio_screen_height + dex + // [389] call gotoxy + // [164] phi from cscroll::@5 to gotoxy [phi:cscroll::@5->gotoxy] + gotoxy_from___b5: + // [164] phi gotoxy::y#3 = gotoxy::y#2 [phi:cscroll::@5->gotoxy#0] -- register_copy + jsr gotoxy + jmp __breturn +} + // insertup +// Insert a new line, and scroll the upper part of the screen up. +insertup: { + .label cy = $4f + .label width = $50 + .label line = $51 + .label start = $51 + // [390] insertup::cy#0 = conio_cursor_y[conio_screen_layer] -- vbuz1=pbuc1_derefidx_vbuz2 + ldy.z conio_screen_layer + lda conio_cursor_y,y + sta.z cy + // [391] insertup::width#0 = conio_screen_width << 1 -- vbuz1=vbuz2_rol_1 + lda.z conio_screen_width + asl + sta.z width + // [392] phi from insertup to insertup::@1 [phi:insertup->insertup::@1] + __b1_from_insertup: + // [392] phi insertup::i#2 = 1 [phi:insertup->insertup::@1#0] -- vbuxx=vbuc1 + ldx #1 + jmp __b1 + // insertup::@1 + __b1: + // [393] if(insertup::i#2<=insertup::cy#0) goto insertup::@2 -- vbuxx_le_vbuz1_then_la1 + lda.z cy + stx.z $ff + cmp.z $ff + bcs __b2 + // [394] phi from insertup::@1 to insertup::@3 [phi:insertup::@1->insertup::@3] + __b3_from___b1: + jmp __b3 + // insertup::@3 + __b3: + // [395] call clearline + jsr clearline + jmp __breturn + // insertup::@return + __breturn: + // [396] return + rts + // insertup::@2 + __b2: + // [397] insertup::$3 = insertup::i#2 - 1 -- vbuaa=vbuxx_minus_1 + txa + sec + sbc #1 + // [398] insertup::line#0 = insertup::$3 << conio_rowshift -- vwuz1=vbuaa_rol_vbuz2 + ldy.z conio_rowshift + sta.z line + lda #0 + sta.z line+1 + cpy #0 + beq !e+ + !: + asl.z line + rol.z line+1 + dey + bne !- + !e: + // [399] insertup::start#0 = (byte*)CONIO_SCREEN_TEXT#101 + insertup::line#0 -- pbuz1=pbuz2_plus_vwuz1 + lda.z start + clc + adc.z CONIO_SCREEN_TEXT + sta.z start + lda.z start+1 + adc.z CONIO_SCREEN_TEXT+1 + sta.z start+1 + // [400] memcpy_in_vram::src#0 = insertup::start#0 + conio_rowskip -- pbuz1=pbuz2_plus_vwuz3 + lda.z start + clc + adc.z conio_rowskip + sta.z memcpy_in_vram.src + lda.z start+1 + adc.z conio_rowskip+1 + sta.z memcpy_in_vram.src+1 + // [401] memcpy_in_vram::dest#0 = (void*)insertup::start#0 + // [402] memcpy_in_vram::num#0 = insertup::width#0 -- vwuz1=vbuz2 + lda.z width + sta.z memcpy_in_vram.num + lda #0 + sta.z memcpy_in_vram.num+1 + // [403] call memcpy_in_vram + jsr memcpy_in_vram + jmp __b4 + // insertup::@4 + __b4: + // [404] insertup::i#1 = ++ insertup::i#2 -- vbuxx=_inc_vbuxx + inx + // [392] phi from insertup::@4 to insertup::@1 [phi:insertup::@4->insertup::@1] + __b1_from___b4: + // [392] phi insertup::i#2 = insertup::i#1 [phi:insertup::@4->insertup::@1#0] -- register_copy + jmp __b1 +} + // clearline +clearline: { + .label addr = $55 + .label c = $20 + // [405] *VERA_CTRL = *VERA_CTRL & ~VERA_ADDRSEL -- _deref_pbuc1=_deref_pbuc1_band_vbuc2 + // Select DATA0 + lda #VERA_ADDRSEL^$ff + and VERA_CTRL + sta VERA_CTRL + // [406] clearline::$5 = conio_screen_layer << 1 -- vbuaa=vbuz1_rol_1 + lda.z conio_screen_layer + asl + // [407] clearline::addr#0 = (byte*)CONIO_SCREEN_TEXT#101 + conio_line_text[clearline::$5] -- pbuz1=pbuz2_plus_pwuc1_derefidx_vbuaa + tay + clc + lda.z CONIO_SCREEN_TEXT + adc conio_line_text,y + sta.z addr + lda.z CONIO_SCREEN_TEXT+1 + adc conio_line_text+1,y + sta.z addr+1 + // [408] clearline::$1 = < clearline::addr#0 -- vbuaa=_lo_pbuz1 + lda.z addr + // [409] *VERA_ADDRX_L = clearline::$1 -- _deref_pbuc1=vbuaa + sta VERA_ADDRX_L + // [410] clearline::$2 = > clearline::addr#0 -- vbuaa=_hi_pbuz1 + lda.z addr+1 + // [411] *VERA_ADDRX_M = clearline::$2 -- _deref_pbuc1=vbuaa + sta VERA_ADDRX_M + // [412] *VERA_ADDRX_H = VERA_INC_1 -- _deref_pbuc1=vbuc2 + lda #VERA_INC_1 + sta VERA_ADDRX_H + // [413] vera_layer_get_color::layer#1 = conio_screen_layer -- vbuxx=vbuz1 + ldx.z conio_screen_layer + // [414] call vera_layer_get_color + // [341] phi from clearline to vera_layer_get_color [phi:clearline->vera_layer_get_color] + vera_layer_get_color_from_clearline: + // [341] phi vera_layer_get_color::layer#2 = vera_layer_get_color::layer#1 [phi:clearline->vera_layer_get_color#0] -- register_copy + jsr vera_layer_get_color + // [415] vera_layer_get_color::return#4 = vera_layer_get_color::return#2 + jmp __b4 + // clearline::@4 + __b4: + // [416] clearline::color#0 = vera_layer_get_color::return#4 -- vbuxx=vbuaa + tax + // [417] phi from clearline::@4 to clearline::@1 [phi:clearline::@4->clearline::@1] + __b1_from___b4: + // [417] phi clearline::c#2 = 0 [phi:clearline::@4->clearline::@1#0] -- vwuz1=vwuc1 + lda #<0 + sta.z c + lda #>0 + sta.z c+1 + jmp __b1 + // clearline::@1 + __b1: + // [418] if(clearline::c#2clearline::@1] + __b1_from___b2: + // [417] phi clearline::c#2 = clearline::c#1 [phi:clearline::@2->clearline::@1#0] -- register_copy + jmp __b1 +} + // memcpy_in_vram +// Copy block of memory (from VRAM to VRAM) +// Copies the values from the location pointed by src to the location pointed by dest. +// The method uses the VERA access ports 0 and 1 to copy data from and to in VRAM. +// - src_bank: 64K VRAM bank number to copy from (0/1). +// - src: pointer to the location to copy from. Note that the address is a 16 bit value! +// - src_increment: the increment indicator, VERA needs this because addressing increment is automated by VERA at each access. +// - dest_bank: 64K VRAM bank number to copy to (0/1). +// - dest: pointer to the location to copy to. Note that the address is a 16 bit value! +// - dest_increment: the increment indicator, VERA needs this because addressing increment is automated by VERA at each access. +// - num: The number of bytes to copy +// memcpy_in_vram(void* zp($51) dest, byte* zp($55) src, word zp($53) num) +memcpy_in_vram: { + .label i = $20 + .label dest = $51 + .label src = $55 + .label num = $53 + // [424] *VERA_CTRL = *VERA_CTRL & ~VERA_ADDRSEL -- _deref_pbuc1=_deref_pbuc1_band_vbuc2 + // Select DATA0 + lda #VERA_ADDRSEL^$ff + and VERA_CTRL + sta VERA_CTRL + // [425] memcpy_in_vram::$0 = < (void*)memcpy_in_vram::src#0 -- vbuaa=_lo_pvoz1 + lda.z src + // [426] *VERA_ADDRX_L = memcpy_in_vram::$0 -- _deref_pbuc1=vbuaa + // Set address + sta VERA_ADDRX_L + // [427] memcpy_in_vram::$1 = > (void*)memcpy_in_vram::src#0 -- vbuaa=_hi_pvoz1 + lda.z src+1 + // [428] *VERA_ADDRX_M = memcpy_in_vram::$1 -- _deref_pbuc1=vbuaa + sta VERA_ADDRX_M + // [429] *VERA_ADDRX_H = VERA_INC_1 -- _deref_pbuc1=vbuc2 + lda #VERA_INC_1 + sta VERA_ADDRX_H + // [430] *VERA_CTRL = *VERA_CTRL | VERA_ADDRSEL -- _deref_pbuc1=_deref_pbuc1_bor_vbuc2 + // Select DATA1 + lda #VERA_ADDRSEL + ora VERA_CTRL + sta VERA_CTRL + // [431] memcpy_in_vram::$3 = < memcpy_in_vram::dest#0 -- vbuaa=_lo_pvoz1 + lda.z dest + // [432] *VERA_ADDRX_L = memcpy_in_vram::$3 -- _deref_pbuc1=vbuaa + // Set address + sta VERA_ADDRX_L + // [433] memcpy_in_vram::$4 = > memcpy_in_vram::dest#0 -- vbuaa=_hi_pvoz1 + lda.z dest+1 + // [434] *VERA_ADDRX_M = memcpy_in_vram::$4 -- _deref_pbuc1=vbuaa + sta VERA_ADDRX_M + // [435] *VERA_ADDRX_H = VERA_INC_1 -- _deref_pbuc1=vbuc2 + lda #VERA_INC_1 + sta VERA_ADDRX_H + // [436] phi from memcpy_in_vram to memcpy_in_vram::@1 [phi:memcpy_in_vram->memcpy_in_vram::@1] + __b1_from_memcpy_in_vram: + // [436] phi memcpy_in_vram::i#2 = 0 [phi:memcpy_in_vram->memcpy_in_vram::@1#0] -- vwuz1=vwuc1 + lda #<0 + sta.z i + lda #>0 + sta.z i+1 + jmp __b1 + // Transfer the data + // memcpy_in_vram::@1 + __b1: + // [437] if(memcpy_in_vram::i#2memcpy_in_vram::@1] + __b1_from___b2: + // [436] phi memcpy_in_vram::i#2 = memcpy_in_vram::i#1 [phi:memcpy_in_vram::@2->memcpy_in_vram::@1#0] -- register_copy + jmp __b1 +} + // File Data +.segment Data + VERA_LAYER_WIDTH: .word $20, $40, $80, $100 + VERA_LAYER_HEIGHT: .word $20, $40, $80, $100 + // --- VERA function encapsulation --- + vera_mapbase_offset: .word 0, 0 + vera_mapbase_bank: .byte 0, 0 + vera_mapbase_address: .dword 0, 0 + vera_tilebase_offset: .word 0, 0 + vera_tilebase_bank: .byte 0, 0 + vera_tilebase_address: .dword 0, 0 + vera_layer_rowshift: .byte 0, 0 + vera_layer_rowskip: .word 0, 0 + vera_layer_config: .word VERA_L0_CONFIG, VERA_L1_CONFIG + vera_layer_mapbase: .word VERA_L0_MAPBASE, VERA_L1_MAPBASE + vera_layer_tilebase: .word VERA_L0_TILEBASE, VERA_L1_TILEBASE + vera_layer_textcolor: .byte WHITE, WHITE + vera_layer_backcolor: .byte BLUE, BLUE + // The number of bytes on the screen + // The current cursor x-position + conio_cursor_x: .byte 0, 0 + // The current cursor y-position + conio_cursor_y: .byte 0, 0 + // The current text cursor line start + conio_line_text: .word 0, 0 + // Is scrolling enabled when outputting beyond the end of the screen (1: yes, 0: no). + // If disabled the cursor just moves back to (0,0) instead + conio_scroll_enable: .byte 1, 1 + // The digits used for numbers + DIGITS: .text "0123456789abcdef" + // Values of hexadecimal digits + RADIX_HEXADECIMAL_VALUES_CHAR: .byte $10 + // Values of hexadecimal digits + RADIX_HEXADECIMAL_VALUES: .word $1000, $100, $10 + // Values of hexadecimal digits + RADIX_HEXADECIMAL_VALUES_LONG: .dword $10000000, $1000000, $100000, $10000, $1000, $100, $10 + // Buffer used for stringified number being printed + printf_buffer: .fill SIZEOF_STRUCT_PRINTF_BUFFER_NUMBER, 0 + +ASSEMBLER OPTIMIZATIONS +Removing instruction jmp __init1 +Removing instruction jmp __b1 +Removing instruction jmp __breturn +Removing instruction jmp __b3 +Removing instruction jmp __b4 +Removing instruction jmp __b5 +Removing instruction jmp __b6 +Removing instruction jmp __b7 +Removing instruction jmp __b8 +Removing instruction jmp __b9 +Removing instruction jmp __b2 +Removing instruction jmp __b1 +Removing instruction jmp __breturn +Removing instruction jmp __b1 +Removing instruction jmp __breturn +Removing instruction jmp __b3 +Removing instruction jmp __b4 +Removing instruction jmp __b5 +Removing instruction jmp __b6 +Removing instruction jmp __b7 +Removing instruction jmp __b8 +Removing instruction jmp __b9 +Removing instruction jmp __b10 +Removing instruction jmp __b11 +Removing instruction jmp __b12 +Removing instruction jmp __b13 +Removing instruction jmp __b14 +Removing instruction jmp __b15 +Removing instruction jmp __b16 +Removing instruction jmp __b17 +Removing instruction jmp __b1 +Removing instruction jmp __breturn +Removing instruction jmp __breturn +Removing instruction jmp __b3 +Removing instruction jmp __b4 +Removing instruction jmp vera_layer_get_width1 +Removing instruction jmp vera_layer_get_width1___breturn +Removing instruction jmp __b1 +Removing instruction jmp __b5 +Removing instruction jmp __b6 +Removing instruction jmp vera_layer_get_height1 +Removing instruction jmp vera_layer_get_height1___breturn +Removing instruction jmp __b2 +Removing instruction jmp __breturn +Removing instruction jmp __breturn +Removing instruction jmp __breturn +Removing instruction jmp __breturn +Removing instruction jmp __b4 +Removing instruction jmp __b1 +Removing instruction jmp __b3 +Removing instruction jmp __b2 +Removing instruction jmp __breturn +Removing instruction jmp __b1 +Removing instruction jmp __breturn +Removing instruction jmp __b1 +Removing instruction jmp __b2 +Removing instruction jmp __breturn +Removing instruction jmp __b1 +Removing instruction jmp __b2 +Removing instruction jmp __breturn +Removing instruction jmp __b1 +Removing instruction jmp __b2 +Removing instruction jmp __breturn +Removing instruction jmp __b1 +Removing instruction jmp __b2 +Removing instruction jmp __b4 +Removing instruction jmp __b5 +Removing instruction jmp __b3 +Removing instruction jmp __breturn +Removing instruction jmp __breturn +Removing instruction jmp __breturn +Removing instruction jmp __breturn +Removing instruction jmp __breturn +Removing instruction jmp __breturn +Removing instruction jmp __b7 +Removing instruction jmp __b2 +Removing instruction jmp __b3 +Removing instruction jmp __b4 +Removing instruction jmp __breturn +Removing instruction jmp __b6 +Removing instruction jmp __b1 +Removing instruction jmp __b1 +Removing instruction jmp __b3 +Removing instruction jmp __breturn +Removing instruction jmp __b7 +Removing instruction jmp __b4 +Removing instruction jmp __b6 +Removing instruction jmp __b1 +Removing instruction jmp __b3 +Removing instruction jmp __b2 +Removing instruction jmp __breturn +Removing instruction jmp __b1 +Removing instruction jmp __b3 +Removing instruction jmp __breturn +Removing instruction jmp __b7 +Removing instruction jmp __b4 +Removing instruction jmp __b6 +Removing instruction jmp __b1 +Removing instruction jmp __b3 +Removing instruction jmp __breturn +Removing instruction jmp __b7 +Removing instruction jmp __b4 +Removing instruction jmp __b6 +Removing instruction jmp __breturn +Removing instruction jmp __breturn +Removing instruction jmp __b2 +Removing instruction jmp __breturn +Removing instruction jmp __breturn +Removing instruction jmp __b1 +Removing instruction jmp __b3 +Removing instruction jmp __breturn +Removing instruction jmp __b1 +Removing instruction jmp __b3 +Removing instruction jmp __breturn +Removing instruction jmp __b1 +Removing instruction jmp __b3 +Removing instruction jmp __breturn +Removing instruction jmp __b1 +Removing instruction jmp __b2 +Removing instruction jmp __b3 +Removing instruction jmp __breturn +Removing instruction jmp __b4 +Removing instruction jmp __b5 +Removing instruction jmp __b1 +Removing instruction jmp __b3 +Removing instruction jmp __breturn +Removing instruction jmp __b4 +Removing instruction jmp __b4 +Removing instruction jmp __b1 +Removing instruction jmp __b3 +Removing instruction jmp __breturn +Removing instruction jmp __b1 +Removing instruction jmp __breturn +Succesful ASM optimization Pass5NextJumpElimination +Removing instruction lda #0 +Removing instruction lda #>0 +Removing instruction lda #<0 +Removing instruction lda #>0 +Removing instruction lda #0 +Removing instruction lda #<0 +Removing instruction lda #>0 +Removing instruction lda #>0 +Replacing instruction ldy.z __4 with TAY +Replacing instruction ldx.z __6+1 with TAX +Replacing instruction ldy.z __15 with TAY +Replacing instruction ldx.z __17+1 with TAX +Replacing instruction ldx.z conio_screen_layer with TAX +Removing instruction ldy.z conio_screen_layer +Removing instruction lda #>0 +Removing instruction lda #0 +Removing instruction ldy #0 +Removing instruction ldy #0 +Removing instruction ldy #0 +Removing instruction lda.z __16+1 +Replacing instruction lda #0 with TXA +Replacing instruction ldy #0 with TAY +Removing instruction lda #0 +Replacing instruction ldy #0 with TAY +Replacing instruction lda #0 with TXA +Replacing instruction ldy #0 with TAY +Removing instruction lda #>0 +Removing instruction lda #>0 +Succesful ASM optimization Pass5UnnecesaryLoadElimination +Replacing label __b1_from___b9 with __b1 +Replacing label __b4_from_gotoxy with __b1 +Replacing label __b1_from___b2 with __b1 +Replacing label __b1_from___b7 with __b1 +Replacing label __b2_from___b1 with __b2 +Replacing label __breturn_from___b1 with __breturn +Replacing label __breturn with __b3 +Replacing label __b4_from___b1 with __b4 +Replacing label __breturn with __b3 +Replacing label __breturn with __b3 +Replacing label __breturn with __b3 +Removing instruction __b1_from___init1: +Removing instruction main_from___b1: +Removing instruction __b3_from_conio_x16_init: +Removing instruction __b4_from___b3: +Removing instruction __b5_from___b4: +Removing instruction __b6_from___b5: +Removing instruction __b7_from___b6: +Removing instruction vera_layer_set_mapbase_from___b7: +Removing instruction __b8_from___b7: +Removing instruction vera_layer_set_mapbase_from___b8: +Removing instruction __b1_from___b2: +Removing instruction __b1_from___b9: +Removing instruction __b4_from___b3: +Removing instruction cputs_from___b4: +Removing instruction __b6_from___b5: +Removing instruction cputs_from___b6: +Removing instruction __b8_from___b7: +Removing instruction cputs_from___b8: +Removing instruction __b10_from___b9: +Removing instruction cputs_from___b10: +Removing instruction __b12_from___b11: +Removing instruction cputs_from___b12: +Removing instruction printf_uint_from___b13: +Removing instruction __b14_from___b13: +Removing instruction cputs_from___b14: +Removing instruction __b16_from___b15: +Removing instruction cputs_from___b16: +Removing instruction __b1_from_vera_layer_mode_text: +Removing instruction vera_layer_get_width1___breturn: +Removing instruction vera_layer_get_height1___breturn: +Removing instruction __b4_from_gotoxy: +Removing instruction __b4: +Removing instruction __b1_from___b4: +Removing instruction __b3_from___b1: +Removing instruction __b3: +Removing instruction __b1_from_cputs: +Removing instruction __b1_from___b2: +Removing instruction __b2_from___b1: +Removing instruction __b3_from___b5: +Removing instruction __b4_from___b3: +Removing instruction __b6_from___b5: +Removing instruction __b1_from___b7: +Removing instruction __b4_from___b7: +Removing instruction ultoa_append_from___b5: +Removing instruction __b2_from___b1: +Removing instruction __b2_from___b3: +Removing instruction cputs_from___b2: +Removing instruction __b4_from___b7: +Removing instruction uctoa_append_from___b5: +Removing instruction __b4_from___b7: +Removing instruction utoa_append_from___b5: +Removing instruction __breturn_from___b1: +Removing instruction __breturn_from___b2: +Removing instruction __b3_from___b2: +Removing instruction __breturn: +Removing instruction __b4_from___b1: +Removing instruction __b3_from___b1: +Succesful ASM optimization Pass5RedundantLabelElimination +Removing instruction __init1: +Removing instruction __b1: +Removing instruction __breturn: +Removing instruction vera_layer_mode_text_from_conio_x16_init: +Removing instruction __b3: +Removing instruction __b4: +Removing instruction __b5: +Removing instruction __b6: +Removing instruction __b7: +Removing instruction __b8: +Removing instruction __b9: +Removing instruction __b2: +Removing instruction gotoxy_from___b1: +Removing instruction __breturn: +Removing instruction __b1_from_main: +Removing instruction __breturn: +Removing instruction cputs_from___b2: +Removing instruction __b3: +Removing instruction printf_ulong_from___b3: +Removing instruction __b4: +Removing instruction __b5: +Removing instruction printf_ulong_from___b5: +Removing instruction __b6: +Removing instruction __b7: +Removing instruction printf_ulong_from___b7: +Removing instruction __b8: +Removing instruction __b9: +Removing instruction printf_uchar_from___b9: +Removing instruction __b10: +Removing instruction __b11: +Removing instruction printf_uchar_from___b11: +Removing instruction __b12: +Removing instruction __b13: +Removing instruction __b14: +Removing instruction __b15: +Removing instruction printf_uint_from___b15: +Removing instruction __b16: +Removing instruction __b17: +Removing instruction __b1_from___b17: +Removing instruction vera_layer_mode_tile_from_vera_layer_mode_text: +Removing instruction __b1: +Removing instruction __breturn: +Removing instruction __breturn: +Removing instruction __b3: +Removing instruction __b4: +Removing instruction vera_layer_get_width1: +Removing instruction __b1: +Removing instruction __b5: +Removing instruction __b6: +Removing instruction vera_layer_get_height1: +Removing instruction __b2: +Removing instruction __breturn: +Removing instruction __breturn: +Removing instruction __breturn: +Removing instruction __breturn: +Removing instruction __b1_from_gotoxy: +Removing instruction __breturn: +Removing instruction __breturn: +Removing instruction cputc_from___b2: +Removing instruction __b1: +Removing instruction ultoa_from___b1: +Removing instruction __b2: +Removing instruction printf_number_buffer_from___b2: +Removing instruction __breturn: +Removing instruction __b1: +Removing instruction uctoa_from___b1: +Removing instruction __b2: +Removing instruction printf_number_buffer_from___b2: +Removing instruction __breturn: +Removing instruction __b1: +Removing instruction utoa_from___b1: +Removing instruction __b2: +Removing instruction printf_number_buffer_from___b2: +Removing instruction __breturn: +Removing instruction __b1: +Removing instruction __b2: +Removing instruction __b4: +Removing instruction vera_layer_set_mapbase_from___b4: +Removing instruction __b5: +Removing instruction __b3: +Removing instruction __breturn: +Removing instruction __breturn: +Removing instruction __breturn: +Removing instruction __breturn: +Removing instruction __breturn: +Removing instruction __breturn: +Removing instruction vera_layer_get_color_from_cputc: +Removing instruction __b7: +Removing instruction __b2: +Removing instruction __b3: +Removing instruction __b4: +Removing instruction __b6: +Removing instruction __b1_from_ultoa: +Removing instruction __b3: +Removing instruction __breturn: +Removing instruction __b7: +Removing instruction __b1_from___b4: +Removing instruction __b6: +Removing instruction __b4_from___b6: +Removing instruction __b1: +Removing instruction __b3: +Removing instruction cputc_from___b3: +Removing instruction __breturn: +Removing instruction __b1_from_uctoa: +Removing instruction __b3: +Removing instruction __breturn: +Removing instruction __b7: +Removing instruction __b1_from___b4: +Removing instruction __b6: +Removing instruction __b4_from___b6: +Removing instruction __b1_from_utoa: +Removing instruction __b3: +Removing instruction __breturn: +Removing instruction __b7: +Removing instruction __b1_from___b4: +Removing instruction __b6: +Removing instruction __b4_from___b6: +Removing instruction __breturn: +Removing instruction __breturn: +Removing instruction __b2: +Removing instruction __breturn: +Removing instruction __b1_from_ultoa_append: +Removing instruction __b3: +Removing instruction __breturn: +Removing instruction __b1_from___b2: +Removing instruction __b1_from_uctoa_append: +Removing instruction __b3: +Removing instruction __breturn: +Removing instruction __b1_from___b2: +Removing instruction __b1_from_utoa_append: +Removing instruction __b3: +Removing instruction __breturn: +Removing instruction __b1_from___b2: +Removing instruction __b1: +Removing instruction __b2: +Removing instruction __b5: +Removing instruction gotoxy_from___b5: +Removing instruction __b1_from_insertup: +Removing instruction __b3: +Removing instruction __breturn: +Removing instruction __b4: +Removing instruction __b1_from___b4: +Removing instruction vera_layer_get_color_from_clearline: +Removing instruction __b4: +Removing instruction __b1_from___b4: +Removing instruction __b3: +Removing instruction __breturn: +Removing instruction __b1_from___b2: +Removing instruction __b1_from_memcpy_in_vram: +Removing instruction __breturn: +Removing instruction __b1_from___b2: +Succesful ASM optimization Pass5UnusedLabelElimination +Replacing jump to rts with rts in jmp __breturn +Replacing jump to rts with rts in jmp __breturn +Replacing jump to rts with rts in jmp __breturn +Replacing jump to rts with rts in jmp __b3 +Succesful ASM optimization Pass5DoubleJumpElimination +Removing instruction jmp __b1 +Removing instruction bne __b2 +Removing instruction bcc __b3 +Succesful ASM optimization Pass5NextJumpElimination +Removing instruction lda #0 +Replacing instruction lda #0 with TYA +Replacing instruction lda #0 with TYA +Removing instruction lda #0 +Replacing instruction lda #0 with TYA +Removing instruction ldy.z conio_screen_layer +Removing instruction lda.z digit_value+1 +Removing instruction ldy.z conio_screen_layer +Removing instruction ldy.z conio_screen_layer +Succesful ASM optimization Pass5UnnecesaryLoadElimination +Removing instruction __b2: +Removing instruction __breturn: +Succesful ASM optimization Pass5UnusedLabelElimination + +FINAL SYMBOL TABLE +const nomodify byte BLUE = 6 +byte CONIO_SCREEN_BANK +byte CONIO_SCREEN_BANK#10 CONIO_SCREEN_BANK zp[1]:56 523560.7434554974 +byte* CONIO_SCREEN_TEXT +word CONIO_SCREEN_TEXT#101 CONIO_SCREEN_TEXT zp[2]:57 0.4225941422594142 +const byte* DIGITS[] = "0123456789abcdef"z +const byte OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS = 1 +const byte RADIX::BINARY = 2 +const byte RADIX::DECIMAL = $a +const byte RADIX::HEXADECIMAL = $10 +const byte RADIX::OCTAL = 8 +const word* RADIX_HEXADECIMAL_VALUES[] = { $1000, $100, $10 } +const byte* RADIX_HEXADECIMAL_VALUES_CHAR[] = { $10 } +const dword* RADIX_HEXADECIMAL_VALUES_LONG[] = { $10000000, $1000000, $100000, $10000, $1000, $100, $10 } +const byte SIZEOF_DWORD = 4 +const byte SIZEOF_POINTER = 2 +const byte SIZEOF_STRUCT_PRINTF_BUFFER_NUMBER = $c +const byte SIZEOF_WORD = 2 +const nomodify byte VERA_ADDRSEL = 1 +const nomodify byte* VERA_ADDRX_H = (byte*) 40738 +const nomodify byte* VERA_ADDRX_L = (byte*) 40736 +const nomodify byte* VERA_ADDRX_M = (byte*) 40737 +const nomodify byte* VERA_CTRL = (byte*) 40741 +const nomodify byte* VERA_DATA0 = (byte*) 40739 +const nomodify byte* VERA_DATA1 = (byte*) 40740 +const nomodify byte* VERA_DC_HSCALE = (byte*) 40746 +const nomodify byte* VERA_DC_VSCALE = (byte*) 40747 +const nomodify byte VERA_INC_1 = $10 +const nomodify byte* VERA_L0_CONFIG = (byte*) 40749 +const nomodify byte* VERA_L0_MAPBASE = (byte*) 40750 +const nomodify byte* VERA_L0_TILEBASE = (byte*) 40751 +const nomodify byte* VERA_L1_CONFIG = (byte*) 40756 +const nomodify byte* VERA_L1_MAPBASE = (byte*) 40757 +const nomodify byte* VERA_L1_TILEBASE = (byte*) 40758 +const nomodify byte VERA_LAYER_CONFIG_256C = 8 +const to_nomodify word* VERA_LAYER_HEIGHT[4] = { $20, $40, $80, $100 } +const nomodify byte VERA_LAYER_HEIGHT_64 = $40 +const nomodify byte VERA_LAYER_HEIGHT_MASK = $c0 +const nomodify byte VERA_LAYER_TILEBASE_MASK = $fc +const to_nomodify word* VERA_LAYER_WIDTH[4] = { $20, $40, $80, $100 } +const nomodify byte VERA_LAYER_WIDTH_128 = $20 +const nomodify byte VERA_LAYER_WIDTH_MASK = $30 +const nomodify byte WHITE = 1 +void __start() +void clearline() +byte~ clearline::$1 reg byte a 2.000000000002E12 +byte~ clearline::$2 reg byte a 2.000000000002E12 +byte~ clearline::$5 reg byte a 2.000000000002E12 +byte* clearline::addr +byte* clearline::addr#0 addr zp[2]:85 1.000000000001E12 +word clearline::c +word clearline::c#1 c zp[2]:32 2.000000000000002E15 +word clearline::c#2 c zp[2]:32 7.500000000000008E14 +byte clearline::color +byte clearline::color#0 reg byte x 1.668333333333337E14 +const byte* conio_cursor_x[2] = { 0, 0 } +const byte* conio_cursor_y[2] = { 0, 0 } +word conio_height loadstore zp[2]:23 5.714285773714286E7 +const word* conio_line_text[2] = { 0, 0 } +byte conio_rowshift loadstore zp[1]:25 4.5917431192708716E11 +word conio_rowskip loadstore zp[2]:26 5.00005000000525E11 +volatile byte conio_screen_height loadstore zp[1]:19 6.091370559746193E8 +byte conio_screen_layer loadstore zp[1]:20 1.3214230772042307E10 +volatile byte conio_screen_width loadstore zp[1]:18 4.311207327586233E12 +const byte* conio_scroll_enable[2] = { 1, 1 } +word conio_width loadstore zp[2]:21 564972.3389830509 +void conio_x16_init() +const nomodify byte* conio_x16_init::BASIC_CURSOR_LINE = (byte*) 214 +byte conio_x16_init::line +byte conio_x16_init::line#0 line zp[1]:2 2.1999999999999997 +byte conio_x16_init::line#1 line zp[1]:2 22.0 +byte conio_x16_init::line#3 line zp[1]:2 33.0 +void cputc(byte cputc::c) +byte~ cputc::$15 reg byte a 2.00000002E8 +word~ cputc::$16 zp[2]:65 2.00000002E8 +byte~ cputc::$2 reg byte a 2.00000002E8 +byte~ cputc::$4 reg byte a 2.00000002E8 +byte~ cputc::$5 reg byte a 2.00000002E8 +byte~ cputc::$6 reg byte a 2.00000002E8 +byte cputc::c +byte cputc::c#0 c zp[1]:17 2.0000002E7 +byte cputc::c#2 c zp[1]:17 20002.0 +byte cputc::c#3 c zp[1]:17 1.2353529647058824E7 +byte cputc::color +byte cputc::color#0 reg byte x 1.428571442857143E7 +byte* cputc::conio_addr +byte* cputc::conio_addr#0 conio_addr zp[2]:71 1.00000001E8 +byte* cputc::conio_addr#1 conio_addr zp[2]:71 6.0000000599999994E7 +byte cputc::scroll_enable +byte cputc::scroll_enable#0 reg byte a 2.00000002E8 +void cputln() +byte~ cputln::$2 reg byte a 2.000000002E9 +byte~ cputln::$3 reg byte a 2.000000002E9 +word cputln::temp +word cputln::temp#0 temp zp[2]:77 2.000000002E9 +word cputln::temp#1 temp zp[2]:77 1.000000001E9 +void cputs(to_nomodify byte* cputs::s) +byte cputs::c +byte cputs::c#1 reg byte a 1.0000001E7 +to_nomodify byte* cputs::s +to_nomodify byte* cputs::s#0 s zp[2]:34 5000000.5 +to_nomodify byte* cputs::s#10 s zp[2]:34 1.5050002E7 +to_nomodify byte* cputs::s#11 s zp[2]:34 100001.0 +void cscroll() +void gotoxy(byte gotoxy::x , byte gotoxy::y) +byte~ gotoxy::$5 reg byte a 2.00000000002E11 +word~ gotoxy::$6 zp[2]:61 2.00000000002E11 +word gotoxy::line_offset +word gotoxy::line_offset#0 line_offset zp[2]:61 1.00000000001E11 +byte gotoxy::x +byte gotoxy::y +byte gotoxy::y#0 reg byte x 22.0 +byte gotoxy::y#2 reg byte x 2.0000000002E10 +byte gotoxy::y#3 reg byte x 7.000000000466667E10 +byte gotoxy::y#4 reg byte x 4.00000000004E10 +void insertup() +byte~ insertup::$3 reg byte a 2.00000000000002E14 +byte insertup::cy +byte insertup::cy#0 cy zp[1]:79 8.341666666666834E12 +byte insertup::i +byte insertup::i#1 reg byte x 2.00000000000002E14 +byte insertup::i#2 reg byte x 4.444444444444489E13 +word insertup::line +word insertup::line#0 line zp[2]:81 2.00000000000002E14 +byte* insertup::start +byte* insertup::start#0 start zp[2]:81 1.00000000000001E14 +byte insertup::width +byte insertup::width#0 width zp[1]:80 9.100000000000182E12 +void main() +dword~ main::$1 zp[4]:28 202.0 +word~ main::$10 zp[2]:38 202.0 +word~ main::$11 zp[2]:38 202.0 +byte~ main::$12 reg byte a 101.0 +word~ main::$13 zp[2]:36 101.0 +word~ main::$14 zp[2]:43 202.0 +word~ main::$15 zp[2]:43 202.0 +byte~ main::$16 reg byte y 33.666666666666664 +word~ main::$17 zp[2]:45 202.0 +byte~ main::$18 reg byte x 101.0 +word~ main::$19 zp[2]:47 202.0 +word~ main::$20 zp[2]:47 40.4 +word~ main::$21 zp[2]:49 202.0 +word~ main::$22 zp[2]:49 202.0 +byte~ main::$23 reg byte a 101.0 +word~ main::$24 zp[2]:47 101.0 +word~ main::$25 zp[2]:15 202.0 +word~ main::$27 zp[2]:54 202.0 +word~ main::$3 zp[2]:32 202.0 +word~ main::$30 zp[2]:36 202.0 +word~ main::$31 zp[2]:40 202.0 +word~ main::$32 zp[2]:47 202.0 +word~ main::$33 zp[2]:51 202.0 +word~ main::$4 zp[2]:32 202.0 +byte~ main::$5 reg byte y 33.666666666666664 +word~ main::$6 zp[2]:34 202.0 +byte~ main::$7 reg byte x 101.0 +word~ main::$8 zp[2]:36 202.0 +word~ main::$9 zp[2]:36 40.4 +byte main::bankbeg +byte main::bankbeg#0 bankbeg zp[1]:42 5.9411764705882355 +byte main::bankend +byte main::bankend#0 bankend zp[1]:53 8.416666666666666 +word main::beg +word main::beg#0 beg zp[2]:15 67.33333333333333 +word main::beg#1 beg zp[2]:15 8.782608695652174 +const nomodify word main::borderbeg = $a000 +dword main::calcbeg +dword main::calcend +dword main::calcend#0 calcend zp[4]:28 13.772727272727272 +word main::end +word main::end#0 end zp[2]:54 101.0 +word main::end#1 end zp[2]:54 7.769230769230769 +const word main::inc = $123 +dword main::num +dword main::num#1 num zp[4]:7 151.5 +dword main::num#10 num zp[4]:7 6.029850746268656 +const byte* main::s[6] = "cbeg=" +const byte* main::s1[7] = ", add=" +const byte* main::s2[8] = ", cend=" +const byte* main::s3[8] = ", bbeg=" +const byte* main::s4[8] = ", bend=" +const byte* main::s5[7] = ", beg=" +const byte* main::s6[7] = ", end=" +const byte* main::s7[2] = " +" +dword main::src1 +dword main::src1#1 src1 zp[4]:3 202.0 +dword main::src1#10 src1 zp[4]:3 13.367647058823529 +void memcpy_in_vram(byte memcpy_in_vram::dest_bank , void* memcpy_in_vram::dest , byte memcpy_in_vram::dest_increment , byte memcpy_in_vram::src_bank , void* memcpy_in_vram::src , byte memcpy_in_vram::src_increment , word memcpy_in_vram::num) +byte~ memcpy_in_vram::$0 reg byte a 2.000000000000002E15 +byte~ memcpy_in_vram::$1 reg byte a 2.000000000000002E15 +byte~ memcpy_in_vram::$3 reg byte a 2.000000000000002E15 +byte~ memcpy_in_vram::$4 reg byte a 2.000000000000002E15 +void* memcpy_in_vram::dest +void* memcpy_in_vram::dest#0 dest zp[2]:81 1.909090909090912E14 +byte memcpy_in_vram::dest_bank +byte memcpy_in_vram::dest_increment +word memcpy_in_vram::i +word memcpy_in_vram::i#1 i zp[2]:32 2.0E19 +word memcpy_in_vram::i#2 i zp[2]:32 1.0E19 +word memcpy_in_vram::num +word memcpy_in_vram::num#0 num zp[2]:83 5.8824117647058829E17 +void* memcpy_in_vram::src +byte* memcpy_in_vram::src#0 src zp[2]:85 1.6666666666666834E13 +byte memcpy_in_vram::src_bank +byte memcpy_in_vram::src_increment +struct printf_buffer_number printf_buffer loadstore mem[12] = {} +void printf_number_buffer(byte printf_number_buffer::buffer_sign , byte* printf_number_buffer::buffer_digits , byte printf_number_buffer::format_min_length , byte printf_number_buffer::format_justify_left , byte printf_number_buffer::format_sign_always , byte printf_number_buffer::format_zero_padding , byte printf_number_buffer::format_upper_case , byte printf_number_buffer::format_radix) +struct printf_buffer_number printf_number_buffer::buffer +byte* printf_number_buffer::buffer_digits +byte printf_number_buffer::buffer_sign +byte printf_number_buffer::buffer_sign#0 reg byte a 2002.0 +byte printf_number_buffer::buffer_sign#1 reg byte a 2002.0 +byte printf_number_buffer::buffer_sign#10 reg byte a 11502.5 +byte printf_number_buffer::buffer_sign#2 reg byte a 2002.0 +struct printf_format_number printf_number_buffer::format +byte printf_number_buffer::format_justify_left +byte printf_number_buffer::format_min_length +byte printf_number_buffer::format_radix +byte printf_number_buffer::format_sign_always +byte printf_number_buffer::format_upper_case +byte printf_number_buffer::format_zero_padding +signed byte printf_number_buffer::len +signed byte printf_number_buffer::padding +void printf_uchar(byte printf_uchar::uvalue , byte printf_uchar::format_min_length , byte printf_uchar::format_justify_left , byte printf_uchar::format_sign_always , byte printf_uchar::format_zero_padding , byte printf_uchar::format_upper_case , byte printf_uchar::format_radix) +struct printf_format_number printf_uchar::format +byte printf_uchar::format_justify_left +byte printf_uchar::format_min_length +byte printf_uchar::format_radix +byte printf_uchar::format_sign_always +byte printf_uchar::format_upper_case +byte printf_uchar::format_zero_padding +byte printf_uchar::uvalue +byte printf_uchar::uvalue#0 reg byte x 202.0 +byte printf_uchar::uvalue#1 reg byte x 202.0 +byte printf_uchar::uvalue#2 reg byte x 601.5 +void printf_uint(word printf_uint::uvalue , byte printf_uint::format_min_length , byte printf_uint::format_justify_left , byte printf_uint::format_sign_always , byte printf_uint::format_zero_padding , byte printf_uint::format_upper_case , byte printf_uint::format_radix) +struct printf_format_number printf_uint::format +byte printf_uint::format_justify_left +byte printf_uint::format_min_length +byte printf_uint::format_radix +byte printf_uint::format_sign_always +byte printf_uint::format_upper_case +byte printf_uint::format_zero_padding +word printf_uint::uvalue +word printf_uint::uvalue#0 uvalue zp[2]:15 202.0 +word printf_uint::uvalue#1 uvalue zp[2]:15 202.0 +word printf_uint::uvalue#2 uvalue zp[2]:15 601.5 +void printf_ulong(dword printf_ulong::uvalue , byte printf_ulong::format_min_length , byte printf_ulong::format_justify_left , byte printf_ulong::format_sign_always , byte printf_ulong::format_zero_padding , byte printf_ulong::format_upper_case , byte printf_ulong::format_radix) +struct printf_format_number printf_ulong::format +byte printf_ulong::format_justify_left +byte printf_ulong::format_min_length +byte printf_ulong::format_radix +byte printf_ulong::format_sign_always +byte printf_ulong::format_upper_case +byte printf_ulong::format_zero_padding +dword printf_ulong::uvalue +dword printf_ulong::uvalue#0 uvalue zp[4]:11 202.0 +dword printf_ulong::uvalue#1 uvalue zp[4]:11 202.0 +dword printf_ulong::uvalue#2 uvalue zp[4]:11 202.0 +dword printf_ulong::uvalue#3 uvalue zp[4]:11 652.0 +void screenlayer(byte screenlayer::layer) +word~ screenlayer::$2 zp[2]:59 202.0 +byte~ screenlayer::$3 reg byte a 202.0 +word~ screenlayer::$4 zp[2]:61 202.0 +word~ screenlayer::$5 zp[2]:73 202.0 +byte screenlayer::layer +const byte screenlayer::layer#0 layer = 1 +byte~ screenlayer::vera_layer_get_height1_$0 reg byte a 202.0 +byte~ screenlayer::vera_layer_get_height1_$1 reg byte a 202.0 +byte~ screenlayer::vera_layer_get_height1_$2 reg byte a 202.0 +byte~ screenlayer::vera_layer_get_height1_$3 reg byte a 202.0 +byte* screenlayer::vera_layer_get_height1_config +byte* screenlayer::vera_layer_get_height1_config#0 vera_layer_get_height1_config zp[2]:63 202.0 +byte screenlayer::vera_layer_get_height1_layer +byte screenlayer::vera_layer_get_height1_layer#0 reg byte a 202.0 +word screenlayer::vera_layer_get_height1_return +word screenlayer::vera_layer_get_height1_return#0 vera_layer_get_height1_return zp[2]:73 202.0 +word screenlayer::vera_layer_get_height1_return#1 vera_layer_get_height1_return zp[2]:73 202.0 +byte~ screenlayer::vera_layer_get_width1_$0 reg byte a 202.0 +byte~ screenlayer::vera_layer_get_width1_$1 reg byte a 202.0 +byte~ screenlayer::vera_layer_get_width1_$2 reg byte a 202.0 +byte~ screenlayer::vera_layer_get_width1_$3 reg byte a 202.0 +byte* screenlayer::vera_layer_get_width1_config +byte* screenlayer::vera_layer_get_width1_config#0 vera_layer_get_width1_config zp[2]:75 202.0 +byte screenlayer::vera_layer_get_width1_layer +byte screenlayer::vera_layer_get_width1_layer#0 reg byte a 202.0 +word screenlayer::vera_layer_get_width1_return +word screenlayer::vera_layer_get_width1_return#0 vera_layer_get_width1_return zp[2]:59 202.0 +word screenlayer::vera_layer_get_width1_return#1 vera_layer_get_width1_return zp[2]:59 202.0 +void screensize(byte* screensize::x , byte* screensize::y) +byte~ screensize::$1 reg byte a 202.0 +byte~ screensize::$3 reg byte a 202.0 +byte screensize::hscale +byte screensize::hscale#0 reg byte a 202.0 +byte screensize::vscale +byte screensize::vscale#0 reg byte a 202.0 +byte* screensize::x +const byte* screensize::x#0 x = &conio_screen_width +byte* screensize::y +const byte* screensize::y#0 y = &conio_screen_height +void uctoa(byte uctoa::value , byte* uctoa::buffer , byte uctoa::radix) +byte* uctoa::buffer +byte* uctoa::buffer#11 buffer zp[2]:34 335000.50000000006 +byte* uctoa::buffer#14 buffer zp[2]:34 1500001.5 +byte* uctoa::buffer#3 buffer zp[2]:34 20002.0 +byte* uctoa::buffer#4 buffer zp[2]:34 2000002.0 +byte uctoa::digit +byte uctoa::digit#1 digit zp[1]:17 2000002.0 +byte uctoa::digit#2 digit zp[1]:17 307692.6153846154 +byte uctoa::digit_value +byte uctoa::digit_value#0 digit_value zp[1]:79 600000.6000000001 +byte* uctoa::digit_values +byte uctoa::max_digits +byte uctoa::radix +byte uctoa::started +byte uctoa::started#2 started zp[1]:42 600000.6000000001 +byte uctoa::started#4 started zp[1]:42 1000001.0 +byte uctoa::value +byte uctoa::value#0 reg byte x 1000001.0 +byte uctoa::value#1 reg byte x 5501.0 +byte uctoa::value#2 reg byte x 670001.0000000001 +byte uctoa::value#6 reg byte x 1500001.5 +byte uctoa_append(byte* uctoa_append::buffer , byte uctoa_append::value , byte uctoa_append::sub) +byte* uctoa_append::buffer +byte* uctoa_append::buffer#0 buffer zp[2]:34 1375000.25 +byte uctoa_append::digit +byte uctoa_append::digit#1 reg byte y 1.0000000001E10 +byte uctoa_append::digit#2 reg byte y 1.00050000015E10 +byte uctoa_append::return +byte uctoa_append::return#0 reg byte x 2000002.0 +byte uctoa_append::sub +byte uctoa_append::sub#0 sub zp[1]:79 3.3335000005E9 +byte uctoa_append::value +byte uctoa_append::value#0 reg byte x 3666667.333333333 +byte uctoa_append::value#1 reg byte x 2.0000000002E10 +byte uctoa_append::value#2 reg byte x 5.001833334166666E9 +void ultoa(dword ultoa::value , byte* ultoa::buffer , byte ultoa::radix) +byte~ ultoa::$10 reg byte a 2000002.0 +byte~ ultoa::$11 reg byte a 20002.0 +byte* ultoa::buffer +byte* ultoa::buffer#11 buffer zp[2]:34 287143.2857142857 +byte* ultoa::buffer#14 buffer zp[2]:34 1500001.5 +byte* ultoa::buffer#3 buffer zp[2]:34 20002.0 +byte* ultoa::buffer#4 buffer zp[2]:34 2000002.0 +byte ultoa::digit +byte ultoa::digit#1 digit zp[1]:17 2000002.0 +byte ultoa::digit#2 digit zp[1]:17 285714.5714285714 +dword ultoa::digit_value +dword ultoa::digit_value#0 digit_value zp[4]:67 600000.6000000001 +dword* ultoa::digit_values +byte ultoa::max_digits +byte ultoa::radix +byte ultoa::started +byte ultoa::started#2 reg byte x 500000.5 +byte ultoa::started#4 reg byte x 1000001.0 +dword ultoa::value +dword ultoa::value#0 value zp[4]:11 1000001.0 +dword ultoa::value#1 value zp[4]:11 5501.0 +dword ultoa::value#2 value zp[4]:11 572857.857142857 +dword ultoa::value#6 value zp[4]:11 1500001.5 +dword ultoa_append(byte* ultoa_append::buffer , dword ultoa_append::value , dword ultoa_append::sub) +byte* ultoa_append::buffer +byte* ultoa_append::buffer#0 buffer zp[2]:34 1375000.25 +byte ultoa_append::digit +byte ultoa_append::digit#1 reg byte x 1.0000000001E10 +byte ultoa_append::digit#2 reg byte x 1.00050000015E10 +dword ultoa_append::return +dword ultoa_append::return#0 return zp[4]:11 2000002.0 +dword ultoa_append::sub +dword ultoa_append::sub#0 sub zp[4]:67 3.3335000005E9 +dword ultoa_append::value +dword ultoa_append::value#0 value zp[4]:11 3666667.333333333 +dword ultoa_append::value#1 value zp[4]:11 2.0000000002E10 +dword ultoa_append::value#2 value zp[4]:11 5.001833334166666E9 +void utoa(word utoa::value , byte* utoa::buffer , byte utoa::radix) +byte~ utoa::$10 reg byte a 2000002.0 +byte~ utoa::$11 reg byte a 20002.0 +byte* utoa::buffer +byte* utoa::buffer#11 buffer zp[2]:34 287143.2857142857 +byte* utoa::buffer#14 buffer zp[2]:34 1500001.5 +byte* utoa::buffer#3 buffer zp[2]:34 20002.0 +byte* utoa::buffer#4 buffer zp[2]:34 2000002.0 +byte utoa::digit +byte utoa::digit#1 digit zp[1]:17 2000002.0 +byte utoa::digit#2 digit zp[1]:17 285714.5714285714 +word utoa::digit_value +word utoa::digit_value#0 digit_value zp[2]:71 600000.6000000001 +word* utoa::digit_values +byte utoa::max_digits +byte utoa::radix +byte utoa::started +byte utoa::started#2 reg byte x 500000.5 +byte utoa::started#4 reg byte x 1000001.0 +word utoa::value +word utoa::value#0 value zp[2]:15 1000001.0 +word utoa::value#1 value zp[2]:15 5501.0 +word utoa::value#2 value zp[2]:15 572857.857142857 +word utoa::value#6 value zp[2]:15 1500001.5 +word utoa_append(byte* utoa_append::buffer , word utoa_append::value , word utoa_append::sub) +byte* utoa_append::buffer +byte* utoa_append::buffer#0 buffer zp[2]:34 1375000.25 +byte utoa_append::digit +byte utoa_append::digit#1 reg byte x 1.0000000001E10 +byte utoa_append::digit#2 reg byte x 1.00050000015E10 +word utoa_append::return +word utoa_append::return#0 return zp[2]:15 2000002.0 +word utoa_append::sub +word utoa_append::sub#0 sub zp[2]:71 3.3335000005E9 +word utoa_append::value +word utoa_append::value#0 value zp[2]:15 3666667.333333333 +word utoa_append::value#1 value zp[2]:15 2.0000000002E10 +word utoa_append::value#2 value zp[2]:15 5.001833334166666E9 +const byte* vera_layer_backcolor[2] = { BLUE, BLUE } +const byte** vera_layer_config[2] = { VERA_L0_CONFIG, VERA_L1_CONFIG } +byte vera_layer_get_color(byte vera_layer_get_color::layer) +byte~ vera_layer_get_color::$0 reg byte a 2.0000000000002E13 +byte~ vera_layer_get_color::$1 reg byte a 2.0000000000002E13 +byte~ vera_layer_get_color::$3 reg byte a 2.0000000000002E13 +byte* vera_layer_get_color::addr +byte* vera_layer_get_color::addr#0 addr zp[2]:77 2.0000000000002E13 +byte vera_layer_get_color::layer +byte vera_layer_get_color::layer#0 reg byte x 2.00000002E8 +byte vera_layer_get_color::layer#1 reg byte x 2.000000000002E12 +byte vera_layer_get_color::layer#2 reg byte x 6.833350000000999E12 +byte vera_layer_get_color::return +byte vera_layer_get_color::return#0 reg byte a 2.0000000000002E13 +byte vera_layer_get_color::return#1 reg byte a 2.0000000000002E13 +byte vera_layer_get_color::return#2 reg byte a 5.250025000001E12 +byte vera_layer_get_color::return#3 reg byte a 2.00000002E8 +byte vera_layer_get_color::return#4 reg byte a 2.000000000002E12 +byte vera_layer_get_mapbase_bank(byte vera_layer_get_mapbase_bank::layer) +byte vera_layer_get_mapbase_bank::layer +byte vera_layer_get_mapbase_bank::layer#0 reg byte x 1102.0 +byte vera_layer_get_mapbase_bank::return +byte vera_layer_get_mapbase_bank::return#0 reg byte a 367.33333333333337 +byte vera_layer_get_mapbase_bank::return#2 reg byte a 202.0 +word vera_layer_get_mapbase_offset(byte vera_layer_get_mapbase_offset::layer) +byte~ vera_layer_get_mapbase_offset::$0 reg byte a 2002.0 +byte vera_layer_get_mapbase_offset::layer +byte vera_layer_get_mapbase_offset::layer#0 reg byte a 1102.0 +word vera_layer_get_mapbase_offset::return +word vera_layer_get_mapbase_offset::return#0 return zp[2]:75 367.33333333333337 +word vera_layer_get_mapbase_offset::return#2 return zp[2]:75 202.0 +byte vera_layer_get_rowshift(byte vera_layer_get_rowshift::layer) +byte vera_layer_get_rowshift::layer +byte vera_layer_get_rowshift::layer#0 reg byte x 1102.0 +byte vera_layer_get_rowshift::return +byte vera_layer_get_rowshift::return#0 reg byte a 367.33333333333337 +byte vera_layer_get_rowshift::return#2 reg byte a 202.0 +word vera_layer_get_rowskip(byte vera_layer_get_rowskip::layer) +byte~ vera_layer_get_rowskip::$0 reg byte a 2002.0 +byte vera_layer_get_rowskip::layer +byte vera_layer_get_rowskip::layer#0 reg byte a 1102.0 +word vera_layer_get_rowskip::return +word vera_layer_get_rowskip::return#0 return zp[2]:61 367.33333333333337 +word vera_layer_get_rowskip::return#2 return zp[2]:61 202.0 +const byte** vera_layer_mapbase[2] = { VERA_L0_MAPBASE, VERA_L1_MAPBASE } +void vera_layer_mode_text(byte vera_layer_mode_text::layer , dword vera_layer_mode_text::mapbase_address , dword vera_layer_mode_text::tilebase_address , word vera_layer_mode_text::mapwidth , word vera_layer_mode_text::mapheight , byte vera_layer_mode_text::tilewidth , byte vera_layer_mode_text::tileheight , word vera_layer_mode_text::color_mode) +word vera_layer_mode_text::color_mode +byte vera_layer_mode_text::layer +const byte vera_layer_mode_text::layer#0 layer = 1 +dword vera_layer_mode_text::mapbase_address +const dword vera_layer_mode_text::mapbase_address#0 mapbase_address = 0 +word vera_layer_mode_text::mapheight +word vera_layer_mode_text::mapwidth +dword vera_layer_mode_text::tilebase_address +const dword vera_layer_mode_text::tilebase_address#0 tilebase_address = $f800 +byte vera_layer_mode_text::tileheight +byte vera_layer_mode_text::tilewidth +void vera_layer_mode_tile(byte vera_layer_mode_tile::layer , dword vera_layer_mode_tile::mapbase_address , dword vera_layer_mode_tile::tilebase_address , word vera_layer_mode_tile::mapwidth , word vera_layer_mode_tile::mapheight , byte vera_layer_mode_tile::tilewidth , byte vera_layer_mode_tile::tileheight , byte vera_layer_mode_tile::color_depth) +byte vera_layer_mode_tile::color_depth +byte vera_layer_mode_tile::config +const byte vera_layer_mode_tile::config#10 config = VERA_LAYER_WIDTH_128|VERA_LAYER_HEIGHT_64 +byte vera_layer_mode_tile::layer +byte vera_layer_mode_tile::mapbase +const byte vera_layer_mode_tile::mapbase#0 mapbase = 0 +dword vera_layer_mode_tile::mapbase_address +word vera_layer_mode_tile::mapheight +word vera_layer_mode_tile::mapwidth +byte vera_layer_mode_tile::tilebase +dword vera_layer_mode_tile::tilebase_address +const dword vera_layer_mode_tile::tilebase_address#0 tilebase_address = vera_layer_mode_text::tilebase_address#0>>1 +byte vera_layer_mode_tile::tileheight +byte vera_layer_mode_tile::tilewidth +const byte* vera_layer_rowshift[2] = { 0, 0 } +const word* vera_layer_rowskip[2] = { 0, 0 } +byte vera_layer_set_backcolor(byte vera_layer_set_backcolor::layer , byte vera_layer_set_backcolor::color) +byte vera_layer_set_backcolor::color +byte vera_layer_set_backcolor::layer +const byte vera_layer_set_backcolor::layer#0 layer = 1 +byte vera_layer_set_backcolor::old +byte vera_layer_set_backcolor::return +void vera_layer_set_config(byte vera_layer_set_config::layer , byte vera_layer_set_config::config) +byte* vera_layer_set_config::addr +byte* vera_layer_set_config::addr#0 addr zp[2]:73 20002.0 +byte vera_layer_set_config::config +byte vera_layer_set_config::layer +void vera_layer_set_mapbase(byte vera_layer_set_mapbase::layer , byte vera_layer_set_mapbase::mapbase) +byte~ vera_layer_set_mapbase::$0 reg byte a 20002.0 +byte* vera_layer_set_mapbase::addr +byte* vera_layer_set_mapbase::addr#0 addr zp[2]:59 20002.0 +byte vera_layer_set_mapbase::layer +byte vera_layer_set_mapbase::layer#3 reg byte a 10001.0 +byte vera_layer_set_mapbase::mapbase +byte vera_layer_set_mapbase::mapbase#3 reg byte x 3333.6666666666665 +void vera_layer_set_text_color_mode(byte vera_layer_set_text_color_mode::layer , byte vera_layer_set_text_color_mode::color_mode) +byte* vera_layer_set_text_color_mode::addr +byte* vera_layer_set_text_color_mode::addr#0 addr zp[2]:63 2502.5 +byte vera_layer_set_text_color_mode::color_mode +byte vera_layer_set_text_color_mode::layer +byte vera_layer_set_textcolor(byte vera_layer_set_textcolor::layer , byte vera_layer_set_textcolor::color) +byte vera_layer_set_textcolor::color +byte vera_layer_set_textcolor::layer +const byte vera_layer_set_textcolor::layer#0 layer = 1 +byte vera_layer_set_textcolor::old +byte vera_layer_set_textcolor::return +void vera_layer_set_tilebase(byte vera_layer_set_tilebase::layer , byte vera_layer_set_tilebase::tilebase) +byte* vera_layer_set_tilebase::addr +byte* vera_layer_set_tilebase::addr#0 addr zp[2]:75 20002.0 +byte vera_layer_set_tilebase::layer +byte vera_layer_set_tilebase::tilebase +const byte* vera_layer_textcolor[2] = { WHITE, WHITE } +const byte** vera_layer_tilebase[2] = { VERA_L0_TILEBASE, VERA_L1_TILEBASE } +const dword* vera_mapbase_address[2] = { 0, 0 } +const byte* vera_mapbase_bank[2] = { 0, 0 } +const word* vera_mapbase_offset[2] = { 0, 0 } +const dword* vera_tilebase_address[2] = { 0, 0 } +const byte* vera_tilebase_bank[2] = { 0, 0 } +const word* vera_tilebase_offset[2] = { 0, 0 } + +zp[1]:2 [ conio_x16_init::line#3 conio_x16_init::line#1 conio_x16_init::line#0 ] +zp[4]:3 [ main::src1#10 main::src1#1 ] +zp[4]:7 [ main::num#10 main::num#1 ] +reg byte a [ vera_layer_set_mapbase::layer#3 ] +reg byte x [ vera_layer_set_mapbase::mapbase#3 ] +reg byte x [ gotoxy::y#4 gotoxy::y#3 gotoxy::y#0 gotoxy::y#2 ] +zp[4]:11 [ printf_ulong::uvalue#3 printf_ulong::uvalue#0 printf_ulong::uvalue#1 printf_ulong::uvalue#2 ultoa::value#2 ultoa::value#6 ultoa::value#1 ultoa::value#0 ultoa_append::value#2 ultoa_append::value#0 ultoa_append::value#1 ultoa_append::return#0 ] +reg byte x [ printf_uchar::uvalue#2 printf_uchar::uvalue#1 printf_uchar::uvalue#0 ] +zp[2]:15 [ printf_uint::uvalue#2 printf_uint::uvalue#0 printf_uint::uvalue#1 utoa::value#2 utoa::value#6 utoa::value#1 utoa::value#0 main::beg#1 utoa_append::value#2 utoa_append::value#0 utoa_append::value#1 utoa_append::return#0 main::$25 main::beg#0 ] +reg byte x [ ultoa::started#2 ultoa::started#4 ] +reg byte a [ printf_number_buffer::buffer_sign#10 printf_number_buffer::buffer_sign#2 printf_number_buffer::buffer_sign#1 printf_number_buffer::buffer_sign#0 ] +reg byte x [ uctoa::value#2 uctoa::value#6 uctoa::value#1 uctoa::value#0 ] +zp[1]:17 [ utoa::digit#2 utoa::digit#1 uctoa::digit#2 uctoa::digit#1 ultoa::digit#2 ultoa::digit#1 cputc::c#3 cputc::c#0 cputc::c#2 ] +reg byte x [ utoa::started#2 utoa::started#4 ] +reg byte x [ vera_layer_get_color::layer#2 vera_layer_get_color::layer#1 vera_layer_get_color::layer#0 ] +reg byte a [ vera_layer_get_color::return#2 vera_layer_get_color::return#0 vera_layer_get_color::return#1 ] +reg byte x [ ultoa_append::digit#2 ultoa_append::digit#1 ] +reg byte x [ uctoa_append::value#2 uctoa_append::value#0 uctoa_append::value#1 ] +reg byte y [ uctoa_append::digit#2 uctoa_append::digit#1 ] +reg byte x [ utoa_append::digit#2 utoa_append::digit#1 ] +reg byte x [ insertup::i#2 insertup::i#1 ] +zp[1]:18 [ conio_screen_width ] +zp[1]:19 [ conio_screen_height ] +zp[1]:20 [ conio_screen_layer ] +zp[2]:21 [ conio_width ] +zp[2]:23 [ conio_height ] +zp[1]:25 [ conio_rowshift ] +zp[2]:26 [ conio_rowskip ] +zp[4]:28 [ main::$1 main::calcend#0 ] +zp[2]:32 [ main::$3 main::$4 memcpy_in_vram::i#2 memcpy_in_vram::i#1 clearline::c#2 clearline::c#1 ] +reg byte y [ main::$5 ] +zp[2]:34 [ main::$6 utoa::buffer#11 utoa::buffer#14 utoa::buffer#4 utoa::buffer#3 utoa_append::buffer#0 uctoa::buffer#11 uctoa::buffer#14 uctoa::buffer#4 uctoa::buffer#3 uctoa_append::buffer#0 ultoa::buffer#11 ultoa::buffer#14 ultoa::buffer#4 ultoa::buffer#3 ultoa_append::buffer#0 cputs::s#10 cputs::s#11 cputs::s#0 ] +reg byte x [ main::$7 ] +zp[2]:36 [ main::$30 main::$8 main::$9 main::$13 ] +zp[2]:38 [ main::$10 main::$11 ] +reg byte a [ main::$12 ] +zp[2]:40 [ main::$31 ] +zp[1]:42 [ main::bankbeg#0 uctoa::started#2 uctoa::started#4 ] +zp[2]:43 [ main::$14 main::$15 ] +reg byte y [ main::$16 ] +zp[2]:45 [ main::$17 ] +reg byte x [ main::$18 ] +zp[2]:47 [ main::$32 main::$19 main::$20 main::$24 ] +zp[2]:49 [ main::$21 main::$22 ] +reg byte a [ main::$23 ] +zp[2]:51 [ main::$33 ] +zp[1]:53 [ main::bankend#0 ] +zp[2]:54 [ main::$27 main::end#0 main::end#1 ] +reg byte a [ screensize::hscale#0 ] +reg byte a [ screensize::$1 ] +reg byte a [ screensize::vscale#0 ] +reg byte a [ screensize::$3 ] +reg byte x [ vera_layer_get_mapbase_bank::layer#0 ] +reg byte a [ vera_layer_get_mapbase_bank::return#2 ] +zp[1]:56 [ CONIO_SCREEN_BANK#10 ] +reg byte a [ vera_layer_get_mapbase_offset::layer#0 ] +zp[2]:57 [ CONIO_SCREEN_TEXT#101 ] +reg byte a [ screenlayer::vera_layer_get_width1_layer#0 ] +reg byte a [ screenlayer::vera_layer_get_width1_$2 ] +reg byte a [ screenlayer::vera_layer_get_width1_$0 ] +reg byte a [ screenlayer::vera_layer_get_width1_$1 ] +reg byte a [ screenlayer::vera_layer_get_width1_$3 ] +reg byte x [ vera_layer_get_rowshift::layer#0 ] +reg byte a [ vera_layer_get_rowshift::return#2 ] +reg byte a [ screenlayer::$3 ] +reg byte a [ vera_layer_get_rowskip::layer#0 ] +reg byte a [ screenlayer::vera_layer_get_height1_layer#0 ] +reg byte a [ screenlayer::vera_layer_get_height1_$2 ] +reg byte a [ screenlayer::vera_layer_get_height1_$0 ] +reg byte a [ screenlayer::vera_layer_get_height1_$1 ] +reg byte a [ screenlayer::vera_layer_get_height1_$3 ] +reg byte a [ vera_layer_set_mapbase::$0 ] +zp[2]:59 [ vera_layer_set_mapbase::addr#0 screenlayer::vera_layer_get_width1_return#0 screenlayer::vera_layer_get_width1_return#1 screenlayer::$2 ] +zp[2]:61 [ gotoxy::$6 gotoxy::line_offset#0 vera_layer_get_rowskip::return#2 screenlayer::$4 vera_layer_get_rowskip::return#0 ] +reg byte a [ gotoxy::$5 ] +reg byte a [ cputs::c#1 ] +zp[2]:63 [ vera_layer_set_text_color_mode::addr#0 screenlayer::vera_layer_get_height1_config#0 ] +reg byte a [ vera_layer_get_mapbase_bank::return#0 ] +reg byte a [ vera_layer_get_mapbase_offset::$0 ] +reg byte a [ vera_layer_get_rowshift::return#0 ] +reg byte a [ vera_layer_get_rowskip::$0 ] +reg byte a [ vera_layer_get_color::return#3 ] +reg byte x [ cputc::color#0 ] +reg byte a [ cputc::$15 ] +reg byte a [ cputc::$2 ] +reg byte a [ cputc::$4 ] +reg byte a [ cputc::$5 ] +reg byte a [ cputc::$6 ] +reg byte a [ cputc::scroll_enable#0 ] +zp[2]:65 [ cputc::$16 ] +reg byte a [ ultoa::$11 ] +reg byte a [ ultoa::$10 ] +zp[4]:67 [ ultoa::digit_value#0 ultoa_append::sub#0 ] +reg byte x [ uctoa_append::return#0 ] +reg byte a [ utoa::$11 ] +reg byte a [ utoa::$10 ] +zp[2]:71 [ utoa::digit_value#0 utoa_append::sub#0 cputc::conio_addr#0 cputc::conio_addr#1 ] +zp[2]:73 [ vera_layer_set_config::addr#0 screenlayer::vera_layer_get_height1_return#0 screenlayer::vera_layer_get_height1_return#1 screenlayer::$5 ] +zp[2]:75 [ vera_layer_set_tilebase::addr#0 screenlayer::vera_layer_get_width1_config#0 vera_layer_get_mapbase_offset::return#2 vera_layer_get_mapbase_offset::return#0 ] +reg byte a [ vera_layer_get_color::$3 ] +reg byte a [ vera_layer_get_color::$0 ] +reg byte a [ vera_layer_get_color::$1 ] +reg byte a [ cputln::$2 ] +zp[2]:77 [ cputln::temp#0 cputln::temp#1 vera_layer_get_color::addr#0 ] +reg byte a [ cputln::$3 ] +zp[1]:79 [ insertup::cy#0 uctoa::digit_value#0 uctoa_append::sub#0 ] +zp[1]:80 [ insertup::width#0 ] +reg byte a [ insertup::$3 ] +zp[2]:81 [ insertup::line#0 insertup::start#0 memcpy_in_vram::dest#0 ] +zp[2]:83 [ memcpy_in_vram::num#0 ] +reg byte a [ clearline::$5 ] +zp[2]:85 [ clearline::addr#0 memcpy_in_vram::src#0 ] +reg byte a [ clearline::$1 ] +reg byte a [ clearline::$2 ] +reg byte a [ vera_layer_get_color::return#4 ] +reg byte x [ clearline::color#0 ] +reg byte a [ memcpy_in_vram::$0 ] +reg byte a [ memcpy_in_vram::$1 ] +reg byte a [ memcpy_in_vram::$3 ] +reg byte a [ memcpy_in_vram::$4 ] +mem[12] [ printf_buffer ] + + +FINAL ASSEMBLER +Score: 866535 + + // File Comments +// Example program for the Commander X16 +// Demonstrates some bank addressing calculations + // Upstart +.cpu _65c02 + // Commodore 64 PRG executable file +.file [name="cx16-bankaddressing.prg", type="prg", segments="Program"] +.segmentdef Program [segments="Basic, Code, Data"] +.segmentdef Basic [start=$0801] +.segmentdef Code [start=$80d] +.segmentdef Data [startAfter="Code"] +.segment Basic +:BasicUpstart(__start) + // Global Constants & labels + .const WHITE = 1 + .const BLUE = 6 + .const VERA_INC_1 = $10 + .const VERA_ADDRSEL = 1 + .const VERA_LAYER_WIDTH_128 = $20 + .const VERA_LAYER_WIDTH_MASK = $30 + .const VERA_LAYER_HEIGHT_64 = $40 + .const VERA_LAYER_HEIGHT_MASK = $c0 + .const VERA_LAYER_CONFIG_256C = 8 + .const VERA_LAYER_TILEBASE_MASK = $fc + .const SIZEOF_WORD = 2 + .const SIZEOF_POINTER = 2 + .const SIZEOF_DWORD = 4 + .const OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS = 1 + .const SIZEOF_STRUCT_PRINTF_BUFFER_NUMBER = $c + // $9F20 VRAM Address (7:0) + .label VERA_ADDRX_L = $9f20 + // $9F21 VRAM Address (15:8) + .label VERA_ADDRX_M = $9f21 + // $9F22 VRAM Address (7:0) + // Bit 4-7: Address Increment The following is the amount incremented per value value:increment + // 0:0, 1:1, 2:2, 3:4, 4:8, 5:16, 6:32, 7:64, 8:128, 9:256, 10:512, 11:40, 12:80, 13:160, 14:320, 15:640 + // Bit 3: DECR Setting the DECR bit, will decrement instead of increment by the value set by the 'Address Increment' field. + // Bit 0: VRAM Address (16) + .label VERA_ADDRX_H = $9f22 + // $9F23 DATA0 VRAM Data port 0 + .label VERA_DATA0 = $9f23 + // $9F24 DATA1 VRAM Data port 1 + .label VERA_DATA1 = $9f24 + // $9F25 CTRL Control + // Bit 7: Reset + // Bit 1: DCSEL + // Bit 2: ADDRSEL + .label VERA_CTRL = $9f25 + // $9F2A DC_HSCALE (DCSEL=0) Active Display H-Scale + .label VERA_DC_HSCALE = $9f2a + // $9F2B DC_VSCALE (DCSEL=0) Active Display V-Scale + .label VERA_DC_VSCALE = $9f2b + // $9F2D L0_CONFIG Layer 0 Configuration + .label VERA_L0_CONFIG = $9f2d + // $9F2E L0_MAPBASE Layer 0 Map Base Address (16:9) + .label VERA_L0_MAPBASE = $9f2e + // Bit 0: Tile Width (0:8 pixels, 1:16 pixels) + .label VERA_L0_TILEBASE = $9f2f + // $9F34 L1_CONFIG Layer 1 Configuration + .label VERA_L1_CONFIG = $9f34 + // $9F35 L1_MAPBASE Layer 1 Map Base Address (16:9) + .label VERA_L1_MAPBASE = $9f35 + // $9F36 L1_TILEBASE Layer 1 Tile Base + // Bit 2-7: Tile Base Address (16:11) + // Bit 1: Tile Height (0:8 pixels, 1:16 pixels) + // Bit 0: Tile Width (0:8 pixels, 1:16 pixels) + .label VERA_L1_TILEBASE = $9f36 + // Variable holding the screen width; + .label conio_screen_width = $12 + // Variable holding the screen height; + .label conio_screen_height = $13 + // Variable holding the screen layer on the VERA card with which conio interacts; + .label conio_screen_layer = $14 + // Variables holding the current map width and map height of the layer. + .label conio_width = $15 + .label conio_height = $17 + .label conio_rowshift = $19 + .label conio_rowskip = $1a + .label CONIO_SCREEN_BANK = $38 + // The screen width + // The screen height + // The text screen base address, which is a 16:0 bit value in VERA VRAM. + // That is 128KB addressable space, thus 17 bits in total. + // CONIO_SCREEN_TEXT contains bits 15:0 of the address. + // CONIO_SCREEN_BANK contains bit 16, the the 64K memory bank in VERA VRAM (the upper 17th bit). + // !!! note that these values are not const for the cx16! + // This conio implements the two layers of VERA, which can be layer 0 or layer 1. + // Configuring conio to output to a different layer, will change these fields to the address base + // configured using VERA_L0_MAPBASE = 0x9f2e or VERA_L1_MAPBASE = 0x9f35. + // Using the function setscreenlayer(layer) will re-calculate using CONIO_SCREEN_TEXT and CONIO_SCREEN_BASE + // based on the values of VERA_L0_MAPBASE or VERA_L1_MAPBASE, mapping the base address of the selected layer. + // The function setscreenlayermapbase(layer,mapbase) allows to configure bit 16:9 of the + // mapbase address of the time map in VRAM of the selected layer VERA_L0_MAPBASE or VERA_L1_MAPBASE. + .label CONIO_SCREEN_TEXT = $39 +.segment Code + // __start +__start: { + // __start::__init1 + // conio_screen_width = 0 + // [1] conio_screen_width = 0 -- vbuz1=vbuc1 + lda #0 + sta.z conio_screen_width + // conio_screen_height = 0 + // [2] conio_screen_height = 0 -- vbuz1=vbuc1 + sta.z conio_screen_height + // conio_screen_layer = 1 + // [3] conio_screen_layer = 1 -- vbuz1=vbuc1 + lda #1 + sta.z conio_screen_layer + // conio_width = 0 + // [4] conio_width = 0 -- vwuz1=vwuc1 + lda #<0 + sta.z conio_width + sta.z conio_width+1 + // conio_height = 0 + // [5] conio_height = 0 -- vwuz1=vwuc1 + sta.z conio_height + sta.z conio_height+1 + // conio_rowshift = 0 + // [6] conio_rowshift = 0 -- vbuz1=vbuc1 + sta.z conio_rowshift + // conio_rowskip = 0 + // [7] conio_rowskip = 0 -- vwuz1=vwuc1 + sta.z conio_rowskip + sta.z conio_rowskip+1 + // #pragma constructor_for(conio_x16_init, cputc, clrscr, cscroll) + // [8] call conio_x16_init + jsr conio_x16_init + // [9] phi from __start::__init1 to __start::@1 [phi:__start::__init1->__start::@1] + // __start::@1 + // [10] call main + // [32] phi from __start::@1 to main [phi:__start::@1->main] + jsr main + // __start::@return + // [11] return + rts +} + // conio_x16_init +// Set initial cursor position +conio_x16_init: { + // Position cursor at current line + .label BASIC_CURSOR_LINE = $d6 + .label line = 2 + // line = *BASIC_CURSOR_LINE + // [12] conio_x16_init::line#0 = *conio_x16_init::BASIC_CURSOR_LINE -- vbuz1=_deref_pbuc1 + lda BASIC_CURSOR_LINE + sta.z line + // vera_layer_mode_text(1,(dword)0x00000,(dword)0x0F800,128,64,8,8,16) + // [13] call vera_layer_mode_text + // [103] phi from conio_x16_init to vera_layer_mode_text [phi:conio_x16_init->vera_layer_mode_text] + jsr vera_layer_mode_text + // [14] phi from conio_x16_init to conio_x16_init::@3 [phi:conio_x16_init->conio_x16_init::@3] + // conio_x16_init::@3 + // screensize(&conio_screen_width, &conio_screen_height) + // [15] call screensize + jsr screensize + // [16] phi from conio_x16_init::@3 to conio_x16_init::@4 [phi:conio_x16_init::@3->conio_x16_init::@4] + // conio_x16_init::@4 + // screenlayer(1) + // [17] call screenlayer + jsr screenlayer + // [18] phi from conio_x16_init::@4 to conio_x16_init::@5 [phi:conio_x16_init::@4->conio_x16_init::@5] + // conio_x16_init::@5 + // vera_layer_set_textcolor(1, WHITE) + // [19] call vera_layer_set_textcolor + jsr vera_layer_set_textcolor + // [20] phi from conio_x16_init::@5 to conio_x16_init::@6 [phi:conio_x16_init::@5->conio_x16_init::@6] + // conio_x16_init::@6 + // vera_layer_set_backcolor(1, BLUE) + // [21] call vera_layer_set_backcolor + jsr vera_layer_set_backcolor + // [22] phi from conio_x16_init::@6 to conio_x16_init::@7 [phi:conio_x16_init::@6->conio_x16_init::@7] + // conio_x16_init::@7 + // vera_layer_set_mapbase(0,0x20) + // [23] call vera_layer_set_mapbase + // [159] phi from conio_x16_init::@7 to vera_layer_set_mapbase [phi:conio_x16_init::@7->vera_layer_set_mapbase] + // [159] phi vera_layer_set_mapbase::mapbase#3 = $20 [phi:conio_x16_init::@7->vera_layer_set_mapbase#0] -- vbuxx=vbuc1 + ldx #$20 + // [159] phi vera_layer_set_mapbase::layer#3 = 0 [phi:conio_x16_init::@7->vera_layer_set_mapbase#1] -- vbuaa=vbuc1 + lda #0 + jsr vera_layer_set_mapbase + // [24] phi from conio_x16_init::@7 to conio_x16_init::@8 [phi:conio_x16_init::@7->conio_x16_init::@8] + // conio_x16_init::@8 + // vera_layer_set_mapbase(1,0x00) + // [25] call vera_layer_set_mapbase + // [159] phi from conio_x16_init::@8 to vera_layer_set_mapbase [phi:conio_x16_init::@8->vera_layer_set_mapbase] + // [159] phi vera_layer_set_mapbase::mapbase#3 = 0 [phi:conio_x16_init::@8->vera_layer_set_mapbase#0] -- vbuxx=vbuc1 + ldx #0 + // [159] phi vera_layer_set_mapbase::layer#3 = 1 [phi:conio_x16_init::@8->vera_layer_set_mapbase#1] -- vbuaa=vbuc1 + lda #1 + jsr vera_layer_set_mapbase + // conio_x16_init::@9 + // if(line>=CONIO_HEIGHT) + // [26] if(conio_x16_init::line#0conio_x16_init::@1] + // [28] phi conio_x16_init::line#3 = conio_x16_init::line#1 [phi:conio_x16_init::@2/conio_x16_init::@9->conio_x16_init::@1#0] -- register_copy + // conio_x16_init::@1 + __b1: + // gotoxy(0, line) + // [29] gotoxy::y#0 = conio_x16_init::line#3 -- vbuxx=vbuz1 + ldx.z line + // [30] call gotoxy + // [164] phi from conio_x16_init::@1 to gotoxy [phi:conio_x16_init::@1->gotoxy] + // [164] phi gotoxy::y#3 = gotoxy::y#0 [phi:conio_x16_init::@1->gotoxy#0] -- register_copy + jsr gotoxy + // conio_x16_init::@return + // } + // [31] return + rts +} + // main +// Functions for performing input and output. +main: { + .const borderbeg = $a000 + .const inc = $123 + .label __1 = $1c + .label __3 = $20 + .label __4 = $20 + .label __6 = $22 + .label __8 = $24 + .label __9 = $24 + .label __10 = $26 + .label __11 = $26 + .label __13 = $24 + .label __14 = $2b + .label __15 = $2b + .label __17 = $2d + .label __19 = $2f + .label __20 = $2f + .label __21 = $31 + .label __22 = $31 + .label __24 = $2f + .label __25 = $f + .label __27 = $36 + .label __30 = $24 + .label __31 = $28 + .label __32 = $2f + .label __33 = $33 + .label calcend = $1c + .label bankbeg = $2a + .label bankend = $35 + .label beg = $f + .label end = $36 + .label num = 7 + .label src1 = 3 + // [33] phi from main to main::@1 [phi:main->main::@1] + // [33] phi main::num#10 = (dword)$40*$40*2 [phi:main->main::@1#0] -- vduz1=vduc1 + lda #<$40*$40*2 + sta.z num + lda #>$40*$40*2 + sta.z num+1 + lda #<$40*$40*2>>$10 + sta.z num+2 + lda #>$40*$40*2>>$10 + sta.z num+3 + // [33] phi main::src1#10 = 0 [phi:main->main::@1#1] -- vduz1=vduc1 + lda #<0 + sta.z src1 + sta.z src1+1 + lda #<0>>$10 + sta.z src1+2 + lda #>0>>$10 + sta.z src1+3 + // main::@1 + __b1: + // for(dword src=0x0000;src<0x3F000;src+=num) + // [34] if(main::src1#10<$3f000) goto main::@2 -- vduz1_lt_vduc1_then_la1 + lda.z src1+3 + cmp #>$3f000>>$10 + bcc __b2 + bne !+ + lda.z src1+2 + cmp #<$3f000>>$10 + bcc __b2 + bne !+ + lda.z src1+1 + cmp #>$3f000 + bcc __b2 + bne !+ + lda.z src1 + cmp #<$3f000 + bcc __b2 + !: + // main::@return + // } + // [35] return + rts + // main::@2 + __b2: + // src+num + // [36] main::$1 = main::src1#10 + main::num#10 -- vduz1=vduz2_plus_vduz3 + lda.z src1 + clc + adc.z num + sta.z __1 + lda.z src1+1 + adc.z num+1 + sta.z __1+1 + lda.z src1+2 + adc.z num+2 + sta.z __1+2 + lda.z src1+3 + adc.z num+3 + sta.z __1+3 + // calcend = src+num+(-1) + // [37] main::calcend#0 = main::$1 + -1 -- vduz1=vduz1_plus_vbuc1 + lda.z calcend + clc + adc #-1 + sta.z calcend + bcc !+ + inc.z calcend+1 + bne !+ + inc.z calcend+2 + bne !+ + inc.z calcend+3 + !: + // >calcbeg + // [38] main::$3 = > main::src1#10 -- vwuz1=_hi_vduz2 + lda.z src1+2 + sta.z __3 + lda.z src1+3 + sta.z __3+1 + // (>calcbeg)<<8 + // [39] main::$4 = main::$3 << 8 -- vwuz1=vwuz1_rol_8 + lda.z __4 + sta.z __4+1 + lda #0 + sta.z __4 + // <(>calcbeg)<<8 + // [40] main::$5 = < main::$4 -- vbuyy=_lo_vwuz1 + tay + // ( main::$6 -- vbuxx=_hi_vwuz1 + tax + // ((word)<(>calcbeg)<<8)|>(calcbeg)<<8)|>(>5 + // [45] main::$9 = main::$8 >> 5 -- vwuz1=vwuz1_ror_5 + lsr.z __9+1 + ror.z __9 + lsr.z __9+1 + ror.z __9 + lsr.z __9+1 + ror.z __9 + lsr.z __9+1 + ror.z __9 + lsr.z __9+1 + ror.z __9 + // >calcbeg + // [46] main::$10 = > main::src1#10 -- vwuz1=_hi_vduz2 + lda.z src1+2 + sta.z __10 + lda.z src1+3 + sta.z __10+1 + // (>calcbeg)<<3 + // [47] main::$11 = main::$10 << 3 -- vwuz1=vwuz1_rol_3 + asl.z __11 + rol.z __11+1 + asl.z __11 + rol.z __11+1 + asl.z __11 + rol.z __11+1 + // <(>calcbeg)<<3 + // [48] main::$12 = < main::$11 -- vbuaa=_lo_vwuz1 + lda.z __11 + // ((((word)<(>calcbeg)<<8)|>(>5)+((word)<(>calcbeg)<<3) + // [49] main::$31 = (word)main::$12 -- vwuz1=_word_vbuaa + sta.z __31 + tya + sta.z __31+1 + // [50] main::$13 = main::$9 + main::$31 -- vwuz1=vwuz1_plus_vwuz2 + lda.z __13 + clc + adc.z __31 + sta.z __13 + lda.z __13+1 + adc.z __31+1 + sta.z __13+1 + // bankbeg = (byte)(((((word)<(>calcbeg)<<8)|>(>5)+((word)<(>calcbeg)<<3)) + // [51] main::bankbeg#0 = (byte)main::$13 -- vbuz1=_byte_vwuz2 + lda.z __13 + sta.z bankbeg + // >calcend + // [52] main::$14 = > main::calcend#0 -- vwuz1=_hi_vduz2 + lda.z calcend+2 + sta.z __14 + lda.z calcend+3 + sta.z __14+1 + // (>calcend)<<8 + // [53] main::$15 = main::$14 << 8 -- vwuz1=vwuz1_rol_8 + lda.z __15 + sta.z __15+1 + tya + sta.z __15 + // <(>calcend)<<8 + // [54] main::$16 = < main::$15 -- vbuyy=_lo_vwuz1 + tay + // ( main::$17 -- vbuxx=_hi_vwuz1 + tax + // ((word)<(>calcend)<<8)|>(calcend)<<8)|>(>5 + // [59] main::$20 = main::$19 >> 5 -- vwuz1=vwuz1_ror_5 + lsr.z __20+1 + ror.z __20 + lsr.z __20+1 + ror.z __20 + lsr.z __20+1 + ror.z __20 + lsr.z __20+1 + ror.z __20 + lsr.z __20+1 + ror.z __20 + // >calcend + // [60] main::$21 = > main::calcend#0 -- vwuz1=_hi_vduz2 + lda.z calcend+2 + sta.z __21 + lda.z calcend+3 + sta.z __21+1 + // (>calcend)<<3 + // [61] main::$22 = main::$21 << 3 -- vwuz1=vwuz1_rol_3 + asl.z __22 + rol.z __22+1 + asl.z __22 + rol.z __22+1 + asl.z __22 + rol.z __22+1 + // <(>calcend)<<3 + // [62] main::$23 = < main::$22 -- vbuaa=_lo_vwuz1 + lda.z __22 + // ((((word)<(>calcend)<<8)|>(>5)+((word)<(>calcend)<<3) + // [63] main::$33 = (word)main::$23 -- vwuz1=_word_vbuaa + sta.z __33 + tya + sta.z __33+1 + // [64] main::$24 = main::$20 + main::$33 -- vwuz1=vwuz1_plus_vwuz2 + lda.z __24 + clc + adc.z __33 + sta.z __24 + lda.z __24+1 + adc.z __33+1 + sta.z __24+1 + // bankend = (byte)(((((word)<(>calcend)<<8)|>(>5)+((word)<(>calcend)<<3)) + // [65] main::bankend#0 = (byte)main::$24 -- vbuz1=_byte_vwuz2 + lda.z __24 + sta.z bankend + // $1fff + sta.z beg+1 + // $1fff + sta.z end+1 + // beg += borderbeg + // [70] main::beg#1 = main::beg#0 + main::borderbeg -- vwuz1=vwuz1_plus_vwuc1 + // same for the end; + clc + lda.z beg + adc #borderbeg + sta.z beg+1 + // end += borderbeg + // [71] main::end#1 = main::end#0 + main::borderbeg -- vwuz1=vwuz1_plus_vwuc1 + clc + lda.z end + adc #borderbeg + sta.z end+1 + // printf("cbeg=%x, add=%x, cend=%x, bbeg=%x, bend=%x, beg=%x, end=%x\n", calcbeg, num, calcend, bankbeg, bankend, beg, end ) + // [72] call cputs + // [177] phi from main::@2 to cputs [phi:main::@2->cputs] + // [177] phi cputs::s#11 = main::s [phi:main::@2->cputs#0] -- pbuz1=pbuc1 + lda #s + sta.z cputs.s+1 + jsr cputs + // main::@3 + // printf("cbeg=%x, add=%x, cend=%x, bbeg=%x, bend=%x, beg=%x, end=%x\n", calcbeg, num, calcend, bankbeg, bankend, beg, end ) + // [73] printf_ulong::uvalue#0 = main::src1#10 -- vduz1=vduz2 + lda.z src1 + sta.z printf_ulong.uvalue + lda.z src1+1 + sta.z printf_ulong.uvalue+1 + lda.z src1+2 + sta.z printf_ulong.uvalue+2 + lda.z src1+3 + sta.z printf_ulong.uvalue+3 + // [74] call printf_ulong + // [185] phi from main::@3 to printf_ulong [phi:main::@3->printf_ulong] + // [185] phi printf_ulong::uvalue#3 = printf_ulong::uvalue#0 [phi:main::@3->printf_ulong#0] -- register_copy + jsr printf_ulong + // [75] phi from main::@3 to main::@4 [phi:main::@3->main::@4] + // main::@4 + // printf("cbeg=%x, add=%x, cend=%x, bbeg=%x, bend=%x, beg=%x, end=%x\n", calcbeg, num, calcend, bankbeg, bankend, beg, end ) + // [76] call cputs + // [177] phi from main::@4 to cputs [phi:main::@4->cputs] + // [177] phi cputs::s#11 = main::s1 [phi:main::@4->cputs#0] -- pbuz1=pbuc1 + lda #s1 + sta.z cputs.s+1 + jsr cputs + // main::@5 + // printf("cbeg=%x, add=%x, cend=%x, bbeg=%x, bend=%x, beg=%x, end=%x\n", calcbeg, num, calcend, bankbeg, bankend, beg, end ) + // [77] printf_ulong::uvalue#1 = main::num#10 -- vduz1=vduz2 + lda.z num + sta.z printf_ulong.uvalue + lda.z num+1 + sta.z printf_ulong.uvalue+1 + lda.z num+2 + sta.z printf_ulong.uvalue+2 + lda.z num+3 + sta.z printf_ulong.uvalue+3 + // [78] call printf_ulong + // [185] phi from main::@5 to printf_ulong [phi:main::@5->printf_ulong] + // [185] phi printf_ulong::uvalue#3 = printf_ulong::uvalue#1 [phi:main::@5->printf_ulong#0] -- register_copy + jsr printf_ulong + // [79] phi from main::@5 to main::@6 [phi:main::@5->main::@6] + // main::@6 + // printf("cbeg=%x, add=%x, cend=%x, bbeg=%x, bend=%x, beg=%x, end=%x\n", calcbeg, num, calcend, bankbeg, bankend, beg, end ) + // [80] call cputs + // [177] phi from main::@6 to cputs [phi:main::@6->cputs] + // [177] phi cputs::s#11 = main::s2 [phi:main::@6->cputs#0] -- pbuz1=pbuc1 + lda #s2 + sta.z cputs.s+1 + jsr cputs + // main::@7 + // printf("cbeg=%x, add=%x, cend=%x, bbeg=%x, bend=%x, beg=%x, end=%x\n", calcbeg, num, calcend, bankbeg, bankend, beg, end ) + // [81] printf_ulong::uvalue#2 = main::calcend#0 -- vduz1=vduz2 + lda.z calcend + sta.z printf_ulong.uvalue + lda.z calcend+1 + sta.z printf_ulong.uvalue+1 + lda.z calcend+2 + sta.z printf_ulong.uvalue+2 + lda.z calcend+3 + sta.z printf_ulong.uvalue+3 + // [82] call printf_ulong + // [185] phi from main::@7 to printf_ulong [phi:main::@7->printf_ulong] + // [185] phi printf_ulong::uvalue#3 = printf_ulong::uvalue#2 [phi:main::@7->printf_ulong#0] -- register_copy + jsr printf_ulong + // [83] phi from main::@7 to main::@8 [phi:main::@7->main::@8] + // main::@8 + // printf("cbeg=%x, add=%x, cend=%x, bbeg=%x, bend=%x, beg=%x, end=%x\n", calcbeg, num, calcend, bankbeg, bankend, beg, end ) + // [84] call cputs + // [177] phi from main::@8 to cputs [phi:main::@8->cputs] + // [177] phi cputs::s#11 = main::s3 [phi:main::@8->cputs#0] -- pbuz1=pbuc1 + lda #s3 + sta.z cputs.s+1 + jsr cputs + // main::@9 + // printf("cbeg=%x, add=%x, cend=%x, bbeg=%x, bend=%x, beg=%x, end=%x\n", calcbeg, num, calcend, bankbeg, bankend, beg, end ) + // [85] printf_uchar::uvalue#0 = main::bankbeg#0 -- vbuxx=vbuz1 + ldx.z bankbeg + // [86] call printf_uchar + // [192] phi from main::@9 to printf_uchar [phi:main::@9->printf_uchar] + // [192] phi printf_uchar::uvalue#2 = printf_uchar::uvalue#0 [phi:main::@9->printf_uchar#0] -- register_copy + jsr printf_uchar + // [87] phi from main::@9 to main::@10 [phi:main::@9->main::@10] + // main::@10 + // printf("cbeg=%x, add=%x, cend=%x, bbeg=%x, bend=%x, beg=%x, end=%x\n", calcbeg, num, calcend, bankbeg, bankend, beg, end ) + // [88] call cputs + // [177] phi from main::@10 to cputs [phi:main::@10->cputs] + // [177] phi cputs::s#11 = main::s4 [phi:main::@10->cputs#0] -- pbuz1=pbuc1 + lda #s4 + sta.z cputs.s+1 + jsr cputs + // main::@11 + // printf("cbeg=%x, add=%x, cend=%x, bbeg=%x, bend=%x, beg=%x, end=%x\n", calcbeg, num, calcend, bankbeg, bankend, beg, end ) + // [89] printf_uchar::uvalue#1 = main::bankend#0 -- vbuxx=vbuz1 + ldx.z bankend + // [90] call printf_uchar + // [192] phi from main::@11 to printf_uchar [phi:main::@11->printf_uchar] + // [192] phi printf_uchar::uvalue#2 = printf_uchar::uvalue#1 [phi:main::@11->printf_uchar#0] -- register_copy + jsr printf_uchar + // [91] phi from main::@11 to main::@12 [phi:main::@11->main::@12] + // main::@12 + // printf("cbeg=%x, add=%x, cend=%x, bbeg=%x, bend=%x, beg=%x, end=%x\n", calcbeg, num, calcend, bankbeg, bankend, beg, end ) + // [92] call cputs + // [177] phi from main::@12 to cputs [phi:main::@12->cputs] + // [177] phi cputs::s#11 = main::s5 [phi:main::@12->cputs#0] -- pbuz1=pbuc1 + lda #s5 + sta.z cputs.s+1 + jsr cputs + // main::@13 + // printf("cbeg=%x, add=%x, cend=%x, bbeg=%x, bend=%x, beg=%x, end=%x\n", calcbeg, num, calcend, bankbeg, bankend, beg, end ) + // [93] printf_uint::uvalue#0 = main::beg#1 + // [94] call printf_uint + // [199] phi from main::@13 to printf_uint [phi:main::@13->printf_uint] + // [199] phi printf_uint::uvalue#2 = printf_uint::uvalue#0 [phi:main::@13->printf_uint#0] -- register_copy + jsr printf_uint + // [95] phi from main::@13 to main::@14 [phi:main::@13->main::@14] + // main::@14 + // printf("cbeg=%x, add=%x, cend=%x, bbeg=%x, bend=%x, beg=%x, end=%x\n", calcbeg, num, calcend, bankbeg, bankend, beg, end ) + // [96] call cputs + // [177] phi from main::@14 to cputs [phi:main::@14->cputs] + // [177] phi cputs::s#11 = main::s6 [phi:main::@14->cputs#0] -- pbuz1=pbuc1 + lda #s6 + sta.z cputs.s+1 + jsr cputs + // main::@15 + // printf("cbeg=%x, add=%x, cend=%x, bbeg=%x, bend=%x, beg=%x, end=%x\n", calcbeg, num, calcend, bankbeg, bankend, beg, end ) + // [97] printf_uint::uvalue#1 = main::end#1 -- vwuz1=vwuz2 + lda.z end + sta.z printf_uint.uvalue + lda.z end+1 + sta.z printf_uint.uvalue+1 + // [98] call printf_uint + // [199] phi from main::@15 to printf_uint [phi:main::@15->printf_uint] + // [199] phi printf_uint::uvalue#2 = printf_uint::uvalue#1 [phi:main::@15->printf_uint#0] -- register_copy + jsr printf_uint + // [99] phi from main::@15 to main::@16 [phi:main::@15->main::@16] + // main::@16 + // printf("cbeg=%x, add=%x, cend=%x, bbeg=%x, bend=%x, beg=%x, end=%x\n", calcbeg, num, calcend, bankbeg, bankend, beg, end ) + // [100] call cputs + // [177] phi from main::@16 to cputs [phi:main::@16->cputs] + // [177] phi cputs::s#11 = main::s7 [phi:main::@16->cputs#0] -- pbuz1=pbuc1 + lda #s7 + sta.z cputs.s+1 + jsr cputs + // main::@17 + // num+=inc + // [101] main::num#1 = main::num#10 + main::inc -- vduz1=vduz1_plus_vwuc1 + lda.z num + clc + adc #inc + sta.z num+1 + lda.z num+2 + adc #0 + sta.z num+2 + lda.z num+3 + adc #0 + sta.z num+3 + // src+=num + // [102] main::src1#1 = main::src1#10 + main::num#1 -- vduz1=vduz1_plus_vduz2 + lda.z src1 + clc + adc.z num + sta.z src1 + lda.z src1+1 + adc.z num+1 + sta.z src1+1 + lda.z src1+2 + adc.z num+2 + sta.z src1+2 + lda.z src1+3 + adc.z num+3 + sta.z src1+3 + // [33] phi from main::@17 to main::@1 [phi:main::@17->main::@1] + // [33] phi main::num#10 = main::num#1 [phi:main::@17->main::@1#0] -- register_copy + // [33] phi main::src1#10 = main::src1#1 [phi:main::@17->main::@1#1] -- register_copy + jmp __b1 + .segment Data + s: .text "cbeg=" + .byte 0 + s1: .text ", add=" + .byte 0 + s2: .text ", cend=" + .byte 0 + s3: .text ", bbeg=" + .byte 0 + s4: .text ", bend=" + .byte 0 + s5: .text ", beg=" + .byte 0 + s6: .text ", end=" + .byte 0 + s7: .text @"\n" + .byte 0 +} +.segment Code + // vera_layer_mode_text +// Set a vera layer in text mode and configure the: +// - layer: Value of 0 or 1. +// - mapbase_address: A dword typed address (4 bytes), that specifies the full address of the map base. +// The function does the translation from the dword that contains the 17 bit address, +// to the respective mapbase vera register. +// Note that the register only specifies bits 16:9 of the address, +// so the resulting address in the VERA VRAM is always aligned to a multiple of 512 bytes. +// - tilebase_address: A dword typed address (4 bytes), that specifies the base address of the tile map. +// The function does the translation from the dword that contains the 17 bit address, +// to the respective tilebase vera register. +// Note that the resulting vera register holds only specifies bits 16:11 of the address, +// so the resulting address in the VERA VRAM is always aligned to a multiple of 2048 bytes! +// - mapwidth: The width of the map in number of tiles. +// - mapheight: The height of the map in number of tiles. +// - tilewidth: The width of a tile, which can be 8 or 16 pixels. +// - tileheight: The height of a tile, which can be 8 or 16 pixels. +// - color_mode: The color mode, which can be 16 or 256. +vera_layer_mode_text: { + .label layer = 1 + .label mapbase_address = 0 + .label tilebase_address = $f800 + // vera_layer_mode_tile( layer, mapbase_address, tilebase_address, mapwidth, mapheight, tilewidth, tileheight, 1 ) + // [104] call vera_layer_mode_tile + // [206] phi from vera_layer_mode_text to vera_layer_mode_tile [phi:vera_layer_mode_text->vera_layer_mode_tile] + jsr vera_layer_mode_tile + // [105] phi from vera_layer_mode_text to vera_layer_mode_text::@1 [phi:vera_layer_mode_text->vera_layer_mode_text::@1] + // vera_layer_mode_text::@1 + // vera_layer_set_text_color_mode( layer, VERA_LAYER_CONFIG_16C ) + // [106] call vera_layer_set_text_color_mode + jsr vera_layer_set_text_color_mode + // vera_layer_mode_text::@return + // } + // [107] return + rts +} + // screensize +// Return the current screen size. +screensize: { + .label x = conio_screen_width + .label y = conio_screen_height + // hscale = (*VERA_DC_HSCALE) >> 7 + // [108] screensize::hscale#0 = *VERA_DC_HSCALE >> 7 -- vbuaa=_deref_pbuc1_ror_7 + lda VERA_DC_HSCALE + rol + rol + and #1 + // 40 << hscale + // [109] screensize::$1 = $28 << screensize::hscale#0 -- vbuaa=vbuc1_rol_vbuaa + tay + lda #$28 + cpy #0 + beq !e+ + !: + asl + dey + bne !- + !e: + // *x = 40 << hscale + // [110] *screensize::x#0 = screensize::$1 -- _deref_pbuc1=vbuaa + sta.z x + // vscale = (*VERA_DC_VSCALE) >> 7 + // [111] screensize::vscale#0 = *VERA_DC_VSCALE >> 7 -- vbuaa=_deref_pbuc1_ror_7 + lda VERA_DC_VSCALE + rol + rol + and #1 + // 30 << vscale + // [112] screensize::$3 = $1e << screensize::vscale#0 -- vbuaa=vbuc1_rol_vbuaa + tay + lda #$1e + cpy #0 + beq !e+ + !: + asl + dey + bne !- + !e: + // *y = 30 << vscale + // [113] *screensize::y#0 = screensize::$3 -- _deref_pbuc1=vbuaa + sta.z y + // screensize::@return + // } + // [114] return + rts +} + // screenlayer +// Set the layer with which the conio will interact. +// - layer: value of 0 or 1. +screenlayer: { + .const layer = 1 + .label __2 = $3b + .label __4 = $3d + .label __5 = $49 + .label vera_layer_get_width1_config = $4b + .label vera_layer_get_width1_return = $3b + .label vera_layer_get_height1_config = $3f + .label vera_layer_get_height1_return = $49 + // conio_screen_layer = layer + // [115] conio_screen_layer = screenlayer::layer#0 -- vbuz1=vbuc1 + lda #layer + sta.z conio_screen_layer + // vera_layer_get_mapbase_bank(conio_screen_layer) + // [116] vera_layer_get_mapbase_bank::layer#0 = conio_screen_layer -- vbuxx=vbuz1 + tax + // [117] call vera_layer_get_mapbase_bank + jsr vera_layer_get_mapbase_bank + // [118] vera_layer_get_mapbase_bank::return#2 = vera_layer_get_mapbase_bank::return#0 + // screenlayer::@3 + // [119] CONIO_SCREEN_BANK#10 = vera_layer_get_mapbase_bank::return#2 -- vbuz1=vbuaa + sta.z CONIO_SCREEN_BANK + // vera_layer_get_mapbase_offset(conio_screen_layer) + // [120] vera_layer_get_mapbase_offset::layer#0 = conio_screen_layer -- vbuaa=vbuz1 + lda.z conio_screen_layer + // [121] call vera_layer_get_mapbase_offset + jsr vera_layer_get_mapbase_offset + // [122] vera_layer_get_mapbase_offset::return#2 = vera_layer_get_mapbase_offset::return#0 + // screenlayer::@4 + // [123] CONIO_SCREEN_TEXT#101 = vera_layer_get_mapbase_offset::return#2 -- vwuz1=vwuz2 + lda.z vera_layer_get_mapbase_offset.return + sta.z CONIO_SCREEN_TEXT + lda.z vera_layer_get_mapbase_offset.return+1 + sta.z CONIO_SCREEN_TEXT+1 + // vera_layer_get_width(conio_screen_layer) + // [124] screenlayer::vera_layer_get_width1_layer#0 = conio_screen_layer -- vbuaa=vbuz1 + lda.z conio_screen_layer + // screenlayer::vera_layer_get_width1 + // config = vera_layer_config[layer] + // [125] screenlayer::vera_layer_get_width1_$2 = screenlayer::vera_layer_get_width1_layer#0 << 1 -- vbuaa=vbuaa_rol_1 + asl + // [126] screenlayer::vera_layer_get_width1_config#0 = vera_layer_config[screenlayer::vera_layer_get_width1_$2] -- pbuz1=qbuc1_derefidx_vbuaa + tay + lda vera_layer_config,y + sta.z vera_layer_get_width1_config + lda vera_layer_config+1,y + sta.z vera_layer_get_width1_config+1 + // *config & VERA_LAYER_WIDTH_MASK + // [127] screenlayer::vera_layer_get_width1_$0 = *screenlayer::vera_layer_get_width1_config#0 & VERA_LAYER_WIDTH_MASK -- vbuaa=_deref_pbuz1_band_vbuc1 + lda #VERA_LAYER_WIDTH_MASK + ldy #0 + and (vera_layer_get_width1_config),y + // (*config & VERA_LAYER_WIDTH_MASK) >> 4 + // [128] screenlayer::vera_layer_get_width1_$1 = screenlayer::vera_layer_get_width1_$0 >> 4 -- vbuaa=vbuaa_ror_4 + lsr + lsr + lsr + lsr + // return VERA_LAYER_WIDTH[ (*config & VERA_LAYER_WIDTH_MASK) >> 4]; + // [129] screenlayer::vera_layer_get_width1_$3 = screenlayer::vera_layer_get_width1_$1 << 1 -- vbuaa=vbuaa_rol_1 + asl + // [130] screenlayer::vera_layer_get_width1_return#0 = VERA_LAYER_WIDTH[screenlayer::vera_layer_get_width1_$3] -- vwuz1=pwuc1_derefidx_vbuaa + tay + lda VERA_LAYER_WIDTH,y + sta.z vera_layer_get_width1_return + lda VERA_LAYER_WIDTH+1,y + sta.z vera_layer_get_width1_return+1 + // screenlayer::vera_layer_get_width1_@return + // } + // [131] screenlayer::vera_layer_get_width1_return#1 = screenlayer::vera_layer_get_width1_return#0 + // screenlayer::@1 + // vera_layer_get_width(conio_screen_layer) + // [132] screenlayer::$2 = screenlayer::vera_layer_get_width1_return#1 + // conio_width = vera_layer_get_width(conio_screen_layer) + // [133] conio_width = screenlayer::$2 -- vwuz1=vwuz2 + lda.z __2 + sta.z conio_width + lda.z __2+1 + sta.z conio_width+1 + // vera_layer_get_rowshift(conio_screen_layer) + // [134] vera_layer_get_rowshift::layer#0 = conio_screen_layer -- vbuxx=vbuz1 + ldx.z conio_screen_layer + // [135] call vera_layer_get_rowshift + jsr vera_layer_get_rowshift + // [136] vera_layer_get_rowshift::return#2 = vera_layer_get_rowshift::return#0 + // screenlayer::@5 + // [137] screenlayer::$3 = vera_layer_get_rowshift::return#2 + // conio_rowshift = vera_layer_get_rowshift(conio_screen_layer) + // [138] conio_rowshift = screenlayer::$3 -- vbuz1=vbuaa + sta.z conio_rowshift + // vera_layer_get_rowskip(conio_screen_layer) + // [139] vera_layer_get_rowskip::layer#0 = conio_screen_layer -- vbuaa=vbuz1 + lda.z conio_screen_layer + // [140] call vera_layer_get_rowskip + jsr vera_layer_get_rowskip + // [141] vera_layer_get_rowskip::return#2 = vera_layer_get_rowskip::return#0 + // screenlayer::@6 + // [142] screenlayer::$4 = vera_layer_get_rowskip::return#2 + // conio_rowskip = vera_layer_get_rowskip(conio_screen_layer) + // [143] conio_rowskip = screenlayer::$4 -- vwuz1=vwuz2 + lda.z __4 + sta.z conio_rowskip + lda.z __4+1 + sta.z conio_rowskip+1 + // vera_layer_get_height(conio_screen_layer) + // [144] screenlayer::vera_layer_get_height1_layer#0 = conio_screen_layer -- vbuaa=vbuz1 + lda.z conio_screen_layer + // screenlayer::vera_layer_get_height1 + // config = vera_layer_config[layer] + // [145] screenlayer::vera_layer_get_height1_$2 = screenlayer::vera_layer_get_height1_layer#0 << 1 -- vbuaa=vbuaa_rol_1 + asl + // [146] screenlayer::vera_layer_get_height1_config#0 = vera_layer_config[screenlayer::vera_layer_get_height1_$2] -- pbuz1=qbuc1_derefidx_vbuaa + tay + lda vera_layer_config,y + sta.z vera_layer_get_height1_config + lda vera_layer_config+1,y + sta.z vera_layer_get_height1_config+1 + // *config & VERA_LAYER_HEIGHT_MASK + // [147] screenlayer::vera_layer_get_height1_$0 = *screenlayer::vera_layer_get_height1_config#0 & VERA_LAYER_HEIGHT_MASK -- vbuaa=_deref_pbuz1_band_vbuc1 + lda #VERA_LAYER_HEIGHT_MASK + ldy #0 + and (vera_layer_get_height1_config),y + // (*config & VERA_LAYER_HEIGHT_MASK) >> 6 + // [148] screenlayer::vera_layer_get_height1_$1 = screenlayer::vera_layer_get_height1_$0 >> 6 -- vbuaa=vbuaa_ror_6 + rol + rol + rol + and #3 + // return VERA_LAYER_HEIGHT[ (*config & VERA_LAYER_HEIGHT_MASK) >> 6]; + // [149] screenlayer::vera_layer_get_height1_$3 = screenlayer::vera_layer_get_height1_$1 << 1 -- vbuaa=vbuaa_rol_1 + asl + // [150] screenlayer::vera_layer_get_height1_return#0 = VERA_LAYER_HEIGHT[screenlayer::vera_layer_get_height1_$3] -- vwuz1=pwuc1_derefidx_vbuaa + tay + lda VERA_LAYER_HEIGHT,y + sta.z vera_layer_get_height1_return + lda VERA_LAYER_HEIGHT+1,y + sta.z vera_layer_get_height1_return+1 + // screenlayer::vera_layer_get_height1_@return + // } + // [151] screenlayer::vera_layer_get_height1_return#1 = screenlayer::vera_layer_get_height1_return#0 + // screenlayer::@2 + // vera_layer_get_height(conio_screen_layer) + // [152] screenlayer::$5 = screenlayer::vera_layer_get_height1_return#1 + // conio_height = vera_layer_get_height(conio_screen_layer) + // [153] conio_height = screenlayer::$5 -- vwuz1=vwuz2 + lda.z __5 + sta.z conio_height + lda.z __5+1 + sta.z conio_height+1 + // screenlayer::@return + // } + // [154] return + rts +} + // vera_layer_set_textcolor +// Set the front color for text output. The old front text color setting is returned. +// - layer: Value of 0 or 1. +// - color: a 4 bit value ( decimal between 0 and 15) when the VERA works in 16x16 color text mode. +// An 8 bit value (decimal between 0 and 255) when the VERA works in 256 text mode. +// Note that on the VERA, the transparent color has value 0. +vera_layer_set_textcolor: { + .const layer = 1 + // vera_layer_textcolor[layer] = color + // [155] *(vera_layer_textcolor+vera_layer_set_textcolor::layer#0) = WHITE -- _deref_pbuc1=vbuc2 + lda #WHITE + sta vera_layer_textcolor+layer + // vera_layer_set_textcolor::@return + // } + // [156] return + rts +} + // vera_layer_set_backcolor +// Set the back color for text output. The old back text color setting is returned. +// - layer: Value of 0 or 1. +// - color: a 4 bit value ( decimal between 0 and 15). +// This will only work when the VERA is in 16 color mode! +// Note that on the VERA, the transparent color has value 0. +vera_layer_set_backcolor: { + .const layer = 1 + // vera_layer_backcolor[layer] = color + // [157] *(vera_layer_backcolor+vera_layer_set_backcolor::layer#0) = BLUE -- _deref_pbuc1=vbuc2 + lda #BLUE + sta vera_layer_backcolor+layer + // vera_layer_set_backcolor::@return + // } + // [158] return + rts +} + // vera_layer_set_mapbase +// Set the base of the map layer with which the conio will interact. +// - layer: Value of 0 or 1. +// - mapbase: Specifies the base address of the tile map. +// Note that the register only specifies bits 16:9 of the address, +// so the resulting address in the VERA VRAM is always aligned to a multiple of 512 bytes. +// vera_layer_set_mapbase(byte register(A) layer, byte register(X) mapbase) +vera_layer_set_mapbase: { + .label addr = $3b + // addr = vera_layer_mapbase[layer] + // [160] vera_layer_set_mapbase::$0 = vera_layer_set_mapbase::layer#3 << 1 -- vbuaa=vbuaa_rol_1 + asl + // [161] vera_layer_set_mapbase::addr#0 = vera_layer_mapbase[vera_layer_set_mapbase::$0] -- pbuz1=qbuc1_derefidx_vbuaa + tay + lda vera_layer_mapbase,y + sta.z addr + lda vera_layer_mapbase+1,y + sta.z addr+1 + // *addr = mapbase + // [162] *vera_layer_set_mapbase::addr#0 = vera_layer_set_mapbase::mapbase#3 -- _deref_pbuz1=vbuxx + txa + ldy #0 + sta (addr),y + // vera_layer_set_mapbase::@return + // } + // [163] return + rts +} + // gotoxy +// Set the cursor to the specified position +// gotoxy(byte register(X) y) +gotoxy: { + .label __6 = $3d + .label line_offset = $3d + // if(y>CONIO_HEIGHT) + // [165] if(gotoxy::y#3<=conio_screen_height) goto gotoxy::@4 -- vbuxx_le_vbuz1_then_la1 + lda.z conio_screen_height + stx.z $ff + cmp.z $ff + bcs __b1 + // [167] phi from gotoxy to gotoxy::@1 [phi:gotoxy->gotoxy::@1] + // [167] phi gotoxy::y#4 = 0 [phi:gotoxy->gotoxy::@1#0] -- vbuxx=vbuc1 + ldx #0 + // [166] phi from gotoxy to gotoxy::@4 [phi:gotoxy->gotoxy::@4] + // gotoxy::@4 + // [167] phi from gotoxy::@4 to gotoxy::@1 [phi:gotoxy::@4->gotoxy::@1] + // [167] phi gotoxy::y#4 = gotoxy::y#3 [phi:gotoxy::@4->gotoxy::@1#0] -- register_copy + // gotoxy::@1 + __b1: + // if(x>=CONIO_WIDTH) + // [168] if(0gotoxy::@3] + // gotoxy::@3 + // gotoxy::@2 + // conio_cursor_x[conio_screen_layer] = x + // [170] conio_cursor_x[conio_screen_layer] = 0 -- pbuc1_derefidx_vbuz1=vbuc2 + lda #0 + ldy.z conio_screen_layer + sta conio_cursor_x,y + // conio_cursor_y[conio_screen_layer] = y + // [171] conio_cursor_y[conio_screen_layer] = gotoxy::y#4 -- pbuc1_derefidx_vbuz1=vbuxx + txa + sta conio_cursor_y,y + // (unsigned int)y << conio_rowshift + // [172] gotoxy::$6 = (word)gotoxy::y#4 -- vwuz1=_word_vbuxx + txa + sta.z __6 + lda #0 + sta.z __6+1 + // line_offset = (unsigned int)y << conio_rowshift + // [173] gotoxy::line_offset#0 = gotoxy::$6 << conio_rowshift -- vwuz1=vwuz1_rol_vbuz2 + ldy.z conio_rowshift + beq !e+ + !: + asl.z line_offset + rol.z line_offset+1 + dey + bne !- + !e: + // conio_line_text[conio_screen_layer] = line_offset + // [174] gotoxy::$5 = conio_screen_layer << 1 -- vbuaa=vbuz1_rol_1 + lda.z conio_screen_layer + asl + // [175] conio_line_text[gotoxy::$5] = gotoxy::line_offset#0 -- pwuc1_derefidx_vbuaa=vwuz1 + tay + lda.z line_offset + sta conio_line_text,y + lda.z line_offset+1 + sta conio_line_text+1,y + // gotoxy::@return + // } + // [176] return + rts +} + // cputs +// Output a NUL-terminated string at the current cursor position +// cputs(byte* zp($22) s) +cputs: { + .label s = $22 + // [178] phi from cputs cputs::@2 to cputs::@1 [phi:cputs/cputs::@2->cputs::@1] + // [178] phi cputs::s#10 = cputs::s#11 [phi:cputs/cputs::@2->cputs::@1#0] -- register_copy + // cputs::@1 + __b1: + // while(c=*s++) + // [179] cputs::c#1 = *cputs::s#10 -- vbuaa=_deref_pbuz1 + ldy #0 + lda (s),y + // [180] cputs::s#0 = ++ cputs::s#10 -- pbuz1=_inc_pbuz1 + inc.z s + bne !+ + inc.z s+1 + !: + // [181] if(0!=cputs::c#1) goto cputs::@2 -- 0_neq_vbuaa_then_la1 + cmp #0 + bne __b2 + // cputs::@return + // } + // [182] return + rts + // cputs::@2 + __b2: + // cputc(c) + // [183] cputc::c#0 = cputs::c#1 -- vbuz1=vbuaa + sta.z cputc.c + // [184] call cputc + // [235] phi from cputs::@2 to cputc [phi:cputs::@2->cputc] + // [235] phi cputc::c#3 = cputc::c#0 [phi:cputs::@2->cputc#0] -- register_copy + jsr cputc + jmp __b1 +} + // printf_ulong +// Print an unsigned int using a specific format +// printf_ulong(dword zp($b) uvalue) +printf_ulong: { + .label uvalue = $b + // printf_ulong::@1 + // printf_buffer.sign = format.sign_always?'+':0 + // [186] *((byte*)&printf_buffer) = 0 -- _deref_pbuc1=vbuc2 + // Handle any sign + lda #0 + sta printf_buffer + // ultoa(uvalue, printf_buffer.digits, format.radix) + // [187] ultoa::value#1 = printf_ulong::uvalue#3 + // [188] call ultoa + // Format number into buffer + // [267] phi from printf_ulong::@1 to ultoa [phi:printf_ulong::@1->ultoa] + jsr ultoa + // printf_ulong::@2 + // printf_number_buffer(printf_buffer, format) + // [189] printf_number_buffer::buffer_sign#0 = *((byte*)&printf_buffer) -- vbuaa=_deref_pbuc1 + lda printf_buffer + // [190] call printf_number_buffer + // Print using format + // [288] phi from printf_ulong::@2 to printf_number_buffer [phi:printf_ulong::@2->printf_number_buffer] + // [288] phi printf_number_buffer::buffer_sign#10 = printf_number_buffer::buffer_sign#0 [phi:printf_ulong::@2->printf_number_buffer#0] -- register_copy + jsr printf_number_buffer + // printf_ulong::@return + // } + // [191] return + rts +} + // printf_uchar +// Print an unsigned char using a specific format +// printf_uchar(byte register(X) uvalue) +printf_uchar: { + // printf_uchar::@1 + // printf_buffer.sign = format.sign_always?'+':0 + // [193] *((byte*)&printf_buffer) = 0 -- _deref_pbuc1=vbuc2 + // Handle any sign + lda #0 + sta printf_buffer + // uctoa(uvalue, printf_buffer.digits, format.radix) + // [194] uctoa::value#1 = printf_uchar::uvalue#2 + // [195] call uctoa + // Format number into buffer + // [295] phi from printf_uchar::@1 to uctoa [phi:printf_uchar::@1->uctoa] + jsr uctoa + // printf_uchar::@2 + // printf_number_buffer(printf_buffer, format) + // [196] printf_number_buffer::buffer_sign#2 = *((byte*)&printf_buffer) -- vbuaa=_deref_pbuc1 + lda printf_buffer + // [197] call printf_number_buffer + // Print using format + // [288] phi from printf_uchar::@2 to printf_number_buffer [phi:printf_uchar::@2->printf_number_buffer] + // [288] phi printf_number_buffer::buffer_sign#10 = printf_number_buffer::buffer_sign#2 [phi:printf_uchar::@2->printf_number_buffer#0] -- register_copy + jsr printf_number_buffer + // printf_uchar::@return + // } + // [198] return + rts +} + // printf_uint +// Print an unsigned int using a specific format +// printf_uint(word zp($f) uvalue) +printf_uint: { + .label uvalue = $f + // printf_uint::@1 + // printf_buffer.sign = format.sign_always?'+':0 + // [200] *((byte*)&printf_buffer) = 0 -- _deref_pbuc1=vbuc2 + // Handle any sign + lda #0 + sta printf_buffer + // utoa(uvalue, printf_buffer.digits, format.radix) + // [201] utoa::value#1 = printf_uint::uvalue#2 + // [202] call utoa + // Format number into buffer + // [314] phi from printf_uint::@1 to utoa [phi:printf_uint::@1->utoa] + jsr utoa + // printf_uint::@2 + // printf_number_buffer(printf_buffer, format) + // [203] printf_number_buffer::buffer_sign#1 = *((byte*)&printf_buffer) -- vbuaa=_deref_pbuc1 + lda printf_buffer + // [204] call printf_number_buffer + // Print using format + // [288] phi from printf_uint::@2 to printf_number_buffer [phi:printf_uint::@2->printf_number_buffer] + // [288] phi printf_number_buffer::buffer_sign#10 = printf_number_buffer::buffer_sign#1 [phi:printf_uint::@2->printf_number_buffer#0] -- register_copy + jsr printf_number_buffer + // printf_uint::@return + // } + // [205] return + rts +} + // vera_layer_mode_tile +// Set a vera layer in tile mode and configure the: +// - layer: Value of 0 or 1. +// - mapbase_address: A dword typed address (4 bytes), that specifies the full address of the map base. +// The function does the translation from the dword that contains the 17 bit address, +// to the respective mapbase vera register. +// Note that the register only specifies bits 16:9 of the address, +// so the resulting address in the VERA VRAM is always aligned to a multiple of 512 bytes. +// - tilebase_address: A dword typed address (4 bytes), that specifies the base address of the tile map. +// The function does the translation from the dword that contains the 17 bit address, +// to the respective tilebase vera register. +// Note that the resulting vera register holds only specifies bits 16:11 of the address, +// so the resulting address in the VERA VRAM is always aligned to a multiple of 2048 bytes! +// - mapwidth: The width of the map in number of tiles. +// - mapheight: The height of the map in number of tiles. +// - tilewidth: The width of a tile, which can be 8 or 16 pixels. +// - tileheight: The height of a tile, which can be 8 or 16 pixels. +// - color_depth: The color depth in bits per pixel (BPP), which can be 1, 2, 4 or 8. +vera_layer_mode_tile: { + .const mapbase = 0 + .label tilebase_address = vera_layer_mode_text.tilebase_address>>1 + // config + .label config = VERA_LAYER_WIDTH_128|VERA_LAYER_HEIGHT_64 + // vera_layer_mode_tile::@1 + // vera_layer_rowshift[layer] = 8 + // [207] *(vera_layer_rowshift+vera_layer_mode_text::layer#0) = 8 -- _deref_pbuc1=vbuc2 + lda #8 + sta vera_layer_rowshift+vera_layer_mode_text.layer + // vera_layer_rowskip[layer] = 256 + // [208] *(vera_layer_rowskip+vera_layer_mode_text::layer#0*SIZEOF_WORD) = $100 -- _deref_pwuc1=vwuc2 + lda #<$100 + sta vera_layer_rowskip+vera_layer_mode_text.layer*SIZEOF_WORD + lda #>$100 + sta vera_layer_rowskip+vera_layer_mode_text.layer*SIZEOF_WORD+1 + // [209] phi from vera_layer_mode_tile::@1 to vera_layer_mode_tile::@2 [phi:vera_layer_mode_tile::@1->vera_layer_mode_tile::@2] + // vera_layer_mode_tile::@2 + // vera_layer_set_config(layer, config) + // [210] call vera_layer_set_config + jsr vera_layer_set_config + // vera_layer_mode_tile::@4 + // vera_mapbase_offset[layer] = mapbase_address) + // [212] *(vera_mapbase_bank+vera_layer_mode_text::layer#0) = 0 -- _deref_pbuc1=vbuc2 + sta vera_mapbase_bank+vera_layer_mode_text.layer + // vera_mapbase_address[layer] = mapbase_address + // [213] *(vera_mapbase_address+vera_layer_mode_text::layer#0*SIZEOF_DWORD) = vera_layer_mode_text::mapbase_address#0 -- _deref_pduc1=vduc2 + lda #vera_layer_mode_text.mapbase_address + sta vera_mapbase_address+vera_layer_mode_text.layer*SIZEOF_DWORD+1 + lda #>$10 + sta vera_mapbase_address+vera_layer_mode_text.layer*SIZEOF_DWORD+2 + lda #>vera_layer_mode_text.mapbase_address>>$10 + sta vera_mapbase_address+vera_layer_mode_text.layer*SIZEOF_DWORD+3 + // vera_layer_set_mapbase(layer,mapbase) + // [214] call vera_layer_set_mapbase + // [159] phi from vera_layer_mode_tile::@4 to vera_layer_set_mapbase [phi:vera_layer_mode_tile::@4->vera_layer_set_mapbase] + // [159] phi vera_layer_set_mapbase::mapbase#3 = vera_layer_mode_tile::mapbase#0 [phi:vera_layer_mode_tile::@4->vera_layer_set_mapbase#0] -- vbuxx=vbuc1 + ldx #mapbase + // [159] phi vera_layer_set_mapbase::layer#3 = vera_layer_mode_text::layer#0 [phi:vera_layer_mode_tile::@4->vera_layer_set_mapbase#1] -- vbuaa=vbuc1 + lda #vera_layer_mode_text.layer + jsr vera_layer_set_mapbase + // vera_layer_mode_tile::@5 + // vera_tilebase_offset[layer] = vera_layer_mode_text.tilebase_address&$ffff + sta vera_tilebase_offset+vera_layer_mode_text.layer*SIZEOF_WORD+1 + // vera_tilebase_bank[layer] = (byte)>tilebase_address + // [216] *(vera_tilebase_bank+vera_layer_mode_text::layer#0) = 0 -- _deref_pbuc1=vbuc2 + lda #0 + sta vera_tilebase_bank+vera_layer_mode_text.layer + // vera_tilebase_address[layer] = tilebase_address + // [217] *(vera_tilebase_address+vera_layer_mode_text::layer#0*SIZEOF_DWORD) = vera_layer_mode_text::tilebase_address#0 -- _deref_pduc1=vduc2 + lda #vera_layer_mode_text.tilebase_address + sta vera_tilebase_address+vera_layer_mode_text.layer*SIZEOF_DWORD+1 + lda #>$10 + sta vera_tilebase_address+vera_layer_mode_text.layer*SIZEOF_DWORD+2 + lda #>vera_layer_mode_text.tilebase_address>>$10 + sta vera_tilebase_address+vera_layer_mode_text.layer*SIZEOF_DWORD+3 + // [218] phi from vera_layer_mode_tile::@5 to vera_layer_mode_tile::@3 [phi:vera_layer_mode_tile::@5->vera_layer_mode_tile::@3] + // vera_layer_mode_tile::@3 + // vera_layer_set_tilebase(layer,tilebase) + // [219] call vera_layer_set_tilebase + jsr vera_layer_set_tilebase + // vera_layer_mode_tile::@return + // } + // [220] return + rts +} + // vera_layer_set_text_color_mode +// Set the configuration of the layer text color mode. +// - layer: Value of 0 or 1. +// - color_mode: Specifies the color mode to be VERA_LAYER_CONFIG_16 or VERA_LAYER_CONFIG_256 for text mode. +vera_layer_set_text_color_mode: { + .label addr = $3f + // addr = vera_layer_config[layer] + // [221] vera_layer_set_text_color_mode::addr#0 = *(vera_layer_config+vera_layer_mode_text::layer#0*SIZEOF_POINTER) -- pbuz1=_deref_qbuc1 + lda vera_layer_config+vera_layer_mode_text.layer*SIZEOF_POINTER + sta.z addr + lda vera_layer_config+vera_layer_mode_text.layer*SIZEOF_POINTER+1 + sta.z addr+1 + // *addr &= ~VERA_LAYER_CONFIG_256C + // [222] *vera_layer_set_text_color_mode::addr#0 = *vera_layer_set_text_color_mode::addr#0 & ~VERA_LAYER_CONFIG_256C -- _deref_pbuz1=_deref_pbuz1_band_vbuc1 + lda #VERA_LAYER_CONFIG_256C^$ff + ldy #0 + and (addr),y + sta (addr),y + // *addr |= color_mode + // [223] *vera_layer_set_text_color_mode::addr#0 = *vera_layer_set_text_color_mode::addr#0 -- _deref_pbuz1=_deref_pbuz1 + lda (addr),y + sta (addr),y + // vera_layer_set_text_color_mode::@return + // } + // [224] return + rts +} + // vera_layer_get_mapbase_bank +// Get the map base bank of the tiles for the layer. +// - layer: Value of 0 or 1. +// - return: Bank in vera vram. +// vera_layer_get_mapbase_bank(byte register(X) layer) +vera_layer_get_mapbase_bank: { + // return vera_mapbase_bank[layer]; + // [225] vera_layer_get_mapbase_bank::return#0 = vera_mapbase_bank[vera_layer_get_mapbase_bank::layer#0] -- vbuaa=pbuc1_derefidx_vbuxx + lda vera_mapbase_bank,x + // vera_layer_get_mapbase_bank::@return + // } + // [226] return + rts +} + // vera_layer_get_mapbase_offset +// Get the map base lower 16-bit address (offset) of the tiles for the layer. +// - layer: Value of 0 or 1. +// - return: Offset in vera vram of the specified bank. +// vera_layer_get_mapbase_offset(byte register(A) layer) +vera_layer_get_mapbase_offset: { + .label return = $4b + // return vera_mapbase_offset[layer]; + // [227] vera_layer_get_mapbase_offset::$0 = vera_layer_get_mapbase_offset::layer#0 << 1 -- vbuaa=vbuaa_rol_1 + asl + // [228] vera_layer_get_mapbase_offset::return#0 = vera_mapbase_offset[vera_layer_get_mapbase_offset::$0] -- vwuz1=pwuc1_derefidx_vbuaa + tay + lda vera_mapbase_offset,y + sta.z return + lda vera_mapbase_offset+1,y + sta.z return+1 + // vera_layer_get_mapbase_offset::@return + // } + // [229] return + rts +} + // vera_layer_get_rowshift +// Get the bit shift value required to skip a whole line fast. +// - layer: Value of 0 or 1. +// - return: Rowshift value to calculate fast from a y value to line offset in tile mode. +// vera_layer_get_rowshift(byte register(X) layer) +vera_layer_get_rowshift: { + // return vera_layer_rowshift[layer]; + // [230] vera_layer_get_rowshift::return#0 = vera_layer_rowshift[vera_layer_get_rowshift::layer#0] -- vbuaa=pbuc1_derefidx_vbuxx + lda vera_layer_rowshift,x + // vera_layer_get_rowshift::@return + // } + // [231] return + rts +} + // vera_layer_get_rowskip +// Get the value required to skip a whole line fast. +// - layer: Value of 0 or 1. +// - return: Skip value to calculate fast from a y value to line offset in tile mode. +// vera_layer_get_rowskip(byte register(A) layer) +vera_layer_get_rowskip: { + .label return = $3d + // return vera_layer_rowskip[layer]; + // [232] vera_layer_get_rowskip::$0 = vera_layer_get_rowskip::layer#0 << 1 -- vbuaa=vbuaa_rol_1 + asl + // [233] vera_layer_get_rowskip::return#0 = vera_layer_rowskip[vera_layer_get_rowskip::$0] -- vwuz1=pwuc1_derefidx_vbuaa + tay + lda vera_layer_rowskip,y + sta.z return + lda vera_layer_rowskip+1,y + sta.z return+1 + // vera_layer_get_rowskip::@return + // } + // [234] return + rts +} + // cputc +// Output one character at the current cursor position +// Moves the cursor forward. Scrolls the entire screen if needed +// cputc(byte zp($11) c) +cputc: { + .label __16 = $41 + .label conio_addr = $47 + .label c = $11 + // vera_layer_get_color( conio_screen_layer) + // [236] vera_layer_get_color::layer#0 = conio_screen_layer -- vbuxx=vbuz1 + ldx.z conio_screen_layer + // [237] call vera_layer_get_color + // [341] phi from cputc to vera_layer_get_color [phi:cputc->vera_layer_get_color] + // [341] phi vera_layer_get_color::layer#2 = vera_layer_get_color::layer#0 [phi:cputc->vera_layer_get_color#0] -- register_copy + jsr vera_layer_get_color + // vera_layer_get_color( conio_screen_layer) + // [238] vera_layer_get_color::return#3 = vera_layer_get_color::return#2 + // cputc::@7 + // color = vera_layer_get_color( conio_screen_layer) + // [239] cputc::color#0 = vera_layer_get_color::return#3 -- vbuxx=vbuaa + tax + // CONIO_SCREEN_TEXT + conio_line_text[conio_screen_layer] + // [240] cputc::$15 = conio_screen_layer << 1 -- vbuaa=vbuz1_rol_1 + lda.z conio_screen_layer + asl + // conio_addr = CONIO_SCREEN_TEXT + conio_line_text[conio_screen_layer] + // [241] cputc::conio_addr#0 = (byte*)CONIO_SCREEN_TEXT#101 + conio_line_text[cputc::$15] -- pbuz1=pbuz2_plus_pwuc1_derefidx_vbuaa + tay + clc + lda.z CONIO_SCREEN_TEXT + adc conio_line_text,y + sta.z conio_addr + lda.z CONIO_SCREEN_TEXT+1 + adc conio_line_text+1,y + sta.z conio_addr+1 + // conio_cursor_x[conio_screen_layer] << 1 + // [242] cputc::$2 = conio_cursor_x[conio_screen_layer] << 1 -- vbuaa=pbuc1_derefidx_vbuz1_rol_1 + ldy.z conio_screen_layer + lda conio_cursor_x,y + asl + // conio_addr += conio_cursor_x[conio_screen_layer] << 1 + // [243] cputc::conio_addr#1 = cputc::conio_addr#0 + cputc::$2 -- pbuz1=pbuz1_plus_vbuaa + clc + adc.z conio_addr + sta.z conio_addr + bcc !+ + inc.z conio_addr+1 + !: + // if(c=='\n') + // [244] if(cputc::c#3==' ') goto cputc::@1 -- vbuz1_eq_vbuc1_then_la1 + lda #'\n' + cmp.z c + beq __b1 + // cputc::@2 + // *VERA_CTRL &= ~VERA_ADDRSEL + // [245] *VERA_CTRL = *VERA_CTRL & ~VERA_ADDRSEL -- _deref_pbuc1=_deref_pbuc1_band_vbuc2 + // Select DATA0 + lda #VERA_ADDRSEL^$ff + and VERA_CTRL + sta VERA_CTRL + // conio_addr + // [248] cputc::$5 = > cputc::conio_addr#1 -- vbuaa=_hi_pbuz1 + lda.z conio_addr+1 + // *VERA_ADDRX_M = >conio_addr + // [249] *VERA_ADDRX_M = cputc::$5 -- _deref_pbuc1=vbuaa + sta VERA_ADDRX_M + // CONIO_SCREEN_BANK | VERA_INC_1 + // [250] cputc::$6 = CONIO_SCREEN_BANK#10 | VERA_INC_1 -- vbuaa=vbuz1_bor_vbuc1 + lda #VERA_INC_1 + ora.z CONIO_SCREEN_BANK + // *VERA_ADDRX_H = CONIO_SCREEN_BANK | VERA_INC_1 + // [251] *VERA_ADDRX_H = cputc::$6 -- _deref_pbuc1=vbuaa + sta VERA_ADDRX_H + // *VERA_DATA0 = c + // [252] *VERA_DATA0 = cputc::c#3 -- _deref_pbuc1=vbuz1 + lda.z c + sta VERA_DATA0 + // *VERA_DATA0 = color + // [253] *VERA_DATA0 = cputc::color#0 -- _deref_pbuc1=vbuxx + stx VERA_DATA0 + // conio_cursor_x[conio_screen_layer]++; + // [254] conio_cursor_x[conio_screen_layer] = ++ conio_cursor_x[conio_screen_layer] -- pbuc1_derefidx_vbuz1=_inc_pbuc1_derefidx_vbuz1 + ldx.z conio_screen_layer + inc conio_cursor_x,x + // scroll_enable = conio_scroll_enable[conio_screen_layer] + // [255] cputc::scroll_enable#0 = conio_scroll_enable[conio_screen_layer] -- vbuaa=pbuc1_derefidx_vbuz1 + ldy.z conio_screen_layer + lda conio_scroll_enable,y + // if(scroll_enable) + // [256] if(0!=cputc::scroll_enable#0) goto cputc::@5 -- 0_neq_vbuaa_then_la1 + cmp #0 + bne __b5 + // cputc::@3 + // (unsigned int)conio_cursor_x[conio_screen_layer] == conio_width + // [257] cputc::$16 = (word)conio_cursor_x[conio_screen_layer] -- vwuz1=_word_pbuc1_derefidx_vbuz2 + lda conio_cursor_x,y + sta.z __16 + lda #0 + sta.z __16+1 + // if((unsigned int)conio_cursor_x[conio_screen_layer] == conio_width) + // [258] if(cputc::$16!=conio_width) goto cputc::@return -- vwuz1_neq_vwuz2_then_la1 + cmp.z conio_width+1 + bne __breturn + lda.z __16 + cmp.z conio_width + bne __breturn + // [259] phi from cputc::@3 to cputc::@4 [phi:cputc::@3->cputc::@4] + // cputc::@4 + // cputln() + // [260] call cputln + jsr cputln + // cputc::@return + __breturn: + // } + // [261] return + rts + // cputc::@5 + __b5: + // if(conio_cursor_x[conio_screen_layer] == CONIO_WIDTH) + // [262] if(conio_cursor_x[conio_screen_layer]!=conio_screen_width) goto cputc::@return -- pbuc1_derefidx_vbuz1_neq_vbuz2_then_la1 + lda.z conio_screen_width + ldy.z conio_screen_layer + cmp conio_cursor_x,y + bne __breturn + // [263] phi from cputc::@5 to cputc::@6 [phi:cputc::@5->cputc::@6] + // cputc::@6 + // cputln() + // [264] call cputln + jsr cputln + rts + // [265] phi from cputc::@7 to cputc::@1 [phi:cputc::@7->cputc::@1] + // cputc::@1 + __b1: + // cputln() + // [266] call cputln + jsr cputln + rts +} + // ultoa +// Converts unsigned number value to a string representing it in RADIX format. +// If the leading digits are zero they are not included in the string. +// - value : The number to be converted to RADIX +// - buffer : receives the string representing the number and zero-termination. +// - radix : The radix to convert the number to (from the enum RADIX) +// ultoa(dword zp($b) value, byte* zp($22) buffer) +ultoa: { + .label digit_value = $43 + .label buffer = $22 + .label digit = $11 + .label value = $b + // [268] phi from ultoa to ultoa::@1 [phi:ultoa->ultoa::@1] + // [268] phi ultoa::buffer#11 = (byte*)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS [phi:ultoa->ultoa::@1#0] -- pbuz1=pbuc1 + lda #printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS + sta.z buffer+1 + // [268] phi ultoa::started#2 = 0 [phi:ultoa->ultoa::@1#1] -- vbuxx=vbuc1 + ldx #0 + // [268] phi ultoa::value#2 = ultoa::value#1 [phi:ultoa->ultoa::@1#2] -- register_copy + // [268] phi ultoa::digit#2 = 0 [phi:ultoa->ultoa::@1#3] -- vbuz1=vbuc1 + txa + sta.z digit + // ultoa::@1 + __b1: + // for( char digit=0; digit= digit_value) + // [277] if(0!=ultoa::started#2) goto ultoa::@5 -- 0_neq_vbuxx_then_la1 + cpx #0 + bne __b5 + // ultoa::@7 + // [278] if(ultoa::value#2>=ultoa::digit_value#0) goto ultoa::@5 -- vduz1_ge_vduz2_then_la1 + lda.z value+3 + cmp.z digit_value+3 + bcc !+ + bne __b5 + lda.z value+2 + cmp.z digit_value+2 + bcc !+ + bne __b5 + lda.z value+1 + cmp.z digit_value+1 + bcc !+ + bne __b5 + lda.z value + cmp.z digit_value + bcs __b5 + !: + // [279] phi from ultoa::@7 to ultoa::@4 [phi:ultoa::@7->ultoa::@4] + // [279] phi ultoa::buffer#14 = ultoa::buffer#11 [phi:ultoa::@7->ultoa::@4#0] -- register_copy + // [279] phi ultoa::started#4 = ultoa::started#2 [phi:ultoa::@7->ultoa::@4#1] -- register_copy + // [279] phi ultoa::value#6 = ultoa::value#2 [phi:ultoa::@7->ultoa::@4#2] -- register_copy + // ultoa::@4 + __b4: + // for( char digit=0; digitultoa::@1] + // [268] phi ultoa::buffer#11 = ultoa::buffer#14 [phi:ultoa::@4->ultoa::@1#0] -- register_copy + // [268] phi ultoa::started#2 = ultoa::started#4 [phi:ultoa::@4->ultoa::@1#1] -- register_copy + // [268] phi ultoa::value#2 = ultoa::value#6 [phi:ultoa::@4->ultoa::@1#2] -- register_copy + // [268] phi ultoa::digit#2 = ultoa::digit#1 [phi:ultoa::@4->ultoa::@1#3] -- register_copy + jmp __b1 + // ultoa::@5 + __b5: + // ultoa_append(buffer++, value, digit_value) + // [281] ultoa_append::buffer#0 = ultoa::buffer#11 + // [282] ultoa_append::value#0 = ultoa::value#2 + // [283] ultoa_append::sub#0 = ultoa::digit_value#0 + // [284] call ultoa_append + // [360] phi from ultoa::@5 to ultoa_append [phi:ultoa::@5->ultoa_append] + jsr ultoa_append + // ultoa_append(buffer++, value, digit_value) + // [285] ultoa_append::return#0 = ultoa_append::value#2 + // ultoa::@6 + // value = ultoa_append(buffer++, value, digit_value) + // [286] ultoa::value#0 = ultoa_append::return#0 + // value = ultoa_append(buffer++, value, digit_value); + // [287] ultoa::buffer#4 = ++ ultoa::buffer#11 -- pbuz1=_inc_pbuz1 + inc.z buffer + bne !+ + inc.z buffer+1 + !: + // [279] phi from ultoa::@6 to ultoa::@4 [phi:ultoa::@6->ultoa::@4] + // [279] phi ultoa::buffer#14 = ultoa::buffer#4 [phi:ultoa::@6->ultoa::@4#0] -- register_copy + // [279] phi ultoa::started#4 = 1 [phi:ultoa::@6->ultoa::@4#1] -- vbuxx=vbuc1 + ldx #1 + // [279] phi ultoa::value#6 = ultoa::value#0 [phi:ultoa::@6->ultoa::@4#2] -- register_copy + jmp __b4 +} + // printf_number_buffer +// Print the contents of the number buffer using a specific format. +// This handles minimum length, zero-filling, and left/right justification from the format +// printf_number_buffer(byte register(A) buffer_sign) +printf_number_buffer: { + // printf_number_buffer::@1 + // if(buffer.sign) + // [289] if(0==printf_number_buffer::buffer_sign#10) goto printf_number_buffer::@2 -- 0_eq_vbuaa_then_la1 + cmp #0 + beq __b2 + // printf_number_buffer::@3 + // cputc(buffer.sign) + // [290] cputc::c#2 = printf_number_buffer::buffer_sign#10 -- vbuz1=vbuaa + sta.z cputc.c + // [291] call cputc + // [235] phi from printf_number_buffer::@3 to cputc [phi:printf_number_buffer::@3->cputc] + // [235] phi cputc::c#3 = cputc::c#2 [phi:printf_number_buffer::@3->cputc#0] -- register_copy + jsr cputc + // [292] phi from printf_number_buffer::@1 printf_number_buffer::@3 to printf_number_buffer::@2 [phi:printf_number_buffer::@1/printf_number_buffer::@3->printf_number_buffer::@2] + // printf_number_buffer::@2 + __b2: + // cputs(buffer.digits) + // [293] call cputs + // [177] phi from printf_number_buffer::@2 to cputs [phi:printf_number_buffer::@2->cputs] + // [177] phi cputs::s#11 = (byte*)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS [phi:printf_number_buffer::@2->cputs#0] -- pbuz1=pbuc1 + lda #printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS + sta.z cputs.s+1 + jsr cputs + // printf_number_buffer::@return + // } + // [294] return + rts +} + // uctoa +// Converts unsigned number value to a string representing it in RADIX format. +// If the leading digits are zero they are not included in the string. +// - value : The number to be converted to RADIX +// - buffer : receives the string representing the number and zero-termination. +// - radix : The radix to convert the number to (from the enum RADIX) +// uctoa(byte register(X) value, byte* zp($22) buffer) +uctoa: { + .label digit_value = $4f + .label buffer = $22 + .label digit = $11 + .label started = $2a + // [296] phi from uctoa to uctoa::@1 [phi:uctoa->uctoa::@1] + // [296] phi uctoa::buffer#11 = (byte*)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS [phi:uctoa->uctoa::@1#0] -- pbuz1=pbuc1 + lda #printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS + sta.z buffer+1 + // [296] phi uctoa::started#2 = 0 [phi:uctoa->uctoa::@1#1] -- vbuz1=vbuc1 + lda #0 + sta.z started + // [296] phi uctoa::value#2 = uctoa::value#1 [phi:uctoa->uctoa::@1#2] -- register_copy + // [296] phi uctoa::digit#2 = 0 [phi:uctoa->uctoa::@1#3] -- vbuz1=vbuc1 + sta.z digit + // uctoa::@1 + __b1: + // for( char digit=0; digit= digit_value) + // [303] if(0!=uctoa::started#2) goto uctoa::@5 -- 0_neq_vbuz1_then_la1 + lda.z started + cmp #0 + bne __b5 + // uctoa::@7 + // [304] if(uctoa::value#2>=uctoa::digit_value#0) goto uctoa::@5 -- vbuxx_ge_vbuz1_then_la1 + cpx.z digit_value + bcs __b5 + // [305] phi from uctoa::@7 to uctoa::@4 [phi:uctoa::@7->uctoa::@4] + // [305] phi uctoa::buffer#14 = uctoa::buffer#11 [phi:uctoa::@7->uctoa::@4#0] -- register_copy + // [305] phi uctoa::started#4 = uctoa::started#2 [phi:uctoa::@7->uctoa::@4#1] -- register_copy + // [305] phi uctoa::value#6 = uctoa::value#2 [phi:uctoa::@7->uctoa::@4#2] -- register_copy + // uctoa::@4 + __b4: + // for( char digit=0; digituctoa::@1] + // [296] phi uctoa::buffer#11 = uctoa::buffer#14 [phi:uctoa::@4->uctoa::@1#0] -- register_copy + // [296] phi uctoa::started#2 = uctoa::started#4 [phi:uctoa::@4->uctoa::@1#1] -- register_copy + // [296] phi uctoa::value#2 = uctoa::value#6 [phi:uctoa::@4->uctoa::@1#2] -- register_copy + // [296] phi uctoa::digit#2 = uctoa::digit#1 [phi:uctoa::@4->uctoa::@1#3] -- register_copy + jmp __b1 + // uctoa::@5 + __b5: + // uctoa_append(buffer++, value, digit_value) + // [307] uctoa_append::buffer#0 = uctoa::buffer#11 + // [308] uctoa_append::value#0 = uctoa::value#2 + // [309] uctoa_append::sub#0 = uctoa::digit_value#0 + // [310] call uctoa_append + // [367] phi from uctoa::@5 to uctoa_append [phi:uctoa::@5->uctoa_append] + jsr uctoa_append + // uctoa_append(buffer++, value, digit_value) + // [311] uctoa_append::return#0 = uctoa_append::value#2 + // uctoa::@6 + // value = uctoa_append(buffer++, value, digit_value) + // [312] uctoa::value#0 = uctoa_append::return#0 + // value = uctoa_append(buffer++, value, digit_value); + // [313] uctoa::buffer#4 = ++ uctoa::buffer#11 -- pbuz1=_inc_pbuz1 + inc.z buffer + bne !+ + inc.z buffer+1 + !: + // [305] phi from uctoa::@6 to uctoa::@4 [phi:uctoa::@6->uctoa::@4] + // [305] phi uctoa::buffer#14 = uctoa::buffer#4 [phi:uctoa::@6->uctoa::@4#0] -- register_copy + // [305] phi uctoa::started#4 = 1 [phi:uctoa::@6->uctoa::@4#1] -- vbuz1=vbuc1 + lda #1 + sta.z started + // [305] phi uctoa::value#6 = uctoa::value#0 [phi:uctoa::@6->uctoa::@4#2] -- register_copy + jmp __b4 +} + // utoa +// Converts unsigned number value to a string representing it in RADIX format. +// If the leading digits are zero they are not included in the string. +// - value : The number to be converted to RADIX +// - buffer : receives the string representing the number and zero-termination. +// - radix : The radix to convert the number to (from the enum RADIX) +// utoa(word zp($f) value, byte* zp($22) buffer) +utoa: { + .label digit_value = $47 + .label buffer = $22 + .label digit = $11 + .label value = $f + // [315] phi from utoa to utoa::@1 [phi:utoa->utoa::@1] + // [315] phi utoa::buffer#11 = (byte*)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS [phi:utoa->utoa::@1#0] -- pbuz1=pbuc1 + lda #printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS + sta.z buffer+1 + // [315] phi utoa::started#2 = 0 [phi:utoa->utoa::@1#1] -- vbuxx=vbuc1 + ldx #0 + // [315] phi utoa::value#2 = utoa::value#1 [phi:utoa->utoa::@1#2] -- register_copy + // [315] phi utoa::digit#2 = 0 [phi:utoa->utoa::@1#3] -- vbuz1=vbuc1 + txa + sta.z digit + // utoa::@1 + __b1: + // for( char digit=0; digit= digit_value) + // [324] if(0!=utoa::started#2) goto utoa::@5 -- 0_neq_vbuxx_then_la1 + cpx #0 + bne __b5 + // utoa::@7 + // [325] if(utoa::value#2>=utoa::digit_value#0) goto utoa::@5 -- vwuz1_ge_vwuz2_then_la1 + cmp.z value+1 + bne !+ + lda.z digit_value + cmp.z value + beq __b5 + !: + bcc __b5 + // [326] phi from utoa::@7 to utoa::@4 [phi:utoa::@7->utoa::@4] + // [326] phi utoa::buffer#14 = utoa::buffer#11 [phi:utoa::@7->utoa::@4#0] -- register_copy + // [326] phi utoa::started#4 = utoa::started#2 [phi:utoa::@7->utoa::@4#1] -- register_copy + // [326] phi utoa::value#6 = utoa::value#2 [phi:utoa::@7->utoa::@4#2] -- register_copy + // utoa::@4 + __b4: + // for( char digit=0; digitutoa::@1] + // [315] phi utoa::buffer#11 = utoa::buffer#14 [phi:utoa::@4->utoa::@1#0] -- register_copy + // [315] phi utoa::started#2 = utoa::started#4 [phi:utoa::@4->utoa::@1#1] -- register_copy + // [315] phi utoa::value#2 = utoa::value#6 [phi:utoa::@4->utoa::@1#2] -- register_copy + // [315] phi utoa::digit#2 = utoa::digit#1 [phi:utoa::@4->utoa::@1#3] -- register_copy + jmp __b1 + // utoa::@5 + __b5: + // utoa_append(buffer++, value, digit_value) + // [328] utoa_append::buffer#0 = utoa::buffer#11 + // [329] utoa_append::value#0 = utoa::value#2 + // [330] utoa_append::sub#0 = utoa::digit_value#0 + // [331] call utoa_append + // [374] phi from utoa::@5 to utoa_append [phi:utoa::@5->utoa_append] + jsr utoa_append + // utoa_append(buffer++, value, digit_value) + // [332] utoa_append::return#0 = utoa_append::value#2 + // utoa::@6 + // value = utoa_append(buffer++, value, digit_value) + // [333] utoa::value#0 = utoa_append::return#0 + // value = utoa_append(buffer++, value, digit_value); + // [334] utoa::buffer#4 = ++ utoa::buffer#11 -- pbuz1=_inc_pbuz1 + inc.z buffer + bne !+ + inc.z buffer+1 + !: + // [326] phi from utoa::@6 to utoa::@4 [phi:utoa::@6->utoa::@4] + // [326] phi utoa::buffer#14 = utoa::buffer#4 [phi:utoa::@6->utoa::@4#0] -- register_copy + // [326] phi utoa::started#4 = 1 [phi:utoa::@6->utoa::@4#1] -- vbuxx=vbuc1 + ldx #1 + // [326] phi utoa::value#6 = utoa::value#0 [phi:utoa::@6->utoa::@4#2] -- register_copy + jmp __b4 +} + // vera_layer_set_config +// Set the configuration of the layer. +// - layer: Value of 0 or 1. +// - config: Specifies the modes which are specified using T256C / 'Bitmap Mode' / 'Color Depth'. +vera_layer_set_config: { + .label addr = $49 + // addr = vera_layer_config[layer] + // [335] vera_layer_set_config::addr#0 = *(vera_layer_config+vera_layer_mode_text::layer#0*SIZEOF_POINTER) -- pbuz1=_deref_qbuc1 + lda vera_layer_config+vera_layer_mode_text.layer*SIZEOF_POINTER + sta.z addr + lda vera_layer_config+vera_layer_mode_text.layer*SIZEOF_POINTER+1 + sta.z addr+1 + // *addr = config + // [336] *vera_layer_set_config::addr#0 = vera_layer_mode_tile::config#10 -- _deref_pbuz1=vbuc1 + lda #vera_layer_mode_tile.config + ldy #0 + sta (addr),y + // vera_layer_set_config::@return + // } + // [337] return + rts +} + // vera_layer_set_tilebase +// Set the base of the tiles for the layer with which the conio will interact. +// - layer: Value of 0 or 1. +// - tilebase: Specifies the base address of the tile map. +// Note that the register only specifies bits 16:11 of the address, +// so the resulting address in the VERA VRAM is always aligned to a multiple of 2048 bytes! +vera_layer_set_tilebase: { + .label addr = $4b + // addr = vera_layer_tilebase[layer] + // [338] vera_layer_set_tilebase::addr#0 = *(vera_layer_tilebase+vera_layer_mode_text::layer#0*SIZEOF_POINTER) -- pbuz1=_deref_qbuc1 + lda vera_layer_tilebase+vera_layer_mode_text.layer*SIZEOF_POINTER + sta.z addr + lda vera_layer_tilebase+vera_layer_mode_text.layer*SIZEOF_POINTER+1 + sta.z addr+1 + // *addr = tilebase + // [339] *vera_layer_set_tilebase::addr#0 = >(vera_layer_mode_tile.tilebase_address&$ffff))&VERA_LAYER_TILEBASE_MASK + ldy #0 + sta (addr),y + // vera_layer_set_tilebase::@return + // } + // [340] return + rts +} + // vera_layer_get_color +// Get the text and back color for text output in 16 color mode. +// - layer: Value of 0 or 1. +// - return: an 8 bit value with bit 7:4 containing the back color and bit 3:0 containing the front color. +// This will only work when the VERA is in 16 color mode! +// Note that on the VERA, the transparent color has value 0. +// vera_layer_get_color(byte register(X) layer) +vera_layer_get_color: { + .label addr = $4d + // addr = vera_layer_config[layer] + // [342] vera_layer_get_color::$3 = vera_layer_get_color::layer#2 << 1 -- vbuaa=vbuxx_rol_1 + txa + asl + // [343] vera_layer_get_color::addr#0 = vera_layer_config[vera_layer_get_color::$3] -- pbuz1=qbuc1_derefidx_vbuaa + tay + lda vera_layer_config,y + sta.z addr + lda vera_layer_config+1,y + sta.z addr+1 + // *addr & VERA_LAYER_CONFIG_256C + // [344] vera_layer_get_color::$0 = *vera_layer_get_color::addr#0 & VERA_LAYER_CONFIG_256C -- vbuaa=_deref_pbuz1_band_vbuc1 + lda #VERA_LAYER_CONFIG_256C + ldy #0 + and (addr),y + // if( *addr & VERA_LAYER_CONFIG_256C ) + // [345] if(0!=vera_layer_get_color::$0) goto vera_layer_get_color::@1 -- 0_neq_vbuaa_then_la1 + cmp #0 + bne __b1 + // vera_layer_get_color::@2 + // vera_layer_backcolor[layer] << 4 + // [346] vera_layer_get_color::$1 = vera_layer_backcolor[vera_layer_get_color::layer#2] << 4 -- vbuaa=pbuc1_derefidx_vbuxx_rol_4 + lda vera_layer_backcolor,x + asl + asl + asl + asl + // return ((vera_layer_backcolor[layer] << 4) | vera_layer_textcolor[layer]); + // [347] vera_layer_get_color::return#1 = vera_layer_get_color::$1 | vera_layer_textcolor[vera_layer_get_color::layer#2] -- vbuaa=vbuaa_bor_pbuc1_derefidx_vbuxx + ora vera_layer_textcolor,x + // [348] phi from vera_layer_get_color::@1 vera_layer_get_color::@2 to vera_layer_get_color::@return [phi:vera_layer_get_color::@1/vera_layer_get_color::@2->vera_layer_get_color::@return] + // [348] phi vera_layer_get_color::return#2 = vera_layer_get_color::return#0 [phi:vera_layer_get_color::@1/vera_layer_get_color::@2->vera_layer_get_color::@return#0] -- register_copy + // vera_layer_get_color::@return + // } + // [349] return + rts + // vera_layer_get_color::@1 + __b1: + // return (vera_layer_textcolor[layer]); + // [350] vera_layer_get_color::return#0 = vera_layer_textcolor[vera_layer_get_color::layer#2] -- vbuaa=pbuc1_derefidx_vbuxx + lda vera_layer_textcolor,x + rts +} + // cputln +// Print a newline +cputln: { + .label temp = $4d + // temp = conio_line_text[conio_screen_layer] + // [351] cputln::$2 = conio_screen_layer << 1 -- vbuaa=vbuz1_rol_1 + lda.z conio_screen_layer + asl + // [352] cputln::temp#0 = conio_line_text[cputln::$2] -- vwuz1=pwuc1_derefidx_vbuaa + // TODO: This needs to be optimized! other variations don't compile because of sections not available! + tay + lda conio_line_text,y + sta.z temp + lda conio_line_text+1,y + sta.z temp+1 + // temp += conio_rowskip + // [353] cputln::temp#1 = cputln::temp#0 + conio_rowskip -- vwuz1=vwuz1_plus_vwuz2 + lda.z temp + clc + adc.z conio_rowskip + sta.z temp + lda.z temp+1 + adc.z conio_rowskip+1 + sta.z temp+1 + // conio_line_text[conio_screen_layer] = temp + // [354] cputln::$3 = conio_screen_layer << 1 -- vbuaa=vbuz1_rol_1 + lda.z conio_screen_layer + asl + // [355] conio_line_text[cputln::$3] = cputln::temp#1 -- pwuc1_derefidx_vbuaa=vwuz1 + tay + lda.z temp + sta conio_line_text,y + lda.z temp+1 + sta conio_line_text+1,y + // conio_cursor_x[conio_screen_layer] = 0 + // [356] conio_cursor_x[conio_screen_layer] = 0 -- pbuc1_derefidx_vbuz1=vbuc2 + lda #0 + ldy.z conio_screen_layer + sta conio_cursor_x,y + // conio_cursor_y[conio_screen_layer]++; + // [357] conio_cursor_y[conio_screen_layer] = ++ conio_cursor_y[conio_screen_layer] -- pbuc1_derefidx_vbuz1=_inc_pbuc1_derefidx_vbuz1 + ldx.z conio_screen_layer + inc conio_cursor_y,x + // cscroll() + // [358] call cscroll + jsr cscroll + // cputln::@return + // } + // [359] return + rts +} + // ultoa_append +// Used to convert a single digit of an unsigned number value to a string representation +// Counts a single digit up from '0' as long as the value is larger than sub. +// Each time the digit is increased sub is subtracted from value. +// - buffer : pointer to the char that receives the digit +// - value : The value where the digit will be derived from +// - sub : the value of a '1' in the digit. Subtracted continually while the digit is increased. +// (For decimal the subs used are 10000, 1000, 100, 10, 1) +// returns : the value reduced by sub * digit so that it is less than sub. +// ultoa_append(byte* zp($22) buffer, dword zp($b) value, dword zp($43) sub) +ultoa_append: { + .label buffer = $22 + .label value = $b + .label sub = $43 + .label return = $b + // [361] phi from ultoa_append to ultoa_append::@1 [phi:ultoa_append->ultoa_append::@1] + // [361] phi ultoa_append::digit#2 = 0 [phi:ultoa_append->ultoa_append::@1#0] -- vbuxx=vbuc1 + ldx #0 + // [361] phi ultoa_append::value#2 = ultoa_append::value#0 [phi:ultoa_append->ultoa_append::@1#1] -- register_copy + // ultoa_append::@1 + __b1: + // while (value >= sub) + // [362] if(ultoa_append::value#2>=ultoa_append::sub#0) goto ultoa_append::@2 -- vduz1_ge_vduz2_then_la1 + lda.z value+3 + cmp.z sub+3 + bcc !+ + bne __b2 + lda.z value+2 + cmp.z sub+2 + bcc !+ + bne __b2 + lda.z value+1 + cmp.z sub+1 + bcc !+ + bne __b2 + lda.z value + cmp.z sub + bcs __b2 + !: + // ultoa_append::@3 + // *buffer = DIGITS[digit] + // [363] *ultoa_append::buffer#0 = DIGITS[ultoa_append::digit#2] -- _deref_pbuz1=pbuc1_derefidx_vbuxx + lda DIGITS,x + ldy #0 + sta (buffer),y + // ultoa_append::@return + // } + // [364] return + rts + // ultoa_append::@2 + __b2: + // digit++; + // [365] ultoa_append::digit#1 = ++ ultoa_append::digit#2 -- vbuxx=_inc_vbuxx + inx + // value -= sub + // [366] ultoa_append::value#1 = ultoa_append::value#2 - ultoa_append::sub#0 -- vduz1=vduz1_minus_vduz2 + lda.z value + sec + sbc.z sub + sta.z value + lda.z value+1 + sbc.z sub+1 + sta.z value+1 + lda.z value+2 + sbc.z sub+2 + sta.z value+2 + lda.z value+3 + sbc.z sub+3 + sta.z value+3 + // [361] phi from ultoa_append::@2 to ultoa_append::@1 [phi:ultoa_append::@2->ultoa_append::@1] + // [361] phi ultoa_append::digit#2 = ultoa_append::digit#1 [phi:ultoa_append::@2->ultoa_append::@1#0] -- register_copy + // [361] phi ultoa_append::value#2 = ultoa_append::value#1 [phi:ultoa_append::@2->ultoa_append::@1#1] -- register_copy + jmp __b1 +} + // uctoa_append +// Used to convert a single digit of an unsigned number value to a string representation +// Counts a single digit up from '0' as long as the value is larger than sub. +// Each time the digit is increased sub is subtracted from value. +// - buffer : pointer to the char that receives the digit +// - value : The value where the digit will be derived from +// - sub : the value of a '1' in the digit. Subtracted continually while the digit is increased. +// (For decimal the subs used are 10000, 1000, 100, 10, 1) +// returns : the value reduced by sub * digit so that it is less than sub. +// uctoa_append(byte* zp($22) buffer, byte register(X) value, byte zp($4f) sub) +uctoa_append: { + .label buffer = $22 + .label sub = $4f + // [368] phi from uctoa_append to uctoa_append::@1 [phi:uctoa_append->uctoa_append::@1] + // [368] phi uctoa_append::digit#2 = 0 [phi:uctoa_append->uctoa_append::@1#0] -- vbuyy=vbuc1 + ldy #0 + // [368] phi uctoa_append::value#2 = uctoa_append::value#0 [phi:uctoa_append->uctoa_append::@1#1] -- register_copy + // uctoa_append::@1 + __b1: + // while (value >= sub) + // [369] if(uctoa_append::value#2>=uctoa_append::sub#0) goto uctoa_append::@2 -- vbuxx_ge_vbuz1_then_la1 + cpx.z sub + bcs __b2 + // uctoa_append::@3 + // *buffer = DIGITS[digit] + // [370] *uctoa_append::buffer#0 = DIGITS[uctoa_append::digit#2] -- _deref_pbuz1=pbuc1_derefidx_vbuyy + lda DIGITS,y + ldy #0 + sta (buffer),y + // uctoa_append::@return + // } + // [371] return + rts + // uctoa_append::@2 + __b2: + // digit++; + // [372] uctoa_append::digit#1 = ++ uctoa_append::digit#2 -- vbuyy=_inc_vbuyy + iny + // value -= sub + // [373] uctoa_append::value#1 = uctoa_append::value#2 - uctoa_append::sub#0 -- vbuxx=vbuxx_minus_vbuz1 + txa + sec + sbc.z sub + tax + // [368] phi from uctoa_append::@2 to uctoa_append::@1 [phi:uctoa_append::@2->uctoa_append::@1] + // [368] phi uctoa_append::digit#2 = uctoa_append::digit#1 [phi:uctoa_append::@2->uctoa_append::@1#0] -- register_copy + // [368] phi uctoa_append::value#2 = uctoa_append::value#1 [phi:uctoa_append::@2->uctoa_append::@1#1] -- register_copy + jmp __b1 +} + // utoa_append +// Used to convert a single digit of an unsigned number value to a string representation +// Counts a single digit up from '0' as long as the value is larger than sub. +// Each time the digit is increased sub is subtracted from value. +// - buffer : pointer to the char that receives the digit +// - value : The value where the digit will be derived from +// - sub : the value of a '1' in the digit. Subtracted continually while the digit is increased. +// (For decimal the subs used are 10000, 1000, 100, 10, 1) +// returns : the value reduced by sub * digit so that it is less than sub. +// utoa_append(byte* zp($22) buffer, word zp($f) value, word zp($47) sub) +utoa_append: { + .label buffer = $22 + .label value = $f + .label sub = $47 + .label return = $f + // [375] phi from utoa_append to utoa_append::@1 [phi:utoa_append->utoa_append::@1] + // [375] phi utoa_append::digit#2 = 0 [phi:utoa_append->utoa_append::@1#0] -- vbuxx=vbuc1 + ldx #0 + // [375] phi utoa_append::value#2 = utoa_append::value#0 [phi:utoa_append->utoa_append::@1#1] -- register_copy + // utoa_append::@1 + __b1: + // while (value >= sub) + // [376] if(utoa_append::value#2>=utoa_append::sub#0) goto utoa_append::@2 -- vwuz1_ge_vwuz2_then_la1 + lda.z sub+1 + cmp.z value+1 + bne !+ + lda.z sub + cmp.z value + beq __b2 + !: + bcc __b2 + // utoa_append::@3 + // *buffer = DIGITS[digit] + // [377] *utoa_append::buffer#0 = DIGITS[utoa_append::digit#2] -- _deref_pbuz1=pbuc1_derefidx_vbuxx + lda DIGITS,x + ldy #0 + sta (buffer),y + // utoa_append::@return + // } + // [378] return + rts + // utoa_append::@2 + __b2: + // digit++; + // [379] utoa_append::digit#1 = ++ utoa_append::digit#2 -- vbuxx=_inc_vbuxx + inx + // value -= sub + // [380] utoa_append::value#1 = utoa_append::value#2 - utoa_append::sub#0 -- vwuz1=vwuz1_minus_vwuz2 + lda.z value + sec + sbc.z sub + sta.z value + lda.z value+1 + sbc.z sub+1 + sta.z value+1 + // [375] phi from utoa_append::@2 to utoa_append::@1 [phi:utoa_append::@2->utoa_append::@1] + // [375] phi utoa_append::digit#2 = utoa_append::digit#1 [phi:utoa_append::@2->utoa_append::@1#0] -- register_copy + // [375] phi utoa_append::value#2 = utoa_append::value#1 [phi:utoa_append::@2->utoa_append::@1#1] -- register_copy + jmp __b1 +} + // cscroll +// Scroll the entire screen if the cursor is beyond the last line +cscroll: { + // if(conio_cursor_y[conio_screen_layer]>=CONIO_HEIGHT) + // [381] if(conio_cursor_y[conio_screen_layer]=conio_height) + // [383] if(conio_cursor_y[conio_screen_layer]cscroll::@3] + // cscroll::@3 + __b3: + // cscroll::@return + // } + // [385] return + rts + // [386] phi from cscroll::@1 to cscroll::@4 [phi:cscroll::@1->cscroll::@4] + // cscroll::@4 + __b4: + // insertup() + // [387] call insertup + jsr insertup + // cscroll::@5 + // gotoxy( 0, CONIO_HEIGHT-1) + // [388] gotoxy::y#2 = conio_screen_height - 1 -- vbuxx=vbuz1_minus_1 + ldx.z conio_screen_height + dex + // [389] call gotoxy + // [164] phi from cscroll::@5 to gotoxy [phi:cscroll::@5->gotoxy] + // [164] phi gotoxy::y#3 = gotoxy::y#2 [phi:cscroll::@5->gotoxy#0] -- register_copy + jsr gotoxy + rts +} + // insertup +// Insert a new line, and scroll the upper part of the screen up. +insertup: { + .label cy = $4f + .label width = $50 + .label line = $51 + .label start = $51 + // cy = conio_cursor_y[conio_screen_layer] + // [390] insertup::cy#0 = conio_cursor_y[conio_screen_layer] -- vbuz1=pbuc1_derefidx_vbuz2 + ldy.z conio_screen_layer + lda conio_cursor_y,y + sta.z cy + // width = CONIO_WIDTH * 2 + // [391] insertup::width#0 = conio_screen_width << 1 -- vbuz1=vbuz2_rol_1 + lda.z conio_screen_width + asl + sta.z width + // [392] phi from insertup to insertup::@1 [phi:insertup->insertup::@1] + // [392] phi insertup::i#2 = 1 [phi:insertup->insertup::@1#0] -- vbuxx=vbuc1 + ldx #1 + // insertup::@1 + __b1: + // for(unsigned byte i=1; i<=cy; i++) + // [393] if(insertup::i#2<=insertup::cy#0) goto insertup::@2 -- vbuxx_le_vbuz1_then_la1 + lda.z cy + stx.z $ff + cmp.z $ff + bcs __b2 + // [394] phi from insertup::@1 to insertup::@3 [phi:insertup::@1->insertup::@3] + // insertup::@3 + // clearline() + // [395] call clearline + jsr clearline + // insertup::@return + // } + // [396] return + rts + // insertup::@2 + __b2: + // i-1 + // [397] insertup::$3 = insertup::i#2 - 1 -- vbuaa=vbuxx_minus_1 + txa + sec + sbc #1 + // line = (i-1) << conio_rowshift + // [398] insertup::line#0 = insertup::$3 << conio_rowshift -- vwuz1=vbuaa_rol_vbuz2 + ldy.z conio_rowshift + sta.z line + lda #0 + sta.z line+1 + cpy #0 + beq !e+ + !: + asl.z line + rol.z line+1 + dey + bne !- + !e: + // start = CONIO_SCREEN_TEXT + line + // [399] insertup::start#0 = (byte*)CONIO_SCREEN_TEXT#101 + insertup::line#0 -- pbuz1=pbuz2_plus_vwuz1 + lda.z start + clc + adc.z CONIO_SCREEN_TEXT + sta.z start + lda.z start+1 + adc.z CONIO_SCREEN_TEXT+1 + sta.z start+1 + // start+conio_rowskip + // [400] memcpy_in_vram::src#0 = insertup::start#0 + conio_rowskip -- pbuz1=pbuz2_plus_vwuz3 + lda.z start + clc + adc.z conio_rowskip + sta.z memcpy_in_vram.src + lda.z start+1 + adc.z conio_rowskip+1 + sta.z memcpy_in_vram.src+1 + // memcpy_in_vram(0, start, VERA_INC_1, 0, start+conio_rowskip, VERA_INC_1, width) + // [401] memcpy_in_vram::dest#0 = (void*)insertup::start#0 + // [402] memcpy_in_vram::num#0 = insertup::width#0 -- vwuz1=vbuz2 + lda.z width + sta.z memcpy_in_vram.num + lda #0 + sta.z memcpy_in_vram.num+1 + // [403] call memcpy_in_vram + jsr memcpy_in_vram + // insertup::@4 + // for(unsigned byte i=1; i<=cy; i++) + // [404] insertup::i#1 = ++ insertup::i#2 -- vbuxx=_inc_vbuxx + inx + // [392] phi from insertup::@4 to insertup::@1 [phi:insertup::@4->insertup::@1] + // [392] phi insertup::i#2 = insertup::i#1 [phi:insertup::@4->insertup::@1#0] -- register_copy + jmp __b1 +} + // clearline +clearline: { + .label addr = $55 + .label c = $20 + // *VERA_CTRL &= ~VERA_ADDRSEL + // [405] *VERA_CTRL = *VERA_CTRL & ~VERA_ADDRSEL -- _deref_pbuc1=_deref_pbuc1_band_vbuc2 + // Select DATA0 + lda #VERA_ADDRSEL^$ff + and VERA_CTRL + sta VERA_CTRL + // CONIO_SCREEN_TEXT + conio_line_text[conio_screen_layer] + // [406] clearline::$5 = conio_screen_layer << 1 -- vbuaa=vbuz1_rol_1 + lda.z conio_screen_layer + asl + // addr = CONIO_SCREEN_TEXT + conio_line_text[conio_screen_layer] + // [407] clearline::addr#0 = (byte*)CONIO_SCREEN_TEXT#101 + conio_line_text[clearline::$5] -- pbuz1=pbuz2_plus_pwuc1_derefidx_vbuaa + tay + clc + lda.z CONIO_SCREEN_TEXT + adc conio_line_text,y + sta.z addr + lda.z CONIO_SCREEN_TEXT+1 + adc conio_line_text+1,y + sta.z addr+1 + // addr + // [410] clearline::$2 = > clearline::addr#0 -- vbuaa=_hi_pbuz1 + lda.z addr+1 + // *VERA_ADDRX_M = >addr + // [411] *VERA_ADDRX_M = clearline::$2 -- _deref_pbuc1=vbuaa + sta VERA_ADDRX_M + // *VERA_ADDRX_H = VERA_INC_1 + // [412] *VERA_ADDRX_H = VERA_INC_1 -- _deref_pbuc1=vbuc2 + lda #VERA_INC_1 + sta VERA_ADDRX_H + // vera_layer_get_color( conio_screen_layer) + // [413] vera_layer_get_color::layer#1 = conio_screen_layer -- vbuxx=vbuz1 + ldx.z conio_screen_layer + // [414] call vera_layer_get_color + // [341] phi from clearline to vera_layer_get_color [phi:clearline->vera_layer_get_color] + // [341] phi vera_layer_get_color::layer#2 = vera_layer_get_color::layer#1 [phi:clearline->vera_layer_get_color#0] -- register_copy + jsr vera_layer_get_color + // vera_layer_get_color( conio_screen_layer) + // [415] vera_layer_get_color::return#4 = vera_layer_get_color::return#2 + // clearline::@4 + // color = vera_layer_get_color( conio_screen_layer) + // [416] clearline::color#0 = vera_layer_get_color::return#4 -- vbuxx=vbuaa + tax + // [417] phi from clearline::@4 to clearline::@1 [phi:clearline::@4->clearline::@1] + // [417] phi clearline::c#2 = 0 [phi:clearline::@4->clearline::@1#0] -- vwuz1=vwuc1 + lda #<0 + sta.z c + sta.z c+1 + // clearline::@1 + __b1: + // for( unsigned int c=0;cclearline::@1] + // [417] phi clearline::c#2 = clearline::c#1 [phi:clearline::@2->clearline::@1#0] -- register_copy + jmp __b1 +} + // memcpy_in_vram +// Copy block of memory (from VRAM to VRAM) +// Copies the values from the location pointed by src to the location pointed by dest. +// The method uses the VERA access ports 0 and 1 to copy data from and to in VRAM. +// - src_bank: 64K VRAM bank number to copy from (0/1). +// - src: pointer to the location to copy from. Note that the address is a 16 bit value! +// - src_increment: the increment indicator, VERA needs this because addressing increment is automated by VERA at each access. +// - dest_bank: 64K VRAM bank number to copy to (0/1). +// - dest: pointer to the location to copy to. Note that the address is a 16 bit value! +// - dest_increment: the increment indicator, VERA needs this because addressing increment is automated by VERA at each access. +// - num: The number of bytes to copy +// memcpy_in_vram(void* zp($51) dest, byte* zp($55) src, word zp($53) num) +memcpy_in_vram: { + .label i = $20 + .label dest = $51 + .label src = $55 + .label num = $53 + // *VERA_CTRL &= ~VERA_ADDRSEL + // [424] *VERA_CTRL = *VERA_CTRL & ~VERA_ADDRSEL -- _deref_pbuc1=_deref_pbuc1_band_vbuc2 + // Select DATA0 + lda #VERA_ADDRSEL^$ff + and VERA_CTRL + sta VERA_CTRL + // src + // [427] memcpy_in_vram::$1 = > (void*)memcpy_in_vram::src#0 -- vbuaa=_hi_pvoz1 + lda.z src+1 + // *VERA_ADDRX_M = >src + // [428] *VERA_ADDRX_M = memcpy_in_vram::$1 -- _deref_pbuc1=vbuaa + sta VERA_ADDRX_M + // *VERA_ADDRX_H = src_increment | src_bank + // [429] *VERA_ADDRX_H = VERA_INC_1 -- _deref_pbuc1=vbuc2 + lda #VERA_INC_1 + sta VERA_ADDRX_H + // *VERA_CTRL |= VERA_ADDRSEL + // [430] *VERA_CTRL = *VERA_CTRL | VERA_ADDRSEL -- _deref_pbuc1=_deref_pbuc1_bor_vbuc2 + // Select DATA1 + lda #VERA_ADDRSEL + ora VERA_CTRL + sta VERA_CTRL + // dest + // [433] memcpy_in_vram::$4 = > memcpy_in_vram::dest#0 -- vbuaa=_hi_pvoz1 + lda.z dest+1 + // *VERA_ADDRX_M = >dest + // [434] *VERA_ADDRX_M = memcpy_in_vram::$4 -- _deref_pbuc1=vbuaa + sta VERA_ADDRX_M + // *VERA_ADDRX_H = dest_increment | dest_bank + // [435] *VERA_ADDRX_H = VERA_INC_1 -- _deref_pbuc1=vbuc2 + lda #VERA_INC_1 + sta VERA_ADDRX_H + // [436] phi from memcpy_in_vram to memcpy_in_vram::@1 [phi:memcpy_in_vram->memcpy_in_vram::@1] + // [436] phi memcpy_in_vram::i#2 = 0 [phi:memcpy_in_vram->memcpy_in_vram::@1#0] -- vwuz1=vwuc1 + lda #<0 + sta.z i + sta.z i+1 + // Transfer the data + // memcpy_in_vram::@1 + __b1: + // for(unsigned int i=0; imemcpy_in_vram::@1] + // [436] phi memcpy_in_vram::i#2 = memcpy_in_vram::i#1 [phi:memcpy_in_vram::@2->memcpy_in_vram::@1#0] -- register_copy + jmp __b1 +} + // File Data +.segment Data + VERA_LAYER_WIDTH: .word $20, $40, $80, $100 + VERA_LAYER_HEIGHT: .word $20, $40, $80, $100 + // --- VERA function encapsulation --- + vera_mapbase_offset: .word 0, 0 + vera_mapbase_bank: .byte 0, 0 + vera_mapbase_address: .dword 0, 0 + vera_tilebase_offset: .word 0, 0 + vera_tilebase_bank: .byte 0, 0 + vera_tilebase_address: .dword 0, 0 + vera_layer_rowshift: .byte 0, 0 + vera_layer_rowskip: .word 0, 0 + vera_layer_config: .word VERA_L0_CONFIG, VERA_L1_CONFIG + vera_layer_mapbase: .word VERA_L0_MAPBASE, VERA_L1_MAPBASE + vera_layer_tilebase: .word VERA_L0_TILEBASE, VERA_L1_TILEBASE + vera_layer_textcolor: .byte WHITE, WHITE + vera_layer_backcolor: .byte BLUE, BLUE + // The number of bytes on the screen + // The current cursor x-position + conio_cursor_x: .byte 0, 0 + // The current cursor y-position + conio_cursor_y: .byte 0, 0 + // The current text cursor line start + conio_line_text: .word 0, 0 + // Is scrolling enabled when outputting beyond the end of the screen (1: yes, 0: no). + // If disabled the cursor just moves back to (0,0) instead + conio_scroll_enable: .byte 1, 1 + // The digits used for numbers + DIGITS: .text "0123456789abcdef" + // Values of hexadecimal digits + RADIX_HEXADECIMAL_VALUES_CHAR: .byte $10 + // Values of hexadecimal digits + RADIX_HEXADECIMAL_VALUES: .word $1000, $100, $10 + // Values of hexadecimal digits + RADIX_HEXADECIMAL_VALUES_LONG: .dword $10000000, $1000000, $100000, $10000, $1000, $100, $10 + // Buffer used for stringified number being printed + printf_buffer: .fill SIZEOF_STRUCT_PRINTF_BUFFER_NUMBER, 0 + diff --git a/src/test/ref/examples/cx16/cx16-bankaddressing.sym b/src/test/ref/examples/cx16/cx16-bankaddressing.sym new file mode 100644 index 000000000..0e2cf36c6 --- /dev/null +++ b/src/test/ref/examples/cx16/cx16-bankaddressing.sym @@ -0,0 +1,652 @@ +const nomodify byte BLUE = 6 +byte CONIO_SCREEN_BANK +byte CONIO_SCREEN_BANK#10 CONIO_SCREEN_BANK zp[1]:56 523560.7434554974 +byte* CONIO_SCREEN_TEXT +word CONIO_SCREEN_TEXT#101 CONIO_SCREEN_TEXT zp[2]:57 0.4225941422594142 +const byte* DIGITS[] = "0123456789abcdef"z +const byte OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS = 1 +const byte RADIX::BINARY = 2 +const byte RADIX::DECIMAL = $a +const byte RADIX::HEXADECIMAL = $10 +const byte RADIX::OCTAL = 8 +const word* RADIX_HEXADECIMAL_VALUES[] = { $1000, $100, $10 } +const byte* RADIX_HEXADECIMAL_VALUES_CHAR[] = { $10 } +const dword* RADIX_HEXADECIMAL_VALUES_LONG[] = { $10000000, $1000000, $100000, $10000, $1000, $100, $10 } +const byte SIZEOF_DWORD = 4 +const byte SIZEOF_POINTER = 2 +const byte SIZEOF_STRUCT_PRINTF_BUFFER_NUMBER = $c +const byte SIZEOF_WORD = 2 +const nomodify byte VERA_ADDRSEL = 1 +const nomodify byte* VERA_ADDRX_H = (byte*) 40738 +const nomodify byte* VERA_ADDRX_L = (byte*) 40736 +const nomodify byte* VERA_ADDRX_M = (byte*) 40737 +const nomodify byte* VERA_CTRL = (byte*) 40741 +const nomodify byte* VERA_DATA0 = (byte*) 40739 +const nomodify byte* VERA_DATA1 = (byte*) 40740 +const nomodify byte* VERA_DC_HSCALE = (byte*) 40746 +const nomodify byte* VERA_DC_VSCALE = (byte*) 40747 +const nomodify byte VERA_INC_1 = $10 +const nomodify byte* VERA_L0_CONFIG = (byte*) 40749 +const nomodify byte* VERA_L0_MAPBASE = (byte*) 40750 +const nomodify byte* VERA_L0_TILEBASE = (byte*) 40751 +const nomodify byte* VERA_L1_CONFIG = (byte*) 40756 +const nomodify byte* VERA_L1_MAPBASE = (byte*) 40757 +const nomodify byte* VERA_L1_TILEBASE = (byte*) 40758 +const nomodify byte VERA_LAYER_CONFIG_256C = 8 +const to_nomodify word* VERA_LAYER_HEIGHT[4] = { $20, $40, $80, $100 } +const nomodify byte VERA_LAYER_HEIGHT_64 = $40 +const nomodify byte VERA_LAYER_HEIGHT_MASK = $c0 +const nomodify byte VERA_LAYER_TILEBASE_MASK = $fc +const to_nomodify word* VERA_LAYER_WIDTH[4] = { $20, $40, $80, $100 } +const nomodify byte VERA_LAYER_WIDTH_128 = $20 +const nomodify byte VERA_LAYER_WIDTH_MASK = $30 +const nomodify byte WHITE = 1 +void __start() +void clearline() +byte~ clearline::$1 reg byte a 2.000000000002E12 +byte~ clearline::$2 reg byte a 2.000000000002E12 +byte~ clearline::$5 reg byte a 2.000000000002E12 +byte* clearline::addr +byte* clearline::addr#0 addr zp[2]:85 1.000000000001E12 +word clearline::c +word clearline::c#1 c zp[2]:32 2.000000000000002E15 +word clearline::c#2 c zp[2]:32 7.500000000000008E14 +byte clearline::color +byte clearline::color#0 reg byte x 1.668333333333337E14 +const byte* conio_cursor_x[2] = { 0, 0 } +const byte* conio_cursor_y[2] = { 0, 0 } +word conio_height loadstore zp[2]:23 5.714285773714286E7 +const word* conio_line_text[2] = { 0, 0 } +byte conio_rowshift loadstore zp[1]:25 4.5917431192708716E11 +word conio_rowskip loadstore zp[2]:26 5.00005000000525E11 +volatile byte conio_screen_height loadstore zp[1]:19 6.091370559746193E8 +byte conio_screen_layer loadstore zp[1]:20 1.3214230772042307E10 +volatile byte conio_screen_width loadstore zp[1]:18 4.311207327586233E12 +const byte* conio_scroll_enable[2] = { 1, 1 } +word conio_width loadstore zp[2]:21 564972.3389830509 +void conio_x16_init() +const nomodify byte* conio_x16_init::BASIC_CURSOR_LINE = (byte*) 214 +byte conio_x16_init::line +byte conio_x16_init::line#0 line zp[1]:2 2.1999999999999997 +byte conio_x16_init::line#1 line zp[1]:2 22.0 +byte conio_x16_init::line#3 line zp[1]:2 33.0 +void cputc(byte cputc::c) +byte~ cputc::$15 reg byte a 2.00000002E8 +word~ cputc::$16 zp[2]:65 2.00000002E8 +byte~ cputc::$2 reg byte a 2.00000002E8 +byte~ cputc::$4 reg byte a 2.00000002E8 +byte~ cputc::$5 reg byte a 2.00000002E8 +byte~ cputc::$6 reg byte a 2.00000002E8 +byte cputc::c +byte cputc::c#0 c zp[1]:17 2.0000002E7 +byte cputc::c#2 c zp[1]:17 20002.0 +byte cputc::c#3 c zp[1]:17 1.2353529647058824E7 +byte cputc::color +byte cputc::color#0 reg byte x 1.428571442857143E7 +byte* cputc::conio_addr +byte* cputc::conio_addr#0 conio_addr zp[2]:71 1.00000001E8 +byte* cputc::conio_addr#1 conio_addr zp[2]:71 6.0000000599999994E7 +byte cputc::scroll_enable +byte cputc::scroll_enable#0 reg byte a 2.00000002E8 +void cputln() +byte~ cputln::$2 reg byte a 2.000000002E9 +byte~ cputln::$3 reg byte a 2.000000002E9 +word cputln::temp +word cputln::temp#0 temp zp[2]:77 2.000000002E9 +word cputln::temp#1 temp zp[2]:77 1.000000001E9 +void cputs(to_nomodify byte* cputs::s) +byte cputs::c +byte cputs::c#1 reg byte a 1.0000001E7 +to_nomodify byte* cputs::s +to_nomodify byte* cputs::s#0 s zp[2]:34 5000000.5 +to_nomodify byte* cputs::s#10 s zp[2]:34 1.5050002E7 +to_nomodify byte* cputs::s#11 s zp[2]:34 100001.0 +void cscroll() +void gotoxy(byte gotoxy::x , byte gotoxy::y) +byte~ gotoxy::$5 reg byte a 2.00000000002E11 +word~ gotoxy::$6 zp[2]:61 2.00000000002E11 +word gotoxy::line_offset +word gotoxy::line_offset#0 line_offset zp[2]:61 1.00000000001E11 +byte gotoxy::x +byte gotoxy::y +byte gotoxy::y#0 reg byte x 22.0 +byte gotoxy::y#2 reg byte x 2.0000000002E10 +byte gotoxy::y#3 reg byte x 7.000000000466667E10 +byte gotoxy::y#4 reg byte x 4.00000000004E10 +void insertup() +byte~ insertup::$3 reg byte a 2.00000000000002E14 +byte insertup::cy +byte insertup::cy#0 cy zp[1]:79 8.341666666666834E12 +byte insertup::i +byte insertup::i#1 reg byte x 2.00000000000002E14 +byte insertup::i#2 reg byte x 4.444444444444489E13 +word insertup::line +word insertup::line#0 line zp[2]:81 2.00000000000002E14 +byte* insertup::start +byte* insertup::start#0 start zp[2]:81 1.00000000000001E14 +byte insertup::width +byte insertup::width#0 width zp[1]:80 9.100000000000182E12 +void main() +dword~ main::$1 zp[4]:28 202.0 +word~ main::$10 zp[2]:38 202.0 +word~ main::$11 zp[2]:38 202.0 +byte~ main::$12 reg byte a 101.0 +word~ main::$13 zp[2]:36 101.0 +word~ main::$14 zp[2]:43 202.0 +word~ main::$15 zp[2]:43 202.0 +byte~ main::$16 reg byte y 33.666666666666664 +word~ main::$17 zp[2]:45 202.0 +byte~ main::$18 reg byte x 101.0 +word~ main::$19 zp[2]:47 202.0 +word~ main::$20 zp[2]:47 40.4 +word~ main::$21 zp[2]:49 202.0 +word~ main::$22 zp[2]:49 202.0 +byte~ main::$23 reg byte a 101.0 +word~ main::$24 zp[2]:47 101.0 +word~ main::$25 zp[2]:15 202.0 +word~ main::$27 zp[2]:54 202.0 +word~ main::$3 zp[2]:32 202.0 +word~ main::$30 zp[2]:36 202.0 +word~ main::$31 zp[2]:40 202.0 +word~ main::$32 zp[2]:47 202.0 +word~ main::$33 zp[2]:51 202.0 +word~ main::$4 zp[2]:32 202.0 +byte~ main::$5 reg byte y 33.666666666666664 +word~ main::$6 zp[2]:34 202.0 +byte~ main::$7 reg byte x 101.0 +word~ main::$8 zp[2]:36 202.0 +word~ main::$9 zp[2]:36 40.4 +byte main::bankbeg +byte main::bankbeg#0 bankbeg zp[1]:42 5.9411764705882355 +byte main::bankend +byte main::bankend#0 bankend zp[1]:53 8.416666666666666 +word main::beg +word main::beg#0 beg zp[2]:15 67.33333333333333 +word main::beg#1 beg zp[2]:15 8.782608695652174 +const nomodify word main::borderbeg = $a000 +dword main::calcbeg +dword main::calcend +dword main::calcend#0 calcend zp[4]:28 13.772727272727272 +word main::end +word main::end#0 end zp[2]:54 101.0 +word main::end#1 end zp[2]:54 7.769230769230769 +const word main::inc = $123 +dword main::num +dword main::num#1 num zp[4]:7 151.5 +dword main::num#10 num zp[4]:7 6.029850746268656 +const byte* main::s[6] = "cbeg=" +const byte* main::s1[7] = ", add=" +const byte* main::s2[8] = ", cend=" +const byte* main::s3[8] = ", bbeg=" +const byte* main::s4[8] = ", bend=" +const byte* main::s5[7] = ", beg=" +const byte* main::s6[7] = ", end=" +const byte* main::s7[2] = " +" +dword main::src1 +dword main::src1#1 src1 zp[4]:3 202.0 +dword main::src1#10 src1 zp[4]:3 13.367647058823529 +void memcpy_in_vram(byte memcpy_in_vram::dest_bank , void* memcpy_in_vram::dest , byte memcpy_in_vram::dest_increment , byte memcpy_in_vram::src_bank , void* memcpy_in_vram::src , byte memcpy_in_vram::src_increment , word memcpy_in_vram::num) +byte~ memcpy_in_vram::$0 reg byte a 2.000000000000002E15 +byte~ memcpy_in_vram::$1 reg byte a 2.000000000000002E15 +byte~ memcpy_in_vram::$3 reg byte a 2.000000000000002E15 +byte~ memcpy_in_vram::$4 reg byte a 2.000000000000002E15 +void* memcpy_in_vram::dest +void* memcpy_in_vram::dest#0 dest zp[2]:81 1.909090909090912E14 +byte memcpy_in_vram::dest_bank +byte memcpy_in_vram::dest_increment +word memcpy_in_vram::i +word memcpy_in_vram::i#1 i zp[2]:32 2.0E19 +word memcpy_in_vram::i#2 i zp[2]:32 1.0E19 +word memcpy_in_vram::num +word memcpy_in_vram::num#0 num zp[2]:83 5.8824117647058829E17 +void* memcpy_in_vram::src +byte* memcpy_in_vram::src#0 src zp[2]:85 1.6666666666666834E13 +byte memcpy_in_vram::src_bank +byte memcpy_in_vram::src_increment +struct printf_buffer_number printf_buffer loadstore mem[12] = {} +void printf_number_buffer(byte printf_number_buffer::buffer_sign , byte* printf_number_buffer::buffer_digits , byte printf_number_buffer::format_min_length , byte printf_number_buffer::format_justify_left , byte printf_number_buffer::format_sign_always , byte printf_number_buffer::format_zero_padding , byte printf_number_buffer::format_upper_case , byte printf_number_buffer::format_radix) +struct printf_buffer_number printf_number_buffer::buffer +byte* printf_number_buffer::buffer_digits +byte printf_number_buffer::buffer_sign +byte printf_number_buffer::buffer_sign#0 reg byte a 2002.0 +byte printf_number_buffer::buffer_sign#1 reg byte a 2002.0 +byte printf_number_buffer::buffer_sign#10 reg byte a 11502.5 +byte printf_number_buffer::buffer_sign#2 reg byte a 2002.0 +struct printf_format_number printf_number_buffer::format +byte printf_number_buffer::format_justify_left +byte printf_number_buffer::format_min_length +byte printf_number_buffer::format_radix +byte printf_number_buffer::format_sign_always +byte printf_number_buffer::format_upper_case +byte printf_number_buffer::format_zero_padding +signed byte printf_number_buffer::len +signed byte printf_number_buffer::padding +void printf_uchar(byte printf_uchar::uvalue , byte printf_uchar::format_min_length , byte printf_uchar::format_justify_left , byte printf_uchar::format_sign_always , byte printf_uchar::format_zero_padding , byte printf_uchar::format_upper_case , byte printf_uchar::format_radix) +struct printf_format_number printf_uchar::format +byte printf_uchar::format_justify_left +byte printf_uchar::format_min_length +byte printf_uchar::format_radix +byte printf_uchar::format_sign_always +byte printf_uchar::format_upper_case +byte printf_uchar::format_zero_padding +byte printf_uchar::uvalue +byte printf_uchar::uvalue#0 reg byte x 202.0 +byte printf_uchar::uvalue#1 reg byte x 202.0 +byte printf_uchar::uvalue#2 reg byte x 601.5 +void printf_uint(word printf_uint::uvalue , byte printf_uint::format_min_length , byte printf_uint::format_justify_left , byte printf_uint::format_sign_always , byte printf_uint::format_zero_padding , byte printf_uint::format_upper_case , byte printf_uint::format_radix) +struct printf_format_number printf_uint::format +byte printf_uint::format_justify_left +byte printf_uint::format_min_length +byte printf_uint::format_radix +byte printf_uint::format_sign_always +byte printf_uint::format_upper_case +byte printf_uint::format_zero_padding +word printf_uint::uvalue +word printf_uint::uvalue#0 uvalue zp[2]:15 202.0 +word printf_uint::uvalue#1 uvalue zp[2]:15 202.0 +word printf_uint::uvalue#2 uvalue zp[2]:15 601.5 +void printf_ulong(dword printf_ulong::uvalue , byte printf_ulong::format_min_length , byte printf_ulong::format_justify_left , byte printf_ulong::format_sign_always , byte printf_ulong::format_zero_padding , byte printf_ulong::format_upper_case , byte printf_ulong::format_radix) +struct printf_format_number printf_ulong::format +byte printf_ulong::format_justify_left +byte printf_ulong::format_min_length +byte printf_ulong::format_radix +byte printf_ulong::format_sign_always +byte printf_ulong::format_upper_case +byte printf_ulong::format_zero_padding +dword printf_ulong::uvalue +dword printf_ulong::uvalue#0 uvalue zp[4]:11 202.0 +dword printf_ulong::uvalue#1 uvalue zp[4]:11 202.0 +dword printf_ulong::uvalue#2 uvalue zp[4]:11 202.0 +dword printf_ulong::uvalue#3 uvalue zp[4]:11 652.0 +void screenlayer(byte screenlayer::layer) +word~ screenlayer::$2 zp[2]:59 202.0 +byte~ screenlayer::$3 reg byte a 202.0 +word~ screenlayer::$4 zp[2]:61 202.0 +word~ screenlayer::$5 zp[2]:73 202.0 +byte screenlayer::layer +const byte screenlayer::layer#0 layer = 1 +byte~ screenlayer::vera_layer_get_height1_$0 reg byte a 202.0 +byte~ screenlayer::vera_layer_get_height1_$1 reg byte a 202.0 +byte~ screenlayer::vera_layer_get_height1_$2 reg byte a 202.0 +byte~ screenlayer::vera_layer_get_height1_$3 reg byte a 202.0 +byte* screenlayer::vera_layer_get_height1_config +byte* screenlayer::vera_layer_get_height1_config#0 vera_layer_get_height1_config zp[2]:63 202.0 +byte screenlayer::vera_layer_get_height1_layer +byte screenlayer::vera_layer_get_height1_layer#0 reg byte a 202.0 +word screenlayer::vera_layer_get_height1_return +word screenlayer::vera_layer_get_height1_return#0 vera_layer_get_height1_return zp[2]:73 202.0 +word screenlayer::vera_layer_get_height1_return#1 vera_layer_get_height1_return zp[2]:73 202.0 +byte~ screenlayer::vera_layer_get_width1_$0 reg byte a 202.0 +byte~ screenlayer::vera_layer_get_width1_$1 reg byte a 202.0 +byte~ screenlayer::vera_layer_get_width1_$2 reg byte a 202.0 +byte~ screenlayer::vera_layer_get_width1_$3 reg byte a 202.0 +byte* screenlayer::vera_layer_get_width1_config +byte* screenlayer::vera_layer_get_width1_config#0 vera_layer_get_width1_config zp[2]:75 202.0 +byte screenlayer::vera_layer_get_width1_layer +byte screenlayer::vera_layer_get_width1_layer#0 reg byte a 202.0 +word screenlayer::vera_layer_get_width1_return +word screenlayer::vera_layer_get_width1_return#0 vera_layer_get_width1_return zp[2]:59 202.0 +word screenlayer::vera_layer_get_width1_return#1 vera_layer_get_width1_return zp[2]:59 202.0 +void screensize(byte* screensize::x , byte* screensize::y) +byte~ screensize::$1 reg byte a 202.0 +byte~ screensize::$3 reg byte a 202.0 +byte screensize::hscale +byte screensize::hscale#0 reg byte a 202.0 +byte screensize::vscale +byte screensize::vscale#0 reg byte a 202.0 +byte* screensize::x +const byte* screensize::x#0 x = &conio_screen_width +byte* screensize::y +const byte* screensize::y#0 y = &conio_screen_height +void uctoa(byte uctoa::value , byte* uctoa::buffer , byte uctoa::radix) +byte* uctoa::buffer +byte* uctoa::buffer#11 buffer zp[2]:34 335000.50000000006 +byte* uctoa::buffer#14 buffer zp[2]:34 1500001.5 +byte* uctoa::buffer#3 buffer zp[2]:34 20002.0 +byte* uctoa::buffer#4 buffer zp[2]:34 2000002.0 +byte uctoa::digit +byte uctoa::digit#1 digit zp[1]:17 2000002.0 +byte uctoa::digit#2 digit zp[1]:17 307692.6153846154 +byte uctoa::digit_value +byte uctoa::digit_value#0 digit_value zp[1]:79 600000.6000000001 +byte* uctoa::digit_values +byte uctoa::max_digits +byte uctoa::radix +byte uctoa::started +byte uctoa::started#2 started zp[1]:42 600000.6000000001 +byte uctoa::started#4 started zp[1]:42 1000001.0 +byte uctoa::value +byte uctoa::value#0 reg byte x 1000001.0 +byte uctoa::value#1 reg byte x 5501.0 +byte uctoa::value#2 reg byte x 670001.0000000001 +byte uctoa::value#6 reg byte x 1500001.5 +byte uctoa_append(byte* uctoa_append::buffer , byte uctoa_append::value , byte uctoa_append::sub) +byte* uctoa_append::buffer +byte* uctoa_append::buffer#0 buffer zp[2]:34 1375000.25 +byte uctoa_append::digit +byte uctoa_append::digit#1 reg byte y 1.0000000001E10 +byte uctoa_append::digit#2 reg byte y 1.00050000015E10 +byte uctoa_append::return +byte uctoa_append::return#0 reg byte x 2000002.0 +byte uctoa_append::sub +byte uctoa_append::sub#0 sub zp[1]:79 3.3335000005E9 +byte uctoa_append::value +byte uctoa_append::value#0 reg byte x 3666667.333333333 +byte uctoa_append::value#1 reg byte x 2.0000000002E10 +byte uctoa_append::value#2 reg byte x 5.001833334166666E9 +void ultoa(dword ultoa::value , byte* ultoa::buffer , byte ultoa::radix) +byte~ ultoa::$10 reg byte a 2000002.0 +byte~ ultoa::$11 reg byte a 20002.0 +byte* ultoa::buffer +byte* ultoa::buffer#11 buffer zp[2]:34 287143.2857142857 +byte* ultoa::buffer#14 buffer zp[2]:34 1500001.5 +byte* ultoa::buffer#3 buffer zp[2]:34 20002.0 +byte* ultoa::buffer#4 buffer zp[2]:34 2000002.0 +byte ultoa::digit +byte ultoa::digit#1 digit zp[1]:17 2000002.0 +byte ultoa::digit#2 digit zp[1]:17 285714.5714285714 +dword ultoa::digit_value +dword ultoa::digit_value#0 digit_value zp[4]:67 600000.6000000001 +dword* ultoa::digit_values +byte ultoa::max_digits +byte ultoa::radix +byte ultoa::started +byte ultoa::started#2 reg byte x 500000.5 +byte ultoa::started#4 reg byte x 1000001.0 +dword ultoa::value +dword ultoa::value#0 value zp[4]:11 1000001.0 +dword ultoa::value#1 value zp[4]:11 5501.0 +dword ultoa::value#2 value zp[4]:11 572857.857142857 +dword ultoa::value#6 value zp[4]:11 1500001.5 +dword ultoa_append(byte* ultoa_append::buffer , dword ultoa_append::value , dword ultoa_append::sub) +byte* ultoa_append::buffer +byte* ultoa_append::buffer#0 buffer zp[2]:34 1375000.25 +byte ultoa_append::digit +byte ultoa_append::digit#1 reg byte x 1.0000000001E10 +byte ultoa_append::digit#2 reg byte x 1.00050000015E10 +dword ultoa_append::return +dword ultoa_append::return#0 return zp[4]:11 2000002.0 +dword ultoa_append::sub +dword ultoa_append::sub#0 sub zp[4]:67 3.3335000005E9 +dword ultoa_append::value +dword ultoa_append::value#0 value zp[4]:11 3666667.333333333 +dword ultoa_append::value#1 value zp[4]:11 2.0000000002E10 +dword ultoa_append::value#2 value zp[4]:11 5.001833334166666E9 +void utoa(word utoa::value , byte* utoa::buffer , byte utoa::radix) +byte~ utoa::$10 reg byte a 2000002.0 +byte~ utoa::$11 reg byte a 20002.0 +byte* utoa::buffer +byte* utoa::buffer#11 buffer zp[2]:34 287143.2857142857 +byte* utoa::buffer#14 buffer zp[2]:34 1500001.5 +byte* utoa::buffer#3 buffer zp[2]:34 20002.0 +byte* utoa::buffer#4 buffer zp[2]:34 2000002.0 +byte utoa::digit +byte utoa::digit#1 digit zp[1]:17 2000002.0 +byte utoa::digit#2 digit zp[1]:17 285714.5714285714 +word utoa::digit_value +word utoa::digit_value#0 digit_value zp[2]:71 600000.6000000001 +word* utoa::digit_values +byte utoa::max_digits +byte utoa::radix +byte utoa::started +byte utoa::started#2 reg byte x 500000.5 +byte utoa::started#4 reg byte x 1000001.0 +word utoa::value +word utoa::value#0 value zp[2]:15 1000001.0 +word utoa::value#1 value zp[2]:15 5501.0 +word utoa::value#2 value zp[2]:15 572857.857142857 +word utoa::value#6 value zp[2]:15 1500001.5 +word utoa_append(byte* utoa_append::buffer , word utoa_append::value , word utoa_append::sub) +byte* utoa_append::buffer +byte* utoa_append::buffer#0 buffer zp[2]:34 1375000.25 +byte utoa_append::digit +byte utoa_append::digit#1 reg byte x 1.0000000001E10 +byte utoa_append::digit#2 reg byte x 1.00050000015E10 +word utoa_append::return +word utoa_append::return#0 return zp[2]:15 2000002.0 +word utoa_append::sub +word utoa_append::sub#0 sub zp[2]:71 3.3335000005E9 +word utoa_append::value +word utoa_append::value#0 value zp[2]:15 3666667.333333333 +word utoa_append::value#1 value zp[2]:15 2.0000000002E10 +word utoa_append::value#2 value zp[2]:15 5.001833334166666E9 +const byte* vera_layer_backcolor[2] = { BLUE, BLUE } +const byte** vera_layer_config[2] = { VERA_L0_CONFIG, VERA_L1_CONFIG } +byte vera_layer_get_color(byte vera_layer_get_color::layer) +byte~ vera_layer_get_color::$0 reg byte a 2.0000000000002E13 +byte~ vera_layer_get_color::$1 reg byte a 2.0000000000002E13 +byte~ vera_layer_get_color::$3 reg byte a 2.0000000000002E13 +byte* vera_layer_get_color::addr +byte* vera_layer_get_color::addr#0 addr zp[2]:77 2.0000000000002E13 +byte vera_layer_get_color::layer +byte vera_layer_get_color::layer#0 reg byte x 2.00000002E8 +byte vera_layer_get_color::layer#1 reg byte x 2.000000000002E12 +byte vera_layer_get_color::layer#2 reg byte x 6.833350000000999E12 +byte vera_layer_get_color::return +byte vera_layer_get_color::return#0 reg byte a 2.0000000000002E13 +byte vera_layer_get_color::return#1 reg byte a 2.0000000000002E13 +byte vera_layer_get_color::return#2 reg byte a 5.250025000001E12 +byte vera_layer_get_color::return#3 reg byte a 2.00000002E8 +byte vera_layer_get_color::return#4 reg byte a 2.000000000002E12 +byte vera_layer_get_mapbase_bank(byte vera_layer_get_mapbase_bank::layer) +byte vera_layer_get_mapbase_bank::layer +byte vera_layer_get_mapbase_bank::layer#0 reg byte x 1102.0 +byte vera_layer_get_mapbase_bank::return +byte vera_layer_get_mapbase_bank::return#0 reg byte a 367.33333333333337 +byte vera_layer_get_mapbase_bank::return#2 reg byte a 202.0 +word vera_layer_get_mapbase_offset(byte vera_layer_get_mapbase_offset::layer) +byte~ vera_layer_get_mapbase_offset::$0 reg byte a 2002.0 +byte vera_layer_get_mapbase_offset::layer +byte vera_layer_get_mapbase_offset::layer#0 reg byte a 1102.0 +word vera_layer_get_mapbase_offset::return +word vera_layer_get_mapbase_offset::return#0 return zp[2]:75 367.33333333333337 +word vera_layer_get_mapbase_offset::return#2 return zp[2]:75 202.0 +byte vera_layer_get_rowshift(byte vera_layer_get_rowshift::layer) +byte vera_layer_get_rowshift::layer +byte vera_layer_get_rowshift::layer#0 reg byte x 1102.0 +byte vera_layer_get_rowshift::return +byte vera_layer_get_rowshift::return#0 reg byte a 367.33333333333337 +byte vera_layer_get_rowshift::return#2 reg byte a 202.0 +word vera_layer_get_rowskip(byte vera_layer_get_rowskip::layer) +byte~ vera_layer_get_rowskip::$0 reg byte a 2002.0 +byte vera_layer_get_rowskip::layer +byte vera_layer_get_rowskip::layer#0 reg byte a 1102.0 +word vera_layer_get_rowskip::return +word vera_layer_get_rowskip::return#0 return zp[2]:61 367.33333333333337 +word vera_layer_get_rowskip::return#2 return zp[2]:61 202.0 +const byte** vera_layer_mapbase[2] = { VERA_L0_MAPBASE, VERA_L1_MAPBASE } +void vera_layer_mode_text(byte vera_layer_mode_text::layer , dword vera_layer_mode_text::mapbase_address , dword vera_layer_mode_text::tilebase_address , word vera_layer_mode_text::mapwidth , word vera_layer_mode_text::mapheight , byte vera_layer_mode_text::tilewidth , byte vera_layer_mode_text::tileheight , word vera_layer_mode_text::color_mode) +word vera_layer_mode_text::color_mode +byte vera_layer_mode_text::layer +const byte vera_layer_mode_text::layer#0 layer = 1 +dword vera_layer_mode_text::mapbase_address +const dword vera_layer_mode_text::mapbase_address#0 mapbase_address = 0 +word vera_layer_mode_text::mapheight +word vera_layer_mode_text::mapwidth +dword vera_layer_mode_text::tilebase_address +const dword vera_layer_mode_text::tilebase_address#0 tilebase_address = $f800 +byte vera_layer_mode_text::tileheight +byte vera_layer_mode_text::tilewidth +void vera_layer_mode_tile(byte vera_layer_mode_tile::layer , dword vera_layer_mode_tile::mapbase_address , dword vera_layer_mode_tile::tilebase_address , word vera_layer_mode_tile::mapwidth , word vera_layer_mode_tile::mapheight , byte vera_layer_mode_tile::tilewidth , byte vera_layer_mode_tile::tileheight , byte vera_layer_mode_tile::color_depth) +byte vera_layer_mode_tile::color_depth +byte vera_layer_mode_tile::config +const byte vera_layer_mode_tile::config#10 config = VERA_LAYER_WIDTH_128|VERA_LAYER_HEIGHT_64 +byte vera_layer_mode_tile::layer +byte vera_layer_mode_tile::mapbase +const byte vera_layer_mode_tile::mapbase#0 mapbase = 0 +dword vera_layer_mode_tile::mapbase_address +word vera_layer_mode_tile::mapheight +word vera_layer_mode_tile::mapwidth +byte vera_layer_mode_tile::tilebase +dword vera_layer_mode_tile::tilebase_address +const dword vera_layer_mode_tile::tilebase_address#0 tilebase_address = vera_layer_mode_text::tilebase_address#0>>1 +byte vera_layer_mode_tile::tileheight +byte vera_layer_mode_tile::tilewidth +const byte* vera_layer_rowshift[2] = { 0, 0 } +const word* vera_layer_rowskip[2] = { 0, 0 } +byte vera_layer_set_backcolor(byte vera_layer_set_backcolor::layer , byte vera_layer_set_backcolor::color) +byte vera_layer_set_backcolor::color +byte vera_layer_set_backcolor::layer +const byte vera_layer_set_backcolor::layer#0 layer = 1 +byte vera_layer_set_backcolor::old +byte vera_layer_set_backcolor::return +void vera_layer_set_config(byte vera_layer_set_config::layer , byte vera_layer_set_config::config) +byte* vera_layer_set_config::addr +byte* vera_layer_set_config::addr#0 addr zp[2]:73 20002.0 +byte vera_layer_set_config::config +byte vera_layer_set_config::layer +void vera_layer_set_mapbase(byte vera_layer_set_mapbase::layer , byte vera_layer_set_mapbase::mapbase) +byte~ vera_layer_set_mapbase::$0 reg byte a 20002.0 +byte* vera_layer_set_mapbase::addr +byte* vera_layer_set_mapbase::addr#0 addr zp[2]:59 20002.0 +byte vera_layer_set_mapbase::layer +byte vera_layer_set_mapbase::layer#3 reg byte a 10001.0 +byte vera_layer_set_mapbase::mapbase +byte vera_layer_set_mapbase::mapbase#3 reg byte x 3333.6666666666665 +void vera_layer_set_text_color_mode(byte vera_layer_set_text_color_mode::layer , byte vera_layer_set_text_color_mode::color_mode) +byte* vera_layer_set_text_color_mode::addr +byte* vera_layer_set_text_color_mode::addr#0 addr zp[2]:63 2502.5 +byte vera_layer_set_text_color_mode::color_mode +byte vera_layer_set_text_color_mode::layer +byte vera_layer_set_textcolor(byte vera_layer_set_textcolor::layer , byte vera_layer_set_textcolor::color) +byte vera_layer_set_textcolor::color +byte vera_layer_set_textcolor::layer +const byte vera_layer_set_textcolor::layer#0 layer = 1 +byte vera_layer_set_textcolor::old +byte vera_layer_set_textcolor::return +void vera_layer_set_tilebase(byte vera_layer_set_tilebase::layer , byte vera_layer_set_tilebase::tilebase) +byte* vera_layer_set_tilebase::addr +byte* vera_layer_set_tilebase::addr#0 addr zp[2]:75 20002.0 +byte vera_layer_set_tilebase::layer +byte vera_layer_set_tilebase::tilebase +const byte* vera_layer_textcolor[2] = { WHITE, WHITE } +const byte** vera_layer_tilebase[2] = { VERA_L0_TILEBASE, VERA_L1_TILEBASE } +const dword* vera_mapbase_address[2] = { 0, 0 } +const byte* vera_mapbase_bank[2] = { 0, 0 } +const word* vera_mapbase_offset[2] = { 0, 0 } +const dword* vera_tilebase_address[2] = { 0, 0 } +const byte* vera_tilebase_bank[2] = { 0, 0 } +const word* vera_tilebase_offset[2] = { 0, 0 } + +zp[1]:2 [ conio_x16_init::line#3 conio_x16_init::line#1 conio_x16_init::line#0 ] +zp[4]:3 [ main::src1#10 main::src1#1 ] +zp[4]:7 [ main::num#10 main::num#1 ] +reg byte a [ vera_layer_set_mapbase::layer#3 ] +reg byte x [ vera_layer_set_mapbase::mapbase#3 ] +reg byte x [ gotoxy::y#4 gotoxy::y#3 gotoxy::y#0 gotoxy::y#2 ] +zp[4]:11 [ printf_ulong::uvalue#3 printf_ulong::uvalue#0 printf_ulong::uvalue#1 printf_ulong::uvalue#2 ultoa::value#2 ultoa::value#6 ultoa::value#1 ultoa::value#0 ultoa_append::value#2 ultoa_append::value#0 ultoa_append::value#1 ultoa_append::return#0 ] +reg byte x [ printf_uchar::uvalue#2 printf_uchar::uvalue#1 printf_uchar::uvalue#0 ] +zp[2]:15 [ printf_uint::uvalue#2 printf_uint::uvalue#0 printf_uint::uvalue#1 utoa::value#2 utoa::value#6 utoa::value#1 utoa::value#0 main::beg#1 utoa_append::value#2 utoa_append::value#0 utoa_append::value#1 utoa_append::return#0 main::$25 main::beg#0 ] +reg byte x [ ultoa::started#2 ultoa::started#4 ] +reg byte a [ printf_number_buffer::buffer_sign#10 printf_number_buffer::buffer_sign#2 printf_number_buffer::buffer_sign#1 printf_number_buffer::buffer_sign#0 ] +reg byte x [ uctoa::value#2 uctoa::value#6 uctoa::value#1 uctoa::value#0 ] +zp[1]:17 [ utoa::digit#2 utoa::digit#1 uctoa::digit#2 uctoa::digit#1 ultoa::digit#2 ultoa::digit#1 cputc::c#3 cputc::c#0 cputc::c#2 ] +reg byte x [ utoa::started#2 utoa::started#4 ] +reg byte x [ vera_layer_get_color::layer#2 vera_layer_get_color::layer#1 vera_layer_get_color::layer#0 ] +reg byte a [ vera_layer_get_color::return#2 vera_layer_get_color::return#0 vera_layer_get_color::return#1 ] +reg byte x [ ultoa_append::digit#2 ultoa_append::digit#1 ] +reg byte x [ uctoa_append::value#2 uctoa_append::value#0 uctoa_append::value#1 ] +reg byte y [ uctoa_append::digit#2 uctoa_append::digit#1 ] +reg byte x [ utoa_append::digit#2 utoa_append::digit#1 ] +reg byte x [ insertup::i#2 insertup::i#1 ] +zp[1]:18 [ conio_screen_width ] +zp[1]:19 [ conio_screen_height ] +zp[1]:20 [ conio_screen_layer ] +zp[2]:21 [ conio_width ] +zp[2]:23 [ conio_height ] +zp[1]:25 [ conio_rowshift ] +zp[2]:26 [ conio_rowskip ] +zp[4]:28 [ main::$1 main::calcend#0 ] +zp[2]:32 [ main::$3 main::$4 memcpy_in_vram::i#2 memcpy_in_vram::i#1 clearline::c#2 clearline::c#1 ] +reg byte y [ main::$5 ] +zp[2]:34 [ main::$6 utoa::buffer#11 utoa::buffer#14 utoa::buffer#4 utoa::buffer#3 utoa_append::buffer#0 uctoa::buffer#11 uctoa::buffer#14 uctoa::buffer#4 uctoa::buffer#3 uctoa_append::buffer#0 ultoa::buffer#11 ultoa::buffer#14 ultoa::buffer#4 ultoa::buffer#3 ultoa_append::buffer#0 cputs::s#10 cputs::s#11 cputs::s#0 ] +reg byte x [ main::$7 ] +zp[2]:36 [ main::$30 main::$8 main::$9 main::$13 ] +zp[2]:38 [ main::$10 main::$11 ] +reg byte a [ main::$12 ] +zp[2]:40 [ main::$31 ] +zp[1]:42 [ main::bankbeg#0 uctoa::started#2 uctoa::started#4 ] +zp[2]:43 [ main::$14 main::$15 ] +reg byte y [ main::$16 ] +zp[2]:45 [ main::$17 ] +reg byte x [ main::$18 ] +zp[2]:47 [ main::$32 main::$19 main::$20 main::$24 ] +zp[2]:49 [ main::$21 main::$22 ] +reg byte a [ main::$23 ] +zp[2]:51 [ main::$33 ] +zp[1]:53 [ main::bankend#0 ] +zp[2]:54 [ main::$27 main::end#0 main::end#1 ] +reg byte a [ screensize::hscale#0 ] +reg byte a [ screensize::$1 ] +reg byte a [ screensize::vscale#0 ] +reg byte a [ screensize::$3 ] +reg byte x [ vera_layer_get_mapbase_bank::layer#0 ] +reg byte a [ vera_layer_get_mapbase_bank::return#2 ] +zp[1]:56 [ CONIO_SCREEN_BANK#10 ] +reg byte a [ vera_layer_get_mapbase_offset::layer#0 ] +zp[2]:57 [ CONIO_SCREEN_TEXT#101 ] +reg byte a [ screenlayer::vera_layer_get_width1_layer#0 ] +reg byte a [ screenlayer::vera_layer_get_width1_$2 ] +reg byte a [ screenlayer::vera_layer_get_width1_$0 ] +reg byte a [ screenlayer::vera_layer_get_width1_$1 ] +reg byte a [ screenlayer::vera_layer_get_width1_$3 ] +reg byte x [ vera_layer_get_rowshift::layer#0 ] +reg byte a [ vera_layer_get_rowshift::return#2 ] +reg byte a [ screenlayer::$3 ] +reg byte a [ vera_layer_get_rowskip::layer#0 ] +reg byte a [ screenlayer::vera_layer_get_height1_layer#0 ] +reg byte a [ screenlayer::vera_layer_get_height1_$2 ] +reg byte a [ screenlayer::vera_layer_get_height1_$0 ] +reg byte a [ screenlayer::vera_layer_get_height1_$1 ] +reg byte a [ screenlayer::vera_layer_get_height1_$3 ] +reg byte a [ vera_layer_set_mapbase::$0 ] +zp[2]:59 [ vera_layer_set_mapbase::addr#0 screenlayer::vera_layer_get_width1_return#0 screenlayer::vera_layer_get_width1_return#1 screenlayer::$2 ] +zp[2]:61 [ gotoxy::$6 gotoxy::line_offset#0 vera_layer_get_rowskip::return#2 screenlayer::$4 vera_layer_get_rowskip::return#0 ] +reg byte a [ gotoxy::$5 ] +reg byte a [ cputs::c#1 ] +zp[2]:63 [ vera_layer_set_text_color_mode::addr#0 screenlayer::vera_layer_get_height1_config#0 ] +reg byte a [ vera_layer_get_mapbase_bank::return#0 ] +reg byte a [ vera_layer_get_mapbase_offset::$0 ] +reg byte a [ vera_layer_get_rowshift::return#0 ] +reg byte a [ vera_layer_get_rowskip::$0 ] +reg byte a [ vera_layer_get_color::return#3 ] +reg byte x [ cputc::color#0 ] +reg byte a [ cputc::$15 ] +reg byte a [ cputc::$2 ] +reg byte a [ cputc::$4 ] +reg byte a [ cputc::$5 ] +reg byte a [ cputc::$6 ] +reg byte a [ cputc::scroll_enable#0 ] +zp[2]:65 [ cputc::$16 ] +reg byte a [ ultoa::$11 ] +reg byte a [ ultoa::$10 ] +zp[4]:67 [ ultoa::digit_value#0 ultoa_append::sub#0 ] +reg byte x [ uctoa_append::return#0 ] +reg byte a [ utoa::$11 ] +reg byte a [ utoa::$10 ] +zp[2]:71 [ utoa::digit_value#0 utoa_append::sub#0 cputc::conio_addr#0 cputc::conio_addr#1 ] +zp[2]:73 [ vera_layer_set_config::addr#0 screenlayer::vera_layer_get_height1_return#0 screenlayer::vera_layer_get_height1_return#1 screenlayer::$5 ] +zp[2]:75 [ vera_layer_set_tilebase::addr#0 screenlayer::vera_layer_get_width1_config#0 vera_layer_get_mapbase_offset::return#2 vera_layer_get_mapbase_offset::return#0 ] +reg byte a [ vera_layer_get_color::$3 ] +reg byte a [ vera_layer_get_color::$0 ] +reg byte a [ vera_layer_get_color::$1 ] +reg byte a [ cputln::$2 ] +zp[2]:77 [ cputln::temp#0 cputln::temp#1 vera_layer_get_color::addr#0 ] +reg byte a [ cputln::$3 ] +zp[1]:79 [ insertup::cy#0 uctoa::digit_value#0 uctoa_append::sub#0 ] +zp[1]:80 [ insertup::width#0 ] +reg byte a [ insertup::$3 ] +zp[2]:81 [ insertup::line#0 insertup::start#0 memcpy_in_vram::dest#0 ] +zp[2]:83 [ memcpy_in_vram::num#0 ] +reg byte a [ clearline::$5 ] +zp[2]:85 [ clearline::addr#0 memcpy_in_vram::src#0 ] +reg byte a [ clearline::$1 ] +reg byte a [ clearline::$2 ] +reg byte a [ vera_layer_get_color::return#4 ] +reg byte x [ clearline::color#0 ] +reg byte a [ memcpy_in_vram::$0 ] +reg byte a [ memcpy_in_vram::$1 ] +reg byte a [ memcpy_in_vram::$3 ] +reg byte a [ memcpy_in_vram::$4 ] +mem[12] [ printf_buffer ] diff --git a/src/test/ref/examples/cx16/cx16-bankload.asm b/src/test/ref/examples/cx16/cx16-bankload.asm new file mode 100644 index 000000000..0400ac17b --- /dev/null +++ b/src/test/ref/examples/cx16/cx16-bankload.asm @@ -0,0 +1,1801 @@ +// Commander X16 Load a file to a memory bank +.cpu _65c02 + // Create a bunch of files +.file [name="cx16-bankload.prg", type="prg", segments="Program"] +.file [name="SPRITE", type="bin", segments="Sprite"] +.segmentdef Program [segments="Basic, Code, Data"] +.segmentdef Basic [start=$0801] +.segmentdef Code [start=$80d] +.segmentdef Data [startAfter="Code"] +.segment Basic +:BasicUpstart(__start) +.segmentdef Sprite + + .const WHITE = 1 + .const BLUE = 6 + .const VERA_INC_1 = $10 + .const VERA_DCSEL = 2 + .const VERA_ADDRSEL = 1 + .const VERA_SPRITES_ENABLE = $40 + .const VERA_LAYER_WIDTH_128 = $20 + .const VERA_LAYER_WIDTH_MASK = $30 + .const VERA_LAYER_HEIGHT_64 = $40 + .const VERA_LAYER_HEIGHT_MASK = $c0 + .const VERA_LAYER_CONFIG_256C = 8 + .const VERA_LAYER_TILEBASE_MASK = $fc + // VERA Palette address in VRAM $1FA00 - $1FBFF + // 256 entries of 2 bytes + // byte 0 bits 4-7: Green + // byte 0 bits 0-3: Blue + // byte 1 bits 0-3: Red + .const VERA_PALETTE = $1fa00 + // Sprite Attributes address in VERA VRAM $1FC00 - $1FFFF + .const VERA_SPRITE_ATTR = $1fc00 + // 8BPP sprite mode (add to VERA_SPRITE.ADDR to enable) + .const VERA_SPRITE_8BPP = $8000 + .const SIZEOF_WORD = 2 + .const SIZEOF_POINTER = 2 + .const SIZEOF_DWORD = 4 + .const SIZEOF_STRUCT_VERA_SPRITE = 8 + .const OFFSET_STRUCT_MOS6522_VIA_PORT_A = 1 + .const OFFSET_STRUCT_VERA_SPRITE_X = 2 + .const OFFSET_STRUCT_VERA_SPRITE_Y = 4 + // $9F20 VRAM Address (7:0) + .label VERA_ADDRX_L = $9f20 + // $9F21 VRAM Address (15:8) + .label VERA_ADDRX_M = $9f21 + // $9F22 VRAM Address (7:0) + // Bit 4-7: Address Increment The following is the amount incremented per value value:increment + // 0:0, 1:1, 2:2, 3:4, 4:8, 5:16, 6:32, 7:64, 8:128, 9:256, 10:512, 11:40, 12:80, 13:160, 14:320, 15:640 + // Bit 3: DECR Setting the DECR bit, will decrement instead of increment by the value set by the 'Address Increment' field. + // Bit 0: VRAM Address (16) + .label VERA_ADDRX_H = $9f22 + // $9F23 DATA0 VRAM Data port 0 + .label VERA_DATA0 = $9f23 + // $9F24 DATA1 VRAM Data port 1 + .label VERA_DATA1 = $9f24 + // $9F25 CTRL Control + // Bit 7: Reset + // Bit 1: DCSEL + // Bit 2: ADDRSEL + .label VERA_CTRL = $9f25 + // $9F29 DC_VIDEO (DCSEL=0) + // Bit 7: Current Field Read-only bit which reflects the active interlaced field in composite and RGB modes. (0: even, 1: odd) + // Bit 6: Sprites Enable Enable output from the Sprites renderer + // Bit 5: Layer1 Enable Enable output from the Layer1 renderer + // Bit 4: Layer0 Enable Enable output from the Layer0 renderer + // Bit 2: Chroma Disable Setting 'Chroma Disable' disables output of chroma in NTSC composite mode and will give a better picture on a monochrome display. (Setting this bit will also disable the chroma output on the S-video output.) + // Bit 0-1: Output Mode 0: Video disabled, 1: VGA output, 2: NTSC composite, 3: RGB interlaced, composite sync (via VGA connector) + .label VERA_DC_VIDEO = $9f29 + // $9F2A DC_HSCALE (DCSEL=0) Active Display H-Scale + .label VERA_DC_HSCALE = $9f2a + // $9F2B DC_VSCALE (DCSEL=0) Active Display V-Scale + .label VERA_DC_VSCALE = $9f2b + // $9F2D L0_CONFIG Layer 0 Configuration + .label VERA_L0_CONFIG = $9f2d + // $9F2E L0_MAPBASE Layer 0 Map Base Address (16:9) + .label VERA_L0_MAPBASE = $9f2e + // Bit 0: Tile Width (0:8 pixels, 1:16 pixels) + .label VERA_L0_TILEBASE = $9f2f + // $9F34 L1_CONFIG Layer 1 Configuration + .label VERA_L1_CONFIG = $9f34 + // $9F35 L1_MAPBASE Layer 1 Map Base Address (16:9) + .label VERA_L1_MAPBASE = $9f35 + // $9F36 L1_TILEBASE Layer 1 Tile Base + // Bit 2-7: Tile Base Address (16:11) + // Bit 1: Tile Height (0:8 pixels, 1:16 pixels) + // Bit 0: Tile Width (0:8 pixels, 1:16 pixels) + .label VERA_L1_TILEBASE = $9f36 + // The VIA#1: ROM/RAM Bank Control + // Port A Bits 0-7 RAM bank + // Port B Bits 0-2 ROM bank + // Port B Bits 3-7 [TBD] + .label VIA1 = $9f60 + // Variable holding the screen width; + .label conio_screen_width = $11 + // Variable holding the screen height; + .label conio_screen_height = $12 + // Variable holding the screen layer on the VERA card with which conio interacts; + .label conio_screen_layer = $13 + // Variables holding the current map width and map height of the layer. + .label conio_width = $14 + .label conio_height = $16 + .label conio_rowshift = $18 + .label conio_rowskip = $19 + .label CONIO_SCREEN_BANK = $1b + // The screen width + // The screen height + // The text screen base address, which is a 16:0 bit value in VERA VRAM. + // That is 128KB addressable space, thus 17 bits in total. + // CONIO_SCREEN_TEXT contains bits 15:0 of the address. + // CONIO_SCREEN_BANK contains bit 16, the the 64K memory bank in VERA VRAM (the upper 17th bit). + // !!! note that these values are not const for the cx16! + // This conio implements the two layers of VERA, which can be layer 0 or layer 1. + // Configuring conio to output to a different layer, will change these fields to the address base + // configured using VERA_L0_MAPBASE = 0x9f2e or VERA_L1_MAPBASE = 0x9f35. + // Using the function setscreenlayer(layer) will re-calculate using CONIO_SCREEN_TEXT and CONIO_SCREEN_BASE + // based on the values of VERA_L0_MAPBASE or VERA_L1_MAPBASE, mapping the base address of the selected layer. + // The function setscreenlayermapbase(layer,mapbase) allows to configure bit 16:9 of the + // mapbase address of the time map in VRAM of the selected layer VERA_L0_MAPBASE or VERA_L1_MAPBASE. + .label CONIO_SCREEN_TEXT = $1c +.segment Code +__start: { + // conio_screen_width = 0 + lda #0 + sta.z conio_screen_width + // conio_screen_height = 0 + sta.z conio_screen_height + // conio_screen_layer = 1 + lda #1 + sta.z conio_screen_layer + // conio_width = 0 + lda #<0 + sta.z conio_width + sta.z conio_width+1 + // conio_height = 0 + sta.z conio_height + sta.z conio_height+1 + // conio_rowshift = 0 + sta.z conio_rowshift + // conio_rowskip = 0 + sta.z conio_rowskip + sta.z conio_rowskip+1 + // #pragma constructor_for(conio_x16_init, cputc, clrscr, cscroll) + jsr conio_x16_init + jsr main + rts +} +// Set initial cursor position +conio_x16_init: { + // Position cursor at current line + .label BASIC_CURSOR_LINE = $d6 + .label line = 2 + // line = *BASIC_CURSOR_LINE + lda BASIC_CURSOR_LINE + sta.z line + // vera_layer_mode_text(1,(dword)0x00000,(dword)0x0F800,128,64,8,8,16) + jsr vera_layer_mode_text + // screensize(&conio_screen_width, &conio_screen_height) + jsr screensize + // screenlayer(1) + jsr screenlayer + // vera_layer_set_textcolor(1, WHITE) + jsr vera_layer_set_textcolor + // vera_layer_set_backcolor(1, BLUE) + jsr vera_layer_set_backcolor + // vera_layer_set_mapbase(0,0x20) + ldx #$20 + lda #0 + jsr vera_layer_set_mapbase + // vera_layer_set_mapbase(1,0x00) + ldx #0 + lda #1 + jsr vera_layer_set_mapbase + // if(line>=CONIO_HEIGHT) + lda.z line + cmp.z conio_screen_height + bcc __b1 + // line=CONIO_HEIGHT-1 + ldx.z conio_screen_height + dex + stx.z line + __b1: + // gotoxy(0, line) + ldx.z line + jsr gotoxy + // } + rts +} +main: { + .label BANK_SPRITE = $12000 + // Load in bank 9. + .label VRAM_SPRITE = $10000 + .label SPRITE_ATTR = $43 + // vera_layer_set_text_color_mode( 1, VERA_LAYER_CONFIG_16C ) + lda #1 + jsr vera_layer_set_text_color_mode + // screenlayer(1) + jsr screenlayer + // clrscr() + jsr clrscr + // printf("\n\nsprite banked file load and display demo.\n") + jsr cputs + // SPRITE_ATTR = { <(VRAM_SPRITE/32)|VERA_SPRITE_8BPP, 320-32, 240-32, 0x0c, 0xf1 } + ldy #SIZEOF_STRUCT_VERA_SPRITE + !: + lda __0-1,y + sta SPRITE_ATTR-1,y + dey + bne !- + // LoadFileBanked(8, "SPRITE", BANK_SPRITE ) + jsr LoadFileBanked + // bnkcpy_vram_address(VERA_PALETTE+32, BANK_SPRITE-2, 32) + lda #$20 + sta.z bnkcpy_vram_address.num + lda #0 + sta.z bnkcpy_vram_address.num+1 + sta.z bnkcpy_vram_address.num+2 + sta.z bnkcpy_vram_address.num+3 + lda #BANK_SPRITE-2 + sta.z bnkcpy_vram_address.beg+1 + lda #>$10 + sta.z bnkcpy_vram_address.beg+2 + lda #>BANK_SPRITE-2>>$10 + sta.z bnkcpy_vram_address.beg+3 + lda #VERA_PALETTE+$20 + sta.z bnkcpy_vram_address.vdest+1 + lda #>$10 + sta.z bnkcpy_vram_address.vdest+2 + lda #>VERA_PALETTE+$20>>$10 + sta.z bnkcpy_vram_address.vdest+3 + jsr bnkcpy_vram_address + // bnkcpy_vram_address(VRAM_SPRITE, BANK_SPRITE+32-2, 64*32) + lda #<$40*$20 + sta.z bnkcpy_vram_address.num + lda #>$40*$20 + sta.z bnkcpy_vram_address.num+1 + lda #<$40*$20>>$10 + sta.z bnkcpy_vram_address.num+2 + lda #>$40*$20>>$10 + sta.z bnkcpy_vram_address.num+3 + lda #BANK_SPRITE+$20-2 + sta.z bnkcpy_vram_address.beg+1 + lda #>$10 + sta.z bnkcpy_vram_address.beg+2 + lda #>BANK_SPRITE+$20-2>>$10 + sta.z bnkcpy_vram_address.beg+3 + lda #VRAM_SPRITE + sta.z bnkcpy_vram_address.vdest+1 + lda #>$10 + sta.z bnkcpy_vram_address.vdest+2 + lda #>VRAM_SPRITE>>$10 + sta.z bnkcpy_vram_address.vdest+3 + jsr bnkcpy_vram_address + // SPRITE_ATTR.ADDR = <(VRAM_SPRITE/32)|VERA_SPRITE_4BPP + lda #VRAM_SPRITE/$20&$ffff + sta.z SPRITE_ATTR+1 + // SPRITE_ATTR.X = 100 + lda #0 + sta SPRITE_ATTR+OFFSET_STRUCT_VERA_SPRITE_X+1 + lda #<$64 + sta SPRITE_ATTR+OFFSET_STRUCT_VERA_SPRITE_X + // SPRITE_ATTR.Y = 100 + lda #0 + sta SPRITE_ATTR+OFFSET_STRUCT_VERA_SPRITE_Y+1 + lda #<$64 + sta SPRITE_ATTR+OFFSET_STRUCT_VERA_SPRITE_Y + // memcpy_to_vram((char)>VERA_SPRITE_ATTR, > 7 + lda VERA_DC_HSCALE + rol + rol + and #1 + // 40 << hscale + tay + lda #$28 + cpy #0 + beq !e+ + !: + asl + dey + bne !- + !e: + // *x = 40 << hscale + sta.z x + // vscale = (*VERA_DC_VSCALE) >> 7 + lda VERA_DC_VSCALE + rol + rol + and #1 + // 30 << vscale + tay + lda #$1e + cpy #0 + beq !e+ + !: + asl + dey + bne !- + !e: + // *y = 30 << vscale + sta.z y + // } + rts +} +// Set the layer with which the conio will interact. +// - layer: value of 0 or 1. +screenlayer: { + .label __2 = $1e + .label __4 = $20 + .label __5 = $31 + .label vera_layer_get_width1_config = $33 + .label vera_layer_get_width1_return = $1e + .label vera_layer_get_height1_config = $22 + .label vera_layer_get_height1_return = $31 + // conio_screen_layer = layer + lda #1 + sta.z conio_screen_layer + // vera_layer_get_mapbase_bank(conio_screen_layer) + tax + jsr vera_layer_get_mapbase_bank + sta.z CONIO_SCREEN_BANK + // vera_layer_get_mapbase_offset(conio_screen_layer) + lda.z conio_screen_layer + jsr vera_layer_get_mapbase_offset + lda.z vera_layer_get_mapbase_offset.return + sta.z CONIO_SCREEN_TEXT + lda.z vera_layer_get_mapbase_offset.return+1 + sta.z CONIO_SCREEN_TEXT+1 + // vera_layer_get_width(conio_screen_layer) + lda.z conio_screen_layer + // config = vera_layer_config[layer] + asl + tay + lda vera_layer_config,y + sta.z vera_layer_get_width1_config + lda vera_layer_config+1,y + sta.z vera_layer_get_width1_config+1 + // *config & VERA_LAYER_WIDTH_MASK + lda #VERA_LAYER_WIDTH_MASK + ldy #0 + and (vera_layer_get_width1_config),y + // (*config & VERA_LAYER_WIDTH_MASK) >> 4 + lsr + lsr + lsr + lsr + // return VERA_LAYER_WIDTH[ (*config & VERA_LAYER_WIDTH_MASK) >> 4]; + asl + tay + lda VERA_LAYER_WIDTH,y + sta.z vera_layer_get_width1_return + lda VERA_LAYER_WIDTH+1,y + sta.z vera_layer_get_width1_return+1 + // } + // vera_layer_get_width(conio_screen_layer) + // conio_width = vera_layer_get_width(conio_screen_layer) + lda.z __2 + sta.z conio_width + lda.z __2+1 + sta.z conio_width+1 + // vera_layer_get_rowshift(conio_screen_layer) + ldx.z conio_screen_layer + jsr vera_layer_get_rowshift + // conio_rowshift = vera_layer_get_rowshift(conio_screen_layer) + sta.z conio_rowshift + // vera_layer_get_rowskip(conio_screen_layer) + lda.z conio_screen_layer + jsr vera_layer_get_rowskip + // conio_rowskip = vera_layer_get_rowskip(conio_screen_layer) + lda.z __4 + sta.z conio_rowskip + lda.z __4+1 + sta.z conio_rowskip+1 + // vera_layer_get_height(conio_screen_layer) + lda.z conio_screen_layer + // config = vera_layer_config[layer] + asl + tay + lda vera_layer_config,y + sta.z vera_layer_get_height1_config + lda vera_layer_config+1,y + sta.z vera_layer_get_height1_config+1 + // *config & VERA_LAYER_HEIGHT_MASK + lda #VERA_LAYER_HEIGHT_MASK + ldy #0 + and (vera_layer_get_height1_config),y + // (*config & VERA_LAYER_HEIGHT_MASK) >> 6 + rol + rol + rol + and #3 + // return VERA_LAYER_HEIGHT[ (*config & VERA_LAYER_HEIGHT_MASK) >> 6]; + asl + tay + lda VERA_LAYER_HEIGHT,y + sta.z vera_layer_get_height1_return + lda VERA_LAYER_HEIGHT+1,y + sta.z vera_layer_get_height1_return+1 + // } + // vera_layer_get_height(conio_screen_layer) + // conio_height = vera_layer_get_height(conio_screen_layer) + lda.z __5 + sta.z conio_height + lda.z __5+1 + sta.z conio_height+1 + // } + rts +} +// Set the front color for text output. The old front text color setting is returned. +// - layer: Value of 0 or 1. +// - color: a 4 bit value ( decimal between 0 and 15) when the VERA works in 16x16 color text mode. +// An 8 bit value (decimal between 0 and 255) when the VERA works in 256 text mode. +// Note that on the VERA, the transparent color has value 0. +vera_layer_set_textcolor: { + .const layer = 1 + // vera_layer_textcolor[layer] = color + lda #WHITE + sta vera_layer_textcolor+layer + // } + rts +} +// Set the back color for text output. The old back text color setting is returned. +// - layer: Value of 0 or 1. +// - color: a 4 bit value ( decimal between 0 and 15). +// This will only work when the VERA is in 16 color mode! +// Note that on the VERA, the transparent color has value 0. +vera_layer_set_backcolor: { + .const layer = 1 + // vera_layer_backcolor[layer] = color + lda #BLUE + sta vera_layer_backcolor+layer + // } + rts +} +// Set the base of the map layer with which the conio will interact. +// - layer: Value of 0 or 1. +// - mapbase: Specifies the base address of the tile map. +// Note that the register only specifies bits 16:9 of the address, +// so the resulting address in the VERA VRAM is always aligned to a multiple of 512 bytes. +// vera_layer_set_mapbase(byte register(A) layer, byte register(X) mapbase) +vera_layer_set_mapbase: { + .label addr = $1e + // addr = vera_layer_mapbase[layer] + asl + tay + lda vera_layer_mapbase,y + sta.z addr + lda vera_layer_mapbase+1,y + sta.z addr+1 + // *addr = mapbase + txa + ldy #0 + sta (addr),y + // } + rts +} +// Set the cursor to the specified position +// gotoxy(byte register(X) y) +gotoxy: { + .label __6 = $20 + .label line_offset = $20 + // if(y>CONIO_HEIGHT) + lda.z conio_screen_height + stx.z $ff + cmp.z $ff + bcs __b1 + ldx #0 + __b1: + // if(x>=CONIO_WIDTH) + lda.z conio_screen_width + // conio_cursor_x[conio_screen_layer] = x + lda #0 + ldy.z conio_screen_layer + sta conio_cursor_x,y + // conio_cursor_y[conio_screen_layer] = y + txa + sta conio_cursor_y,y + // (unsigned int)y << conio_rowshift + txa + sta.z __6 + lda #0 + sta.z __6+1 + // line_offset = (unsigned int)y << conio_rowshift + ldy.z conio_rowshift + beq !e+ + !: + asl.z line_offset + rol.z line_offset+1 + dey + bne !- + !e: + // conio_line_text[conio_screen_layer] = line_offset + lda.z conio_screen_layer + asl + tay + lda.z line_offset + sta conio_line_text,y + lda.z line_offset+1 + sta conio_line_text+1,y + // } + rts +} +// Set the configuration of the layer text color mode. +// - layer: Value of 0 or 1. +// - color_mode: Specifies the color mode to be VERA_LAYER_CONFIG_16 or VERA_LAYER_CONFIG_256 for text mode. +// vera_layer_set_text_color_mode(byte register(A) layer) +vera_layer_set_text_color_mode: { + .label addr = $22 + // addr = vera_layer_config[layer] + asl + tay + lda vera_layer_config,y + sta.z addr + lda vera_layer_config+1,y + sta.z addr+1 + // *addr &= ~VERA_LAYER_CONFIG_256C + lda #VERA_LAYER_CONFIG_256C^$ff + ldy #0 + and (addr),y + sta (addr),y + // *addr |= color_mode + lda (addr),y + sta (addr),y + // } + rts +} +// clears the screen and moves the cursor to the upper left-hand corner of the screen. +clrscr: { + .label __1 = $24 + .label line_text = $f + .label color = $24 + // line_text = CONIO_SCREEN_TEXT + lda.z CONIO_SCREEN_TEXT + sta.z line_text + lda.z CONIO_SCREEN_TEXT+1 + sta.z line_text+1 + // vera_layer_get_backcolor(conio_screen_layer) + ldx.z conio_screen_layer + jsr vera_layer_get_backcolor + // vera_layer_get_backcolor(conio_screen_layer) << 4 + asl + asl + asl + asl + sta.z __1 + // vera_layer_get_textcolor(conio_screen_layer) + ldx.z conio_screen_layer + jsr vera_layer_get_textcolor + // color = ( vera_layer_get_backcolor(conio_screen_layer) << 4 ) | vera_layer_get_textcolor(conio_screen_layer) + ora.z color + sta.z color + ldx #0 + __b1: + // for( char l=0;lch + lda.z line_text+1 + // *VERA_ADDRX_M = >ch + sta VERA_ADDRX_M + // CONIO_SCREEN_BANK | VERA_INC_1 + lda #VERA_INC_1 + ora.z CONIO_SCREEN_BANK + // *VERA_ADDRX_H = CONIO_SCREEN_BANK | VERA_INC_1 + sta VERA_ADDRX_H + ldy #0 + __b4: + // for( char c=0;cmain.s + sta.z s+1 + __b1: + // while(c=*s++) + ldy #0 + lda (s),y + inc.z s + bne !+ + inc.z s+1 + !: + cmp #0 + bne __b2 + // } + rts + __b2: + // cputc(c) + sta.z cputc.c + jsr cputc + jmp __b1 +} +// Load a file to memory +// Returns a status: +// - 0xff: Success +// - other: Kernal Error Code (https://commodore.ca/manuals/pdfs/commodore_error_messages.pdf) +LoadFileBanked: { + .const device = 8 + .const bank = ((>((main.BANK_SPRITE&$ffff)))>>5)+(<((main.BANK_SPRITE>>$10)<<3)) + // setnam(filename) + lda #main.filename + sta.z setnam.filename+1 + jsr setnam + // setlfs(device) + lda #device + sta.z setlfs.device + jsr setlfs + // VIA1->PORT_A = (char)bank + lda #bank + sta VIA1+OFFSET_STRUCT_MOS6522_VIA_PORT_A + // load(addr, 0) + lda #<0+$a000 + sta.z load.address + lda #>0+$a000 + sta.z load.address+1 + lda #0 + sta.z load.verify + jsr load + // } + rts +} +// Copy block of banked internal memory (256 banks at A000-BFFF) to VERA VRAM. +// Copies the values of num bytes from the location pointed to by source directly to the memory block pointed to by destination in VRAM. +// - vdest: dword of the destination address in VRAM +// - src: dword of source banked address in RAM. This address is a linair project of the banked memory of 512K to 2048K. +// - num: dword of the number of bytes to copy +// bnkcpy_vram_address(dword zp(3) vdest, dword zp(7) num) +bnkcpy_vram_address: { + .label __0 = $2b + .label __2 = $2d + .label __4 = $35 + .label __7 = $37 + .label __8 = $37 + .label __10 = $3b + .label __12 = $3d + .label __13 = $3d + .label __14 = $3f + .label __15 = $3f + .label __17 = $3d + .label __18 = $f + .label __23 = $3d + .label __24 = $41 + .label beg = $b + .label end = 7 + // select the bank + .label addr = $f + .label pos = $b + .label vdest = 3 + .label num = 7 + // *VERA_CTRL &= ~VERA_ADDRSEL + // Select DATA0 + lda #VERA_ADDRSEL^$ff + and VERA_CTRL + sta VERA_CTRL + // ((vdest + lda.z vdest+2 + sta.z __4 + lda.z vdest+3 + sta.z __4+1 + // <(>vdest) + lda.z __4 + // *VERA_ADDRX_H = <(>vdest) + sta VERA_ADDRX_H + // *VERA_ADDRX_H |= VERA_INC_1 + lda #VERA_INC_1 + ora VERA_ADDRX_H + sta VERA_ADDRX_H + // end = src+num + lda.z end + clc + adc.z beg + sta.z end + lda.z end+1 + adc.z beg+1 + sta.z end+1 + lda.z end+2 + adc.z beg+2 + sta.z end+2 + lda.z end+3 + adc.z beg+3 + sta.z end+3 + // >beg + lda.z beg+2 + sta.z __7 + lda.z beg+3 + sta.z __7+1 + // (>beg)<<8 + lda.z __8 + sta.z __8+1 + lda #0 + sta.z __8 + // <(>beg)<<8 + tay + // (beg)<<8)|>(beg)<<8)|>(>5 + lsr.z __13+1 + ror.z __13 + lsr.z __13+1 + ror.z __13 + lsr.z __13+1 + ror.z __13 + lsr.z __13+1 + ror.z __13 + lsr.z __13+1 + ror.z __13 + // >beg + lda.z beg+2 + sta.z __14 + lda.z beg+3 + sta.z __14+1 + // (>beg)<<3 + asl.z __15 + rol.z __15+1 + asl.z __15 + rol.z __15+1 + asl.z __15 + rol.z __15+1 + // <(>beg)<<3 + lda.z __15 + // ((((word)<(>beg)<<8)|>(>5)+((word)<(>beg)<<3) + sta.z __24 + tya + sta.z __24+1 + lda.z __17 + clc + adc.z __24 + sta.z __17 + lda.z __17+1 + adc.z __24+1 + sta.z __17+1 + // bank = (byte)(((((word)<(>beg)<<8)|>(>5)+((word)<(>beg)<<3)) + lda.z __17 + tax + // $1fff + sta.z addr+1 + // addr += 0xA000 + // stip off the top 3 bits, which are representing the bank of the word! + clc + lda.z addr + adc #<$a000 + sta.z addr + lda.z addr+1 + adc #>$a000 + sta.z addr+1 + // POKE + stx $9f61 + __b1: + // select the bank + // for(dword pos=beg; pos$c000 + bne __b3 + lda.z addr + cmp #<$c000 + bne __b3 + // POKE(0x9f61, (byte)++bank); + inx + // POKE + stx $9f61 + lda #<$a000 + sta.z addr + lda #>$a000 + sta.z addr+1 + __b3: + // *VERA_DATA0 = *addr + ldy #0 + lda (addr),y + sta VERA_DATA0 + // addr++; + inc.z addr + bne !+ + inc.z addr+1 + !: + // for(dword pos=beg; pos>$10 + .label vdest = VERA_SPRITE_ATTR&$ffff + .label src = main.SPRITE_ATTR + .label end = src+SIZEOF_STRUCT_VERA_SPRITE + .label s = $f + // *VERA_CTRL &= ~VERA_ADDRSEL + // Select DATA0 + lda #VERA_ADDRSEL^$ff + and VERA_CTRL + sta VERA_CTRL + // *VERA_ADDRX_L = vdest + lda #>vdest + sta VERA_ADDRX_M + // *VERA_ADDRX_H = VERA_INC_1 | vbank + lda #VERA_INC_1|vbank + sta VERA_ADDRX_H + lda #src + sta.z s+1 + __b1: + // for(char *s = src; s!=end; s++) + lda.z s+1 + cmp #>end + bne __b2 + lda.z s + cmp #>1 + // config + .label config = VERA_LAYER_WIDTH_128|VERA_LAYER_HEIGHT_64 + // vera_layer_rowshift[layer] = 8 + lda #8 + sta vera_layer_rowshift+vera_layer_mode_text.layer + // vera_layer_rowskip[layer] = 256 + lda #<$100 + sta vera_layer_rowskip+vera_layer_mode_text.layer*SIZEOF_WORD + lda #>$100 + sta vera_layer_rowskip+vera_layer_mode_text.layer*SIZEOF_WORD+1 + // vera_layer_set_config(layer, config) + jsr vera_layer_set_config + // vera_mapbase_offset[layer] = mapbase_address) + sta vera_mapbase_bank+vera_layer_mode_text.layer + // vera_mapbase_address[layer] = mapbase_address + lda #vera_layer_mode_text.mapbase_address + sta vera_mapbase_address+vera_layer_mode_text.layer*SIZEOF_DWORD+1 + lda #>$10 + sta vera_mapbase_address+vera_layer_mode_text.layer*SIZEOF_DWORD+2 + lda #>vera_layer_mode_text.mapbase_address>>$10 + sta vera_mapbase_address+vera_layer_mode_text.layer*SIZEOF_DWORD+3 + // vera_layer_set_mapbase(layer,mapbase) + ldx #mapbase + lda #vera_layer_mode_text.layer + jsr vera_layer_set_mapbase + // vera_tilebase_offset[layer] = vera_layer_mode_text.tilebase_address&$ffff + sta vera_tilebase_offset+vera_layer_mode_text.layer*SIZEOF_WORD+1 + // vera_tilebase_bank[layer] = (byte)>tilebase_address + lda #0 + sta vera_tilebase_bank+vera_layer_mode_text.layer + // vera_tilebase_address[layer] = tilebase_address + lda #vera_layer_mode_text.tilebase_address + sta vera_tilebase_address+vera_layer_mode_text.layer*SIZEOF_DWORD+1 + lda #>$10 + sta vera_tilebase_address+vera_layer_mode_text.layer*SIZEOF_DWORD+2 + lda #>vera_layer_mode_text.tilebase_address>>$10 + sta vera_tilebase_address+vera_layer_mode_text.layer*SIZEOF_DWORD+3 + // vera_layer_set_tilebase(layer,tilebase) + jsr vera_layer_set_tilebase + // } + rts +} +// Get the map base bank of the tiles for the layer. +// - layer: Value of 0 or 1. +// - return: Bank in vera vram. +// vera_layer_get_mapbase_bank(byte register(X) layer) +vera_layer_get_mapbase_bank: { + // return vera_mapbase_bank[layer]; + lda vera_mapbase_bank,x + // } + rts +} +// Get the map base lower 16-bit address (offset) of the tiles for the layer. +// - layer: Value of 0 or 1. +// - return: Offset in vera vram of the specified bank. +// vera_layer_get_mapbase_offset(byte register(A) layer) +vera_layer_get_mapbase_offset: { + .label return = $33 + // return vera_mapbase_offset[layer]; + asl + tay + lda vera_mapbase_offset,y + sta.z return + lda vera_mapbase_offset+1,y + sta.z return+1 + // } + rts +} +// Get the bit shift value required to skip a whole line fast. +// - layer: Value of 0 or 1. +// - return: Rowshift value to calculate fast from a y value to line offset in tile mode. +// vera_layer_get_rowshift(byte register(X) layer) +vera_layer_get_rowshift: { + // return vera_layer_rowshift[layer]; + lda vera_layer_rowshift,x + // } + rts +} +// Get the value required to skip a whole line fast. +// - layer: Value of 0 or 1. +// - return: Skip value to calculate fast from a y value to line offset in tile mode. +// vera_layer_get_rowskip(byte register(A) layer) +vera_layer_get_rowskip: { + .label return = $20 + // return vera_layer_rowskip[layer]; + asl + tay + lda vera_layer_rowskip,y + sta.z return + lda vera_layer_rowskip+1,y + sta.z return+1 + // } + rts +} +// Get the back color for text output. The old back text color setting is returned. +// - layer: Value of 0 or 1. +// - return: a 4 bit value ( decimal between 0 and 15). +// This will only work when the VERA is in 16 color mode! +// Note that on the VERA, the transparent color has value 0. +// vera_layer_get_backcolor(byte register(X) layer) +vera_layer_get_backcolor: { + // return vera_layer_backcolor[layer]; + lda vera_layer_backcolor,x + // } + rts +} +// Get the front color for text output. The old front text color setting is returned. +// - layer: Value of 0 or 1. +// - return: a 4 bit value ( decimal between 0 and 15). +// This will only work when the VERA is in 16 color mode! +// Note that on the VERA, the transparent color has value 0. +// vera_layer_get_textcolor(byte register(X) layer) +vera_layer_get_textcolor: { + // return vera_layer_textcolor[layer]; + lda vera_layer_textcolor,x + // } + rts +} +// Output one character at the current cursor position +// Moves the cursor forward. Scrolls the entire screen if needed +// cputc(byte zp($24) c) +cputc: { + .label __16 = $2d + .label conio_addr = $2b + .label c = $24 + // vera_layer_get_color( conio_screen_layer) + ldx.z conio_screen_layer + jsr vera_layer_get_color + // vera_layer_get_color( conio_screen_layer) + // color = vera_layer_get_color( conio_screen_layer) + tax + // CONIO_SCREEN_TEXT + conio_line_text[conio_screen_layer] + lda.z conio_screen_layer + asl + // conio_addr = CONIO_SCREEN_TEXT + conio_line_text[conio_screen_layer] + tay + clc + lda.z CONIO_SCREEN_TEXT + adc conio_line_text,y + sta.z conio_addr + lda.z CONIO_SCREEN_TEXT+1 + adc conio_line_text+1,y + sta.z conio_addr+1 + // conio_cursor_x[conio_screen_layer] << 1 + ldy.z conio_screen_layer + lda conio_cursor_x,y + asl + // conio_addr += conio_cursor_x[conio_screen_layer] << 1 + clc + adc.z conio_addr + sta.z conio_addr + bcc !+ + inc.z conio_addr+1 + !: + // if(c=='\n') + lda #'\n' + cmp.z c + beq __b1 + // *VERA_CTRL &= ~VERA_ADDRSEL + // Select DATA0 + lda #VERA_ADDRSEL^$ff + and VERA_CTRL + sta VERA_CTRL + // conio_addr + lda.z conio_addr+1 + // *VERA_ADDRX_M = >conio_addr + sta VERA_ADDRX_M + // CONIO_SCREEN_BANK | VERA_INC_1 + lda #VERA_INC_1 + ora.z CONIO_SCREEN_BANK + // *VERA_ADDRX_H = CONIO_SCREEN_BANK | VERA_INC_1 + sta VERA_ADDRX_H + // *VERA_DATA0 = c + lda.z c + sta VERA_DATA0 + // *VERA_DATA0 = color + stx VERA_DATA0 + // conio_cursor_x[conio_screen_layer]++; + ldx.z conio_screen_layer + inc conio_cursor_x,x + // scroll_enable = conio_scroll_enable[conio_screen_layer] + ldy.z conio_screen_layer + lda conio_scroll_enable,y + // if(scroll_enable) + cmp #0 + bne __b5 + // (unsigned int)conio_cursor_x[conio_screen_layer] == conio_width + lda conio_cursor_x,y + sta.z __16 + lda #0 + sta.z __16+1 + // if((unsigned int)conio_cursor_x[conio_screen_layer] == conio_width) + cmp.z conio_width+1 + bne __breturn + lda.z __16 + cmp.z conio_width + bne __breturn + // cputln() + jsr cputln + __breturn: + // } + rts + __b5: + // if(conio_cursor_x[conio_screen_layer] == CONIO_WIDTH) + lda.z conio_screen_width + ldy.z conio_screen_layer + cmp conio_cursor_x,y + bne __breturn + // cputln() + jsr cputln + rts + __b1: + // cputln() + jsr cputln + rts +} +// Kernal SETNAM function +// SETNAM. Set file name parameters. +// setnam(byte* zp($25) filename) +setnam: { + .label filename = $25 + .label filename_len = $2f + .label __0 = $2d + // strlen(filename) + lda.z filename + sta.z strlen.str + lda.z filename+1 + sta.z strlen.str+1 + jsr strlen + // strlen(filename) + // filename_len = (char)strlen(filename) + lda.z __0 + sta.z filename_len + // asm + ldx filename + ldy filename+1 + jsr $ffbd + // } + rts +} +// SETLFS. Set file parameters. +// setlfs(byte zp($27) device) +setlfs: { + .label device = $27 + // asm + ldx device + lda #1 + ldy #0 + jsr $ffba + // } + rts +} +// LOAD. Load or verify file. (Must call SETLFS and SETNAM beforehands.) +// - verify: 0 = Load, 1-255 = Verify +// +// Returns a status, 0xff: Success other: Kernal Error Code +// load(byte* zp($28) address, byte zp($2a) verify) +load: { + .label address = $28 + .label verify = $2a + .label status = $30 + // status + lda #0 + sta.z status + // asm + ldx address + ldy address+1 + lda verify + jsr $ffd5 + bcs error + lda #$ff + error: + sta status + // } + rts +} +// Set the configuration of the layer. +// - layer: Value of 0 or 1. +// - config: Specifies the modes which are specified using T256C / 'Bitmap Mode' / 'Color Depth'. +vera_layer_set_config: { + .label addr = $31 + // addr = vera_layer_config[layer] + lda vera_layer_config+vera_layer_mode_text.layer*SIZEOF_POINTER + sta.z addr + lda vera_layer_config+vera_layer_mode_text.layer*SIZEOF_POINTER+1 + sta.z addr+1 + // *addr = config + lda #vera_layer_mode_tile.config + ldy #0 + sta (addr),y + // } + rts +} +// Set the base of the tiles for the layer with which the conio will interact. +// - layer: Value of 0 or 1. +// - tilebase: Specifies the base address of the tile map. +// Note that the register only specifies bits 16:11 of the address, +// so the resulting address in the VERA VRAM is always aligned to a multiple of 2048 bytes! +vera_layer_set_tilebase: { + .label addr = $33 + // addr = vera_layer_tilebase[layer] + lda vera_layer_tilebase+vera_layer_mode_text.layer*SIZEOF_POINTER + sta.z addr + lda vera_layer_tilebase+vera_layer_mode_text.layer*SIZEOF_POINTER+1 + sta.z addr+1 + // *addr = tilebase + lda #(>(vera_layer_mode_tile.tilebase_address&$ffff))&VERA_LAYER_TILEBASE_MASK + ldy #0 + sta (addr),y + // } + rts +} +// Get the text and back color for text output in 16 color mode. +// - layer: Value of 0 or 1. +// - return: an 8 bit value with bit 7:4 containing the back color and bit 3:0 containing the front color. +// This will only work when the VERA is in 16 color mode! +// Note that on the VERA, the transparent color has value 0. +// vera_layer_get_color(byte register(X) layer) +vera_layer_get_color: { + .label addr = $35 + // addr = vera_layer_config[layer] + txa + asl + tay + lda vera_layer_config,y + sta.z addr + lda vera_layer_config+1,y + sta.z addr+1 + // *addr & VERA_LAYER_CONFIG_256C + lda #VERA_LAYER_CONFIG_256C + ldy #0 + and (addr),y + // if( *addr & VERA_LAYER_CONFIG_256C ) + cmp #0 + bne __b1 + // vera_layer_backcolor[layer] << 4 + lda vera_layer_backcolor,x + asl + asl + asl + asl + // return ((vera_layer_backcolor[layer] << 4) | vera_layer_textcolor[layer]); + ora vera_layer_textcolor,x + // } + rts + __b1: + // return (vera_layer_textcolor[layer]); + lda vera_layer_textcolor,x + rts +} +// Print a newline +cputln: { + .label temp = $37 + // temp = conio_line_text[conio_screen_layer] + lda.z conio_screen_layer + asl + // TODO: This needs to be optimized! other variations don't compile because of sections not available! + tay + lda conio_line_text,y + sta.z temp + lda conio_line_text+1,y + sta.z temp+1 + // temp += conio_rowskip + lda.z temp + clc + adc.z conio_rowskip + sta.z temp + lda.z temp+1 + adc.z conio_rowskip+1 + sta.z temp+1 + // conio_line_text[conio_screen_layer] = temp + lda.z conio_screen_layer + asl + tay + lda.z temp + sta conio_line_text,y + lda.z temp+1 + sta conio_line_text+1,y + // conio_cursor_x[conio_screen_layer] = 0 + lda #0 + ldy.z conio_screen_layer + sta conio_cursor_x,y + // conio_cursor_y[conio_screen_layer]++; + ldx.z conio_screen_layer + inc conio_cursor_y,x + // cscroll() + jsr cscroll + // } + rts +} +// Computes the length of the string str up to but not including the terminating null character. +// strlen(byte* zp($2b) str) +strlen: { + .label len = $2d + .label str = $2b + .label return = $2d + lda #<0 + sta.z len + sta.z len+1 + __b1: + // while(*str) + ldy #0 + lda (str),y + cmp #0 + bne __b2 + // } + rts + __b2: + // len++; + inc.z len + bne !+ + inc.z len+1 + !: + // str++; + inc.z str + bne !+ + inc.z str+1 + !: + jmp __b1 +} +// Scroll the entire screen if the cursor is beyond the last line +cscroll: { + // if(conio_cursor_y[conio_screen_layer]>=CONIO_HEIGHT) + ldy.z conio_screen_layer + lda conio_cursor_y,y + cmp.z conio_screen_height + bcc __b3 + // if(conio_scroll_enable[conio_screen_layer]) + lda conio_scroll_enable,y + cmp #0 + bne __b4 + // if(conio_cursor_y[conio_screen_layer]>=conio_height) + lda conio_cursor_y,y + ldy.z conio_height+1 + bne __b3 + cmp.z conio_height + __b3: + // } + rts + __b4: + // insertup() + jsr insertup + // gotoxy( 0, CONIO_HEIGHT-1) + ldx.z conio_screen_height + dex + jsr gotoxy + rts +} +// Insert a new line, and scroll the upper part of the screen up. +insertup: { + .label cy = $39 + .label width = $3a + .label line = $3b + .label start = $3b + // cy = conio_cursor_y[conio_screen_layer] + ldy.z conio_screen_layer + lda conio_cursor_y,y + sta.z cy + // width = CONIO_WIDTH * 2 + lda.z conio_screen_width + asl + sta.z width + ldx #1 + __b1: + // for(unsigned byte i=1; i<=cy; i++) + lda.z cy + stx.z $ff + cmp.z $ff + bcs __b2 + // clearline() + jsr clearline + // } + rts + __b2: + // i-1 + txa + sec + sbc #1 + // line = (i-1) << conio_rowshift + ldy.z conio_rowshift + sta.z line + lda #0 + sta.z line+1 + cpy #0 + beq !e+ + !: + asl.z line + rol.z line+1 + dey + bne !- + !e: + // start = CONIO_SCREEN_TEXT + line + lda.z start + clc + adc.z CONIO_SCREEN_TEXT + sta.z start + lda.z start+1 + adc.z CONIO_SCREEN_TEXT+1 + sta.z start+1 + // start+conio_rowskip + lda.z start + clc + adc.z conio_rowskip + sta.z memcpy_in_vram.src + lda.z start+1 + adc.z conio_rowskip+1 + sta.z memcpy_in_vram.src+1 + // memcpy_in_vram(0, start, VERA_INC_1, 0, start+conio_rowskip, VERA_INC_1, width) + lda.z width + sta.z memcpy_in_vram.num + lda #0 + sta.z memcpy_in_vram.num+1 + jsr memcpy_in_vram + // for(unsigned byte i=1; i<=cy; i++) + inx + jmp __b1 +} +clearline: { + .label addr = $41 + .label c = $2b + // *VERA_CTRL &= ~VERA_ADDRSEL + // Select DATA0 + lda #VERA_ADDRSEL^$ff + and VERA_CTRL + sta VERA_CTRL + // CONIO_SCREEN_TEXT + conio_line_text[conio_screen_layer] + lda.z conio_screen_layer + asl + // addr = CONIO_SCREEN_TEXT + conio_line_text[conio_screen_layer] + tay + clc + lda.z CONIO_SCREEN_TEXT + adc conio_line_text,y + sta.z addr + lda.z CONIO_SCREEN_TEXT+1 + adc conio_line_text+1,y + sta.z addr+1 + // addr + lda.z addr+1 + // *VERA_ADDRX_M = >addr + sta VERA_ADDRX_M + // *VERA_ADDRX_H = VERA_INC_1 + lda #VERA_INC_1 + sta VERA_ADDRX_H + // vera_layer_get_color( conio_screen_layer) + ldx.z conio_screen_layer + jsr vera_layer_get_color + // vera_layer_get_color( conio_screen_layer) + // color = vera_layer_get_color( conio_screen_layer) + tax + lda #<0 + sta.z c + sta.z c+1 + __b1: + // for( unsigned int c=0;csrc + lda.z src+1 + // *VERA_ADDRX_M = >src + sta VERA_ADDRX_M + // *VERA_ADDRX_H = src_increment | src_bank + lda #VERA_INC_1 + sta VERA_ADDRX_H + // *VERA_CTRL |= VERA_ADDRSEL + // Select DATA1 + lda #VERA_ADDRSEL + ora VERA_CTRL + sta VERA_CTRL + // dest + lda.z dest+1 + // *VERA_ADDRX_M = >dest + sta VERA_ADDRX_M + // *VERA_ADDRX_H = dest_increment | dest_bank + lda #VERA_INC_1 + sta VERA_ADDRX_H + lda #<0 + sta.z i + sta.z i+1 + // Transfer the data + __b1: + // for(unsigned int i=0; iidx + .var palette = Hashtable() + // RGB value for each palette index + .var palList = List() + // Next palette index + .var nxt_idx = 0; + // Extract palette while outputting pixels as palete index values + .for (var y=0; y<64; y++) { + .for (var x=0;x<64; x++) { + // Find palette index (add if not known) + .var rgb = pic.getPixel(x,y); + .var idx = palette.get(rgb) + .if(idx==null) { + .eval idx = nxt_idx++; + .eval palette.put(rgb,idx); + .eval palList.add(rgb) + } + } + } + .if(nxt_idx>16) .error "Image has too many colours "+nxt_idx + + .for(var i=0;i<16;i++) { + .var rgb = palList.get(i) + .var red = floor(rgb / [256*256]) + .var green = floor(rgb/256) & 255 + .var blue = rgb & 255 + // bits 4-8: green, bits 0-3 blue + .byte green&$f0 | blue/16 + // bits bits 0-3 red + .byte red/16 + } + + .for (var y=0; y<64; y++) { + .for (var x=0;x<64; x+=2) { + // Find palette index (add if not known) + .var rgb = pic.getPixel(x,y); + .var idx1 = palette.get(rgb) + .if(idx1==null) { + .printnow "unknown rgb value!" + } + // Find palette index (add if not known) + .eval rgb = pic.getPixel(x+1,y); + .var idx2 = palette.get(rgb) + .if(idx2==null) { + .printnow "unknown rgb value!" + } + .byte idx1*16+idx2; + } + } + +.segment Data + __0: .word (main.VRAM_SPRITE/$20&$ffff)|VERA_SPRITE_8BPP, $140-$20, $f0-$20 + .byte $c, $f1 diff --git a/src/test/ref/examples/cx16/cx16-bankload.cfg b/src/test/ref/examples/cx16/cx16-bankload.cfg new file mode 100644 index 000000000..a9736d2a0 --- /dev/null +++ b/src/test/ref/examples/cx16/cx16-bankload.cfg @@ -0,0 +1,788 @@ + +void __start() +__start: scope:[__start] from + [0] phi() + to:__start::__init1 +__start::__init1: scope:[__start] from __start + [1] conio_screen_width = 0 + [2] conio_screen_height = 0 + [3] conio_screen_layer = 1 + [4] conio_width = 0 + [5] conio_height = 0 + [6] conio_rowshift = 0 + [7] conio_rowskip = 0 + [8] call conio_x16_init + to:__start::@1 +__start::@1: scope:[__start] from __start::__init1 + [9] phi() + [10] call main + to:__start::@return +__start::@return: scope:[__start] from __start::@1 + [11] return + to:@return + +void conio_x16_init() +conio_x16_init: scope:[conio_x16_init] from __start::__init1 + [12] conio_x16_init::line#0 = *conio_x16_init::BASIC_CURSOR_LINE + [13] call vera_layer_mode_text + to:conio_x16_init::@3 +conio_x16_init::@3: scope:[conio_x16_init] from conio_x16_init + [14] phi() + [15] call screensize + to:conio_x16_init::@4 +conio_x16_init::@4: scope:[conio_x16_init] from conio_x16_init::@3 + [16] phi() + [17] call screenlayer + to:conio_x16_init::@5 +conio_x16_init::@5: scope:[conio_x16_init] from conio_x16_init::@4 + [18] phi() + [19] call vera_layer_set_textcolor + to:conio_x16_init::@6 +conio_x16_init::@6: scope:[conio_x16_init] from conio_x16_init::@5 + [20] phi() + [21] call vera_layer_set_backcolor + to:conio_x16_init::@7 +conio_x16_init::@7: scope:[conio_x16_init] from conio_x16_init::@6 + [22] phi() + [23] call vera_layer_set_mapbase + to:conio_x16_init::@8 +conio_x16_init::@8: scope:[conio_x16_init] from conio_x16_init::@7 + [24] phi() + [25] call vera_layer_set_mapbase + to:conio_x16_init::@9 +conio_x16_init::@9: scope:[conio_x16_init] from conio_x16_init::@8 + [26] if(conio_x16_init::line#0> 7 + [59] screensize::$1 = $28 << screensize::hscale#0 + [60] *screensize::x#0 = screensize::$1 + [61] screensize::vscale#0 = *VERA_DC_VSCALE >> 7 + [62] screensize::$3 = $1e << screensize::vscale#0 + [63] *screensize::y#0 = screensize::$3 + to:screensize::@return +screensize::@return: scope:[screensize] from screensize + [64] return + to:@return + +void screenlayer(byte screenlayer::layer) +screenlayer: scope:[screenlayer] from conio_x16_init::@4 main::@1 + [65] conio_screen_layer = 1 + [66] vera_layer_get_mapbase_bank::layer#0 = conio_screen_layer + [67] call vera_layer_get_mapbase_bank + [68] vera_layer_get_mapbase_bank::return#2 = vera_layer_get_mapbase_bank::return#0 + to:screenlayer::@3 +screenlayer::@3: scope:[screenlayer] from screenlayer + [69] CONIO_SCREEN_BANK#14 = vera_layer_get_mapbase_bank::return#2 + [70] vera_layer_get_mapbase_offset::layer#0 = conio_screen_layer + [71] call vera_layer_get_mapbase_offset + [72] vera_layer_get_mapbase_offset::return#2 = vera_layer_get_mapbase_offset::return#0 + to:screenlayer::@4 +screenlayer::@4: scope:[screenlayer] from screenlayer::@3 + [73] CONIO_SCREEN_TEXT#16 = vera_layer_get_mapbase_offset::return#2 + [74] screenlayer::vera_layer_get_width1_layer#0 = conio_screen_layer + to:screenlayer::vera_layer_get_width1 +screenlayer::vera_layer_get_width1: scope:[screenlayer] from screenlayer::@4 + [75] screenlayer::vera_layer_get_width1_$2 = screenlayer::vera_layer_get_width1_layer#0 << 1 + [76] screenlayer::vera_layer_get_width1_config#0 = vera_layer_config[screenlayer::vera_layer_get_width1_$2] + [77] screenlayer::vera_layer_get_width1_$0 = *screenlayer::vera_layer_get_width1_config#0 & VERA_LAYER_WIDTH_MASK + [78] screenlayer::vera_layer_get_width1_$1 = screenlayer::vera_layer_get_width1_$0 >> 4 + [79] screenlayer::vera_layer_get_width1_$3 = screenlayer::vera_layer_get_width1_$1 << 1 + [80] screenlayer::vera_layer_get_width1_return#0 = VERA_LAYER_WIDTH[screenlayer::vera_layer_get_width1_$3] + to:screenlayer::vera_layer_get_width1_@return +screenlayer::vera_layer_get_width1_@return: scope:[screenlayer] from screenlayer::vera_layer_get_width1 + [81] screenlayer::vera_layer_get_width1_return#1 = screenlayer::vera_layer_get_width1_return#0 + to:screenlayer::@1 +screenlayer::@1: scope:[screenlayer] from screenlayer::vera_layer_get_width1_@return + [82] screenlayer::$2 = screenlayer::vera_layer_get_width1_return#1 + [83] conio_width = screenlayer::$2 + [84] vera_layer_get_rowshift::layer#0 = conio_screen_layer + [85] call vera_layer_get_rowshift + [86] vera_layer_get_rowshift::return#2 = vera_layer_get_rowshift::return#0 + to:screenlayer::@5 +screenlayer::@5: scope:[screenlayer] from screenlayer::@1 + [87] screenlayer::$3 = vera_layer_get_rowshift::return#2 + [88] conio_rowshift = screenlayer::$3 + [89] vera_layer_get_rowskip::layer#0 = conio_screen_layer + [90] call vera_layer_get_rowskip + [91] vera_layer_get_rowskip::return#2 = vera_layer_get_rowskip::return#0 + to:screenlayer::@6 +screenlayer::@6: scope:[screenlayer] from screenlayer::@5 + [92] screenlayer::$4 = vera_layer_get_rowskip::return#2 + [93] conio_rowskip = screenlayer::$4 + [94] screenlayer::vera_layer_get_height1_layer#0 = conio_screen_layer + to:screenlayer::vera_layer_get_height1 +screenlayer::vera_layer_get_height1: scope:[screenlayer] from screenlayer::@6 + [95] screenlayer::vera_layer_get_height1_$2 = screenlayer::vera_layer_get_height1_layer#0 << 1 + [96] screenlayer::vera_layer_get_height1_config#0 = vera_layer_config[screenlayer::vera_layer_get_height1_$2] + [97] screenlayer::vera_layer_get_height1_$0 = *screenlayer::vera_layer_get_height1_config#0 & VERA_LAYER_HEIGHT_MASK + [98] screenlayer::vera_layer_get_height1_$1 = screenlayer::vera_layer_get_height1_$0 >> 6 + [99] screenlayer::vera_layer_get_height1_$3 = screenlayer::vera_layer_get_height1_$1 << 1 + [100] screenlayer::vera_layer_get_height1_return#0 = VERA_LAYER_HEIGHT[screenlayer::vera_layer_get_height1_$3] + to:screenlayer::vera_layer_get_height1_@return +screenlayer::vera_layer_get_height1_@return: scope:[screenlayer] from screenlayer::vera_layer_get_height1 + [101] screenlayer::vera_layer_get_height1_return#1 = screenlayer::vera_layer_get_height1_return#0 + to:screenlayer::@2 +screenlayer::@2: scope:[screenlayer] from screenlayer::vera_layer_get_height1_@return + [102] screenlayer::$5 = screenlayer::vera_layer_get_height1_return#1 + [103] conio_height = screenlayer::$5 + to:screenlayer::@return +screenlayer::@return: scope:[screenlayer] from screenlayer::@2 + [104] return + to:@return + +byte vera_layer_set_textcolor(byte vera_layer_set_textcolor::layer , byte vera_layer_set_textcolor::color) +vera_layer_set_textcolor: scope:[vera_layer_set_textcolor] from conio_x16_init::@5 + [105] *(vera_layer_textcolor+vera_layer_set_textcolor::layer#0) = WHITE + to:vera_layer_set_textcolor::@return +vera_layer_set_textcolor::@return: scope:[vera_layer_set_textcolor] from vera_layer_set_textcolor + [106] return + to:@return + +byte vera_layer_set_backcolor(byte vera_layer_set_backcolor::layer , byte vera_layer_set_backcolor::color) +vera_layer_set_backcolor: scope:[vera_layer_set_backcolor] from conio_x16_init::@6 + [107] *(vera_layer_backcolor+vera_layer_set_backcolor::layer#0) = BLUE + to:vera_layer_set_backcolor::@return +vera_layer_set_backcolor::@return: scope:[vera_layer_set_backcolor] from vera_layer_set_backcolor + [108] return + to:@return + +void vera_layer_set_mapbase(byte vera_layer_set_mapbase::layer , byte vera_layer_set_mapbase::mapbase) +vera_layer_set_mapbase: scope:[vera_layer_set_mapbase] from conio_x16_init::@7 conio_x16_init::@8 vera_layer_mode_tile::@4 + [109] vera_layer_set_mapbase::mapbase#3 = phi( conio_x16_init::@7/$20, conio_x16_init::@8/0, vera_layer_mode_tile::@4/vera_layer_mode_tile::mapbase#0 ) + [109] vera_layer_set_mapbase::layer#3 = phi( conio_x16_init::@7/0, conio_x16_init::@8/1, vera_layer_mode_tile::@4/vera_layer_mode_text::layer#0 ) + [110] vera_layer_set_mapbase::$0 = vera_layer_set_mapbase::layer#3 << 1 + [111] vera_layer_set_mapbase::addr#0 = vera_layer_mapbase[vera_layer_set_mapbase::$0] + [112] *vera_layer_set_mapbase::addr#0 = vera_layer_set_mapbase::mapbase#3 + to:vera_layer_set_mapbase::@return +vera_layer_set_mapbase::@return: scope:[vera_layer_set_mapbase] from vera_layer_set_mapbase + [113] return + to:@return + +void gotoxy(byte gotoxy::x , byte gotoxy::y) +gotoxy: scope:[gotoxy] from conio_x16_init::@1 cscroll::@5 + [114] gotoxy::y#3 = phi( conio_x16_init::@1/gotoxy::y#0, cscroll::@5/gotoxy::y#2 ) + [115] if(gotoxy::y#3<=conio_screen_height) goto gotoxy::@4 + to:gotoxy::@1 +gotoxy::@4: scope:[gotoxy] from gotoxy + [116] phi() + to:gotoxy::@1 +gotoxy::@1: scope:[gotoxy] from gotoxy gotoxy::@4 + [117] gotoxy::y#4 = phi( gotoxy::@4/gotoxy::y#3, gotoxy/0 ) + [118] if(0 clrscr::line_text#2 + [155] *VERA_ADDRX_M = clrscr::$6 + [156] clrscr::$7 = CONIO_SCREEN_BANK#14 | VERA_INC_1 + [157] *VERA_ADDRX_H = clrscr::$7 + to:clrscr::@4 +clrscr::@4: scope:[clrscr] from clrscr::@2 clrscr::@5 + [158] clrscr::c#2 = phi( clrscr::@2/0, clrscr::@5/clrscr::c#1 ) + [159] if(clrscr::c#2 bnkcpy_vram_address::$2 + [189] *VERA_ADDRX_M = bnkcpy_vram_address::$3 + [190] bnkcpy_vram_address::$4 = > bnkcpy_vram_address::vdest#2 + [191] bnkcpy_vram_address::$5 = < bnkcpy_vram_address::$4 + [192] *VERA_ADDRX_H = bnkcpy_vram_address::$5 + [193] *VERA_ADDRX_H = *VERA_ADDRX_H | VERA_INC_1 + [194] bnkcpy_vram_address::end#0 = bnkcpy_vram_address::beg#0 + bnkcpy_vram_address::num#2 + [195] bnkcpy_vram_address::$7 = > bnkcpy_vram_address::beg#0 + [196] bnkcpy_vram_address::$8 = bnkcpy_vram_address::$7 << 8 + [197] bnkcpy_vram_address::$9 = < bnkcpy_vram_address::$8 + [198] bnkcpy_vram_address::$10 = < bnkcpy_vram_address::beg#0 + [199] bnkcpy_vram_address::$11 = > bnkcpy_vram_address::$10 + [200] bnkcpy_vram_address::$23 = (word)bnkcpy_vram_address::$9 + [201] bnkcpy_vram_address::$12 = bnkcpy_vram_address::$23 | bnkcpy_vram_address::$11 + [202] bnkcpy_vram_address::$13 = bnkcpy_vram_address::$12 >> 5 + [203] bnkcpy_vram_address::$14 = > bnkcpy_vram_address::beg#0 + [204] bnkcpy_vram_address::$15 = bnkcpy_vram_address::$14 << 3 + [205] bnkcpy_vram_address::$16 = < bnkcpy_vram_address::$15 + [206] bnkcpy_vram_address::$24 = (word)bnkcpy_vram_address::$16 + [207] bnkcpy_vram_address::$17 = bnkcpy_vram_address::$13 + bnkcpy_vram_address::$24 + [208] bnkcpy_vram_address::bank#0 = (byte)bnkcpy_vram_address::$17 + [209] bnkcpy_vram_address::$18 = < bnkcpy_vram_address::beg#0 + [210] bnkcpy_vram_address::addr#0 = bnkcpy_vram_address::$18 & $1fff + [211] bnkcpy_vram_address::addr#1 = (byte*)bnkcpy_vram_address::addr#0 + $a000 + [212] *((byte*) 40801) = bnkcpy_vram_address::bank#0 + to:bnkcpy_vram_address::@1 +bnkcpy_vram_address::@1: scope:[bnkcpy_vram_address] from bnkcpy_vram_address bnkcpy_vram_address::@3 + [213] bnkcpy_vram_address::bank#2 = phi( bnkcpy_vram_address/bnkcpy_vram_address::bank#0, bnkcpy_vram_address::@3/bnkcpy_vram_address::bank#5 ) + [213] bnkcpy_vram_address::addr#4 = phi( bnkcpy_vram_address/bnkcpy_vram_address::addr#1, bnkcpy_vram_address::@3/bnkcpy_vram_address::addr#2 ) + [213] bnkcpy_vram_address::pos#2 = phi( bnkcpy_vram_address/bnkcpy_vram_address::beg#0, bnkcpy_vram_address::@3/bnkcpy_vram_address::pos#1 ) + [214] if(bnkcpy_vram_address::pos#2memcpy_to_vram::vdest#0 + [226] *VERA_ADDRX_H = VERA_INC_1|memcpy_to_vram::vbank#0 + to:memcpy_to_vram::@1 +memcpy_to_vram::@1: scope:[memcpy_to_vram] from memcpy_to_vram memcpy_to_vram::@2 + [227] memcpy_to_vram::s#2 = phi( memcpy_to_vram/(byte*)memcpy_to_vram::src#0, memcpy_to_vram::@2/memcpy_to_vram::s#1 ) + [228] if(memcpy_to_vram::s#2!=memcpy_to_vram::end#0) goto memcpy_to_vram::@2 + to:memcpy_to_vram::@return +memcpy_to_vram::@return: scope:[memcpy_to_vram] from memcpy_to_vram::@1 + [229] return + to:@return +memcpy_to_vram::@2: scope:[memcpy_to_vram] from memcpy_to_vram::@1 + [230] *VERA_DATA0 = *memcpy_to_vram::s#2 + [231] memcpy_to_vram::s#1 = ++ memcpy_to_vram::s#2 + to:memcpy_to_vram::@1 + +void vera_layer_mode_tile(byte vera_layer_mode_tile::layer , dword vera_layer_mode_tile::mapbase_address , dword vera_layer_mode_tile::tilebase_address , word vera_layer_mode_tile::mapwidth , word vera_layer_mode_tile::mapheight , byte vera_layer_mode_tile::tilewidth , byte vera_layer_mode_tile::tileheight , byte vera_layer_mode_tile::color_depth) +vera_layer_mode_tile: scope:[vera_layer_mode_tile] from vera_layer_mode_text + [232] phi() + to:vera_layer_mode_tile::@1 +vera_layer_mode_tile::@1: scope:[vera_layer_mode_tile] from vera_layer_mode_tile + [233] *(vera_layer_rowshift+vera_layer_mode_text::layer#0) = 8 + [234] *(vera_layer_rowskip+vera_layer_mode_text::layer#0*SIZEOF_WORD) = $100 + to:vera_layer_mode_tile::@2 +vera_layer_mode_tile::@2: scope:[vera_layer_mode_tile] from vera_layer_mode_tile::@1 + [235] phi() + [236] call vera_layer_set_config + to:vera_layer_mode_tile::@4 +vera_layer_mode_tile::@4: scope:[vera_layer_mode_tile] from vera_layer_mode_tile::@2 + [237] *(vera_mapbase_offset+vera_layer_mode_text::layer#0*SIZEOF_WORD) = 0 + [238] *(vera_mapbase_bank+vera_layer_mode_text::layer#0) = 0 + [239] *(vera_mapbase_address+vera_layer_mode_text::layer#0*SIZEOF_DWORD) = vera_layer_mode_text::mapbase_address#0 + [240] call vera_layer_set_mapbase + to:vera_layer_mode_tile::@5 +vera_layer_mode_tile::@5: scope:[vera_layer_mode_tile] from vera_layer_mode_tile::@4 + [241] *(vera_tilebase_offset+vera_layer_mode_text::layer#0*SIZEOF_WORD) = cputc::conio_addr#1 + [274] *VERA_ADDRX_M = cputc::$5 + [275] cputc::$6 = CONIO_SCREEN_BANK#14 | VERA_INC_1 + [276] *VERA_ADDRX_H = cputc::$6 + [277] *VERA_DATA0 = cputc::c#0 + [278] *VERA_DATA0 = cputc::color#0 + [279] conio_cursor_x[conio_screen_layer] = ++ conio_cursor_x[conio_screen_layer] + [280] cputc::scroll_enable#0 = conio_scroll_enable[conio_screen_layer] + [281] if(0!=cputc::scroll_enable#0) goto cputc::@5 + to:cputc::@3 +cputc::@3: scope:[cputc] from cputc::@2 + [282] cputc::$16 = (word)conio_cursor_x[conio_screen_layer] + [283] if(cputc::$16!=conio_width) goto cputc::@return + to:cputc::@4 +cputc::@4: scope:[cputc] from cputc::@3 + [284] phi() + [285] call cputln + to:cputc::@return +cputc::@return: scope:[cputc] from cputc::@1 cputc::@3 cputc::@4 cputc::@5 cputc::@6 + [286] return + to:@return +cputc::@5: scope:[cputc] from cputc::@2 + [287] if(conio_cursor_x[conio_screen_layer]!=conio_screen_width) goto cputc::@return + to:cputc::@6 +cputc::@6: scope:[cputc] from cputc::@5 + [288] phi() + [289] call cputln + to:cputc::@return +cputc::@1: scope:[cputc] from cputc::@7 + [290] phi() + [291] call cputln + to:cputc::@return + +void setnam(volatile byte* setnam::filename) +setnam: scope:[setnam] from LoadFileBanked + [292] strlen::str#1 = setnam::filename + [293] call strlen + [294] strlen::return#2 = strlen::len#2 + to:setnam::@1 +setnam::@1: scope:[setnam] from setnam + [295] setnam::$0 = strlen::return#2 + [296] setnam::filename_len = (byte)setnam::$0 + asm { ldafilename_len ldxfilename ldyfilename+1 jsr$ffbd } + to:setnam::@return +setnam::@return: scope:[setnam] from setnam::@1 + [298] return + to:@return + +void setlfs(volatile byte setlfs::device) +setlfs: scope:[setlfs] from LoadFileBanked::@1 + asm { ldxdevice lda#1 ldy#0 jsr$ffba } + to:setlfs::@return +setlfs::@return: scope:[setlfs] from setlfs + [300] return + to:@return + +byte load(volatile byte* load::address , volatile byte load::verify) +load: scope:[load] from LoadFileBanked::@2 + [301] load::status = 0 + asm { ldxaddress ldyaddress+1 ldaverify jsr$ffd5 bcserror lda#$ff error: stastatus } + to:load::@return +load::@return: scope:[load] from load + [303] return + to:@return + +void vera_layer_set_config(byte vera_layer_set_config::layer , byte vera_layer_set_config::config) +vera_layer_set_config: scope:[vera_layer_set_config] from vera_layer_mode_tile::@2 + [304] vera_layer_set_config::addr#0 = *(vera_layer_config+vera_layer_mode_text::layer#0*SIZEOF_POINTER) + [305] *vera_layer_set_config::addr#0 = vera_layer_mode_tile::config#10 + to:vera_layer_set_config::@return +vera_layer_set_config::@return: scope:[vera_layer_set_config] from vera_layer_set_config + [306] return + to:@return + +void vera_layer_set_tilebase(byte vera_layer_set_tilebase::layer , byte vera_layer_set_tilebase::tilebase) +vera_layer_set_tilebase: scope:[vera_layer_set_tilebase] from vera_layer_mode_tile::@3 + [307] vera_layer_set_tilebase::addr#0 = *(vera_layer_tilebase+vera_layer_mode_text::layer#0*SIZEOF_POINTER) + [308] *vera_layer_set_tilebase::addr#0 = > clearline::addr#0 + [365] *VERA_ADDRX_M = clearline::$2 + [366] *VERA_ADDRX_H = VERA_INC_1 + [367] vera_layer_get_color::layer#1 = conio_screen_layer + [368] call vera_layer_get_color + [369] vera_layer_get_color::return#4 = vera_layer_get_color::return#2 + to:clearline::@4 +clearline::@4: scope:[clearline] from clearline + [370] clearline::color#0 = vera_layer_get_color::return#4 + to:clearline::@1 +clearline::@1: scope:[clearline] from clearline::@2 clearline::@4 + [371] clearline::c#2 = phi( clearline::@2/clearline::c#1, clearline::@4/0 ) + [372] if(clearline::c#2 (void*)memcpy_in_vram::src#0 + [382] *VERA_ADDRX_M = memcpy_in_vram::$1 + [383] *VERA_ADDRX_H = VERA_INC_1 + [384] *VERA_CTRL = *VERA_CTRL | VERA_ADDRSEL + [385] memcpy_in_vram::$3 = < memcpy_in_vram::dest#0 + [386] *VERA_ADDRX_L = memcpy_in_vram::$3 + [387] memcpy_in_vram::$4 = > memcpy_in_vram::dest#0 + [388] *VERA_ADDRX_M = memcpy_in_vram::$4 + [389] *VERA_ADDRX_H = VERA_INC_1 + to:memcpy_in_vram::@1 +memcpy_in_vram::@1: scope:[memcpy_in_vram] from memcpy_in_vram memcpy_in_vram::@2 + [390] memcpy_in_vram::i#2 = phi( memcpy_in_vram/0, memcpy_in_vram::@2/memcpy_in_vram::i#1 ) + [391] if(memcpy_in_vram::i#2VERA_SPRITE_ATTR LoadFileBanked::address#1 + LoadFileBanked::$3 = LoadFileBanked::$2 << 8 + LoadFileBanked::$4 = < LoadFileBanked::$3 + LoadFileBanked::$5 = < LoadFileBanked::address#1 + LoadFileBanked::$6 = > LoadFileBanked::$5 + LoadFileBanked::$16 = (word)LoadFileBanked::$4 + LoadFileBanked::$7 = LoadFileBanked::$16 | LoadFileBanked::$6 + LoadFileBanked::$8 = LoadFileBanked::$7 >> 5 + LoadFileBanked::$9 = > LoadFileBanked::address#1 + LoadFileBanked::$10 = LoadFileBanked::$9 << 3 + LoadFileBanked::$11 = < LoadFileBanked::$10 + LoadFileBanked::$17 = (word)LoadFileBanked::$11 + LoadFileBanked::$12 = LoadFileBanked::$8 + LoadFileBanked::$17 + LoadFileBanked::bank#0 = (byte)LoadFileBanked::$12 + LoadFileBanked::$13 = < LoadFileBanked::address#1 + LoadFileBanked::$14 = LoadFileBanked::$13 & $1fff + LoadFileBanked::addr#0 = ((byte*)) LoadFileBanked::$14 + LoadFileBanked::addr#1 = LoadFileBanked::addr#0 + $a000 + *((byte*)VIA1+OFFSET_STRUCT_MOS6522_VIA_PORT_A) = (byte)LoadFileBanked::bank#0 + load::address = LoadFileBanked::addr#1 + load::verify = 0 + call load + load::return#2 = load::return#1 + to:LoadFileBanked::@3 +LoadFileBanked::@3: scope:[LoadFileBanked] from LoadFileBanked::@2 + load::return#4 = phi( LoadFileBanked::@2/load::return#2 ) + LoadFileBanked::$15 = load::return#4 + LoadFileBanked::return#0 = LoadFileBanked::$15 + to:LoadFileBanked::@return +LoadFileBanked::@return: scope:[LoadFileBanked] from LoadFileBanked::@3 + LoadFileBanked::return#3 = phi( LoadFileBanked::@3/LoadFileBanked::return#0 ) + LoadFileBanked::return#1 = LoadFileBanked::return#3 + return + to:@return + +void memcpy_to_vram(byte memcpy_to_vram::vbank , void* memcpy_to_vram::vdest , void* memcpy_to_vram::src , word memcpy_to_vram::num) +memcpy_to_vram: scope:[memcpy_to_vram] from main::@7 + memcpy_to_vram::num#1 = phi( main::@7/memcpy_to_vram::num#0 ) + memcpy_to_vram::src#1 = phi( main::@7/memcpy_to_vram::src#0 ) + memcpy_to_vram::vbank#1 = phi( main::@7/memcpy_to_vram::vbank#0 ) + memcpy_to_vram::vdest#1 = phi( main::@7/memcpy_to_vram::vdest#0 ) + *VERA_CTRL = *VERA_CTRL & ~VERA_ADDRSEL + memcpy_to_vram::$0 = < memcpy_to_vram::vdest#1 + *VERA_ADDRX_L = memcpy_to_vram::$0 + memcpy_to_vram::$1 = > memcpy_to_vram::vdest#1 + *VERA_ADDRX_M = memcpy_to_vram::$1 + memcpy_to_vram::$2 = VERA_INC_1 | memcpy_to_vram::vbank#1 + *VERA_ADDRX_H = memcpy_to_vram::$2 + memcpy_to_vram::$5 = (byte*)memcpy_to_vram::src#1 + memcpy_to_vram::$3 = memcpy_to_vram::$5 + memcpy_to_vram::num#1 + memcpy_to_vram::end#0 = memcpy_to_vram::$3 + memcpy_to_vram::s#0 = ((byte*)) memcpy_to_vram::src#1 + to:memcpy_to_vram::@1 +memcpy_to_vram::@1: scope:[memcpy_to_vram] from memcpy_to_vram memcpy_to_vram::@2 + memcpy_to_vram::end#1 = phi( memcpy_to_vram/memcpy_to_vram::end#0, memcpy_to_vram::@2/memcpy_to_vram::end#2 ) + memcpy_to_vram::s#2 = phi( memcpy_to_vram/memcpy_to_vram::s#0, memcpy_to_vram::@2/memcpy_to_vram::s#1 ) + memcpy_to_vram::$4 = memcpy_to_vram::s#2 != memcpy_to_vram::end#1 + if(memcpy_to_vram::$4) goto memcpy_to_vram::@2 + to:memcpy_to_vram::@return +memcpy_to_vram::@2: scope:[memcpy_to_vram] from memcpy_to_vram::@1 + memcpy_to_vram::end#2 = phi( memcpy_to_vram::@1/memcpy_to_vram::end#1 ) + memcpy_to_vram::s#3 = phi( memcpy_to_vram::@1/memcpy_to_vram::s#2 ) + *VERA_DATA0 = *memcpy_to_vram::s#3 + memcpy_to_vram::s#1 = ++ memcpy_to_vram::s#3 + to:memcpy_to_vram::@1 +memcpy_to_vram::@return: scope:[memcpy_to_vram] from memcpy_to_vram::@1 + return + to:@return + +void bnkcpy_vram_address(dword bnkcpy_vram_address::vdest , dword bnkcpy_vram_address::src , dword bnkcpy_vram_address::num) +bnkcpy_vram_address: scope:[bnkcpy_vram_address] from main::@5 main::@6 + bnkcpy_vram_address::num#2 = phi( main::@5/bnkcpy_vram_address::num#0, main::@6/bnkcpy_vram_address::num#1 ) + bnkcpy_vram_address::src#2 = phi( main::@5/bnkcpy_vram_address::src#0, main::@6/bnkcpy_vram_address::src#1 ) + bnkcpy_vram_address::vdest#2 = phi( main::@5/bnkcpy_vram_address::vdest#0, main::@6/bnkcpy_vram_address::vdest#1 ) + *VERA_CTRL = *VERA_CTRL & ~VERA_ADDRSEL + bnkcpy_vram_address::$0 = < bnkcpy_vram_address::vdest#2 + bnkcpy_vram_address::$1 = < bnkcpy_vram_address::$0 + *VERA_ADDRX_L = bnkcpy_vram_address::$1 + bnkcpy_vram_address::$2 = < bnkcpy_vram_address::vdest#2 + bnkcpy_vram_address::$3 = > bnkcpy_vram_address::$2 + *VERA_ADDRX_M = bnkcpy_vram_address::$3 + bnkcpy_vram_address::$4 = > bnkcpy_vram_address::vdest#2 + bnkcpy_vram_address::$5 = < bnkcpy_vram_address::$4 + *VERA_ADDRX_H = bnkcpy_vram_address::$5 + *VERA_ADDRX_H = *VERA_ADDRX_H | VERA_INC_1 + bnkcpy_vram_address::beg#0 = bnkcpy_vram_address::src#2 + bnkcpy_vram_address::$6 = bnkcpy_vram_address::src#2 + bnkcpy_vram_address::num#2 + bnkcpy_vram_address::end#0 = bnkcpy_vram_address::$6 + bnkcpy_vram_address::$7 = > bnkcpy_vram_address::beg#0 + bnkcpy_vram_address::$8 = bnkcpy_vram_address::$7 << 8 + bnkcpy_vram_address::$9 = < bnkcpy_vram_address::$8 + bnkcpy_vram_address::$10 = < bnkcpy_vram_address::beg#0 + bnkcpy_vram_address::$11 = > bnkcpy_vram_address::$10 + bnkcpy_vram_address::$23 = (word)bnkcpy_vram_address::$9 + bnkcpy_vram_address::$12 = bnkcpy_vram_address::$23 | bnkcpy_vram_address::$11 + bnkcpy_vram_address::$13 = bnkcpy_vram_address::$12 >> 5 + bnkcpy_vram_address::$14 = > bnkcpy_vram_address::beg#0 + bnkcpy_vram_address::$15 = bnkcpy_vram_address::$14 << 3 + bnkcpy_vram_address::$16 = < bnkcpy_vram_address::$15 + bnkcpy_vram_address::$24 = (word)bnkcpy_vram_address::$16 + bnkcpy_vram_address::$17 = bnkcpy_vram_address::$13 + bnkcpy_vram_address::$24 + bnkcpy_vram_address::bank#0 = (byte)bnkcpy_vram_address::$17 + bnkcpy_vram_address::$18 = < bnkcpy_vram_address::beg#0 + bnkcpy_vram_address::$19 = bnkcpy_vram_address::$18 & $1fff + bnkcpy_vram_address::addr#0 = ((byte*)) bnkcpy_vram_address::$19 + bnkcpy_vram_address::addr#1 = bnkcpy_vram_address::addr#0 + $a000 + *((byte*)$9f61) = (byte)bnkcpy_vram_address::bank#0 + bnkcpy_vram_address::pos#0 = bnkcpy_vram_address::beg#0 + to:bnkcpy_vram_address::@1 +bnkcpy_vram_address::@1: scope:[bnkcpy_vram_address] from bnkcpy_vram_address bnkcpy_vram_address::@3 + bnkcpy_vram_address::bank#4 = phi( bnkcpy_vram_address/bnkcpy_vram_address::bank#0, bnkcpy_vram_address::@3/bnkcpy_vram_address::bank#5 ) + bnkcpy_vram_address::addr#6 = phi( bnkcpy_vram_address/bnkcpy_vram_address::addr#1, bnkcpy_vram_address::@3/bnkcpy_vram_address::addr#2 ) + bnkcpy_vram_address::end#1 = phi( bnkcpy_vram_address/bnkcpy_vram_address::end#0, bnkcpy_vram_address::@3/bnkcpy_vram_address::end#2 ) + bnkcpy_vram_address::pos#2 = phi( bnkcpy_vram_address/bnkcpy_vram_address::pos#0, bnkcpy_vram_address::@3/bnkcpy_vram_address::pos#1 ) + bnkcpy_vram_address::$20 = bnkcpy_vram_address::pos#2 < bnkcpy_vram_address::end#1 + if(bnkcpy_vram_address::$20) goto bnkcpy_vram_address::@2 + to:bnkcpy_vram_address::@return +bnkcpy_vram_address::@2: scope:[bnkcpy_vram_address] from bnkcpy_vram_address::@1 + bnkcpy_vram_address::end#3 = phi( bnkcpy_vram_address::@1/bnkcpy_vram_address::end#1 ) + bnkcpy_vram_address::bank#3 = phi( bnkcpy_vram_address::@1/bnkcpy_vram_address::bank#4 ) + bnkcpy_vram_address::pos#4 = phi( bnkcpy_vram_address::@1/bnkcpy_vram_address::pos#2 ) + bnkcpy_vram_address::addr#4 = phi( bnkcpy_vram_address::@1/bnkcpy_vram_address::addr#6 ) + bnkcpy_vram_address::$21 = bnkcpy_vram_address::addr#4 == $c000 + bnkcpy_vram_address::$22 = ! bnkcpy_vram_address::$21 + if(bnkcpy_vram_address::$22) goto bnkcpy_vram_address::@3 + to:bnkcpy_vram_address::@4 +bnkcpy_vram_address::@3: scope:[bnkcpy_vram_address] from bnkcpy_vram_address::@2 bnkcpy_vram_address::@4 + bnkcpy_vram_address::bank#5 = phi( bnkcpy_vram_address::@2/bnkcpy_vram_address::bank#3, bnkcpy_vram_address::@4/bnkcpy_vram_address::bank#1 ) + bnkcpy_vram_address::end#2 = phi( bnkcpy_vram_address::@2/bnkcpy_vram_address::end#3, bnkcpy_vram_address::@4/bnkcpy_vram_address::end#4 ) + bnkcpy_vram_address::pos#3 = phi( bnkcpy_vram_address::@2/bnkcpy_vram_address::pos#4, bnkcpy_vram_address::@4/bnkcpy_vram_address::pos#5 ) + bnkcpy_vram_address::addr#5 = phi( bnkcpy_vram_address::@2/bnkcpy_vram_address::addr#4, bnkcpy_vram_address::@4/bnkcpy_vram_address::addr#3 ) + *VERA_DATA0 = *bnkcpy_vram_address::addr#5 + bnkcpy_vram_address::addr#2 = ++ bnkcpy_vram_address::addr#5 + bnkcpy_vram_address::pos#1 = ++ bnkcpy_vram_address::pos#3 + to:bnkcpy_vram_address::@1 +bnkcpy_vram_address::@4: scope:[bnkcpy_vram_address] from bnkcpy_vram_address::@2 + bnkcpy_vram_address::end#4 = phi( bnkcpy_vram_address::@2/bnkcpy_vram_address::end#3 ) + bnkcpy_vram_address::pos#5 = phi( bnkcpy_vram_address::@2/bnkcpy_vram_address::pos#4 ) + bnkcpy_vram_address::bank#2 = phi( bnkcpy_vram_address::@2/bnkcpy_vram_address::bank#3 ) + bnkcpy_vram_address::bank#1 = ++ bnkcpy_vram_address::bank#2 + *((byte*)$9f61) = (byte)bnkcpy_vram_address::bank#1 + bnkcpy_vram_address::addr#3 = ((byte*)) $a000 + to:bnkcpy_vram_address::@3 +bnkcpy_vram_address::@return: scope:[bnkcpy_vram_address] from bnkcpy_vram_address::@1 + return + to:@return + +void memcpy_in_vram(byte memcpy_in_vram::dest_bank , void* memcpy_in_vram::dest , byte memcpy_in_vram::dest_increment , byte memcpy_in_vram::src_bank , void* memcpy_in_vram::src , byte memcpy_in_vram::src_increment , word memcpy_in_vram::num) +memcpy_in_vram: scope:[memcpy_in_vram] from insertup::@2 + memcpy_in_vram::num#2 = phi( insertup::@2/memcpy_in_vram::num#0 ) + memcpy_in_vram::dest_bank#1 = phi( insertup::@2/memcpy_in_vram::dest_bank#0 ) + memcpy_in_vram::dest_increment#1 = phi( insertup::@2/memcpy_in_vram::dest_increment#0 ) + memcpy_in_vram::dest#1 = phi( insertup::@2/memcpy_in_vram::dest#0 ) + memcpy_in_vram::src_bank#1 = phi( insertup::@2/memcpy_in_vram::src_bank#0 ) + memcpy_in_vram::src_increment#1 = phi( insertup::@2/memcpy_in_vram::src_increment#0 ) + memcpy_in_vram::src#1 = phi( insertup::@2/memcpy_in_vram::src#0 ) + *VERA_CTRL = *VERA_CTRL & ~VERA_ADDRSEL + memcpy_in_vram::$0 = < memcpy_in_vram::src#1 + *VERA_ADDRX_L = memcpy_in_vram::$0 + memcpy_in_vram::$1 = > memcpy_in_vram::src#1 + *VERA_ADDRX_M = memcpy_in_vram::$1 + memcpy_in_vram::$2 = memcpy_in_vram::src_increment#1 | memcpy_in_vram::src_bank#1 + *VERA_ADDRX_H = memcpy_in_vram::$2 + *VERA_CTRL = *VERA_CTRL | VERA_ADDRSEL + memcpy_in_vram::$3 = < memcpy_in_vram::dest#1 + *VERA_ADDRX_L = memcpy_in_vram::$3 + memcpy_in_vram::$4 = > memcpy_in_vram::dest#1 + *VERA_ADDRX_M = memcpy_in_vram::$4 + memcpy_in_vram::$5 = memcpy_in_vram::dest_increment#1 | memcpy_in_vram::dest_bank#1 + *VERA_ADDRX_H = memcpy_in_vram::$5 + memcpy_in_vram::i#0 = 0 + to:memcpy_in_vram::@1 +memcpy_in_vram::@1: scope:[memcpy_in_vram] from memcpy_in_vram memcpy_in_vram::@2 + memcpy_in_vram::num#1 = phi( memcpy_in_vram/memcpy_in_vram::num#2, memcpy_in_vram::@2/memcpy_in_vram::num#3 ) + memcpy_in_vram::i#2 = phi( memcpy_in_vram/memcpy_in_vram::i#0, memcpy_in_vram::@2/memcpy_in_vram::i#1 ) + memcpy_in_vram::$6 = memcpy_in_vram::i#2 < memcpy_in_vram::num#1 + if(memcpy_in_vram::$6) goto memcpy_in_vram::@2 + to:memcpy_in_vram::@return +memcpy_in_vram::@2: scope:[memcpy_in_vram] from memcpy_in_vram::@1 + memcpy_in_vram::num#3 = phi( memcpy_in_vram::@1/memcpy_in_vram::num#1 ) + memcpy_in_vram::i#3 = phi( memcpy_in_vram::@1/memcpy_in_vram::i#2 ) + *VERA_DATA1 = *VERA_DATA0 + memcpy_in_vram::i#1 = ++ memcpy_in_vram::i#3 + to:memcpy_in_vram::@1 +memcpy_in_vram::@return: scope:[memcpy_in_vram] from memcpy_in_vram::@1 + return + to:@return + +void vera_layer_set_config(byte vera_layer_set_config::layer , byte vera_layer_set_config::config) +vera_layer_set_config: scope:[vera_layer_set_config] from vera_layer_mode_tile::@24 + vera_layer_set_config::config#1 = phi( vera_layer_mode_tile::@24/vera_layer_set_config::config#0 ) + vera_layer_set_config::layer#1 = phi( vera_layer_mode_tile::@24/vera_layer_set_config::layer#0 ) + vera_layer_set_config::$0 = vera_layer_set_config::layer#1 * SIZEOF_POINTER + vera_layer_set_config::addr#0 = vera_layer_config[vera_layer_set_config::$0] + *vera_layer_set_config::addr#0 = vera_layer_set_config::config#1 + to:vera_layer_set_config::@return +vera_layer_set_config::@return: scope:[vera_layer_set_config] from vera_layer_set_config + return + to:@return + +void vera_layer_set_text_color_mode(byte vera_layer_set_text_color_mode::layer , byte vera_layer_set_text_color_mode::color_mode) +vera_layer_set_text_color_mode: scope:[vera_layer_set_text_color_mode] from main vera_layer_mode_text::@2 vera_layer_mode_text::@3 + vera_layer_set_text_color_mode::color_mode#3 = phi( main/vera_layer_set_text_color_mode::color_mode#2, vera_layer_mode_text::@2/vera_layer_set_text_color_mode::color_mode#0, vera_layer_mode_text::@3/vera_layer_set_text_color_mode::color_mode#1 ) + vera_layer_set_text_color_mode::layer#3 = phi( main/vera_layer_set_text_color_mode::layer#2, vera_layer_mode_text::@2/vera_layer_set_text_color_mode::layer#0, vera_layer_mode_text::@3/vera_layer_set_text_color_mode::layer#1 ) + vera_layer_set_text_color_mode::$0 = vera_layer_set_text_color_mode::layer#3 * SIZEOF_POINTER + vera_layer_set_text_color_mode::addr#0 = vera_layer_config[vera_layer_set_text_color_mode::$0] + *vera_layer_set_text_color_mode::addr#0 = *vera_layer_set_text_color_mode::addr#0 & ~VERA_LAYER_CONFIG_256C + *vera_layer_set_text_color_mode::addr#0 = *vera_layer_set_text_color_mode::addr#0 | vera_layer_set_text_color_mode::color_mode#3 + to:vera_layer_set_text_color_mode::@return +vera_layer_set_text_color_mode::@return: scope:[vera_layer_set_text_color_mode] from vera_layer_set_text_color_mode + return + to:@return + +void vera_layer_set_mapbase(byte vera_layer_set_mapbase::layer , byte vera_layer_set_mapbase::mapbase) +vera_layer_set_mapbase: scope:[vera_layer_set_mapbase] from conio_x16_init::@7 conio_x16_init::@8 vera_layer_mode_tile::@33 + vera_layer_set_mapbase::mapbase#3 = phi( conio_x16_init::@7/vera_layer_set_mapbase::mapbase#1, conio_x16_init::@8/vera_layer_set_mapbase::mapbase#2, vera_layer_mode_tile::@33/vera_layer_set_mapbase::mapbase#0 ) + vera_layer_set_mapbase::layer#3 = phi( conio_x16_init::@7/vera_layer_set_mapbase::layer#1, conio_x16_init::@8/vera_layer_set_mapbase::layer#2, vera_layer_mode_tile::@33/vera_layer_set_mapbase::layer#0 ) + vera_layer_set_mapbase::$0 = vera_layer_set_mapbase::layer#3 * SIZEOF_POINTER + vera_layer_set_mapbase::addr#0 = vera_layer_mapbase[vera_layer_set_mapbase::$0] + *vera_layer_set_mapbase::addr#0 = vera_layer_set_mapbase::mapbase#3 + to:vera_layer_set_mapbase::@return +vera_layer_set_mapbase::@return: scope:[vera_layer_set_mapbase] from vera_layer_set_mapbase + return + to:@return + +byte vera_layer_get_mapbase_bank(byte vera_layer_get_mapbase_bank::layer) +vera_layer_get_mapbase_bank: scope:[vera_layer_get_mapbase_bank] from screenlayer + vera_layer_get_mapbase_bank::layer#1 = phi( screenlayer/vera_layer_get_mapbase_bank::layer#0 ) + vera_layer_get_mapbase_bank::return#0 = vera_mapbase_bank[vera_layer_get_mapbase_bank::layer#1] + to:vera_layer_get_mapbase_bank::@return +vera_layer_get_mapbase_bank::@return: scope:[vera_layer_get_mapbase_bank] from vera_layer_get_mapbase_bank + vera_layer_get_mapbase_bank::return#3 = phi( vera_layer_get_mapbase_bank/vera_layer_get_mapbase_bank::return#0 ) + vera_layer_get_mapbase_bank::return#1 = vera_layer_get_mapbase_bank::return#3 + return + to:@return + +word vera_layer_get_mapbase_offset(byte vera_layer_get_mapbase_offset::layer) +vera_layer_get_mapbase_offset: scope:[vera_layer_get_mapbase_offset] from screenlayer::@3 + vera_layer_get_mapbase_offset::layer#1 = phi( screenlayer::@3/vera_layer_get_mapbase_offset::layer#0 ) + vera_layer_get_mapbase_offset::$0 = vera_layer_get_mapbase_offset::layer#1 * SIZEOF_WORD + vera_layer_get_mapbase_offset::return#0 = vera_mapbase_offset[vera_layer_get_mapbase_offset::$0] + to:vera_layer_get_mapbase_offset::@return +vera_layer_get_mapbase_offset::@return: scope:[vera_layer_get_mapbase_offset] from vera_layer_get_mapbase_offset + vera_layer_get_mapbase_offset::return#3 = phi( vera_layer_get_mapbase_offset/vera_layer_get_mapbase_offset::return#0 ) + vera_layer_get_mapbase_offset::return#1 = vera_layer_get_mapbase_offset::return#3 + return + to:@return + +void vera_layer_set_tilebase(byte vera_layer_set_tilebase::layer , byte vera_layer_set_tilebase::tilebase) +vera_layer_set_tilebase: scope:[vera_layer_set_tilebase] from vera_layer_mode_tile::@32 + vera_layer_set_tilebase::tilebase#1 = phi( vera_layer_mode_tile::@32/vera_layer_set_tilebase::tilebase#0 ) + vera_layer_set_tilebase::layer#1 = phi( vera_layer_mode_tile::@32/vera_layer_set_tilebase::layer#0 ) + vera_layer_set_tilebase::$0 = vera_layer_set_tilebase::layer#1 * SIZEOF_POINTER + vera_layer_set_tilebase::addr#0 = vera_layer_tilebase[vera_layer_set_tilebase::$0] + *vera_layer_set_tilebase::addr#0 = vera_layer_set_tilebase::tilebase#1 + to:vera_layer_set_tilebase::@return +vera_layer_set_tilebase::@return: scope:[vera_layer_set_tilebase] from vera_layer_set_tilebase + return + to:@return + +byte vera_layer_set_textcolor(byte vera_layer_set_textcolor::layer , byte vera_layer_set_textcolor::color) +vera_layer_set_textcolor: scope:[vera_layer_set_textcolor] from conio_x16_init::@5 + vera_layer_set_textcolor::color#1 = phi( conio_x16_init::@5/vera_layer_set_textcolor::color#0 ) + vera_layer_set_textcolor::layer#1 = phi( conio_x16_init::@5/vera_layer_set_textcolor::layer#0 ) + vera_layer_set_textcolor::old#0 = vera_layer_textcolor[vera_layer_set_textcolor::layer#1] + vera_layer_textcolor[vera_layer_set_textcolor::layer#1] = vera_layer_set_textcolor::color#1 + vera_layer_set_textcolor::return#0 = vera_layer_set_textcolor::old#0 + to:vera_layer_set_textcolor::@return +vera_layer_set_textcolor::@return: scope:[vera_layer_set_textcolor] from vera_layer_set_textcolor + vera_layer_set_textcolor::return#3 = phi( vera_layer_set_textcolor/vera_layer_set_textcolor::return#0 ) + vera_layer_set_textcolor::return#1 = vera_layer_set_textcolor::return#3 + return + to:@return + +byte vera_layer_get_textcolor(byte vera_layer_get_textcolor::layer) +vera_layer_get_textcolor: scope:[vera_layer_get_textcolor] from clrscr::@7 + vera_layer_get_textcolor::layer#1 = phi( clrscr::@7/vera_layer_get_textcolor::layer#0 ) + vera_layer_get_textcolor::return#0 = vera_layer_textcolor[vera_layer_get_textcolor::layer#1] + to:vera_layer_get_textcolor::@return +vera_layer_get_textcolor::@return: scope:[vera_layer_get_textcolor] from vera_layer_get_textcolor + vera_layer_get_textcolor::return#3 = phi( vera_layer_get_textcolor/vera_layer_get_textcolor::return#0 ) + vera_layer_get_textcolor::return#1 = vera_layer_get_textcolor::return#3 + return + to:@return + +byte vera_layer_set_backcolor(byte vera_layer_set_backcolor::layer , byte vera_layer_set_backcolor::color) +vera_layer_set_backcolor: scope:[vera_layer_set_backcolor] from conio_x16_init::@6 + vera_layer_set_backcolor::color#1 = phi( conio_x16_init::@6/vera_layer_set_backcolor::color#0 ) + vera_layer_set_backcolor::layer#1 = phi( conio_x16_init::@6/vera_layer_set_backcolor::layer#0 ) + vera_layer_set_backcolor::old#0 = vera_layer_backcolor[vera_layer_set_backcolor::layer#1] + vera_layer_backcolor[vera_layer_set_backcolor::layer#1] = vera_layer_set_backcolor::color#1 + vera_layer_set_backcolor::return#0 = vera_layer_set_backcolor::old#0 + to:vera_layer_set_backcolor::@return +vera_layer_set_backcolor::@return: scope:[vera_layer_set_backcolor] from vera_layer_set_backcolor + vera_layer_set_backcolor::return#3 = phi( vera_layer_set_backcolor/vera_layer_set_backcolor::return#0 ) + vera_layer_set_backcolor::return#1 = vera_layer_set_backcolor::return#3 + return + to:@return + +byte vera_layer_get_backcolor(byte vera_layer_get_backcolor::layer) +vera_layer_get_backcolor: scope:[vera_layer_get_backcolor] from clrscr + vera_layer_get_backcolor::layer#1 = phi( clrscr/vera_layer_get_backcolor::layer#0 ) + vera_layer_get_backcolor::return#0 = vera_layer_backcolor[vera_layer_get_backcolor::layer#1] + to:vera_layer_get_backcolor::@return +vera_layer_get_backcolor::@return: scope:[vera_layer_get_backcolor] from vera_layer_get_backcolor + vera_layer_get_backcolor::return#3 = phi( vera_layer_get_backcolor/vera_layer_get_backcolor::return#0 ) + vera_layer_get_backcolor::return#1 = vera_layer_get_backcolor::return#3 + return + to:@return + +byte vera_layer_get_color(byte vera_layer_get_color::layer) +vera_layer_get_color: scope:[vera_layer_get_color] from clearline cputc + vera_layer_get_color::layer#2 = phi( clearline/vera_layer_get_color::layer#1, cputc/vera_layer_get_color::layer#0 ) + vera_layer_get_color::$3 = vera_layer_get_color::layer#2 * SIZEOF_POINTER + vera_layer_get_color::addr#0 = vera_layer_config[vera_layer_get_color::$3] + vera_layer_get_color::$0 = *vera_layer_get_color::addr#0 & VERA_LAYER_CONFIG_256C + vera_layer_get_color::$4 = 0 != vera_layer_get_color::$0 + if(vera_layer_get_color::$4) goto vera_layer_get_color::@1 + to:vera_layer_get_color::@2 +vera_layer_get_color::@1: scope:[vera_layer_get_color] from vera_layer_get_color + vera_layer_get_color::layer#3 = phi( vera_layer_get_color/vera_layer_get_color::layer#2 ) + vera_layer_get_color::return#0 = vera_layer_textcolor[vera_layer_get_color::layer#3] + to:vera_layer_get_color::@return +vera_layer_get_color::@2: scope:[vera_layer_get_color] from vera_layer_get_color + vera_layer_get_color::layer#4 = phi( vera_layer_get_color/vera_layer_get_color::layer#2 ) + vera_layer_get_color::$1 = vera_layer_backcolor[vera_layer_get_color::layer#4] << 4 + vera_layer_get_color::$2 = vera_layer_get_color::$1 | vera_layer_textcolor[vera_layer_get_color::layer#4] + vera_layer_get_color::return#1 = vera_layer_get_color::$2 + to:vera_layer_get_color::@return +vera_layer_get_color::@return: scope:[vera_layer_get_color] from vera_layer_get_color::@1 vera_layer_get_color::@2 + vera_layer_get_color::return#5 = phi( vera_layer_get_color::@1/vera_layer_get_color::return#0, vera_layer_get_color::@2/vera_layer_get_color::return#1 ) + vera_layer_get_color::return#2 = vera_layer_get_color::return#5 + return + to:@return + +byte vera_layer_get_rowshift(byte vera_layer_get_rowshift::layer) +vera_layer_get_rowshift: scope:[vera_layer_get_rowshift] from screenlayer::@1 + vera_layer_get_rowshift::layer#1 = phi( screenlayer::@1/vera_layer_get_rowshift::layer#0 ) + vera_layer_get_rowshift::return#0 = vera_layer_rowshift[vera_layer_get_rowshift::layer#1] + to:vera_layer_get_rowshift::@return +vera_layer_get_rowshift::@return: scope:[vera_layer_get_rowshift] from vera_layer_get_rowshift + vera_layer_get_rowshift::return#3 = phi( vera_layer_get_rowshift/vera_layer_get_rowshift::return#0 ) + vera_layer_get_rowshift::return#1 = vera_layer_get_rowshift::return#3 + return + to:@return + +word vera_layer_get_rowskip(byte vera_layer_get_rowskip::layer) +vera_layer_get_rowskip: scope:[vera_layer_get_rowskip] from screenlayer::@5 + vera_layer_get_rowskip::layer#1 = phi( screenlayer::@5/vera_layer_get_rowskip::layer#0 ) + vera_layer_get_rowskip::$0 = vera_layer_get_rowskip::layer#1 * SIZEOF_WORD + vera_layer_get_rowskip::return#0 = vera_layer_rowskip[vera_layer_get_rowskip::$0] + to:vera_layer_get_rowskip::@return +vera_layer_get_rowskip::@return: scope:[vera_layer_get_rowskip] from vera_layer_get_rowskip + vera_layer_get_rowskip::return#3 = phi( vera_layer_get_rowskip/vera_layer_get_rowskip::return#0 ) + vera_layer_get_rowskip::return#1 = vera_layer_get_rowskip::return#3 + return + to:@return + +void vera_layer_mode_tile(byte vera_layer_mode_tile::layer , dword vera_layer_mode_tile::mapbase_address , dword vera_layer_mode_tile::tilebase_address , word vera_layer_mode_tile::mapwidth , word vera_layer_mode_tile::mapheight , byte vera_layer_mode_tile::tilewidth , byte vera_layer_mode_tile::tileheight , byte vera_layer_mode_tile::color_depth) +vera_layer_mode_tile: scope:[vera_layer_mode_tile] from vera_layer_mode_text + vera_layer_mode_tile::tileheight#30 = phi( vera_layer_mode_text/vera_layer_mode_tile::tileheight#0 ) + vera_layer_mode_tile::tilewidth#26 = phi( vera_layer_mode_text/vera_layer_mode_tile::tilewidth#0 ) + vera_layer_mode_tile::tilebase_address#26 = phi( vera_layer_mode_text/vera_layer_mode_tile::tilebase_address#1 ) + vera_layer_mode_tile::mapbase_address#25 = phi( vera_layer_mode_text/vera_layer_mode_tile::mapbase_address#1 ) + vera_layer_mode_tile::mapheight#18 = phi( vera_layer_mode_text/vera_layer_mode_tile::mapheight#0 ) + vera_layer_mode_tile::layer#30 = phi( vera_layer_mode_text/vera_layer_mode_tile::layer#0 ) + vera_layer_mode_tile::mapwidth#10 = phi( vera_layer_mode_text/vera_layer_mode_tile::mapwidth#0 ) + vera_layer_mode_tile::color_depth#1 = phi( vera_layer_mode_text/vera_layer_mode_tile::color_depth#0 ) + vera_layer_mode_tile::config#0 = 0 + if(vera_layer_mode_tile::color_depth#1==1) goto vera_layer_mode_tile::@4 + to:vera_layer_mode_tile::@1 +vera_layer_mode_tile::@4: scope:[vera_layer_mode_tile] from vera_layer_mode_tile + vera_layer_mode_tile::tileheight#26 = phi( vera_layer_mode_tile/vera_layer_mode_tile::tileheight#30 ) + vera_layer_mode_tile::tilewidth#22 = phi( vera_layer_mode_tile/vera_layer_mode_tile::tilewidth#26 ) + vera_layer_mode_tile::tilebase_address#22 = phi( vera_layer_mode_tile/vera_layer_mode_tile::tilebase_address#26 ) + vera_layer_mode_tile::mapbase_address#21 = phi( vera_layer_mode_tile/vera_layer_mode_tile::mapbase_address#25 ) + vera_layer_mode_tile::mapheight#14 = phi( vera_layer_mode_tile/vera_layer_mode_tile::mapheight#18 ) + vera_layer_mode_tile::layer#22 = phi( vera_layer_mode_tile/vera_layer_mode_tile::layer#30 ) + vera_layer_mode_tile::mapwidth#6 = phi( vera_layer_mode_tile/vera_layer_mode_tile::mapwidth#10 ) + vera_layer_mode_tile::config#13 = phi( vera_layer_mode_tile/vera_layer_mode_tile::config#0 ) + vera_layer_mode_tile::config#1 = vera_layer_mode_tile::config#13 | VERA_LAYER_COLOR_DEPTH_1BPP + to:vera_layer_mode_tile::@8 +vera_layer_mode_tile::@1: scope:[vera_layer_mode_tile] from vera_layer_mode_tile + vera_layer_mode_tile::tileheight#31 = phi( vera_layer_mode_tile/vera_layer_mode_tile::tileheight#30 ) + vera_layer_mode_tile::tilewidth#27 = phi( vera_layer_mode_tile/vera_layer_mode_tile::tilewidth#26 ) + vera_layer_mode_tile::tilebase_address#27 = phi( vera_layer_mode_tile/vera_layer_mode_tile::tilebase_address#26 ) + vera_layer_mode_tile::mapbase_address#26 = phi( vera_layer_mode_tile/vera_layer_mode_tile::mapbase_address#25 ) + vera_layer_mode_tile::mapheight#19 = phi( vera_layer_mode_tile/vera_layer_mode_tile::mapheight#18 ) + vera_layer_mode_tile::layer#31 = phi( vera_layer_mode_tile/vera_layer_mode_tile::layer#30 ) + vera_layer_mode_tile::mapwidth#11 = phi( vera_layer_mode_tile/vera_layer_mode_tile::mapwidth#10 ) + vera_layer_mode_tile::config#26 = phi( vera_layer_mode_tile/vera_layer_mode_tile::config#0 ) + vera_layer_mode_tile::color_depth#2 = phi( vera_layer_mode_tile/vera_layer_mode_tile::color_depth#1 ) + if(vera_layer_mode_tile::color_depth#2==2) goto vera_layer_mode_tile::@5 + to:vera_layer_mode_tile::@2 +vera_layer_mode_tile::@5: scope:[vera_layer_mode_tile] from vera_layer_mode_tile::@1 + vera_layer_mode_tile::tileheight#27 = phi( vera_layer_mode_tile::@1/vera_layer_mode_tile::tileheight#31 ) + vera_layer_mode_tile::tilewidth#23 = phi( vera_layer_mode_tile::@1/vera_layer_mode_tile::tilewidth#27 ) + vera_layer_mode_tile::tilebase_address#23 = phi( vera_layer_mode_tile::@1/vera_layer_mode_tile::tilebase_address#27 ) + vera_layer_mode_tile::mapbase_address#22 = phi( vera_layer_mode_tile::@1/vera_layer_mode_tile::mapbase_address#26 ) + vera_layer_mode_tile::mapheight#15 = phi( vera_layer_mode_tile::@1/vera_layer_mode_tile::mapheight#19 ) + vera_layer_mode_tile::layer#23 = phi( vera_layer_mode_tile::@1/vera_layer_mode_tile::layer#31 ) + vera_layer_mode_tile::mapwidth#7 = phi( vera_layer_mode_tile::@1/vera_layer_mode_tile::mapwidth#11 ) + vera_layer_mode_tile::config#14 = phi( vera_layer_mode_tile::@1/vera_layer_mode_tile::config#26 ) + vera_layer_mode_tile::config#2 = vera_layer_mode_tile::config#14 | VERA_LAYER_COLOR_DEPTH_2BPP + to:vera_layer_mode_tile::@8 +vera_layer_mode_tile::@2: scope:[vera_layer_mode_tile] from vera_layer_mode_tile::@1 + vera_layer_mode_tile::tileheight#32 = phi( vera_layer_mode_tile::@1/vera_layer_mode_tile::tileheight#31 ) + vera_layer_mode_tile::tilewidth#28 = phi( vera_layer_mode_tile::@1/vera_layer_mode_tile::tilewidth#27 ) + vera_layer_mode_tile::tilebase_address#28 = phi( vera_layer_mode_tile::@1/vera_layer_mode_tile::tilebase_address#27 ) + vera_layer_mode_tile::mapbase_address#27 = phi( vera_layer_mode_tile::@1/vera_layer_mode_tile::mapbase_address#26 ) + vera_layer_mode_tile::mapheight#20 = phi( vera_layer_mode_tile::@1/vera_layer_mode_tile::mapheight#19 ) + vera_layer_mode_tile::layer#32 = phi( vera_layer_mode_tile::@1/vera_layer_mode_tile::layer#31 ) + vera_layer_mode_tile::mapwidth#12 = phi( vera_layer_mode_tile::@1/vera_layer_mode_tile::mapwidth#11 ) + vera_layer_mode_tile::config#27 = phi( vera_layer_mode_tile::@1/vera_layer_mode_tile::config#26 ) + vera_layer_mode_tile::color_depth#3 = phi( vera_layer_mode_tile::@1/vera_layer_mode_tile::color_depth#2 ) + if(vera_layer_mode_tile::color_depth#3==4) goto vera_layer_mode_tile::@6 + to:vera_layer_mode_tile::@3 +vera_layer_mode_tile::@6: scope:[vera_layer_mode_tile] from vera_layer_mode_tile::@2 + vera_layer_mode_tile::tileheight#28 = phi( vera_layer_mode_tile::@2/vera_layer_mode_tile::tileheight#32 ) + vera_layer_mode_tile::tilewidth#24 = phi( vera_layer_mode_tile::@2/vera_layer_mode_tile::tilewidth#28 ) + vera_layer_mode_tile::tilebase_address#24 = phi( vera_layer_mode_tile::@2/vera_layer_mode_tile::tilebase_address#28 ) + vera_layer_mode_tile::mapbase_address#23 = phi( vera_layer_mode_tile::@2/vera_layer_mode_tile::mapbase_address#27 ) + vera_layer_mode_tile::mapheight#16 = phi( vera_layer_mode_tile::@2/vera_layer_mode_tile::mapheight#20 ) + vera_layer_mode_tile::layer#24 = phi( vera_layer_mode_tile::@2/vera_layer_mode_tile::layer#32 ) + vera_layer_mode_tile::mapwidth#8 = phi( vera_layer_mode_tile::@2/vera_layer_mode_tile::mapwidth#12 ) + vera_layer_mode_tile::config#15 = phi( vera_layer_mode_tile::@2/vera_layer_mode_tile::config#27 ) + vera_layer_mode_tile::config#3 = vera_layer_mode_tile::config#15 | VERA_LAYER_COLOR_DEPTH_4BPP + to:vera_layer_mode_tile::@8 +vera_layer_mode_tile::@3: scope:[vera_layer_mode_tile] from vera_layer_mode_tile::@2 + vera_layer_mode_tile::tileheight#25 = phi( vera_layer_mode_tile::@2/vera_layer_mode_tile::tileheight#32 ) + vera_layer_mode_tile::tilewidth#21 = phi( vera_layer_mode_tile::@2/vera_layer_mode_tile::tilewidth#28 ) + vera_layer_mode_tile::tilebase_address#21 = phi( vera_layer_mode_tile::@2/vera_layer_mode_tile::tilebase_address#28 ) + vera_layer_mode_tile::mapbase_address#20 = phi( vera_layer_mode_tile::@2/vera_layer_mode_tile::mapbase_address#27 ) + vera_layer_mode_tile::mapheight#13 = phi( vera_layer_mode_tile::@2/vera_layer_mode_tile::mapheight#20 ) + vera_layer_mode_tile::layer#21 = phi( vera_layer_mode_tile::@2/vera_layer_mode_tile::layer#32 ) + vera_layer_mode_tile::mapwidth#5 = phi( vera_layer_mode_tile::@2/vera_layer_mode_tile::mapwidth#12 ) + vera_layer_mode_tile::config#28 = phi( vera_layer_mode_tile::@2/vera_layer_mode_tile::config#27 ) + vera_layer_mode_tile::color_depth#4 = phi( vera_layer_mode_tile::@2/vera_layer_mode_tile::color_depth#3 ) + if(vera_layer_mode_tile::color_depth#4==8) goto vera_layer_mode_tile::@7 + to:vera_layer_mode_tile::@8 +vera_layer_mode_tile::@7: scope:[vera_layer_mode_tile] from vera_layer_mode_tile::@3 + vera_layer_mode_tile::tileheight#29 = phi( vera_layer_mode_tile::@3/vera_layer_mode_tile::tileheight#25 ) + vera_layer_mode_tile::tilewidth#25 = phi( vera_layer_mode_tile::@3/vera_layer_mode_tile::tilewidth#21 ) + vera_layer_mode_tile::tilebase_address#25 = phi( vera_layer_mode_tile::@3/vera_layer_mode_tile::tilebase_address#21 ) + vera_layer_mode_tile::mapbase_address#24 = phi( vera_layer_mode_tile::@3/vera_layer_mode_tile::mapbase_address#20 ) + vera_layer_mode_tile::mapheight#17 = phi( vera_layer_mode_tile::@3/vera_layer_mode_tile::mapheight#13 ) + vera_layer_mode_tile::layer#25 = phi( vera_layer_mode_tile::@3/vera_layer_mode_tile::layer#21 ) + vera_layer_mode_tile::mapwidth#9 = phi( vera_layer_mode_tile::@3/vera_layer_mode_tile::mapwidth#5 ) + vera_layer_mode_tile::config#16 = phi( vera_layer_mode_tile::@3/vera_layer_mode_tile::config#28 ) + vera_layer_mode_tile::config#4 = vera_layer_mode_tile::config#16 | VERA_LAYER_COLOR_DEPTH_8BPP + to:vera_layer_mode_tile::@8 +vera_layer_mode_tile::@8: scope:[vera_layer_mode_tile] from vera_layer_mode_tile::@3 vera_layer_mode_tile::@4 vera_layer_mode_tile::@5 vera_layer_mode_tile::@6 vera_layer_mode_tile::@7 + vera_layer_mode_tile::tileheight#22 = phi( vera_layer_mode_tile::@3/vera_layer_mode_tile::tileheight#25, vera_layer_mode_tile::@4/vera_layer_mode_tile::tileheight#26, vera_layer_mode_tile::@5/vera_layer_mode_tile::tileheight#27, vera_layer_mode_tile::@6/vera_layer_mode_tile::tileheight#28, vera_layer_mode_tile::@7/vera_layer_mode_tile::tileheight#29 ) + vera_layer_mode_tile::tilewidth#18 = phi( vera_layer_mode_tile::@3/vera_layer_mode_tile::tilewidth#21, vera_layer_mode_tile::@4/vera_layer_mode_tile::tilewidth#22, vera_layer_mode_tile::@5/vera_layer_mode_tile::tilewidth#23, vera_layer_mode_tile::@6/vera_layer_mode_tile::tilewidth#24, vera_layer_mode_tile::@7/vera_layer_mode_tile::tilewidth#25 ) + vera_layer_mode_tile::tilebase_address#18 = phi( vera_layer_mode_tile::@3/vera_layer_mode_tile::tilebase_address#21, vera_layer_mode_tile::@4/vera_layer_mode_tile::tilebase_address#22, vera_layer_mode_tile::@5/vera_layer_mode_tile::tilebase_address#23, vera_layer_mode_tile::@6/vera_layer_mode_tile::tilebase_address#24, vera_layer_mode_tile::@7/vera_layer_mode_tile::tilebase_address#25 ) + vera_layer_mode_tile::mapbase_address#17 = phi( vera_layer_mode_tile::@3/vera_layer_mode_tile::mapbase_address#20, vera_layer_mode_tile::@4/vera_layer_mode_tile::mapbase_address#21, vera_layer_mode_tile::@5/vera_layer_mode_tile::mapbase_address#22, vera_layer_mode_tile::@6/vera_layer_mode_tile::mapbase_address#23, vera_layer_mode_tile::@7/vera_layer_mode_tile::mapbase_address#24 ) + vera_layer_mode_tile::mapheight#10 = phi( vera_layer_mode_tile::@3/vera_layer_mode_tile::mapheight#13, vera_layer_mode_tile::@4/vera_layer_mode_tile::mapheight#14, vera_layer_mode_tile::@5/vera_layer_mode_tile::mapheight#15, vera_layer_mode_tile::@6/vera_layer_mode_tile::mapheight#16, vera_layer_mode_tile::@7/vera_layer_mode_tile::mapheight#17 ) + vera_layer_mode_tile::layer#9 = phi( vera_layer_mode_tile::@3/vera_layer_mode_tile::layer#21, vera_layer_mode_tile::@4/vera_layer_mode_tile::layer#22, vera_layer_mode_tile::@5/vera_layer_mode_tile::layer#23, vera_layer_mode_tile::@6/vera_layer_mode_tile::layer#24, vera_layer_mode_tile::@7/vera_layer_mode_tile::layer#25 ) + vera_layer_mode_tile::config#29 = phi( vera_layer_mode_tile::@3/vera_layer_mode_tile::config#28, vera_layer_mode_tile::@4/vera_layer_mode_tile::config#1, vera_layer_mode_tile::@5/vera_layer_mode_tile::config#2, vera_layer_mode_tile::@6/vera_layer_mode_tile::config#3, vera_layer_mode_tile::@7/vera_layer_mode_tile::config#4 ) + vera_layer_mode_tile::mapwidth#1 = phi( vera_layer_mode_tile::@3/vera_layer_mode_tile::mapwidth#5, vera_layer_mode_tile::@4/vera_layer_mode_tile::mapwidth#6, vera_layer_mode_tile::@5/vera_layer_mode_tile::mapwidth#7, vera_layer_mode_tile::@6/vera_layer_mode_tile::mapwidth#8, vera_layer_mode_tile::@7/vera_layer_mode_tile::mapwidth#9 ) + if(vera_layer_mode_tile::mapwidth#1==$20) goto vera_layer_mode_tile::@12 + to:vera_layer_mode_tile::@9 +vera_layer_mode_tile::@12: scope:[vera_layer_mode_tile] from vera_layer_mode_tile::@8 + vera_layer_mode_tile::tileheight#18 = phi( vera_layer_mode_tile::@8/vera_layer_mode_tile::tileheight#22 ) + vera_layer_mode_tile::tilewidth#14 = phi( vera_layer_mode_tile::@8/vera_layer_mode_tile::tilewidth#18 ) + vera_layer_mode_tile::tilebase_address#14 = phi( vera_layer_mode_tile::@8/vera_layer_mode_tile::tilebase_address#18 ) + vera_layer_mode_tile::mapbase_address#13 = phi( vera_layer_mode_tile::@8/vera_layer_mode_tile::mapbase_address#17 ) + vera_layer_mode_tile::mapheight#6 = phi( vera_layer_mode_tile::@8/vera_layer_mode_tile::mapheight#10 ) + vera_layer_mode_tile::layer#1 = phi( vera_layer_mode_tile::@8/vera_layer_mode_tile::layer#9 ) + vera_layer_mode_tile::config#17 = phi( vera_layer_mode_tile::@8/vera_layer_mode_tile::config#29 ) + vera_layer_mode_tile::config#5 = vera_layer_mode_tile::config#17 | VERA_LAYER_WIDTH_32 + vera_layer_rowshift[vera_layer_mode_tile::layer#1] = 6 + vera_layer_mode_tile::$13 = vera_layer_mode_tile::layer#1 * SIZEOF_WORD + vera_layer_rowskip[vera_layer_mode_tile::$13] = $40 + to:vera_layer_mode_tile::@16 +vera_layer_mode_tile::@9: scope:[vera_layer_mode_tile] from vera_layer_mode_tile::@8 + vera_layer_mode_tile::tileheight#23 = phi( vera_layer_mode_tile::@8/vera_layer_mode_tile::tileheight#22 ) + vera_layer_mode_tile::tilewidth#19 = phi( vera_layer_mode_tile::@8/vera_layer_mode_tile::tilewidth#18 ) + vera_layer_mode_tile::tilebase_address#19 = phi( vera_layer_mode_tile::@8/vera_layer_mode_tile::tilebase_address#18 ) + vera_layer_mode_tile::mapbase_address#18 = phi( vera_layer_mode_tile::@8/vera_layer_mode_tile::mapbase_address#17 ) + vera_layer_mode_tile::mapheight#11 = phi( vera_layer_mode_tile::@8/vera_layer_mode_tile::mapheight#10 ) + vera_layer_mode_tile::layer#10 = phi( vera_layer_mode_tile::@8/vera_layer_mode_tile::layer#9 ) + vera_layer_mode_tile::config#30 = phi( vera_layer_mode_tile::@8/vera_layer_mode_tile::config#29 ) + vera_layer_mode_tile::mapwidth#2 = phi( vera_layer_mode_tile::@8/vera_layer_mode_tile::mapwidth#1 ) + if(vera_layer_mode_tile::mapwidth#2==$40) goto vera_layer_mode_tile::@13 + to:vera_layer_mode_tile::@10 +vera_layer_mode_tile::@13: scope:[vera_layer_mode_tile] from vera_layer_mode_tile::@9 + vera_layer_mode_tile::tileheight#19 = phi( vera_layer_mode_tile::@9/vera_layer_mode_tile::tileheight#23 ) + vera_layer_mode_tile::tilewidth#15 = phi( vera_layer_mode_tile::@9/vera_layer_mode_tile::tilewidth#19 ) + vera_layer_mode_tile::tilebase_address#15 = phi( vera_layer_mode_tile::@9/vera_layer_mode_tile::tilebase_address#19 ) + vera_layer_mode_tile::mapbase_address#14 = phi( vera_layer_mode_tile::@9/vera_layer_mode_tile::mapbase_address#18 ) + vera_layer_mode_tile::mapheight#7 = phi( vera_layer_mode_tile::@9/vera_layer_mode_tile::mapheight#11 ) + vera_layer_mode_tile::layer#2 = phi( vera_layer_mode_tile::@9/vera_layer_mode_tile::layer#10 ) + vera_layer_mode_tile::config#18 = phi( vera_layer_mode_tile::@9/vera_layer_mode_tile::config#30 ) + vera_layer_mode_tile::config#6 = vera_layer_mode_tile::config#18 | VERA_LAYER_WIDTH_64 + vera_layer_rowshift[vera_layer_mode_tile::layer#2] = 7 + vera_layer_mode_tile::$14 = vera_layer_mode_tile::layer#2 * SIZEOF_WORD + vera_layer_rowskip[vera_layer_mode_tile::$14] = $80 + to:vera_layer_mode_tile::@16 +vera_layer_mode_tile::@10: scope:[vera_layer_mode_tile] from vera_layer_mode_tile::@9 + vera_layer_mode_tile::tileheight#24 = phi( vera_layer_mode_tile::@9/vera_layer_mode_tile::tileheight#23 ) + vera_layer_mode_tile::tilewidth#20 = phi( vera_layer_mode_tile::@9/vera_layer_mode_tile::tilewidth#19 ) + vera_layer_mode_tile::tilebase_address#20 = phi( vera_layer_mode_tile::@9/vera_layer_mode_tile::tilebase_address#19 ) + vera_layer_mode_tile::mapbase_address#19 = phi( vera_layer_mode_tile::@9/vera_layer_mode_tile::mapbase_address#18 ) + vera_layer_mode_tile::mapheight#12 = phi( vera_layer_mode_tile::@9/vera_layer_mode_tile::mapheight#11 ) + vera_layer_mode_tile::layer#11 = phi( vera_layer_mode_tile::@9/vera_layer_mode_tile::layer#10 ) + vera_layer_mode_tile::config#31 = phi( vera_layer_mode_tile::@9/vera_layer_mode_tile::config#30 ) + vera_layer_mode_tile::mapwidth#3 = phi( vera_layer_mode_tile::@9/vera_layer_mode_tile::mapwidth#2 ) + if(vera_layer_mode_tile::mapwidth#3==$80) goto vera_layer_mode_tile::@14 + to:vera_layer_mode_tile::@11 +vera_layer_mode_tile::@14: scope:[vera_layer_mode_tile] from vera_layer_mode_tile::@10 + vera_layer_mode_tile::tileheight#20 = phi( vera_layer_mode_tile::@10/vera_layer_mode_tile::tileheight#24 ) + vera_layer_mode_tile::tilewidth#16 = phi( vera_layer_mode_tile::@10/vera_layer_mode_tile::tilewidth#20 ) + vera_layer_mode_tile::tilebase_address#16 = phi( vera_layer_mode_tile::@10/vera_layer_mode_tile::tilebase_address#20 ) + vera_layer_mode_tile::mapbase_address#15 = phi( vera_layer_mode_tile::@10/vera_layer_mode_tile::mapbase_address#19 ) + vera_layer_mode_tile::mapheight#8 = phi( vera_layer_mode_tile::@10/vera_layer_mode_tile::mapheight#12 ) + vera_layer_mode_tile::layer#3 = phi( vera_layer_mode_tile::@10/vera_layer_mode_tile::layer#11 ) + vera_layer_mode_tile::config#19 = phi( vera_layer_mode_tile::@10/vera_layer_mode_tile::config#31 ) + vera_layer_mode_tile::config#7 = vera_layer_mode_tile::config#19 | VERA_LAYER_WIDTH_128 + vera_layer_rowshift[vera_layer_mode_tile::layer#3] = 8 + vera_layer_mode_tile::$15 = vera_layer_mode_tile::layer#3 * SIZEOF_WORD + vera_layer_rowskip[vera_layer_mode_tile::$15] = $100 + to:vera_layer_mode_tile::@16 +vera_layer_mode_tile::@11: scope:[vera_layer_mode_tile] from vera_layer_mode_tile::@10 + vera_layer_mode_tile::tileheight#17 = phi( vera_layer_mode_tile::@10/vera_layer_mode_tile::tileheight#24 ) + vera_layer_mode_tile::tilewidth#13 = phi( vera_layer_mode_tile::@10/vera_layer_mode_tile::tilewidth#20 ) + vera_layer_mode_tile::tilebase_address#13 = phi( vera_layer_mode_tile::@10/vera_layer_mode_tile::tilebase_address#20 ) + vera_layer_mode_tile::mapbase_address#12 = phi( vera_layer_mode_tile::@10/vera_layer_mode_tile::mapbase_address#19 ) + vera_layer_mode_tile::mapheight#5 = phi( vera_layer_mode_tile::@10/vera_layer_mode_tile::mapheight#12 ) + vera_layer_mode_tile::layer#12 = phi( vera_layer_mode_tile::@10/vera_layer_mode_tile::layer#11 ) + vera_layer_mode_tile::config#32 = phi( vera_layer_mode_tile::@10/vera_layer_mode_tile::config#31 ) + vera_layer_mode_tile::mapwidth#4 = phi( vera_layer_mode_tile::@10/vera_layer_mode_tile::mapwidth#3 ) + if(vera_layer_mode_tile::mapwidth#4==$100) goto vera_layer_mode_tile::@15 + to:vera_layer_mode_tile::@16 +vera_layer_mode_tile::@15: scope:[vera_layer_mode_tile] from vera_layer_mode_tile::@11 + vera_layer_mode_tile::tileheight#21 = phi( vera_layer_mode_tile::@11/vera_layer_mode_tile::tileheight#17 ) + vera_layer_mode_tile::tilewidth#17 = phi( vera_layer_mode_tile::@11/vera_layer_mode_tile::tilewidth#13 ) + vera_layer_mode_tile::tilebase_address#17 = phi( vera_layer_mode_tile::@11/vera_layer_mode_tile::tilebase_address#13 ) + vera_layer_mode_tile::mapbase_address#16 = phi( vera_layer_mode_tile::@11/vera_layer_mode_tile::mapbase_address#12 ) + vera_layer_mode_tile::mapheight#9 = phi( vera_layer_mode_tile::@11/vera_layer_mode_tile::mapheight#5 ) + vera_layer_mode_tile::layer#4 = phi( vera_layer_mode_tile::@11/vera_layer_mode_tile::layer#12 ) + vera_layer_mode_tile::config#20 = phi( vera_layer_mode_tile::@11/vera_layer_mode_tile::config#32 ) + vera_layer_mode_tile::config#8 = vera_layer_mode_tile::config#20 | VERA_LAYER_WIDTH_256 + vera_layer_rowshift[vera_layer_mode_tile::layer#4] = 9 + vera_layer_mode_tile::$16 = vera_layer_mode_tile::layer#4 * SIZEOF_WORD + vera_layer_rowskip[vera_layer_mode_tile::$16] = $200 + to:vera_layer_mode_tile::@16 +vera_layer_mode_tile::@16: scope:[vera_layer_mode_tile] from vera_layer_mode_tile::@11 vera_layer_mode_tile::@12 vera_layer_mode_tile::@13 vera_layer_mode_tile::@14 vera_layer_mode_tile::@15 + vera_layer_mode_tile::tileheight#14 = phi( vera_layer_mode_tile::@11/vera_layer_mode_tile::tileheight#17, vera_layer_mode_tile::@12/vera_layer_mode_tile::tileheight#18, vera_layer_mode_tile::@13/vera_layer_mode_tile::tileheight#19, vera_layer_mode_tile::@14/vera_layer_mode_tile::tileheight#20, vera_layer_mode_tile::@15/vera_layer_mode_tile::tileheight#21 ) + vera_layer_mode_tile::tilewidth#10 = phi( vera_layer_mode_tile::@11/vera_layer_mode_tile::tilewidth#13, vera_layer_mode_tile::@12/vera_layer_mode_tile::tilewidth#14, vera_layer_mode_tile::@13/vera_layer_mode_tile::tilewidth#15, vera_layer_mode_tile::@14/vera_layer_mode_tile::tilewidth#16, vera_layer_mode_tile::@15/vera_layer_mode_tile::tilewidth#17 ) + vera_layer_mode_tile::tilebase_address#10 = phi( vera_layer_mode_tile::@11/vera_layer_mode_tile::tilebase_address#13, vera_layer_mode_tile::@12/vera_layer_mode_tile::tilebase_address#14, vera_layer_mode_tile::@13/vera_layer_mode_tile::tilebase_address#15, vera_layer_mode_tile::@14/vera_layer_mode_tile::tilebase_address#16, vera_layer_mode_tile::@15/vera_layer_mode_tile::tilebase_address#17 ) + vera_layer_mode_tile::mapbase_address#9 = phi( vera_layer_mode_tile::@11/vera_layer_mode_tile::mapbase_address#12, vera_layer_mode_tile::@12/vera_layer_mode_tile::mapbase_address#13, vera_layer_mode_tile::@13/vera_layer_mode_tile::mapbase_address#14, vera_layer_mode_tile::@14/vera_layer_mode_tile::mapbase_address#15, vera_layer_mode_tile::@15/vera_layer_mode_tile::mapbase_address#16 ) + vera_layer_mode_tile::layer#26 = phi( vera_layer_mode_tile::@11/vera_layer_mode_tile::layer#12, vera_layer_mode_tile::@12/vera_layer_mode_tile::layer#1, vera_layer_mode_tile::@13/vera_layer_mode_tile::layer#2, vera_layer_mode_tile::@14/vera_layer_mode_tile::layer#3, vera_layer_mode_tile::@15/vera_layer_mode_tile::layer#4 ) + vera_layer_mode_tile::config#33 = phi( vera_layer_mode_tile::@11/vera_layer_mode_tile::config#32, vera_layer_mode_tile::@12/vera_layer_mode_tile::config#5, vera_layer_mode_tile::@13/vera_layer_mode_tile::config#6, vera_layer_mode_tile::@14/vera_layer_mode_tile::config#7, vera_layer_mode_tile::@15/vera_layer_mode_tile::config#8 ) + vera_layer_mode_tile::mapheight#1 = phi( vera_layer_mode_tile::@11/vera_layer_mode_tile::mapheight#5, vera_layer_mode_tile::@12/vera_layer_mode_tile::mapheight#6, vera_layer_mode_tile::@13/vera_layer_mode_tile::mapheight#7, vera_layer_mode_tile::@14/vera_layer_mode_tile::mapheight#8, vera_layer_mode_tile::@15/vera_layer_mode_tile::mapheight#9 ) + if(vera_layer_mode_tile::mapheight#1==$20) goto vera_layer_mode_tile::@20 + to:vera_layer_mode_tile::@17 +vera_layer_mode_tile::@20: scope:[vera_layer_mode_tile] from vera_layer_mode_tile::@16 + vera_layer_mode_tile::tileheight#10 = phi( vera_layer_mode_tile::@16/vera_layer_mode_tile::tileheight#14 ) + vera_layer_mode_tile::tilewidth#6 = phi( vera_layer_mode_tile::@16/vera_layer_mode_tile::tilewidth#10 ) + vera_layer_mode_tile::tilebase_address#6 = phi( vera_layer_mode_tile::@16/vera_layer_mode_tile::tilebase_address#10 ) + vera_layer_mode_tile::mapbase_address#5 = phi( vera_layer_mode_tile::@16/vera_layer_mode_tile::mapbase_address#9 ) + vera_layer_mode_tile::layer#14 = phi( vera_layer_mode_tile::@16/vera_layer_mode_tile::layer#26 ) + vera_layer_mode_tile::config#21 = phi( vera_layer_mode_tile::@16/vera_layer_mode_tile::config#33 ) + vera_layer_mode_tile::config#9 = vera_layer_mode_tile::config#21 | VERA_LAYER_HEIGHT_32 + to:vera_layer_mode_tile::@24 +vera_layer_mode_tile::@17: scope:[vera_layer_mode_tile] from vera_layer_mode_tile::@16 + vera_layer_mode_tile::tileheight#15 = phi( vera_layer_mode_tile::@16/vera_layer_mode_tile::tileheight#14 ) + vera_layer_mode_tile::tilewidth#11 = phi( vera_layer_mode_tile::@16/vera_layer_mode_tile::tilewidth#10 ) + vera_layer_mode_tile::tilebase_address#11 = phi( vera_layer_mode_tile::@16/vera_layer_mode_tile::tilebase_address#10 ) + vera_layer_mode_tile::mapbase_address#10 = phi( vera_layer_mode_tile::@16/vera_layer_mode_tile::mapbase_address#9 ) + vera_layer_mode_tile::layer#27 = phi( vera_layer_mode_tile::@16/vera_layer_mode_tile::layer#26 ) + vera_layer_mode_tile::config#34 = phi( vera_layer_mode_tile::@16/vera_layer_mode_tile::config#33 ) + vera_layer_mode_tile::mapheight#2 = phi( vera_layer_mode_tile::@16/vera_layer_mode_tile::mapheight#1 ) + if(vera_layer_mode_tile::mapheight#2==$40) goto vera_layer_mode_tile::@21 + to:vera_layer_mode_tile::@18 +vera_layer_mode_tile::@21: scope:[vera_layer_mode_tile] from vera_layer_mode_tile::@17 + vera_layer_mode_tile::tileheight#11 = phi( vera_layer_mode_tile::@17/vera_layer_mode_tile::tileheight#15 ) + vera_layer_mode_tile::tilewidth#7 = phi( vera_layer_mode_tile::@17/vera_layer_mode_tile::tilewidth#11 ) + vera_layer_mode_tile::tilebase_address#7 = phi( vera_layer_mode_tile::@17/vera_layer_mode_tile::tilebase_address#11 ) + vera_layer_mode_tile::mapbase_address#6 = phi( vera_layer_mode_tile::@17/vera_layer_mode_tile::mapbase_address#10 ) + vera_layer_mode_tile::layer#15 = phi( vera_layer_mode_tile::@17/vera_layer_mode_tile::layer#27 ) + vera_layer_mode_tile::config#22 = phi( vera_layer_mode_tile::@17/vera_layer_mode_tile::config#34 ) + vera_layer_mode_tile::config#10 = vera_layer_mode_tile::config#22 | VERA_LAYER_HEIGHT_64 + to:vera_layer_mode_tile::@24 +vera_layer_mode_tile::@18: scope:[vera_layer_mode_tile] from vera_layer_mode_tile::@17 + vera_layer_mode_tile::tileheight#16 = phi( vera_layer_mode_tile::@17/vera_layer_mode_tile::tileheight#15 ) + vera_layer_mode_tile::tilewidth#12 = phi( vera_layer_mode_tile::@17/vera_layer_mode_tile::tilewidth#11 ) + vera_layer_mode_tile::tilebase_address#12 = phi( vera_layer_mode_tile::@17/vera_layer_mode_tile::tilebase_address#11 ) + vera_layer_mode_tile::mapbase_address#11 = phi( vera_layer_mode_tile::@17/vera_layer_mode_tile::mapbase_address#10 ) + vera_layer_mode_tile::layer#28 = phi( vera_layer_mode_tile::@17/vera_layer_mode_tile::layer#27 ) + vera_layer_mode_tile::config#35 = phi( vera_layer_mode_tile::@17/vera_layer_mode_tile::config#34 ) + vera_layer_mode_tile::mapheight#3 = phi( vera_layer_mode_tile::@17/vera_layer_mode_tile::mapheight#2 ) + if(vera_layer_mode_tile::mapheight#3==$80) goto vera_layer_mode_tile::@22 + to:vera_layer_mode_tile::@19 +vera_layer_mode_tile::@22: scope:[vera_layer_mode_tile] from vera_layer_mode_tile::@18 + vera_layer_mode_tile::tileheight#12 = phi( vera_layer_mode_tile::@18/vera_layer_mode_tile::tileheight#16 ) + vera_layer_mode_tile::tilewidth#8 = phi( vera_layer_mode_tile::@18/vera_layer_mode_tile::tilewidth#12 ) + vera_layer_mode_tile::tilebase_address#8 = phi( vera_layer_mode_tile::@18/vera_layer_mode_tile::tilebase_address#12 ) + vera_layer_mode_tile::mapbase_address#7 = phi( vera_layer_mode_tile::@18/vera_layer_mode_tile::mapbase_address#11 ) + vera_layer_mode_tile::layer#16 = phi( vera_layer_mode_tile::@18/vera_layer_mode_tile::layer#28 ) + vera_layer_mode_tile::config#23 = phi( vera_layer_mode_tile::@18/vera_layer_mode_tile::config#35 ) + vera_layer_mode_tile::config#11 = vera_layer_mode_tile::config#23 | VERA_LAYER_HEIGHT_128 + to:vera_layer_mode_tile::@24 +vera_layer_mode_tile::@19: scope:[vera_layer_mode_tile] from vera_layer_mode_tile::@18 + vera_layer_mode_tile::tileheight#9 = phi( vera_layer_mode_tile::@18/vera_layer_mode_tile::tileheight#16 ) + vera_layer_mode_tile::tilewidth#5 = phi( vera_layer_mode_tile::@18/vera_layer_mode_tile::tilewidth#12 ) + vera_layer_mode_tile::tilebase_address#5 = phi( vera_layer_mode_tile::@18/vera_layer_mode_tile::tilebase_address#12 ) + vera_layer_mode_tile::mapbase_address#4 = phi( vera_layer_mode_tile::@18/vera_layer_mode_tile::mapbase_address#11 ) + vera_layer_mode_tile::layer#13 = phi( vera_layer_mode_tile::@18/vera_layer_mode_tile::layer#28 ) + vera_layer_mode_tile::config#36 = phi( vera_layer_mode_tile::@18/vera_layer_mode_tile::config#35 ) + vera_layer_mode_tile::mapheight#4 = phi( vera_layer_mode_tile::@18/vera_layer_mode_tile::mapheight#3 ) + if(vera_layer_mode_tile::mapheight#4==$100) goto vera_layer_mode_tile::@23 + to:vera_layer_mode_tile::@24 +vera_layer_mode_tile::@23: scope:[vera_layer_mode_tile] from vera_layer_mode_tile::@19 + vera_layer_mode_tile::tileheight#13 = phi( vera_layer_mode_tile::@19/vera_layer_mode_tile::tileheight#9 ) + vera_layer_mode_tile::tilewidth#9 = phi( vera_layer_mode_tile::@19/vera_layer_mode_tile::tilewidth#5 ) + vera_layer_mode_tile::tilebase_address#9 = phi( vera_layer_mode_tile::@19/vera_layer_mode_tile::tilebase_address#5 ) + vera_layer_mode_tile::mapbase_address#8 = phi( vera_layer_mode_tile::@19/vera_layer_mode_tile::mapbase_address#4 ) + vera_layer_mode_tile::layer#17 = phi( vera_layer_mode_tile::@19/vera_layer_mode_tile::layer#13 ) + vera_layer_mode_tile::config#24 = phi( vera_layer_mode_tile::@19/vera_layer_mode_tile::config#36 ) + vera_layer_mode_tile::config#12 = vera_layer_mode_tile::config#24 | VERA_LAYER_HEIGHT_256 + to:vera_layer_mode_tile::@24 +vera_layer_mode_tile::@24: scope:[vera_layer_mode_tile] from vera_layer_mode_tile::@19 vera_layer_mode_tile::@20 vera_layer_mode_tile::@21 vera_layer_mode_tile::@22 vera_layer_mode_tile::@23 + vera_layer_mode_tile::tileheight#8 = phi( vera_layer_mode_tile::@19/vera_layer_mode_tile::tileheight#9, vera_layer_mode_tile::@20/vera_layer_mode_tile::tileheight#10, vera_layer_mode_tile::@21/vera_layer_mode_tile::tileheight#11, vera_layer_mode_tile::@22/vera_layer_mode_tile::tileheight#12, vera_layer_mode_tile::@23/vera_layer_mode_tile::tileheight#13 ) + vera_layer_mode_tile::tilewidth#4 = phi( vera_layer_mode_tile::@19/vera_layer_mode_tile::tilewidth#5, vera_layer_mode_tile::@20/vera_layer_mode_tile::tilewidth#6, vera_layer_mode_tile::@21/vera_layer_mode_tile::tilewidth#7, vera_layer_mode_tile::@22/vera_layer_mode_tile::tilewidth#8, vera_layer_mode_tile::@23/vera_layer_mode_tile::tilewidth#9 ) + vera_layer_mode_tile::tilebase_address#4 = phi( vera_layer_mode_tile::@19/vera_layer_mode_tile::tilebase_address#5, vera_layer_mode_tile::@20/vera_layer_mode_tile::tilebase_address#6, vera_layer_mode_tile::@21/vera_layer_mode_tile::tilebase_address#7, vera_layer_mode_tile::@22/vera_layer_mode_tile::tilebase_address#8, vera_layer_mode_tile::@23/vera_layer_mode_tile::tilebase_address#9 ) + vera_layer_mode_tile::mapbase_address#3 = phi( vera_layer_mode_tile::@19/vera_layer_mode_tile::mapbase_address#4, vera_layer_mode_tile::@20/vera_layer_mode_tile::mapbase_address#5, vera_layer_mode_tile::@21/vera_layer_mode_tile::mapbase_address#6, vera_layer_mode_tile::@22/vera_layer_mode_tile::mapbase_address#7, vera_layer_mode_tile::@23/vera_layer_mode_tile::mapbase_address#8 ) + vera_layer_mode_tile::config#25 = phi( vera_layer_mode_tile::@19/vera_layer_mode_tile::config#36, vera_layer_mode_tile::@20/vera_layer_mode_tile::config#9, vera_layer_mode_tile::@21/vera_layer_mode_tile::config#10, vera_layer_mode_tile::@22/vera_layer_mode_tile::config#11, vera_layer_mode_tile::@23/vera_layer_mode_tile::config#12 ) + vera_layer_mode_tile::layer#5 = phi( vera_layer_mode_tile::@19/vera_layer_mode_tile::layer#13, vera_layer_mode_tile::@20/vera_layer_mode_tile::layer#14, vera_layer_mode_tile::@21/vera_layer_mode_tile::layer#15, vera_layer_mode_tile::@22/vera_layer_mode_tile::layer#16, vera_layer_mode_tile::@23/vera_layer_mode_tile::layer#17 ) + vera_layer_set_config::layer#0 = vera_layer_mode_tile::layer#5 + vera_layer_set_config::config#0 = vera_layer_mode_tile::config#25 + call vera_layer_set_config + to:vera_layer_mode_tile::@33 +vera_layer_mode_tile::@33: scope:[vera_layer_mode_tile] from vera_layer_mode_tile::@24 + vera_layer_mode_tile::tileheight#7 = phi( vera_layer_mode_tile::@24/vera_layer_mode_tile::tileheight#8 ) + vera_layer_mode_tile::tilewidth#3 = phi( vera_layer_mode_tile::@24/vera_layer_mode_tile::tilewidth#4 ) + vera_layer_mode_tile::tilebase_address#3 = phi( vera_layer_mode_tile::@24/vera_layer_mode_tile::tilebase_address#4 ) + vera_layer_mode_tile::layer#6 = phi( vera_layer_mode_tile::@24/vera_layer_mode_tile::layer#5 ) + vera_layer_mode_tile::mapbase_address#2 = phi( vera_layer_mode_tile::@24/vera_layer_mode_tile::mapbase_address#3 ) + vera_layer_mode_tile::$1 = < vera_layer_mode_tile::mapbase_address#2 + vera_layer_mode_tile::$17 = vera_layer_mode_tile::layer#6 * SIZEOF_WORD + vera_mapbase_offset[vera_layer_mode_tile::$17] = vera_layer_mode_tile::$1 + vera_layer_mode_tile::$2 = > vera_layer_mode_tile::mapbase_address#2 + vera_mapbase_bank[vera_layer_mode_tile::layer#6] = (byte)vera_layer_mode_tile::$2 + vera_layer_mode_tile::$18 = vera_layer_mode_tile::layer#6 * SIZEOF_DWORD + vera_mapbase_address[vera_layer_mode_tile::$18] = vera_layer_mode_tile::mapbase_address#2 + vera_layer_mode_tile::$3 = vera_layer_mode_tile::mapbase_address#2 >> 1 + vera_layer_mode_tile::mapbase_address#0 = vera_layer_mode_tile::$3 + vera_layer_mode_tile::$4 = < vera_layer_mode_tile::mapbase_address#0 + vera_layer_mode_tile::$5 = > vera_layer_mode_tile::$4 + vera_layer_mode_tile::mapbase#0 = vera_layer_mode_tile::$5 + vera_layer_set_mapbase::layer#0 = vera_layer_mode_tile::layer#6 + vera_layer_set_mapbase::mapbase#0 = vera_layer_mode_tile::mapbase#0 + call vera_layer_set_mapbase + to:vera_layer_mode_tile::@34 +vera_layer_mode_tile::@34: scope:[vera_layer_mode_tile] from vera_layer_mode_tile::@33 + vera_layer_mode_tile::tileheight#6 = phi( vera_layer_mode_tile::@33/vera_layer_mode_tile::tileheight#7 ) + vera_layer_mode_tile::tilewidth#1 = phi( vera_layer_mode_tile::@33/vera_layer_mode_tile::tilewidth#3 ) + vera_layer_mode_tile::layer#7 = phi( vera_layer_mode_tile::@33/vera_layer_mode_tile::layer#6 ) + vera_layer_mode_tile::tilebase_address#2 = phi( vera_layer_mode_tile::@33/vera_layer_mode_tile::tilebase_address#3 ) + vera_layer_mode_tile::$7 = < vera_layer_mode_tile::tilebase_address#2 + vera_layer_mode_tile::$19 = vera_layer_mode_tile::layer#7 * SIZEOF_WORD + vera_tilebase_offset[vera_layer_mode_tile::$19] = vera_layer_mode_tile::$7 + vera_layer_mode_tile::$8 = > vera_layer_mode_tile::tilebase_address#2 + vera_tilebase_bank[vera_layer_mode_tile::layer#7] = (byte)vera_layer_mode_tile::$8 + vera_layer_mode_tile::$20 = vera_layer_mode_tile::layer#7 * SIZEOF_DWORD + vera_tilebase_address[vera_layer_mode_tile::$20] = vera_layer_mode_tile::tilebase_address#2 + vera_layer_mode_tile::$9 = vera_layer_mode_tile::tilebase_address#2 >> 1 + vera_layer_mode_tile::tilebase_address#0 = vera_layer_mode_tile::$9 + vera_layer_mode_tile::$10 = < vera_layer_mode_tile::tilebase_address#0 + vera_layer_mode_tile::$11 = > vera_layer_mode_tile::$10 + vera_layer_mode_tile::tilebase#0 = vera_layer_mode_tile::$11 + vera_layer_mode_tile::tilebase#1 = vera_layer_mode_tile::tilebase#0 & VERA_LAYER_TILEBASE_MASK + if(vera_layer_mode_tile::tilewidth#1==8) goto vera_layer_mode_tile::@26 + to:vera_layer_mode_tile::@25 +vera_layer_mode_tile::@26: scope:[vera_layer_mode_tile] from vera_layer_mode_tile::@34 + vera_layer_mode_tile::layer#34 = phi( vera_layer_mode_tile::@34/vera_layer_mode_tile::layer#7 ) + vera_layer_mode_tile::tileheight#4 = phi( vera_layer_mode_tile::@34/vera_layer_mode_tile::tileheight#6 ) + vera_layer_mode_tile::tilebase#6 = phi( vera_layer_mode_tile::@34/vera_layer_mode_tile::tilebase#1 ) + vera_layer_mode_tile::tilebase#2 = vera_layer_mode_tile::tilebase#6 | VERA_TILEBASE_WIDTH_8 + to:vera_layer_mode_tile::@28 +vera_layer_mode_tile::@25: scope:[vera_layer_mode_tile] from vera_layer_mode_tile::@34 + vera_layer_mode_tile::layer#33 = phi( vera_layer_mode_tile::@34/vera_layer_mode_tile::layer#7 ) + vera_layer_mode_tile::tileheight#3 = phi( vera_layer_mode_tile::@34/vera_layer_mode_tile::tileheight#6 ) + vera_layer_mode_tile::tilebase#11 = phi( vera_layer_mode_tile::@34/vera_layer_mode_tile::tilebase#1 ) + vera_layer_mode_tile::tilewidth#2 = phi( vera_layer_mode_tile::@34/vera_layer_mode_tile::tilewidth#1 ) + if(vera_layer_mode_tile::tilewidth#2==$10) goto vera_layer_mode_tile::@27 + to:vera_layer_mode_tile::@28 +vera_layer_mode_tile::@27: scope:[vera_layer_mode_tile] from vera_layer_mode_tile::@25 + vera_layer_mode_tile::layer#35 = phi( vera_layer_mode_tile::@25/vera_layer_mode_tile::layer#33 ) + vera_layer_mode_tile::tileheight#5 = phi( vera_layer_mode_tile::@25/vera_layer_mode_tile::tileheight#3 ) + vera_layer_mode_tile::tilebase#7 = phi( vera_layer_mode_tile::@25/vera_layer_mode_tile::tilebase#11 ) + vera_layer_mode_tile::tilebase#3 = vera_layer_mode_tile::tilebase#7 | VERA_TILEBASE_WIDTH_16 + to:vera_layer_mode_tile::@28 +vera_layer_mode_tile::@28: scope:[vera_layer_mode_tile] from vera_layer_mode_tile::@25 vera_layer_mode_tile::@26 vera_layer_mode_tile::@27 + vera_layer_mode_tile::layer#29 = phi( vera_layer_mode_tile::@25/vera_layer_mode_tile::layer#33, vera_layer_mode_tile::@26/vera_layer_mode_tile::layer#34, vera_layer_mode_tile::@27/vera_layer_mode_tile::layer#35 ) + vera_layer_mode_tile::tilebase#12 = phi( vera_layer_mode_tile::@25/vera_layer_mode_tile::tilebase#11, vera_layer_mode_tile::@26/vera_layer_mode_tile::tilebase#2, vera_layer_mode_tile::@27/vera_layer_mode_tile::tilebase#3 ) + vera_layer_mode_tile::tileheight#1 = phi( vera_layer_mode_tile::@25/vera_layer_mode_tile::tileheight#3, vera_layer_mode_tile::@26/vera_layer_mode_tile::tileheight#4, vera_layer_mode_tile::@27/vera_layer_mode_tile::tileheight#5 ) + if(vera_layer_mode_tile::tileheight#1==8) goto vera_layer_mode_tile::@30 + to:vera_layer_mode_tile::@29 +vera_layer_mode_tile::@30: scope:[vera_layer_mode_tile] from vera_layer_mode_tile::@28 + vera_layer_mode_tile::layer#19 = phi( vera_layer_mode_tile::@28/vera_layer_mode_tile::layer#29 ) + vera_layer_mode_tile::tilebase#8 = phi( vera_layer_mode_tile::@28/vera_layer_mode_tile::tilebase#12 ) + vera_layer_mode_tile::tilebase#4 = vera_layer_mode_tile::tilebase#8 | VERA_TILEBASE_HEIGHT_8 + to:vera_layer_mode_tile::@32 +vera_layer_mode_tile::@29: scope:[vera_layer_mode_tile] from vera_layer_mode_tile::@28 + vera_layer_mode_tile::layer#18 = phi( vera_layer_mode_tile::@28/vera_layer_mode_tile::layer#29 ) + vera_layer_mode_tile::tilebase#13 = phi( vera_layer_mode_tile::@28/vera_layer_mode_tile::tilebase#12 ) + vera_layer_mode_tile::tileheight#2 = phi( vera_layer_mode_tile::@28/vera_layer_mode_tile::tileheight#1 ) + if(vera_layer_mode_tile::tileheight#2==$10) goto vera_layer_mode_tile::@31 + to:vera_layer_mode_tile::@32 +vera_layer_mode_tile::@31: scope:[vera_layer_mode_tile] from vera_layer_mode_tile::@29 + vera_layer_mode_tile::layer#20 = phi( vera_layer_mode_tile::@29/vera_layer_mode_tile::layer#18 ) + vera_layer_mode_tile::tilebase#9 = phi( vera_layer_mode_tile::@29/vera_layer_mode_tile::tilebase#13 ) + vera_layer_mode_tile::tilebase#5 = vera_layer_mode_tile::tilebase#9 | VERA_TILEBASE_HEIGHT_16 + to:vera_layer_mode_tile::@32 +vera_layer_mode_tile::@32: scope:[vera_layer_mode_tile] from vera_layer_mode_tile::@29 vera_layer_mode_tile::@30 vera_layer_mode_tile::@31 + vera_layer_mode_tile::tilebase#10 = phi( vera_layer_mode_tile::@29/vera_layer_mode_tile::tilebase#13, vera_layer_mode_tile::@30/vera_layer_mode_tile::tilebase#4, vera_layer_mode_tile::@31/vera_layer_mode_tile::tilebase#5 ) + vera_layer_mode_tile::layer#8 = phi( vera_layer_mode_tile::@29/vera_layer_mode_tile::layer#18, vera_layer_mode_tile::@30/vera_layer_mode_tile::layer#19, vera_layer_mode_tile::@31/vera_layer_mode_tile::layer#20 ) + vera_layer_set_tilebase::layer#0 = vera_layer_mode_tile::layer#8 + vera_layer_set_tilebase::tilebase#0 = vera_layer_mode_tile::tilebase#10 + call vera_layer_set_tilebase + to:vera_layer_mode_tile::@35 +vera_layer_mode_tile::@35: scope:[vera_layer_mode_tile] from vera_layer_mode_tile::@32 + to:vera_layer_mode_tile::@return +vera_layer_mode_tile::@return: scope:[vera_layer_mode_tile] from vera_layer_mode_tile::@35 + return + to:@return + +void vera_layer_mode_text(byte vera_layer_mode_text::layer , dword vera_layer_mode_text::mapbase_address , dword vera_layer_mode_text::tilebase_address , word vera_layer_mode_text::mapwidth , word vera_layer_mode_text::mapheight , byte vera_layer_mode_text::tilewidth , byte vera_layer_mode_text::tileheight , word vera_layer_mode_text::color_mode) +vera_layer_mode_text: scope:[vera_layer_mode_text] from conio_x16_init + vera_layer_mode_text::color_mode#3 = phi( conio_x16_init/vera_layer_mode_text::color_mode#0 ) + vera_layer_mode_text::tileheight#1 = phi( conio_x16_init/vera_layer_mode_text::tileheight#0 ) + vera_layer_mode_text::tilewidth#1 = phi( conio_x16_init/vera_layer_mode_text::tilewidth#0 ) + vera_layer_mode_text::mapheight#1 = phi( conio_x16_init/vera_layer_mode_text::mapheight#0 ) + vera_layer_mode_text::mapwidth#1 = phi( conio_x16_init/vera_layer_mode_text::mapwidth#0 ) + vera_layer_mode_text::tilebase_address#1 = phi( conio_x16_init/vera_layer_mode_text::tilebase_address#0 ) + vera_layer_mode_text::mapbase_address#1 = phi( conio_x16_init/vera_layer_mode_text::mapbase_address#0 ) + vera_layer_mode_text::layer#1 = phi( conio_x16_init/vera_layer_mode_text::layer#0 ) + vera_layer_mode_tile::layer#0 = vera_layer_mode_text::layer#1 + vera_layer_mode_tile::mapbase_address#1 = vera_layer_mode_text::mapbase_address#1 + vera_layer_mode_tile::tilebase_address#1 = vera_layer_mode_text::tilebase_address#1 + vera_layer_mode_tile::mapwidth#0 = vera_layer_mode_text::mapwidth#1 + vera_layer_mode_tile::mapheight#0 = vera_layer_mode_text::mapheight#1 + vera_layer_mode_tile::tilewidth#0 = vera_layer_mode_text::tilewidth#1 + vera_layer_mode_tile::tileheight#0 = vera_layer_mode_text::tileheight#1 + vera_layer_mode_tile::color_depth#0 = 1 + call vera_layer_mode_tile + to:vera_layer_mode_text::@4 +vera_layer_mode_text::@4: scope:[vera_layer_mode_text] from vera_layer_mode_text + vera_layer_mode_text::layer#4 = phi( vera_layer_mode_text/vera_layer_mode_text::layer#1 ) + vera_layer_mode_text::color_mode#1 = phi( vera_layer_mode_text/vera_layer_mode_text::color_mode#3 ) + if(vera_layer_mode_text::color_mode#1==$10) goto vera_layer_mode_text::@2 + to:vera_layer_mode_text::@1 +vera_layer_mode_text::@2: scope:[vera_layer_mode_text] from vera_layer_mode_text::@4 + vera_layer_mode_text::layer#2 = phi( vera_layer_mode_text::@4/vera_layer_mode_text::layer#4 ) + vera_layer_set_text_color_mode::layer#0 = vera_layer_mode_text::layer#2 + vera_layer_set_text_color_mode::color_mode#0 = VERA_LAYER_CONFIG_16C + call vera_layer_set_text_color_mode + to:vera_layer_mode_text::@5 +vera_layer_mode_text::@5: scope:[vera_layer_mode_text] from vera_layer_mode_text::@2 + to:vera_layer_mode_text::@return +vera_layer_mode_text::@1: scope:[vera_layer_mode_text] from vera_layer_mode_text::@4 + vera_layer_mode_text::layer#5 = phi( vera_layer_mode_text::@4/vera_layer_mode_text::layer#4 ) + vera_layer_mode_text::color_mode#2 = phi( vera_layer_mode_text::@4/vera_layer_mode_text::color_mode#1 ) + if(vera_layer_mode_text::color_mode#2==$100) goto vera_layer_mode_text::@3 + to:vera_layer_mode_text::@return +vera_layer_mode_text::@3: scope:[vera_layer_mode_text] from vera_layer_mode_text::@1 + vera_layer_mode_text::layer#3 = phi( vera_layer_mode_text::@1/vera_layer_mode_text::layer#5 ) + vera_layer_set_text_color_mode::layer#1 = vera_layer_mode_text::layer#3 + vera_layer_set_text_color_mode::color_mode#1 = VERA_LAYER_CONFIG_256C + call vera_layer_set_text_color_mode + to:vera_layer_mode_text::@6 +vera_layer_mode_text::@6: scope:[vera_layer_mode_text] from vera_layer_mode_text::@3 + to:vera_layer_mode_text::@return +vera_layer_mode_text::@return: scope:[vera_layer_mode_text] from vera_layer_mode_text::@1 vera_layer_mode_text::@5 vera_layer_mode_text::@6 + return + to:@return + +void conio_x16_init() +conio_x16_init: scope:[conio_x16_init] from __start::__init1 + CONIO_SCREEN_TEXT#39 = phi( __start::__init1/CONIO_SCREEN_TEXT#6 ) + CONIO_SCREEN_BANK#36 = phi( __start::__init1/CONIO_SCREEN_BANK#6 ) + conio_x16_init::line#0 = *conio_x16_init::BASIC_CURSOR_LINE + vera_layer_mode_text::layer#0 = 1 + vera_layer_mode_text::mapbase_address#0 = (dword)0 + vera_layer_mode_text::tilebase_address#0 = (dword)$f800 + vera_layer_mode_text::mapwidth#0 = $80 + vera_layer_mode_text::mapheight#0 = $40 + vera_layer_mode_text::tilewidth#0 = 8 + vera_layer_mode_text::tileheight#0 = 8 + vera_layer_mode_text::color_mode#0 = $10 + call vera_layer_mode_text + to:conio_x16_init::@3 +conio_x16_init::@3: scope:[conio_x16_init] from conio_x16_init + conio_x16_init::line#9 = phi( conio_x16_init/conio_x16_init::line#0 ) + CONIO_SCREEN_TEXT#31 = phi( conio_x16_init/CONIO_SCREEN_TEXT#39 ) + CONIO_SCREEN_BANK#28 = phi( conio_x16_init/CONIO_SCREEN_BANK#36 ) + screensize::x#0 = &conio_screen_width + screensize::y#0 = &conio_screen_height + call screensize + to:conio_x16_init::@4 +conio_x16_init::@4: scope:[conio_x16_init] from conio_x16_init::@3 + conio_x16_init::line#8 = phi( conio_x16_init::@3/conio_x16_init::line#9 ) + CONIO_SCREEN_TEXT#22 = phi( conio_x16_init::@3/CONIO_SCREEN_TEXT#31 ) + CONIO_SCREEN_BANK#20 = phi( conio_x16_init::@3/CONIO_SCREEN_BANK#28 ) + screenlayer::layer#0 = 1 + call screenlayer + to:conio_x16_init::@5 +conio_x16_init::@5: scope:[conio_x16_init] from conio_x16_init::@4 + conio_x16_init::line#7 = phi( conio_x16_init::@4/conio_x16_init::line#8 ) + CONIO_SCREEN_TEXT#10 = phi( conio_x16_init::@4/CONIO_SCREEN_TEXT#3 ) + CONIO_SCREEN_BANK#10 = phi( conio_x16_init::@4/CONIO_SCREEN_BANK#3 ) + CONIO_SCREEN_BANK#0 = CONIO_SCREEN_BANK#10 + CONIO_SCREEN_TEXT#0 = CONIO_SCREEN_TEXT#10 + vera_layer_set_textcolor::layer#0 = 1 + vera_layer_set_textcolor::color#0 = WHITE + call vera_layer_set_textcolor + vera_layer_set_textcolor::return#2 = vera_layer_set_textcolor::return#1 + to:conio_x16_init::@6 +conio_x16_init::@6: scope:[conio_x16_init] from conio_x16_init::@5 + CONIO_SCREEN_TEXT#57 = phi( conio_x16_init::@5/CONIO_SCREEN_TEXT#0 ) + CONIO_SCREEN_BANK#55 = phi( conio_x16_init::@5/CONIO_SCREEN_BANK#0 ) + conio_x16_init::line#6 = phi( conio_x16_init::@5/conio_x16_init::line#7 ) + vera_layer_set_backcolor::layer#0 = 1 + vera_layer_set_backcolor::color#0 = BLUE + call vera_layer_set_backcolor + vera_layer_set_backcolor::return#2 = vera_layer_set_backcolor::return#1 + to:conio_x16_init::@7 +conio_x16_init::@7: scope:[conio_x16_init] from conio_x16_init::@6 + CONIO_SCREEN_TEXT#52 = phi( conio_x16_init::@6/CONIO_SCREEN_TEXT#57 ) + CONIO_SCREEN_BANK#50 = phi( conio_x16_init::@6/CONIO_SCREEN_BANK#55 ) + conio_x16_init::line#5 = phi( conio_x16_init::@6/conio_x16_init::line#6 ) + vera_layer_set_mapbase::layer#1 = 0 + vera_layer_set_mapbase::mapbase#1 = $20 + call vera_layer_set_mapbase + to:conio_x16_init::@8 +conio_x16_init::@8: scope:[conio_x16_init] from conio_x16_init::@7 + CONIO_SCREEN_TEXT#46 = phi( conio_x16_init::@7/CONIO_SCREEN_TEXT#52 ) + CONIO_SCREEN_BANK#44 = phi( conio_x16_init::@7/CONIO_SCREEN_BANK#50 ) + conio_x16_init::line#4 = phi( conio_x16_init::@7/conio_x16_init::line#5 ) + vera_layer_set_mapbase::layer#2 = 1 + vera_layer_set_mapbase::mapbase#2 = 0 + call vera_layer_set_mapbase + to:conio_x16_init::@9 +conio_x16_init::@9: scope:[conio_x16_init] from conio_x16_init::@8 + CONIO_SCREEN_TEXT#41 = phi( conio_x16_init::@8/CONIO_SCREEN_TEXT#46 ) + CONIO_SCREEN_BANK#38 = phi( conio_x16_init::@8/CONIO_SCREEN_BANK#44 ) + conio_x16_init::line#2 = phi( conio_x16_init::@8/conio_x16_init::line#4 ) + conio_x16_init::$7 = conio_x16_init::line#2 >= conio_screen_height + conio_x16_init::$8 = ! conio_x16_init::$7 + if(conio_x16_init::$8) goto conio_x16_init::@1 + to:conio_x16_init::@2 +conio_x16_init::@1: scope:[conio_x16_init] from conio_x16_init::@2 conio_x16_init::@9 + CONIO_SCREEN_TEXT#32 = phi( conio_x16_init::@2/CONIO_SCREEN_TEXT#40, conio_x16_init::@9/CONIO_SCREEN_TEXT#41 ) + CONIO_SCREEN_BANK#29 = phi( conio_x16_init::@2/CONIO_SCREEN_BANK#37, conio_x16_init::@9/CONIO_SCREEN_BANK#38 ) + conio_x16_init::line#3 = phi( conio_x16_init::@2/conio_x16_init::line#1, conio_x16_init::@9/conio_x16_init::line#2 ) + gotoxy::x#0 = 0 + gotoxy::y#0 = conio_x16_init::line#3 + call gotoxy + to:conio_x16_init::@10 +conio_x16_init::@10: scope:[conio_x16_init] from conio_x16_init::@1 + CONIO_SCREEN_TEXT#23 = phi( conio_x16_init::@1/CONIO_SCREEN_TEXT#32 ) + CONIO_SCREEN_BANK#21 = phi( conio_x16_init::@1/CONIO_SCREEN_BANK#29 ) + to:conio_x16_init::@return +conio_x16_init::@2: scope:[conio_x16_init] from conio_x16_init::@9 + CONIO_SCREEN_TEXT#40 = phi( conio_x16_init::@9/CONIO_SCREEN_TEXT#41 ) + CONIO_SCREEN_BANK#37 = phi( conio_x16_init::@9/CONIO_SCREEN_BANK#38 ) + conio_x16_init::$9 = conio_screen_height - 1 + conio_x16_init::line#1 = conio_x16_init::$9 + to:conio_x16_init::@1 +conio_x16_init::@return: scope:[conio_x16_init] from conio_x16_init::@10 + CONIO_SCREEN_TEXT#11 = phi( conio_x16_init::@10/CONIO_SCREEN_TEXT#23 ) + CONIO_SCREEN_BANK#11 = phi( conio_x16_init::@10/CONIO_SCREEN_BANK#21 ) + CONIO_SCREEN_BANK#1 = CONIO_SCREEN_BANK#11 + CONIO_SCREEN_TEXT#1 = CONIO_SCREEN_TEXT#11 + return + to:@return + +void clrscr() +clrscr: scope:[clrscr] from main::@2 + CONIO_SCREEN_BANK#45 = phi( main::@2/CONIO_SCREEN_BANK#4 ) + CONIO_SCREEN_TEXT#12 = phi( main::@2/CONIO_SCREEN_TEXT#4 ) + clrscr::line_text#0 = CONIO_SCREEN_TEXT#12 + vera_layer_get_backcolor::layer#0 = conio_screen_layer + call vera_layer_get_backcolor + vera_layer_get_backcolor::return#2 = vera_layer_get_backcolor::return#1 + to:clrscr::@7 +clrscr::@7: scope:[clrscr] from clrscr + CONIO_SCREEN_BANK#39 = phi( clrscr/CONIO_SCREEN_BANK#45 ) + clrscr::line_text#8 = phi( clrscr/clrscr::line_text#0 ) + vera_layer_get_backcolor::return#4 = phi( clrscr/vera_layer_get_backcolor::return#2 ) + clrscr::$0 = vera_layer_get_backcolor::return#4 + clrscr::$1 = clrscr::$0 << 4 + vera_layer_get_textcolor::layer#0 = conio_screen_layer + call vera_layer_get_textcolor + vera_layer_get_textcolor::return#2 = vera_layer_get_textcolor::return#1 + to:clrscr::@8 +clrscr::@8: scope:[clrscr] from clrscr::@7 + CONIO_SCREEN_BANK#31 = phi( clrscr::@7/CONIO_SCREEN_BANK#39 ) + clrscr::line_text#6 = phi( clrscr::@7/clrscr::line_text#8 ) + vera_layer_get_textcolor::return#4 = phi( clrscr::@7/vera_layer_get_textcolor::return#2 ) + clrscr::$2 = vera_layer_get_textcolor::return#4 + clrscr::$3 = clrscr::$1 | clrscr::$2 + clrscr::color#0 = clrscr::$3 + clrscr::l#0 = 0 + to:clrscr::@1 +clrscr::@1: scope:[clrscr] from clrscr::@6 clrscr::@8 + clrscr::color#4 = phi( clrscr::@6/clrscr::color#5, clrscr::@8/clrscr::color#0 ) + CONIO_SCREEN_BANK#22 = phi( clrscr::@6/CONIO_SCREEN_BANK#30, clrscr::@8/CONIO_SCREEN_BANK#31 ) + clrscr::line_text#4 = phi( clrscr::@6/clrscr::line_text#1, clrscr::@8/clrscr::line_text#6 ) + clrscr::l#2 = phi( clrscr::@6/clrscr::l#1, clrscr::@8/clrscr::l#0 ) + clrscr::$4 = clrscr::l#2 < conio_height + if(clrscr::$4) goto clrscr::@2 + to:clrscr::@3 +clrscr::@2: scope:[clrscr] from clrscr::@1 + clrscr::l#5 = phi( clrscr::@1/clrscr::l#2 ) + clrscr::color#3 = phi( clrscr::@1/clrscr::color#4 ) + CONIO_SCREEN_BANK#12 = phi( clrscr::@1/CONIO_SCREEN_BANK#22 ) + clrscr::line_text#2 = phi( clrscr::@1/clrscr::line_text#4 ) + clrscr::ch#0 = clrscr::line_text#2 + *VERA_CTRL = *VERA_CTRL & ~VERA_ADDRSEL + clrscr::$5 = < clrscr::ch#0 + *VERA_ADDRX_L = clrscr::$5 + clrscr::$6 = > clrscr::ch#0 + *VERA_ADDRX_M = clrscr::$6 + clrscr::$7 = CONIO_SCREEN_BANK#12 | VERA_INC_1 + *VERA_ADDRX_H = clrscr::$7 + clrscr::c#0 = 0 + to:clrscr::@4 +clrscr::@3: scope:[clrscr] from clrscr::@1 + conio_cursor_x[conio_screen_layer] = 0 + conio_cursor_y[conio_screen_layer] = 0 + clrscr::$9 = conio_screen_layer * SIZEOF_WORD + conio_line_text[clrscr::$9] = 0 + to:clrscr::@return +clrscr::@4: scope:[clrscr] from clrscr::@2 clrscr::@5 + CONIO_SCREEN_BANK#40 = phi( clrscr::@2/CONIO_SCREEN_BANK#12, clrscr::@5/CONIO_SCREEN_BANK#46 ) + clrscr::l#4 = phi( clrscr::@2/clrscr::l#5, clrscr::@5/clrscr::l#6 ) + clrscr::line_text#5 = phi( clrscr::@2/clrscr::line_text#2, clrscr::@5/clrscr::line_text#7 ) + clrscr::color#2 = phi( clrscr::@2/clrscr::color#3, clrscr::@5/clrscr::color#1 ) + clrscr::c#2 = phi( clrscr::@2/clrscr::c#0, clrscr::@5/clrscr::c#1 ) + clrscr::$8 = clrscr::c#2 < conio_width + if(clrscr::$8) goto clrscr::@5 + to:clrscr::@6 +clrscr::@5: scope:[clrscr] from clrscr::@4 + CONIO_SCREEN_BANK#46 = phi( clrscr::@4/CONIO_SCREEN_BANK#40 ) + clrscr::l#6 = phi( clrscr::@4/clrscr::l#4 ) + clrscr::line_text#7 = phi( clrscr::@4/clrscr::line_text#5 ) + clrscr::c#3 = phi( clrscr::@4/clrscr::c#2 ) + clrscr::color#1 = phi( clrscr::@4/clrscr::color#2 ) + *VERA_DATA0 = ' ' + *VERA_DATA0 = clrscr::color#1 + clrscr::c#1 = ++ clrscr::c#3 + to:clrscr::@4 +clrscr::@6: scope:[clrscr] from clrscr::@4 + clrscr::color#5 = phi( clrscr::@4/clrscr::color#2 ) + CONIO_SCREEN_BANK#30 = phi( clrscr::@4/CONIO_SCREEN_BANK#40 ) + clrscr::l#3 = phi( clrscr::@4/clrscr::l#4 ) + clrscr::line_text#3 = phi( clrscr::@4/clrscr::line_text#5 ) + clrscr::line_text#1 = clrscr::line_text#3 + conio_rowskip + clrscr::l#1 = ++ clrscr::l#3 + to:clrscr::@1 +clrscr::@return: scope:[clrscr] from clrscr::@3 + return + to:@return + +void gotoxy(byte gotoxy::x , byte gotoxy::y) +gotoxy: scope:[gotoxy] from conio_x16_init::@1 cscroll::@5 + gotoxy::x#5 = phi( conio_x16_init::@1/gotoxy::x#0, cscroll::@5/gotoxy::x#2 ) + gotoxy::y#3 = phi( conio_x16_init::@1/gotoxy::y#0, cscroll::@5/gotoxy::y#2 ) + gotoxy::$0 = gotoxy::y#3 > conio_screen_height + gotoxy::$1 = ! gotoxy::$0 + if(gotoxy::$1) goto gotoxy::@1 + to:gotoxy::@3 +gotoxy::@1: scope:[gotoxy] from gotoxy gotoxy::@3 + gotoxy::y#5 = phi( gotoxy/gotoxy::y#3, gotoxy::@3/gotoxy::y#1 ) + gotoxy::x#3 = phi( gotoxy/gotoxy::x#5, gotoxy::@3/gotoxy::x#6 ) + gotoxy::$2 = gotoxy::x#3 >= conio_screen_width + gotoxy::$3 = ! gotoxy::$2 + if(gotoxy::$3) goto gotoxy::@2 + to:gotoxy::@4 +gotoxy::@3: scope:[gotoxy] from gotoxy + gotoxy::x#6 = phi( gotoxy/gotoxy::x#5 ) + gotoxy::y#1 = 0 + to:gotoxy::@1 +gotoxy::@2: scope:[gotoxy] from gotoxy::@1 gotoxy::@4 + gotoxy::y#4 = phi( gotoxy::@1/gotoxy::y#5, gotoxy::@4/gotoxy::y#6 ) + gotoxy::x#4 = phi( gotoxy::@1/gotoxy::x#3, gotoxy::@4/gotoxy::x#1 ) + conio_cursor_x[conio_screen_layer] = gotoxy::x#4 + conio_cursor_y[conio_screen_layer] = gotoxy::y#4 + gotoxy::$6 = (word)gotoxy::y#4 + gotoxy::$4 = gotoxy::$6 << conio_rowshift + gotoxy::line_offset#0 = gotoxy::$4 + gotoxy::$5 = conio_screen_layer * SIZEOF_WORD + conio_line_text[gotoxy::$5] = gotoxy::line_offset#0 + to:gotoxy::@return +gotoxy::@4: scope:[gotoxy] from gotoxy::@1 + gotoxy::y#6 = phi( gotoxy::@1/gotoxy::y#5 ) + gotoxy::x#1 = 0 + to:gotoxy::@2 +gotoxy::@return: scope:[gotoxy] from gotoxy::@2 + return + to:@return + +void screensize(byte* screensize::x , byte* screensize::y) +screensize: scope:[screensize] from conio_x16_init::@3 + screensize::y#1 = phi( conio_x16_init::@3/screensize::y#0 ) + screensize::x#1 = phi( conio_x16_init::@3/screensize::x#0 ) + screensize::$0 = *VERA_DC_HSCALE >> 7 + screensize::hscale#0 = screensize::$0 + screensize::$1 = $28 << screensize::hscale#0 + *screensize::x#1 = screensize::$1 + screensize::$2 = *VERA_DC_VSCALE >> 7 + screensize::vscale#0 = screensize::$2 + screensize::$3 = $1e << screensize::vscale#0 + *screensize::y#1 = screensize::$3 + to:screensize::@return +screensize::@return: scope:[screensize] from screensize + return + to:@return + +void cputc(byte cputc::c) +cputc: scope:[cputc] from cputs::@2 + CONIO_SCREEN_BANK#32 = phi( cputs::@2/CONIO_SCREEN_BANK#41 ) + cputc::c#3 = phi( cputs::@2/cputc::c#0 ) + CONIO_SCREEN_TEXT#24 = phi( cputs::@2/CONIO_SCREEN_TEXT#33 ) + vera_layer_get_color::layer#0 = conio_screen_layer + call vera_layer_get_color + vera_layer_get_color::return#3 = vera_layer_get_color::return#2 + to:cputc::@7 +cputc::@7: scope:[cputc] from cputc + CONIO_SCREEN_BANK#23 = phi( cputc/CONIO_SCREEN_BANK#32 ) + cputc::c#1 = phi( cputc/cputc::c#3 ) + CONIO_SCREEN_TEXT#13 = phi( cputc/CONIO_SCREEN_TEXT#24 ) + vera_layer_get_color::return#6 = phi( cputc/vera_layer_get_color::return#3 ) + cputc::$0 = vera_layer_get_color::return#6 + cputc::color#0 = cputc::$0 + cputc::$15 = conio_screen_layer * SIZEOF_WORD + cputc::$1 = CONIO_SCREEN_TEXT#13 + conio_line_text[cputc::$15] + cputc::conio_addr#0 = cputc::$1 + cputc::$2 = conio_cursor_x[conio_screen_layer] << 1 + cputc::conio_addr#1 = cputc::conio_addr#0 + cputc::$2 + cputc::$3 = cputc::c#1 == ' +' + if(cputc::$3) goto cputc::@1 + to:cputc::@2 +cputc::@1: scope:[cputc] from cputc::@7 + CONIO_SCREEN_TEXT#60 = phi( cputc::@7/CONIO_SCREEN_TEXT#13 ) + call cputln + to:cputc::@8 +cputc::@8: scope:[cputc] from cputc::@1 + to:cputc::@return +cputc::@2: scope:[cputc] from cputc::@7 + CONIO_SCREEN_TEXT#67 = phi( cputc::@7/CONIO_SCREEN_TEXT#13 ) + cputc::color#1 = phi( cputc::@7/cputc::color#0 ) + cputc::c#2 = phi( cputc::@7/cputc::c#1 ) + CONIO_SCREEN_BANK#13 = phi( cputc::@7/CONIO_SCREEN_BANK#23 ) + cputc::conio_addr#2 = phi( cputc::@7/cputc::conio_addr#1 ) + *VERA_CTRL = *VERA_CTRL & ~VERA_ADDRSEL + cputc::$4 = < cputc::conio_addr#2 + *VERA_ADDRX_L = cputc::$4 + cputc::$5 = > cputc::conio_addr#2 + *VERA_ADDRX_M = cputc::$5 + cputc::$6 = CONIO_SCREEN_BANK#13 | VERA_INC_1 + *VERA_ADDRX_H = cputc::$6 + *VERA_DATA0 = cputc::c#2 + *VERA_DATA0 = cputc::color#1 + conio_cursor_x[conio_screen_layer] = ++ conio_cursor_x[conio_screen_layer] + cputc::scroll_enable#0 = conio_scroll_enable[conio_screen_layer] + cputc::$17 = 0 != cputc::scroll_enable#0 + if(cputc::$17) goto cputc::@5 + to:cputc::@3 +cputc::@5: scope:[cputc] from cputc::@2 + CONIO_SCREEN_TEXT#65 = phi( cputc::@2/CONIO_SCREEN_TEXT#67 ) + cputc::$11 = conio_cursor_x[conio_screen_layer] == conio_screen_width + cputc::$12 = ! cputc::$11 + if(cputc::$12) goto cputc::@return + to:cputc::@6 +cputc::@3: scope:[cputc] from cputc::@2 + CONIO_SCREEN_TEXT#64 = phi( cputc::@2/CONIO_SCREEN_TEXT#67 ) + cputc::$16 = (word)conio_cursor_x[conio_screen_layer] + cputc::$8 = cputc::$16 == conio_width + cputc::$9 = ! cputc::$8 + if(cputc::$9) goto cputc::@return + to:cputc::@4 +cputc::@4: scope:[cputc] from cputc::@3 + CONIO_SCREEN_TEXT#61 = phi( cputc::@3/CONIO_SCREEN_TEXT#64 ) + call cputln + to:cputc::@9 +cputc::@9: scope:[cputc] from cputc::@4 + to:cputc::@return +cputc::@6: scope:[cputc] from cputc::@5 + CONIO_SCREEN_TEXT#62 = phi( cputc::@5/CONIO_SCREEN_TEXT#65 ) + call cputln + to:cputc::@10 +cputc::@10: scope:[cputc] from cputc::@6 + to:cputc::@return +cputc::@return: scope:[cputc] from cputc::@10 cputc::@3 cputc::@5 cputc::@8 cputc::@9 + return + to:@return + +void cputln() +cputln: scope:[cputln] from cputc::@1 cputc::@4 cputc::@6 + CONIO_SCREEN_TEXT#58 = phi( cputc::@1/CONIO_SCREEN_TEXT#60, cputc::@4/CONIO_SCREEN_TEXT#61, cputc::@6/CONIO_SCREEN_TEXT#62 ) + cputln::$2 = conio_screen_layer * SIZEOF_WORD + cputln::temp#0 = conio_line_text[cputln::$2] + cputln::temp#1 = cputln::temp#0 + conio_rowskip + cputln::$3 = conio_screen_layer * SIZEOF_WORD + conio_line_text[cputln::$3] = cputln::temp#1 + conio_cursor_x[conio_screen_layer] = 0 + conio_cursor_y[conio_screen_layer] = ++ conio_cursor_y[conio_screen_layer] + call cscroll + to:cputln::@1 +cputln::@1: scope:[cputln] from cputln + to:cputln::@return +cputln::@return: scope:[cputln] from cputln::@1 + return + to:@return + +void clearline() +clearline: scope:[clearline] from insertup::@3 + CONIO_SCREEN_TEXT#14 = phi( insertup::@3/CONIO_SCREEN_TEXT#25 ) + *VERA_CTRL = *VERA_CTRL & ~VERA_ADDRSEL + clearline::$5 = conio_screen_layer * SIZEOF_WORD + clearline::$0 = CONIO_SCREEN_TEXT#14 + conio_line_text[clearline::$5] + clearline::addr#0 = clearline::$0 + clearline::$1 = < clearline::addr#0 + *VERA_ADDRX_L = clearline::$1 + clearline::$2 = > clearline::addr#0 + *VERA_ADDRX_M = clearline::$2 + *VERA_ADDRX_H = VERA_INC_1 + vera_layer_get_color::layer#1 = conio_screen_layer + call vera_layer_get_color + vera_layer_get_color::return#4 = vera_layer_get_color::return#2 + to:clearline::@4 +clearline::@4: scope:[clearline] from clearline + vera_layer_get_color::return#7 = phi( clearline/vera_layer_get_color::return#4 ) + clearline::$3 = vera_layer_get_color::return#7 + clearline::color#0 = clearline::$3 + clearline::c#0 = 0 + to:clearline::@1 +clearline::@1: scope:[clearline] from clearline::@2 clearline::@4 + clearline::color#2 = phi( clearline::@2/clearline::color#1, clearline::@4/clearline::color#0 ) + clearline::c#2 = phi( clearline::@2/clearline::c#1, clearline::@4/clearline::c#0 ) + clearline::$4 = clearline::c#2 < conio_screen_width + if(clearline::$4) goto clearline::@2 + to:clearline::@3 +clearline::@2: scope:[clearline] from clearline::@1 + clearline::c#3 = phi( clearline::@1/clearline::c#2 ) + clearline::color#1 = phi( clearline::@1/clearline::color#2 ) + *VERA_DATA0 = ' ' + *VERA_DATA0 = clearline::color#1 + clearline::c#1 = ++ clearline::c#3 + to:clearline::@1 +clearline::@3: scope:[clearline] from clearline::@1 + conio_cursor_x[conio_screen_layer] = 0 + to:clearline::@return +clearline::@return: scope:[clearline] from clearline::@3 + return + to:@return + +void insertup() +insertup: scope:[insertup] from cscroll::@4 + CONIO_SCREEN_TEXT#34 = phi( cscroll::@4/CONIO_SCREEN_TEXT#42 ) + insertup::cy#0 = conio_cursor_y[conio_screen_layer] + insertup::$0 = conio_screen_width * 2 + insertup::width#0 = insertup::$0 + insertup::i#0 = 1 + to:insertup::@1 +insertup::@1: scope:[insertup] from insertup insertup::@4 + insertup::width#2 = phi( insertup/insertup::width#0, insertup::@4/insertup::width#3 ) + CONIO_SCREEN_TEXT#26 = phi( insertup/CONIO_SCREEN_TEXT#34, insertup::@4/CONIO_SCREEN_TEXT#35 ) + insertup::cy#1 = phi( insertup/insertup::cy#0, insertup::@4/insertup::cy#2 ) + insertup::i#2 = phi( insertup/insertup::i#0, insertup::@4/insertup::i#1 ) + insertup::$2 = insertup::i#2 <= insertup::cy#1 + if(insertup::$2) goto insertup::@2 + to:insertup::@3 +insertup::@2: scope:[insertup] from insertup::@1 + insertup::cy#3 = phi( insertup::@1/insertup::cy#1 ) + insertup::width#1 = phi( insertup::@1/insertup::width#2 ) + CONIO_SCREEN_TEXT#15 = phi( insertup::@1/CONIO_SCREEN_TEXT#26 ) + insertup::i#3 = phi( insertup::@1/insertup::i#2 ) + insertup::$3 = insertup::i#3 - 1 + insertup::$4 = insertup::$3 << conio_rowshift + insertup::line#0 = insertup::$4 + insertup::$5 = CONIO_SCREEN_TEXT#15 + insertup::line#0 + insertup::start#0 = insertup::$5 + insertup::$6 = insertup::start#0 + conio_rowskip + memcpy_in_vram::dest_bank#0 = 0 + memcpy_in_vram::dest#0 = (void*)insertup::start#0 + memcpy_in_vram::dest_increment#0 = VERA_INC_1 + memcpy_in_vram::src_bank#0 = 0 + memcpy_in_vram::src#0 = (void*)insertup::$6 + memcpy_in_vram::src_increment#0 = VERA_INC_1 + memcpy_in_vram::num#0 = insertup::width#1 + call memcpy_in_vram + to:insertup::@4 +insertup::@4: scope:[insertup] from insertup::@2 + insertup::width#3 = phi( insertup::@2/insertup::width#1 ) + CONIO_SCREEN_TEXT#35 = phi( insertup::@2/CONIO_SCREEN_TEXT#15 ) + insertup::cy#2 = phi( insertup::@2/insertup::cy#3 ) + insertup::i#4 = phi( insertup::@2/insertup::i#3 ) + insertup::i#1 = ++ insertup::i#4 + to:insertup::@1 +insertup::@3: scope:[insertup] from insertup::@1 + CONIO_SCREEN_TEXT#25 = phi( insertup::@1/CONIO_SCREEN_TEXT#26 ) + call clearline + to:insertup::@5 +insertup::@5: scope:[insertup] from insertup::@3 + to:insertup::@return +insertup::@return: scope:[insertup] from insertup::@5 + return + to:@return + +void cscroll() +cscroll: scope:[cscroll] from cputln + CONIO_SCREEN_TEXT#53 = phi( cputln/CONIO_SCREEN_TEXT#58 ) + cscroll::$0 = conio_cursor_y[conio_screen_layer] >= conio_screen_height + cscroll::$1 = ! cscroll::$0 + if(cscroll::$1) goto cscroll::@return + to:cscroll::@1 +cscroll::@1: scope:[cscroll] from cscroll + CONIO_SCREEN_TEXT#47 = phi( cscroll/CONIO_SCREEN_TEXT#53 ) + cscroll::$7 = 0 != conio_scroll_enable[conio_screen_layer] + if(cscroll::$7) goto cscroll::@4 + to:cscroll::@2 +cscroll::@4: scope:[cscroll] from cscroll::@1 + CONIO_SCREEN_TEXT#42 = phi( cscroll::@1/CONIO_SCREEN_TEXT#47 ) + call insertup + to:cscroll::@5 +cscroll::@5: scope:[cscroll] from cscroll::@4 + cscroll::$5 = conio_screen_height - 1 + gotoxy::x#2 = 0 + gotoxy::y#2 = cscroll::$5 + call gotoxy + to:cscroll::@6 +cscroll::@6: scope:[cscroll] from cscroll::@5 + to:cscroll::@return +cscroll::@2: scope:[cscroll] from cscroll::@1 + cscroll::$2 = conio_cursor_y[conio_screen_layer] >= conio_height + cscroll::$3 = ! cscroll::$2 + if(cscroll::$3) goto cscroll::@return + to:cscroll::@3 +cscroll::@3: scope:[cscroll] from cscroll::@2 + to:cscroll::@return +cscroll::@return: scope:[cscroll] from cscroll cscroll::@2 cscroll::@3 cscroll::@6 + return + to:@return + +void cputs(to_nomodify byte* cputs::s) +cputs: scope:[cputs] from main::@3 + CONIO_SCREEN_BANK#51 = phi( main::@3/CONIO_SCREEN_BANK#56 ) + CONIO_SCREEN_TEXT#48 = phi( main::@3/CONIO_SCREEN_TEXT#54 ) + cputs::s#3 = phi( main::@3/cputs::s#1 ) + cputs::c#0 = 0 + to:cputs::@1 +cputs::@1: scope:[cputs] from cputs cputs::@3 + CONIO_SCREEN_BANK#47 = phi( cputs/CONIO_SCREEN_BANK#51, cputs::@3/CONIO_SCREEN_BANK#52 ) + CONIO_SCREEN_TEXT#43 = phi( cputs/CONIO_SCREEN_TEXT#48, cputs::@3/CONIO_SCREEN_TEXT#49 ) + cputs::s#2 = phi( cputs/cputs::s#3, cputs::@3/cputs::s#4 ) + cputs::c#1 = *cputs::s#2 + cputs::$0 = cputs::c#1 + cputs::s#0 = ++ cputs::s#2 + cputs::$2 = 0 != cputs::$0 + if(cputs::$2) goto cputs::@2 + to:cputs::@return +cputs::@2: scope:[cputs] from cputs::@1 + CONIO_SCREEN_BANK#41 = phi( cputs::@1/CONIO_SCREEN_BANK#47 ) + cputs::s#5 = phi( cputs::@1/cputs::s#0 ) + CONIO_SCREEN_TEXT#33 = phi( cputs::@1/CONIO_SCREEN_TEXT#43 ) + cputs::c#2 = phi( cputs::@1/cputs::c#1 ) + cputc::c#0 = cputs::c#2 + call cputc + to:cputs::@3 +cputs::@3: scope:[cputs] from cputs::@2 + CONIO_SCREEN_BANK#52 = phi( cputs::@2/CONIO_SCREEN_BANK#41 ) + CONIO_SCREEN_TEXT#49 = phi( cputs::@2/CONIO_SCREEN_TEXT#33 ) + cputs::s#4 = phi( cputs::@2/cputs::s#5 ) + to:cputs::@1 +cputs::@return: scope:[cputs] from cputs::@1 + return + to:@return + +void screenlayer(byte screenlayer::layer) +screenlayer: scope:[screenlayer] from conio_x16_init::@4 main::@1 + screenlayer::layer#2 = phi( conio_x16_init::@4/screenlayer::layer#0, main::@1/screenlayer::layer#1 ) + conio_screen_layer = screenlayer::layer#2 + vera_layer_get_mapbase_bank::layer#0 = conio_screen_layer + call vera_layer_get_mapbase_bank + vera_layer_get_mapbase_bank::return#2 = vera_layer_get_mapbase_bank::return#1 + to:screenlayer::@3 +screenlayer::@3: scope:[screenlayer] from screenlayer + vera_layer_get_mapbase_bank::return#4 = phi( screenlayer/vera_layer_get_mapbase_bank::return#2 ) + screenlayer::$0 = vera_layer_get_mapbase_bank::return#4 + CONIO_SCREEN_BANK#2 = screenlayer::$0 + vera_layer_get_mapbase_offset::layer#0 = conio_screen_layer + call vera_layer_get_mapbase_offset + vera_layer_get_mapbase_offset::return#2 = vera_layer_get_mapbase_offset::return#1 + to:screenlayer::@4 +screenlayer::@4: scope:[screenlayer] from screenlayer::@3 + CONIO_SCREEN_BANK#60 = phi( screenlayer::@3/CONIO_SCREEN_BANK#2 ) + vera_layer_get_mapbase_offset::return#4 = phi( screenlayer::@3/vera_layer_get_mapbase_offset::return#2 ) + screenlayer::$1 = vera_layer_get_mapbase_offset::return#4 + CONIO_SCREEN_TEXT#2 = ((byte*)) screenlayer::$1 + screenlayer::vera_layer_get_width1_layer#0 = conio_screen_layer + to:screenlayer::vera_layer_get_width1 +screenlayer::vera_layer_get_width1: scope:[screenlayer] from screenlayer::@4 + CONIO_SCREEN_TEXT#66 = phi( screenlayer::@4/CONIO_SCREEN_TEXT#2 ) + CONIO_SCREEN_BANK#59 = phi( screenlayer::@4/CONIO_SCREEN_BANK#60 ) + screenlayer::vera_layer_get_width1_layer#1 = phi( screenlayer::@4/screenlayer::vera_layer_get_width1_layer#0 ) + screenlayer::vera_layer_get_width1_$2 = screenlayer::vera_layer_get_width1_layer#1 * SIZEOF_POINTER + screenlayer::vera_layer_get_width1_config#0 = vera_layer_config[screenlayer::vera_layer_get_width1_$2] + screenlayer::vera_layer_get_width1_$0 = *screenlayer::vera_layer_get_width1_config#0 & VERA_LAYER_WIDTH_MASK + screenlayer::vera_layer_get_width1_$1 = screenlayer::vera_layer_get_width1_$0 >> 4 + screenlayer::vera_layer_get_width1_$3 = screenlayer::vera_layer_get_width1_$1 * SIZEOF_WORD + screenlayer::vera_layer_get_width1_return#0 = VERA_LAYER_WIDTH[screenlayer::vera_layer_get_width1_$3] + to:screenlayer::vera_layer_get_width1_@return +screenlayer::vera_layer_get_width1_@return: scope:[screenlayer] from screenlayer::vera_layer_get_width1 + CONIO_SCREEN_TEXT#63 = phi( screenlayer::vera_layer_get_width1/CONIO_SCREEN_TEXT#66 ) + CONIO_SCREEN_BANK#58 = phi( screenlayer::vera_layer_get_width1/CONIO_SCREEN_BANK#59 ) + screenlayer::vera_layer_get_width1_return#2 = phi( screenlayer::vera_layer_get_width1/screenlayer::vera_layer_get_width1_return#0 ) + screenlayer::vera_layer_get_width1_return#1 = screenlayer::vera_layer_get_width1_return#2 + to:screenlayer::@1 +screenlayer::@1: scope:[screenlayer] from screenlayer::vera_layer_get_width1_@return + CONIO_SCREEN_TEXT#59 = phi( screenlayer::vera_layer_get_width1_@return/CONIO_SCREEN_TEXT#63 ) + CONIO_SCREEN_BANK#57 = phi( screenlayer::vera_layer_get_width1_@return/CONIO_SCREEN_BANK#58 ) + screenlayer::vera_layer_get_width1_return#3 = phi( screenlayer::vera_layer_get_width1_@return/screenlayer::vera_layer_get_width1_return#1 ) + screenlayer::$2 = screenlayer::vera_layer_get_width1_return#3 + conio_width = screenlayer::$2 + vera_layer_get_rowshift::layer#0 = conio_screen_layer + call vera_layer_get_rowshift + vera_layer_get_rowshift::return#2 = vera_layer_get_rowshift::return#1 + to:screenlayer::@5 +screenlayer::@5: scope:[screenlayer] from screenlayer::@1 + CONIO_SCREEN_TEXT#55 = phi( screenlayer::@1/CONIO_SCREEN_TEXT#59 ) + CONIO_SCREEN_BANK#53 = phi( screenlayer::@1/CONIO_SCREEN_BANK#57 ) + vera_layer_get_rowshift::return#4 = phi( screenlayer::@1/vera_layer_get_rowshift::return#2 ) + screenlayer::$3 = vera_layer_get_rowshift::return#4 + conio_rowshift = screenlayer::$3 + vera_layer_get_rowskip::layer#0 = conio_screen_layer + call vera_layer_get_rowskip + vera_layer_get_rowskip::return#2 = vera_layer_get_rowskip::return#1 + to:screenlayer::@6 +screenlayer::@6: scope:[screenlayer] from screenlayer::@5 + CONIO_SCREEN_TEXT#50 = phi( screenlayer::@5/CONIO_SCREEN_TEXT#55 ) + CONIO_SCREEN_BANK#48 = phi( screenlayer::@5/CONIO_SCREEN_BANK#53 ) + vera_layer_get_rowskip::return#4 = phi( screenlayer::@5/vera_layer_get_rowskip::return#2 ) + screenlayer::$4 = vera_layer_get_rowskip::return#4 + conio_rowskip = screenlayer::$4 + screenlayer::vera_layer_get_height1_layer#0 = conio_screen_layer + to:screenlayer::vera_layer_get_height1 +screenlayer::vera_layer_get_height1: scope:[screenlayer] from screenlayer::@6 + CONIO_SCREEN_TEXT#44 = phi( screenlayer::@6/CONIO_SCREEN_TEXT#50 ) + CONIO_SCREEN_BANK#42 = phi( screenlayer::@6/CONIO_SCREEN_BANK#48 ) + screenlayer::vera_layer_get_height1_layer#1 = phi( screenlayer::@6/screenlayer::vera_layer_get_height1_layer#0 ) + screenlayer::vera_layer_get_height1_$2 = screenlayer::vera_layer_get_height1_layer#1 * SIZEOF_POINTER + screenlayer::vera_layer_get_height1_config#0 = vera_layer_config[screenlayer::vera_layer_get_height1_$2] + screenlayer::vera_layer_get_height1_$0 = *screenlayer::vera_layer_get_height1_config#0 & VERA_LAYER_HEIGHT_MASK + screenlayer::vera_layer_get_height1_$1 = screenlayer::vera_layer_get_height1_$0 >> 6 + screenlayer::vera_layer_get_height1_$3 = screenlayer::vera_layer_get_height1_$1 * SIZEOF_WORD + screenlayer::vera_layer_get_height1_return#0 = VERA_LAYER_HEIGHT[screenlayer::vera_layer_get_height1_$3] + to:screenlayer::vera_layer_get_height1_@return +screenlayer::vera_layer_get_height1_@return: scope:[screenlayer] from screenlayer::vera_layer_get_height1 + CONIO_SCREEN_TEXT#36 = phi( screenlayer::vera_layer_get_height1/CONIO_SCREEN_TEXT#44 ) + CONIO_SCREEN_BANK#33 = phi( screenlayer::vera_layer_get_height1/CONIO_SCREEN_BANK#42 ) + screenlayer::vera_layer_get_height1_return#2 = phi( screenlayer::vera_layer_get_height1/screenlayer::vera_layer_get_height1_return#0 ) + screenlayer::vera_layer_get_height1_return#1 = screenlayer::vera_layer_get_height1_return#2 + to:screenlayer::@2 +screenlayer::@2: scope:[screenlayer] from screenlayer::vera_layer_get_height1_@return + CONIO_SCREEN_TEXT#27 = phi( screenlayer::vera_layer_get_height1_@return/CONIO_SCREEN_TEXT#36 ) + CONIO_SCREEN_BANK#24 = phi( screenlayer::vera_layer_get_height1_@return/CONIO_SCREEN_BANK#33 ) + screenlayer::vera_layer_get_height1_return#3 = phi( screenlayer::vera_layer_get_height1_@return/screenlayer::vera_layer_get_height1_return#1 ) + screenlayer::$5 = screenlayer::vera_layer_get_height1_return#3 + conio_height = screenlayer::$5 + to:screenlayer::@return +screenlayer::@return: scope:[screenlayer] from screenlayer::@2 + CONIO_SCREEN_TEXT#16 = phi( screenlayer::@2/CONIO_SCREEN_TEXT#27 ) + CONIO_SCREEN_BANK#14 = phi( screenlayer::@2/CONIO_SCREEN_BANK#24 ) + CONIO_SCREEN_BANK#3 = CONIO_SCREEN_BANK#14 + CONIO_SCREEN_TEXT#3 = CONIO_SCREEN_TEXT#16 + return + to:@return + +void main() +main: scope:[main] from __start::@1 + CONIO_SCREEN_TEXT#37 = phi( __start::@1/CONIO_SCREEN_TEXT#30 ) + CONIO_SCREEN_BANK#34 = phi( __start::@1/CONIO_SCREEN_BANK#27 ) + vera_layer_set_text_color_mode::layer#2 = 1 + vera_layer_set_text_color_mode::color_mode#2 = VERA_LAYER_CONFIG_16C + call vera_layer_set_text_color_mode + to:main::@1 +main::@1: scope:[main] from main + CONIO_SCREEN_TEXT#28 = phi( main/CONIO_SCREEN_TEXT#37 ) + CONIO_SCREEN_BANK#25 = phi( main/CONIO_SCREEN_BANK#34 ) + screenlayer::layer#1 = 1 + call screenlayer + to:main::@2 +main::@2: scope:[main] from main::@1 + CONIO_SCREEN_TEXT#17 = phi( main::@1/CONIO_SCREEN_TEXT#3 ) + CONIO_SCREEN_BANK#15 = phi( main::@1/CONIO_SCREEN_BANK#3 ) + CONIO_SCREEN_BANK#4 = CONIO_SCREEN_BANK#15 + CONIO_SCREEN_TEXT#4 = CONIO_SCREEN_TEXT#17 + call clrscr + to:main::@3 +main::@3: scope:[main] from main::@2 + CONIO_SCREEN_BANK#56 = phi( main::@2/CONIO_SCREEN_BANK#4 ) + CONIO_SCREEN_TEXT#54 = phi( main::@2/CONIO_SCREEN_TEXT#4 ) + cputs::s#1 = main::s + call cputs + to:main::@4 +main::@4: scope:[main] from main::@3 + CONIO_SCREEN_TEXT#56 = phi( main::@3/CONIO_SCREEN_TEXT#54 ) + CONIO_SCREEN_BANK#54 = phi( main::@3/CONIO_SCREEN_BANK#56 ) + *(&main::SPRITE_ATTR) = memcpy(*(&$0), struct VERA_SPRITE, SIZEOF_STRUCT_VERA_SPRITE) + main::SPRITE_ATTR = struct-unwound {*(&main::SPRITE_ATTR)} + LoadFileBanked::device#0 = 8 + LoadFileBanked::filename#0 = main::filename + LoadFileBanked::address#0 = main::BANK_SPRITE + call LoadFileBanked + LoadFileBanked::return#2 = LoadFileBanked::return#1 + to:main::@5 +main::@5: scope:[main] from main::@4 + CONIO_SCREEN_TEXT#51 = phi( main::@4/CONIO_SCREEN_TEXT#56 ) + CONIO_SCREEN_BANK#49 = phi( main::@4/CONIO_SCREEN_BANK#54 ) + bnkcpy_vram_address::vdest#0 = VERA_PALETTE+$20 + bnkcpy_vram_address::src#0 = main::BANK_SPRITE-2 + bnkcpy_vram_address::num#0 = $20 + call bnkcpy_vram_address + to:main::@6 +main::@6: scope:[main] from main::@5 + CONIO_SCREEN_TEXT#45 = phi( main::@5/CONIO_SCREEN_TEXT#51 ) + CONIO_SCREEN_BANK#43 = phi( main::@5/CONIO_SCREEN_BANK#49 ) + bnkcpy_vram_address::vdest#1 = main::VRAM_SPRITE + bnkcpy_vram_address::src#1 = main::BANK_SPRITE+$20-2 + bnkcpy_vram_address::num#1 = $40*$20 + call bnkcpy_vram_address + to:main::@7 +main::@7: scope:[main] from main::@6 + CONIO_SCREEN_TEXT#38 = phi( main::@6/CONIO_SCREEN_TEXT#45 ) + CONIO_SCREEN_BANK#35 = phi( main::@6/CONIO_SCREEN_BANK#43 ) + *((word*)&main::SPRITE_ATTR+OFFSET_STRUCT_VERA_SPRITE_ADDR) = VERA_SPRITE_ATTR + memcpy_to_vram::vdest#0 = (void*)idx + .var palette = Hashtable() + // RGB value for each palette index + .var palList = List() + // Next palette index + .var nxt_idx = 0; + // Extract palette while outputting pixels as palete index values + .for (var y=0; y<64; y++) { + .for (var x=0;x<64; x++) { + // Find palette index (add if not known) + .var rgb = pic.getPixel(x,y); + .var idx = palette.get(rgb) + .if(idx==null) { + .eval idx = nxt_idx++; + .eval palette.put(rgb,idx); + .eval palList.add(rgb) + } + } + } + .if(nxt_idx>16) .error "Image has too many colours "+nxt_idx + + .for(var i=0;i<16;i++) { + .var rgb = palList.get(i) + .var red = floor(rgb / [256*256]) + .var green = floor(rgb/256) & 255 + .var blue = rgb & 255 + // bits 4-8: green, bits 0-3 blue + .byte green&$f0 | blue/16 + // bits bits 0-3 red + .byte red/16 + } + + .for (var y=0; y<64; y++) { + .for (var x=0;x<64; x+=2) { + // Find palette index (add if not known) + .var rgb = pic.getPixel(x,y); + .var idx1 = palette.get(rgb) + .if(idx1==null) { + .printnow "unknown rgb value!" + } + // Find palette index (add if not known) + .eval rgb = pic.getPixel(x+1,y); + .var idx2 = palette.get(rgb) + .if(idx2==null) { + .printnow "unknown rgb value!" + } + .byte idx1*16+idx2; + } + } + }} +const nomodify byte VERA_ADDRSEL = 1 +const nomodify byte* VERA_ADDRX_H = (byte*)$9f22 +const nomodify byte* VERA_ADDRX_L = (byte*)$9f20 +const nomodify byte* VERA_ADDRX_M = (byte*)$9f21 +const nomodify byte* VERA_CTRL = (byte*)$9f25 +const nomodify byte* VERA_DATA0 = (byte*)$9f23 +const nomodify byte* VERA_DATA1 = (byte*)$9f24 +const nomodify byte VERA_DCSEL = 2 +const nomodify byte* VERA_DC_HSCALE = (byte*)$9f2a +const nomodify byte* VERA_DC_VIDEO = (byte*)$9f29 +const nomodify byte* VERA_DC_VSCALE = (byte*)$9f2b +const nomodify byte VERA_INC_1 = $10 +const nomodify byte* VERA_L0_CONFIG = (byte*)$9f2d +const nomodify byte* VERA_L0_MAPBASE = (byte*)$9f2e +const nomodify byte* VERA_L0_TILEBASE = (byte*)$9f2f +const nomodify byte* VERA_L1_CONFIG = (byte*)$9f34 +const nomodify byte* VERA_L1_MAPBASE = (byte*)$9f35 +const nomodify byte* VERA_L1_TILEBASE = (byte*)$9f36 +const nomodify byte VERA_LAYER_COLOR_DEPTH_1BPP = 0 +const nomodify byte VERA_LAYER_COLOR_DEPTH_2BPP = 1 +const nomodify byte VERA_LAYER_COLOR_DEPTH_4BPP = 2 +const nomodify byte VERA_LAYER_COLOR_DEPTH_8BPP = 3 +const nomodify byte VERA_LAYER_CONFIG_16C = 0 +const nomodify byte VERA_LAYER_CONFIG_256C = 8 +const to_nomodify word* VERA_LAYER_HEIGHT[4] = { $20, $40, $80, $100 } +const nomodify byte VERA_LAYER_HEIGHT_128 = $80 +const nomodify byte VERA_LAYER_HEIGHT_256 = $c0 +const nomodify byte VERA_LAYER_HEIGHT_32 = 0 +const nomodify byte VERA_LAYER_HEIGHT_64 = $40 +const nomodify byte VERA_LAYER_HEIGHT_MASK = $c0 +const nomodify byte VERA_LAYER_TILEBASE_MASK = $fc +const to_nomodify word* VERA_LAYER_WIDTH[4] = { $20, $40, $80, $100 } +const nomodify byte VERA_LAYER_WIDTH_128 = $20 +const nomodify byte VERA_LAYER_WIDTH_256 = $30 +const nomodify byte VERA_LAYER_WIDTH_32 = 0 +const nomodify byte VERA_LAYER_WIDTH_64 = $10 +const nomodify byte VERA_LAYER_WIDTH_MASK = $30 +const nomodify dword VERA_PALETTE = $1fa00 +const nomodify byte VERA_SPRITES_ENABLE = $40 +const nomodify word VERA_SPRITE_4BPP = 0 +const nomodify word VERA_SPRITE_8BPP = $8000 +const nomodify dword VERA_SPRITE_ATTR = $1fc00 +const nomodify byte VERA_TILEBASE_HEIGHT_16 = 2 +const nomodify byte VERA_TILEBASE_HEIGHT_8 = 0 +const nomodify byte VERA_TILEBASE_WIDTH_16 = 1 +const nomodify byte VERA_TILEBASE_WIDTH_8 = 0 +const nomodify struct MOS6522_VIA* VIA1 = (struct MOS6522_VIA*)$9f60 +const nomodify byte WHITE = 1 +void __start() +void bnkcpy_vram_address(dword bnkcpy_vram_address::vdest , dword bnkcpy_vram_address::src , dword bnkcpy_vram_address::num) +word~ bnkcpy_vram_address::$0 +byte~ bnkcpy_vram_address::$1 +word~ bnkcpy_vram_address::$10 +byte~ bnkcpy_vram_address::$11 +word~ bnkcpy_vram_address::$12 +word~ bnkcpy_vram_address::$13 +word~ bnkcpy_vram_address::$14 +word~ bnkcpy_vram_address::$15 +byte~ bnkcpy_vram_address::$16 +word~ bnkcpy_vram_address::$17 +word~ bnkcpy_vram_address::$18 +number~ bnkcpy_vram_address::$19 +word~ bnkcpy_vram_address::$2 +bool~ bnkcpy_vram_address::$20 +bool~ bnkcpy_vram_address::$21 +bool~ bnkcpy_vram_address::$22 +word~ bnkcpy_vram_address::$23 +word~ bnkcpy_vram_address::$24 +byte~ bnkcpy_vram_address::$3 +word~ bnkcpy_vram_address::$4 +byte~ bnkcpy_vram_address::$5 +dword~ bnkcpy_vram_address::$6 +word~ bnkcpy_vram_address::$7 +word~ bnkcpy_vram_address::$8 +byte~ bnkcpy_vram_address::$9 +byte* bnkcpy_vram_address::addr +byte* bnkcpy_vram_address::addr#0 +byte* bnkcpy_vram_address::addr#1 +byte* bnkcpy_vram_address::addr#2 +byte* bnkcpy_vram_address::addr#3 +byte* bnkcpy_vram_address::addr#4 +byte* bnkcpy_vram_address::addr#5 +byte* bnkcpy_vram_address::addr#6 +byte bnkcpy_vram_address::bank +byte bnkcpy_vram_address::bank#0 +byte bnkcpy_vram_address::bank#1 +byte bnkcpy_vram_address::bank#2 +byte bnkcpy_vram_address::bank#3 +byte bnkcpy_vram_address::bank#4 +byte bnkcpy_vram_address::bank#5 +dword bnkcpy_vram_address::beg +dword bnkcpy_vram_address::beg#0 +dword bnkcpy_vram_address::end +dword bnkcpy_vram_address::end#0 +dword bnkcpy_vram_address::end#1 +dword bnkcpy_vram_address::end#2 +dword bnkcpy_vram_address::end#3 +dword bnkcpy_vram_address::end#4 +dword bnkcpy_vram_address::num +dword bnkcpy_vram_address::num#0 +dword bnkcpy_vram_address::num#1 +dword bnkcpy_vram_address::num#2 +dword bnkcpy_vram_address::pos +dword bnkcpy_vram_address::pos#0 +dword bnkcpy_vram_address::pos#1 +dword bnkcpy_vram_address::pos#2 +dword bnkcpy_vram_address::pos#3 +dword bnkcpy_vram_address::pos#4 +dword bnkcpy_vram_address::pos#5 +dword bnkcpy_vram_address::src +dword bnkcpy_vram_address::src#0 +dword bnkcpy_vram_address::src#1 +dword bnkcpy_vram_address::src#2 +dword bnkcpy_vram_address::vdest +dword bnkcpy_vram_address::vdest#0 +dword bnkcpy_vram_address::vdest#1 +dword bnkcpy_vram_address::vdest#2 +void clearline() +byte*~ clearline::$0 +byte~ clearline::$1 +byte~ clearline::$2 +byte~ clearline::$3 +bool~ clearline::$4 +byte~ clearline::$5 +byte* clearline::addr +byte* clearline::addr#0 +word clearline::c +word clearline::c#0 +word clearline::c#1 +word clearline::c#2 +word clearline::c#3 +byte clearline::color +byte clearline::color#0 +byte clearline::color#1 +byte clearline::color#2 +void clrscr() +byte~ clrscr::$0 +byte~ clrscr::$1 +byte~ clrscr::$2 +byte~ clrscr::$3 +bool~ clrscr::$4 +byte~ clrscr::$5 +byte~ clrscr::$6 +byte~ clrscr::$7 +bool~ clrscr::$8 +byte~ clrscr::$9 +byte clrscr::c +byte clrscr::c#0 +byte clrscr::c#1 +byte clrscr::c#2 +byte clrscr::c#3 +byte* clrscr::ch +byte* clrscr::ch#0 +byte clrscr::color +byte clrscr::color#0 +byte clrscr::color#1 +byte clrscr::color#2 +byte clrscr::color#3 +byte clrscr::color#4 +byte clrscr::color#5 +byte clrscr::l +byte clrscr::l#0 +byte clrscr::l#1 +byte clrscr::l#2 +byte clrscr::l#3 +byte clrscr::l#4 +byte clrscr::l#5 +byte clrscr::l#6 +byte* clrscr::line_text +byte* clrscr::line_text#0 +byte* clrscr::line_text#1 +byte* clrscr::line_text#2 +byte* clrscr::line_text#3 +byte* clrscr::line_text#4 +byte* clrscr::line_text#5 +byte* clrscr::line_text#6 +byte* clrscr::line_text#7 +byte* clrscr::line_text#8 +const byte* conio_cursor_x[2] = { 0, 0 } +const byte* conio_cursor_y[2] = { 0, 0 } +word conio_height loadstore +const word* conio_line_text[2] = { 0, 0 } +byte conio_rowshift loadstore +word conio_rowskip loadstore +volatile byte conio_screen_height loadstore +byte conio_screen_layer loadstore +volatile byte conio_screen_width loadstore +const byte* conio_scroll_enable[2] = { 1, 1 } +word conio_width loadstore +void conio_x16_init() +bool~ conio_x16_init::$7 +bool~ conio_x16_init::$8 +number~ conio_x16_init::$9 +const nomodify byte* conio_x16_init::BASIC_CURSOR_LINE = (byte*)$d6 +byte conio_x16_init::line +byte conio_x16_init::line#0 +byte conio_x16_init::line#1 +byte conio_x16_init::line#2 +byte conio_x16_init::line#3 +byte conio_x16_init::line#4 +byte conio_x16_init::line#5 +byte conio_x16_init::line#6 +byte conio_x16_init::line#7 +byte conio_x16_init::line#8 +byte conio_x16_init::line#9 +void cputc(byte cputc::c) +byte~ cputc::$0 +byte*~ cputc::$1 +bool~ cputc::$11 +bool~ cputc::$12 +byte~ cputc::$15 +word~ cputc::$16 +bool~ cputc::$17 +byte~ cputc::$2 +bool~ cputc::$3 +byte~ cputc::$4 +byte~ cputc::$5 +byte~ cputc::$6 +bool~ cputc::$8 +bool~ cputc::$9 +byte cputc::c +byte cputc::c#0 +byte cputc::c#1 +byte cputc::c#2 +byte cputc::c#3 +byte cputc::color +byte cputc::color#0 +byte cputc::color#1 +byte* cputc::conio_addr +byte* cputc::conio_addr#0 +byte* cputc::conio_addr#1 +byte* cputc::conio_addr#2 +byte cputc::scroll_enable +byte cputc::scroll_enable#0 +void cputln() +byte~ cputln::$2 +byte~ cputln::$3 +word cputln::temp +word cputln::temp#0 +word cputln::temp#1 +void cputs(to_nomodify byte* cputs::s) +byte~ cputs::$0 +bool~ cputs::$2 +byte cputs::c +byte cputs::c#0 +byte cputs::c#1 +byte cputs::c#2 +to_nomodify byte* cputs::s +to_nomodify byte* cputs::s#0 +to_nomodify byte* cputs::s#1 +to_nomodify byte* cputs::s#2 +to_nomodify byte* cputs::s#3 +to_nomodify byte* cputs::s#4 +to_nomodify byte* cputs::s#5 +void cscroll() +bool~ cscroll::$0 +bool~ cscroll::$1 +bool~ cscroll::$2 +bool~ cscroll::$3 +number~ cscroll::$5 +bool~ cscroll::$7 +void gotoxy(byte gotoxy::x , byte gotoxy::y) +bool~ gotoxy::$0 +bool~ gotoxy::$1 +bool~ gotoxy::$2 +bool~ gotoxy::$3 +word~ gotoxy::$4 +byte~ gotoxy::$5 +word~ gotoxy::$6 +word gotoxy::line_offset +word gotoxy::line_offset#0 +byte gotoxy::x +byte gotoxy::x#0 +byte gotoxy::x#1 +byte gotoxy::x#2 +byte gotoxy::x#3 +byte gotoxy::x#4 +byte gotoxy::x#5 +byte gotoxy::x#6 +byte gotoxy::y +byte gotoxy::y#0 +byte gotoxy::y#1 +byte gotoxy::y#2 +byte gotoxy::y#3 +byte gotoxy::y#4 +byte gotoxy::y#5 +byte gotoxy::y#6 +void insertup() +number~ insertup::$0 +bool~ insertup::$2 +number~ insertup::$3 +number~ insertup::$4 +byte*~ insertup::$5 +byte*~ insertup::$6 +byte insertup::cy +byte insertup::cy#0 +byte insertup::cy#1 +byte insertup::cy#2 +byte insertup::cy#3 +byte insertup::i +byte insertup::i#0 +byte insertup::i#1 +byte insertup::i#2 +byte insertup::i#3 +byte insertup::i#4 +word insertup::line +word insertup::line#0 +byte* insertup::start +byte* insertup::start#0 +byte insertup::width +byte insertup::width#0 +byte insertup::width#1 +byte insertup::width#2 +byte insertup::width#3 +byte load(volatile byte* load::address , volatile byte load::verify) +volatile byte* load::address loadstore +byte load::return +byte load::return#0 +byte load::return#1 +byte load::return#2 +byte load::return#3 +byte load::return#4 +volatile byte load::status loadstore +volatile byte load::verify loadstore +void main() +byte~ main::$7 +const nomodify dword main::BANK_SPRITE = $12000 +struct VERA_SPRITE main::SPRITE_ATTR loadstore +const nomodify dword main::VRAM_SPRITE = $10000 +const byte* main::filename[7] = "SPRITE" +const byte* main::s[$2d] = " + +sprite banked file load and display demo. +" +void memcpy_in_vram(byte memcpy_in_vram::dest_bank , void* memcpy_in_vram::dest , byte memcpy_in_vram::dest_increment , byte memcpy_in_vram::src_bank , void* memcpy_in_vram::src , byte memcpy_in_vram::src_increment , word memcpy_in_vram::num) +byte~ memcpy_in_vram::$0 +byte~ memcpy_in_vram::$1 +byte~ memcpy_in_vram::$2 +byte~ memcpy_in_vram::$3 +byte~ memcpy_in_vram::$4 +byte~ memcpy_in_vram::$5 +bool~ memcpy_in_vram::$6 +void* memcpy_in_vram::dest +void* memcpy_in_vram::dest#0 +void* memcpy_in_vram::dest#1 +byte memcpy_in_vram::dest_bank +byte memcpy_in_vram::dest_bank#0 +byte memcpy_in_vram::dest_bank#1 +byte memcpy_in_vram::dest_increment +byte memcpy_in_vram::dest_increment#0 +byte memcpy_in_vram::dest_increment#1 +word memcpy_in_vram::i +word memcpy_in_vram::i#0 +word memcpy_in_vram::i#1 +word memcpy_in_vram::i#2 +word memcpy_in_vram::i#3 +word memcpy_in_vram::num +word memcpy_in_vram::num#0 +word memcpy_in_vram::num#1 +word memcpy_in_vram::num#2 +word memcpy_in_vram::num#3 +void* memcpy_in_vram::src +void* memcpy_in_vram::src#0 +void* memcpy_in_vram::src#1 +byte memcpy_in_vram::src_bank +byte memcpy_in_vram::src_bank#0 +byte memcpy_in_vram::src_bank#1 +byte memcpy_in_vram::src_increment +byte memcpy_in_vram::src_increment#0 +byte memcpy_in_vram::src_increment#1 +void memcpy_to_vram(byte memcpy_to_vram::vbank , void* memcpy_to_vram::vdest , void* memcpy_to_vram::src , word memcpy_to_vram::num) +byte~ memcpy_to_vram::$0 +byte~ memcpy_to_vram::$1 +byte~ memcpy_to_vram::$2 +byte*~ memcpy_to_vram::$3 +bool~ memcpy_to_vram::$4 +byte*~ memcpy_to_vram::$5 +byte* memcpy_to_vram::end +byte* memcpy_to_vram::end#0 +byte* memcpy_to_vram::end#1 +byte* memcpy_to_vram::end#2 +word memcpy_to_vram::num +word memcpy_to_vram::num#0 +word memcpy_to_vram::num#1 +byte* memcpy_to_vram::s +byte* memcpy_to_vram::s#0 +byte* memcpy_to_vram::s#1 +byte* memcpy_to_vram::s#2 +byte* memcpy_to_vram::s#3 +void* memcpy_to_vram::src +void* memcpy_to_vram::src#0 +void* memcpy_to_vram::src#1 +byte memcpy_to_vram::vbank +byte memcpy_to_vram::vbank#0 +byte memcpy_to_vram::vbank#1 +void* memcpy_to_vram::vdest +void* memcpy_to_vram::vdest#0 +void* memcpy_to_vram::vdest#1 +void screenlayer(byte screenlayer::layer) +byte~ screenlayer::$0 +word~ screenlayer::$1 +word~ screenlayer::$2 +byte~ screenlayer::$3 +word~ screenlayer::$4 +word~ screenlayer::$5 +byte screenlayer::layer +byte screenlayer::layer#0 +byte screenlayer::layer#1 +byte screenlayer::layer#2 +byte~ screenlayer::vera_layer_get_height1_$0 +byte~ screenlayer::vera_layer_get_height1_$1 +byte~ screenlayer::vera_layer_get_height1_$2 +byte~ screenlayer::vera_layer_get_height1_$3 +byte* screenlayer::vera_layer_get_height1_config +byte* screenlayer::vera_layer_get_height1_config#0 +byte screenlayer::vera_layer_get_height1_layer +byte screenlayer::vera_layer_get_height1_layer#0 +byte screenlayer::vera_layer_get_height1_layer#1 +word screenlayer::vera_layer_get_height1_return +word screenlayer::vera_layer_get_height1_return#0 +word screenlayer::vera_layer_get_height1_return#1 +word screenlayer::vera_layer_get_height1_return#2 +word screenlayer::vera_layer_get_height1_return#3 +byte~ screenlayer::vera_layer_get_width1_$0 +byte~ screenlayer::vera_layer_get_width1_$1 +byte~ screenlayer::vera_layer_get_width1_$2 +byte~ screenlayer::vera_layer_get_width1_$3 +byte* screenlayer::vera_layer_get_width1_config +byte* screenlayer::vera_layer_get_width1_config#0 +byte screenlayer::vera_layer_get_width1_layer +byte screenlayer::vera_layer_get_width1_layer#0 +byte screenlayer::vera_layer_get_width1_layer#1 +word screenlayer::vera_layer_get_width1_return +word screenlayer::vera_layer_get_width1_return#0 +word screenlayer::vera_layer_get_width1_return#1 +word screenlayer::vera_layer_get_width1_return#2 +word screenlayer::vera_layer_get_width1_return#3 +void screensize(byte* screensize::x , byte* screensize::y) +byte~ screensize::$0 +number~ screensize::$1 +byte~ screensize::$2 +number~ screensize::$3 +byte screensize::hscale +byte screensize::hscale#0 +byte screensize::vscale +byte screensize::vscale#0 +byte* screensize::x +byte* screensize::x#0 +byte* screensize::x#1 +byte* screensize::y +byte* screensize::y#0 +byte* screensize::y#1 +void setlfs(volatile byte setlfs::device) +volatile byte setlfs::device loadstore +void setnam(volatile byte* setnam::filename) +word~ setnam::$0 +volatile byte* setnam::filename loadstore +volatile byte setnam::filename_len loadstore +word strlen(byte* strlen::str) +bool~ strlen::$0 +word strlen::len +word strlen::len#0 +word strlen::len#1 +word strlen::len#2 +word strlen::len#3 +word strlen::len#4 +word strlen::return +word strlen::return#0 +word strlen::return#1 +word strlen::return#2 +word strlen::return#3 +word strlen::return#4 +byte* strlen::str +byte* strlen::str#0 +byte* strlen::str#1 +byte* strlen::str#2 +byte* strlen::str#3 +byte* strlen::str#4 +const byte* vera_layer_backcolor[2] = { BLUE, BLUE } +const byte** vera_layer_config[2] = { VERA_L0_CONFIG, VERA_L1_CONFIG } +byte vera_layer_get_backcolor(byte vera_layer_get_backcolor::layer) +byte vera_layer_get_backcolor::layer +byte vera_layer_get_backcolor::layer#0 +byte vera_layer_get_backcolor::layer#1 +byte vera_layer_get_backcolor::return +byte vera_layer_get_backcolor::return#0 +byte vera_layer_get_backcolor::return#1 +byte vera_layer_get_backcolor::return#2 +byte vera_layer_get_backcolor::return#3 +byte vera_layer_get_backcolor::return#4 +byte vera_layer_get_color(byte vera_layer_get_color::layer) +byte~ vera_layer_get_color::$0 +byte~ vera_layer_get_color::$1 +byte~ vera_layer_get_color::$2 +byte~ vera_layer_get_color::$3 +bool~ vera_layer_get_color::$4 +byte* vera_layer_get_color::addr +byte* vera_layer_get_color::addr#0 +byte vera_layer_get_color::layer +byte vera_layer_get_color::layer#0 +byte vera_layer_get_color::layer#1 +byte vera_layer_get_color::layer#2 +byte vera_layer_get_color::layer#3 +byte vera_layer_get_color::layer#4 +byte vera_layer_get_color::return +byte vera_layer_get_color::return#0 +byte vera_layer_get_color::return#1 +byte vera_layer_get_color::return#2 +byte vera_layer_get_color::return#3 +byte vera_layer_get_color::return#4 +byte vera_layer_get_color::return#5 +byte vera_layer_get_color::return#6 +byte vera_layer_get_color::return#7 +byte vera_layer_get_mapbase_bank(byte vera_layer_get_mapbase_bank::layer) +byte vera_layer_get_mapbase_bank::layer +byte vera_layer_get_mapbase_bank::layer#0 +byte vera_layer_get_mapbase_bank::layer#1 +byte vera_layer_get_mapbase_bank::return +byte vera_layer_get_mapbase_bank::return#0 +byte vera_layer_get_mapbase_bank::return#1 +byte vera_layer_get_mapbase_bank::return#2 +byte vera_layer_get_mapbase_bank::return#3 +byte vera_layer_get_mapbase_bank::return#4 +word vera_layer_get_mapbase_offset(byte vera_layer_get_mapbase_offset::layer) +byte~ vera_layer_get_mapbase_offset::$0 +byte vera_layer_get_mapbase_offset::layer +byte vera_layer_get_mapbase_offset::layer#0 +byte vera_layer_get_mapbase_offset::layer#1 +word vera_layer_get_mapbase_offset::return +word vera_layer_get_mapbase_offset::return#0 +word vera_layer_get_mapbase_offset::return#1 +word vera_layer_get_mapbase_offset::return#2 +word vera_layer_get_mapbase_offset::return#3 +word vera_layer_get_mapbase_offset::return#4 +byte vera_layer_get_rowshift(byte vera_layer_get_rowshift::layer) +byte vera_layer_get_rowshift::layer +byte vera_layer_get_rowshift::layer#0 +byte vera_layer_get_rowshift::layer#1 +byte vera_layer_get_rowshift::return +byte vera_layer_get_rowshift::return#0 +byte vera_layer_get_rowshift::return#1 +byte vera_layer_get_rowshift::return#2 +byte vera_layer_get_rowshift::return#3 +byte vera_layer_get_rowshift::return#4 +word vera_layer_get_rowskip(byte vera_layer_get_rowskip::layer) +byte~ vera_layer_get_rowskip::$0 +byte vera_layer_get_rowskip::layer +byte vera_layer_get_rowskip::layer#0 +byte vera_layer_get_rowskip::layer#1 +word vera_layer_get_rowskip::return +word vera_layer_get_rowskip::return#0 +word vera_layer_get_rowskip::return#1 +word vera_layer_get_rowskip::return#2 +word vera_layer_get_rowskip::return#3 +word vera_layer_get_rowskip::return#4 +byte vera_layer_get_textcolor(byte vera_layer_get_textcolor::layer) +byte vera_layer_get_textcolor::layer +byte vera_layer_get_textcolor::layer#0 +byte vera_layer_get_textcolor::layer#1 +byte vera_layer_get_textcolor::return +byte vera_layer_get_textcolor::return#0 +byte vera_layer_get_textcolor::return#1 +byte vera_layer_get_textcolor::return#2 +byte vera_layer_get_textcolor::return#3 +byte vera_layer_get_textcolor::return#4 +const byte** vera_layer_mapbase[2] = { VERA_L0_MAPBASE, VERA_L1_MAPBASE } +void vera_layer_mode_text(byte vera_layer_mode_text::layer , dword vera_layer_mode_text::mapbase_address , dword vera_layer_mode_text::tilebase_address , word vera_layer_mode_text::mapwidth , word vera_layer_mode_text::mapheight , byte vera_layer_mode_text::tilewidth , byte vera_layer_mode_text::tileheight , word vera_layer_mode_text::color_mode) +word vera_layer_mode_text::color_mode +word vera_layer_mode_text::color_mode#0 +word vera_layer_mode_text::color_mode#1 +word vera_layer_mode_text::color_mode#2 +word vera_layer_mode_text::color_mode#3 +byte vera_layer_mode_text::layer +byte vera_layer_mode_text::layer#0 +byte vera_layer_mode_text::layer#1 +byte vera_layer_mode_text::layer#2 +byte vera_layer_mode_text::layer#3 +byte vera_layer_mode_text::layer#4 +byte vera_layer_mode_text::layer#5 +dword vera_layer_mode_text::mapbase_address +dword vera_layer_mode_text::mapbase_address#0 +dword vera_layer_mode_text::mapbase_address#1 +word vera_layer_mode_text::mapheight +word vera_layer_mode_text::mapheight#0 +word vera_layer_mode_text::mapheight#1 +word vera_layer_mode_text::mapwidth +word vera_layer_mode_text::mapwidth#0 +word vera_layer_mode_text::mapwidth#1 +dword vera_layer_mode_text::tilebase_address +dword vera_layer_mode_text::tilebase_address#0 +dword vera_layer_mode_text::tilebase_address#1 +byte vera_layer_mode_text::tileheight +byte vera_layer_mode_text::tileheight#0 +byte vera_layer_mode_text::tileheight#1 +byte vera_layer_mode_text::tilewidth +byte vera_layer_mode_text::tilewidth#0 +byte vera_layer_mode_text::tilewidth#1 +void vera_layer_mode_tile(byte vera_layer_mode_tile::layer , dword vera_layer_mode_tile::mapbase_address , dword vera_layer_mode_tile::tilebase_address , word vera_layer_mode_tile::mapwidth , word vera_layer_mode_tile::mapheight , byte vera_layer_mode_tile::tilewidth , byte vera_layer_mode_tile::tileheight , byte vera_layer_mode_tile::color_depth) +word~ vera_layer_mode_tile::$1 +word~ vera_layer_mode_tile::$10 +byte~ vera_layer_mode_tile::$11 +byte~ vera_layer_mode_tile::$13 +byte~ vera_layer_mode_tile::$14 +byte~ vera_layer_mode_tile::$15 +byte~ vera_layer_mode_tile::$16 +byte~ vera_layer_mode_tile::$17 +byte~ vera_layer_mode_tile::$18 +byte~ vera_layer_mode_tile::$19 +word~ vera_layer_mode_tile::$2 +byte~ vera_layer_mode_tile::$20 +dword~ vera_layer_mode_tile::$3 +word~ vera_layer_mode_tile::$4 +byte~ vera_layer_mode_tile::$5 +word~ vera_layer_mode_tile::$7 +word~ vera_layer_mode_tile::$8 +dword~ vera_layer_mode_tile::$9 +byte vera_layer_mode_tile::color_depth +byte vera_layer_mode_tile::color_depth#0 +byte vera_layer_mode_tile::color_depth#1 +byte vera_layer_mode_tile::color_depth#2 +byte vera_layer_mode_tile::color_depth#3 +byte vera_layer_mode_tile::color_depth#4 +byte vera_layer_mode_tile::config +byte vera_layer_mode_tile::config#0 +byte vera_layer_mode_tile::config#1 +byte vera_layer_mode_tile::config#10 +byte vera_layer_mode_tile::config#11 +byte vera_layer_mode_tile::config#12 +byte vera_layer_mode_tile::config#13 +byte vera_layer_mode_tile::config#14 +byte vera_layer_mode_tile::config#15 +byte vera_layer_mode_tile::config#16 +byte vera_layer_mode_tile::config#17 +byte vera_layer_mode_tile::config#18 +byte vera_layer_mode_tile::config#19 +byte vera_layer_mode_tile::config#2 +byte vera_layer_mode_tile::config#20 +byte vera_layer_mode_tile::config#21 +byte vera_layer_mode_tile::config#22 +byte vera_layer_mode_tile::config#23 +byte vera_layer_mode_tile::config#24 +byte vera_layer_mode_tile::config#25 +byte vera_layer_mode_tile::config#26 +byte vera_layer_mode_tile::config#27 +byte vera_layer_mode_tile::config#28 +byte vera_layer_mode_tile::config#29 +byte vera_layer_mode_tile::config#3 +byte vera_layer_mode_tile::config#30 +byte vera_layer_mode_tile::config#31 +byte vera_layer_mode_tile::config#32 +byte vera_layer_mode_tile::config#33 +byte vera_layer_mode_tile::config#34 +byte vera_layer_mode_tile::config#35 +byte vera_layer_mode_tile::config#36 +byte vera_layer_mode_tile::config#4 +byte vera_layer_mode_tile::config#5 +byte vera_layer_mode_tile::config#6 +byte vera_layer_mode_tile::config#7 +byte vera_layer_mode_tile::config#8 +byte vera_layer_mode_tile::config#9 +byte vera_layer_mode_tile::layer +byte vera_layer_mode_tile::layer#0 +byte vera_layer_mode_tile::layer#1 +byte vera_layer_mode_tile::layer#10 +byte vera_layer_mode_tile::layer#11 +byte vera_layer_mode_tile::layer#12 +byte vera_layer_mode_tile::layer#13 +byte vera_layer_mode_tile::layer#14 +byte vera_layer_mode_tile::layer#15 +byte vera_layer_mode_tile::layer#16 +byte vera_layer_mode_tile::layer#17 +byte vera_layer_mode_tile::layer#18 +byte vera_layer_mode_tile::layer#19 +byte vera_layer_mode_tile::layer#2 +byte vera_layer_mode_tile::layer#20 +byte vera_layer_mode_tile::layer#21 +byte vera_layer_mode_tile::layer#22 +byte vera_layer_mode_tile::layer#23 +byte vera_layer_mode_tile::layer#24 +byte vera_layer_mode_tile::layer#25 +byte vera_layer_mode_tile::layer#26 +byte vera_layer_mode_tile::layer#27 +byte vera_layer_mode_tile::layer#28 +byte vera_layer_mode_tile::layer#29 +byte vera_layer_mode_tile::layer#3 +byte vera_layer_mode_tile::layer#30 +byte vera_layer_mode_tile::layer#31 +byte vera_layer_mode_tile::layer#32 +byte vera_layer_mode_tile::layer#33 +byte vera_layer_mode_tile::layer#34 +byte vera_layer_mode_tile::layer#35 +byte vera_layer_mode_tile::layer#4 +byte vera_layer_mode_tile::layer#5 +byte vera_layer_mode_tile::layer#6 +byte vera_layer_mode_tile::layer#7 +byte vera_layer_mode_tile::layer#8 +byte vera_layer_mode_tile::layer#9 +byte vera_layer_mode_tile::mapbase +byte vera_layer_mode_tile::mapbase#0 +dword vera_layer_mode_tile::mapbase_address +dword vera_layer_mode_tile::mapbase_address#0 +dword vera_layer_mode_tile::mapbase_address#1 +dword vera_layer_mode_tile::mapbase_address#10 +dword vera_layer_mode_tile::mapbase_address#11 +dword vera_layer_mode_tile::mapbase_address#12 +dword vera_layer_mode_tile::mapbase_address#13 +dword vera_layer_mode_tile::mapbase_address#14 +dword vera_layer_mode_tile::mapbase_address#15 +dword vera_layer_mode_tile::mapbase_address#16 +dword vera_layer_mode_tile::mapbase_address#17 +dword vera_layer_mode_tile::mapbase_address#18 +dword vera_layer_mode_tile::mapbase_address#19 +dword vera_layer_mode_tile::mapbase_address#2 +dword vera_layer_mode_tile::mapbase_address#20 +dword vera_layer_mode_tile::mapbase_address#21 +dword vera_layer_mode_tile::mapbase_address#22 +dword vera_layer_mode_tile::mapbase_address#23 +dword vera_layer_mode_tile::mapbase_address#24 +dword vera_layer_mode_tile::mapbase_address#25 +dword vera_layer_mode_tile::mapbase_address#26 +dword vera_layer_mode_tile::mapbase_address#27 +dword vera_layer_mode_tile::mapbase_address#3 +dword vera_layer_mode_tile::mapbase_address#4 +dword vera_layer_mode_tile::mapbase_address#5 +dword vera_layer_mode_tile::mapbase_address#6 +dword vera_layer_mode_tile::mapbase_address#7 +dword vera_layer_mode_tile::mapbase_address#8 +dword vera_layer_mode_tile::mapbase_address#9 +word vera_layer_mode_tile::mapheight +word vera_layer_mode_tile::mapheight#0 +word vera_layer_mode_tile::mapheight#1 +word vera_layer_mode_tile::mapheight#10 +word vera_layer_mode_tile::mapheight#11 +word vera_layer_mode_tile::mapheight#12 +word vera_layer_mode_tile::mapheight#13 +word vera_layer_mode_tile::mapheight#14 +word vera_layer_mode_tile::mapheight#15 +word vera_layer_mode_tile::mapheight#16 +word vera_layer_mode_tile::mapheight#17 +word vera_layer_mode_tile::mapheight#18 +word vera_layer_mode_tile::mapheight#19 +word vera_layer_mode_tile::mapheight#2 +word vera_layer_mode_tile::mapheight#20 +word vera_layer_mode_tile::mapheight#3 +word vera_layer_mode_tile::mapheight#4 +word vera_layer_mode_tile::mapheight#5 +word vera_layer_mode_tile::mapheight#6 +word vera_layer_mode_tile::mapheight#7 +word vera_layer_mode_tile::mapheight#8 +word vera_layer_mode_tile::mapheight#9 +word vera_layer_mode_tile::mapwidth +word vera_layer_mode_tile::mapwidth#0 +word vera_layer_mode_tile::mapwidth#1 +word vera_layer_mode_tile::mapwidth#10 +word vera_layer_mode_tile::mapwidth#11 +word vera_layer_mode_tile::mapwidth#12 +word vera_layer_mode_tile::mapwidth#2 +word vera_layer_mode_tile::mapwidth#3 +word vera_layer_mode_tile::mapwidth#4 +word vera_layer_mode_tile::mapwidth#5 +word vera_layer_mode_tile::mapwidth#6 +word vera_layer_mode_tile::mapwidth#7 +word vera_layer_mode_tile::mapwidth#8 +word vera_layer_mode_tile::mapwidth#9 +byte vera_layer_mode_tile::tilebase +byte vera_layer_mode_tile::tilebase#0 +byte vera_layer_mode_tile::tilebase#1 +byte vera_layer_mode_tile::tilebase#10 +byte vera_layer_mode_tile::tilebase#11 +byte vera_layer_mode_tile::tilebase#12 +byte vera_layer_mode_tile::tilebase#13 +byte vera_layer_mode_tile::tilebase#2 +byte vera_layer_mode_tile::tilebase#3 +byte vera_layer_mode_tile::tilebase#4 +byte vera_layer_mode_tile::tilebase#5 +byte vera_layer_mode_tile::tilebase#6 +byte vera_layer_mode_tile::tilebase#7 +byte vera_layer_mode_tile::tilebase#8 +byte vera_layer_mode_tile::tilebase#9 +dword vera_layer_mode_tile::tilebase_address +dword vera_layer_mode_tile::tilebase_address#0 +dword vera_layer_mode_tile::tilebase_address#1 +dword vera_layer_mode_tile::tilebase_address#10 +dword vera_layer_mode_tile::tilebase_address#11 +dword vera_layer_mode_tile::tilebase_address#12 +dword vera_layer_mode_tile::tilebase_address#13 +dword vera_layer_mode_tile::tilebase_address#14 +dword vera_layer_mode_tile::tilebase_address#15 +dword vera_layer_mode_tile::tilebase_address#16 +dword vera_layer_mode_tile::tilebase_address#17 +dword vera_layer_mode_tile::tilebase_address#18 +dword vera_layer_mode_tile::tilebase_address#19 +dword vera_layer_mode_tile::tilebase_address#2 +dword vera_layer_mode_tile::tilebase_address#20 +dword vera_layer_mode_tile::tilebase_address#21 +dword vera_layer_mode_tile::tilebase_address#22 +dword vera_layer_mode_tile::tilebase_address#23 +dword vera_layer_mode_tile::tilebase_address#24 +dword vera_layer_mode_tile::tilebase_address#25 +dword vera_layer_mode_tile::tilebase_address#26 +dword vera_layer_mode_tile::tilebase_address#27 +dword vera_layer_mode_tile::tilebase_address#28 +dword vera_layer_mode_tile::tilebase_address#3 +dword vera_layer_mode_tile::tilebase_address#4 +dword vera_layer_mode_tile::tilebase_address#5 +dword vera_layer_mode_tile::tilebase_address#6 +dword vera_layer_mode_tile::tilebase_address#7 +dword vera_layer_mode_tile::tilebase_address#8 +dword vera_layer_mode_tile::tilebase_address#9 +byte vera_layer_mode_tile::tileheight +byte vera_layer_mode_tile::tileheight#0 +byte vera_layer_mode_tile::tileheight#1 +byte vera_layer_mode_tile::tileheight#10 +byte vera_layer_mode_tile::tileheight#11 +byte vera_layer_mode_tile::tileheight#12 +byte vera_layer_mode_tile::tileheight#13 +byte vera_layer_mode_tile::tileheight#14 +byte vera_layer_mode_tile::tileheight#15 +byte vera_layer_mode_tile::tileheight#16 +byte vera_layer_mode_tile::tileheight#17 +byte vera_layer_mode_tile::tileheight#18 +byte vera_layer_mode_tile::tileheight#19 +byte vera_layer_mode_tile::tileheight#2 +byte vera_layer_mode_tile::tileheight#20 +byte vera_layer_mode_tile::tileheight#21 +byte vera_layer_mode_tile::tileheight#22 +byte vera_layer_mode_tile::tileheight#23 +byte vera_layer_mode_tile::tileheight#24 +byte vera_layer_mode_tile::tileheight#25 +byte vera_layer_mode_tile::tileheight#26 +byte vera_layer_mode_tile::tileheight#27 +byte vera_layer_mode_tile::tileheight#28 +byte vera_layer_mode_tile::tileheight#29 +byte vera_layer_mode_tile::tileheight#3 +byte vera_layer_mode_tile::tileheight#30 +byte vera_layer_mode_tile::tileheight#31 +byte vera_layer_mode_tile::tileheight#32 +byte vera_layer_mode_tile::tileheight#4 +byte vera_layer_mode_tile::tileheight#5 +byte vera_layer_mode_tile::tileheight#6 +byte vera_layer_mode_tile::tileheight#7 +byte vera_layer_mode_tile::tileheight#8 +byte vera_layer_mode_tile::tileheight#9 +byte vera_layer_mode_tile::tilewidth +byte vera_layer_mode_tile::tilewidth#0 +byte vera_layer_mode_tile::tilewidth#1 +byte vera_layer_mode_tile::tilewidth#10 +byte vera_layer_mode_tile::tilewidth#11 +byte vera_layer_mode_tile::tilewidth#12 +byte vera_layer_mode_tile::tilewidth#13 +byte vera_layer_mode_tile::tilewidth#14 +byte vera_layer_mode_tile::tilewidth#15 +byte vera_layer_mode_tile::tilewidth#16 +byte vera_layer_mode_tile::tilewidth#17 +byte vera_layer_mode_tile::tilewidth#18 +byte vera_layer_mode_tile::tilewidth#19 +byte vera_layer_mode_tile::tilewidth#2 +byte vera_layer_mode_tile::tilewidth#20 +byte vera_layer_mode_tile::tilewidth#21 +byte vera_layer_mode_tile::tilewidth#22 +byte vera_layer_mode_tile::tilewidth#23 +byte vera_layer_mode_tile::tilewidth#24 +byte vera_layer_mode_tile::tilewidth#25 +byte vera_layer_mode_tile::tilewidth#26 +byte vera_layer_mode_tile::tilewidth#27 +byte vera_layer_mode_tile::tilewidth#28 +byte vera_layer_mode_tile::tilewidth#3 +byte vera_layer_mode_tile::tilewidth#4 +byte vera_layer_mode_tile::tilewidth#5 +byte vera_layer_mode_tile::tilewidth#6 +byte vera_layer_mode_tile::tilewidth#7 +byte vera_layer_mode_tile::tilewidth#8 +byte vera_layer_mode_tile::tilewidth#9 +const byte* vera_layer_rowshift[2] = { 0, 0 } +const word* vera_layer_rowskip[2] = { 0, 0 } +byte vera_layer_set_backcolor(byte vera_layer_set_backcolor::layer , byte vera_layer_set_backcolor::color) +byte vera_layer_set_backcolor::color +byte vera_layer_set_backcolor::color#0 +byte vera_layer_set_backcolor::color#1 +byte vera_layer_set_backcolor::layer +byte vera_layer_set_backcolor::layer#0 +byte vera_layer_set_backcolor::layer#1 +byte vera_layer_set_backcolor::old +byte vera_layer_set_backcolor::old#0 +byte vera_layer_set_backcolor::return +byte vera_layer_set_backcolor::return#0 +byte vera_layer_set_backcolor::return#1 +byte vera_layer_set_backcolor::return#2 +byte vera_layer_set_backcolor::return#3 +void vera_layer_set_config(byte vera_layer_set_config::layer , byte vera_layer_set_config::config) +byte~ vera_layer_set_config::$0 +byte* vera_layer_set_config::addr +byte* vera_layer_set_config::addr#0 +byte vera_layer_set_config::config +byte vera_layer_set_config::config#0 +byte vera_layer_set_config::config#1 +byte vera_layer_set_config::layer +byte vera_layer_set_config::layer#0 +byte vera_layer_set_config::layer#1 +void vera_layer_set_mapbase(byte vera_layer_set_mapbase::layer , byte vera_layer_set_mapbase::mapbase) +byte~ vera_layer_set_mapbase::$0 +byte* vera_layer_set_mapbase::addr +byte* vera_layer_set_mapbase::addr#0 +byte vera_layer_set_mapbase::layer +byte vera_layer_set_mapbase::layer#0 +byte vera_layer_set_mapbase::layer#1 +byte vera_layer_set_mapbase::layer#2 +byte vera_layer_set_mapbase::layer#3 +byte vera_layer_set_mapbase::mapbase +byte vera_layer_set_mapbase::mapbase#0 +byte vera_layer_set_mapbase::mapbase#1 +byte vera_layer_set_mapbase::mapbase#2 +byte vera_layer_set_mapbase::mapbase#3 +void vera_layer_set_text_color_mode(byte vera_layer_set_text_color_mode::layer , byte vera_layer_set_text_color_mode::color_mode) +byte~ vera_layer_set_text_color_mode::$0 +byte* vera_layer_set_text_color_mode::addr +byte* vera_layer_set_text_color_mode::addr#0 +byte vera_layer_set_text_color_mode::color_mode +byte vera_layer_set_text_color_mode::color_mode#0 +byte vera_layer_set_text_color_mode::color_mode#1 +byte vera_layer_set_text_color_mode::color_mode#2 +byte vera_layer_set_text_color_mode::color_mode#3 +byte vera_layer_set_text_color_mode::layer +byte vera_layer_set_text_color_mode::layer#0 +byte vera_layer_set_text_color_mode::layer#1 +byte vera_layer_set_text_color_mode::layer#2 +byte vera_layer_set_text_color_mode::layer#3 +byte vera_layer_set_textcolor(byte vera_layer_set_textcolor::layer , byte vera_layer_set_textcolor::color) +byte vera_layer_set_textcolor::color +byte vera_layer_set_textcolor::color#0 +byte vera_layer_set_textcolor::color#1 +byte vera_layer_set_textcolor::layer +byte vera_layer_set_textcolor::layer#0 +byte vera_layer_set_textcolor::layer#1 +byte vera_layer_set_textcolor::old +byte vera_layer_set_textcolor::old#0 +byte vera_layer_set_textcolor::return +byte vera_layer_set_textcolor::return#0 +byte vera_layer_set_textcolor::return#1 +byte vera_layer_set_textcolor::return#2 +byte vera_layer_set_textcolor::return#3 +void vera_layer_set_tilebase(byte vera_layer_set_tilebase::layer , byte vera_layer_set_tilebase::tilebase) +byte~ vera_layer_set_tilebase::$0 +byte* vera_layer_set_tilebase::addr +byte* vera_layer_set_tilebase::addr#0 +byte vera_layer_set_tilebase::layer +byte vera_layer_set_tilebase::layer#0 +byte vera_layer_set_tilebase::layer#1 +byte vera_layer_set_tilebase::tilebase +byte vera_layer_set_tilebase::tilebase#0 +byte vera_layer_set_tilebase::tilebase#1 +const byte* vera_layer_textcolor[2] = { WHITE, WHITE } +const byte** vera_layer_tilebase[2] = { VERA_L0_TILEBASE, VERA_L1_TILEBASE } +const dword* vera_mapbase_address[2] = { 0, 0 } +const byte* vera_mapbase_bank[2] = { 0, 0 } +const word* vera_mapbase_offset[2] = { 0, 0 } +const dword* vera_tilebase_address[2] = { 0, 0 } +const byte* vera_tilebase_bank[2] = { 0, 0 } +const word* vera_tilebase_offset[2] = { 0, 0 } + +Adding number conversion cast (unumber) > 5 +Adding number conversion cast (unumber) 3 in LoadFileBanked::$10 = LoadFileBanked::$9 << 3 +Adding number conversion cast (unumber) $1fff in LoadFileBanked::$14 = LoadFileBanked::$13 & $1fff +Adding number conversion cast (unumber) LoadFileBanked::$14 in LoadFileBanked::$14 = LoadFileBanked::$13 & (unumber)$1fff +Adding number conversion cast (unumber) $a000 in LoadFileBanked::addr#1 = LoadFileBanked::addr#0 + $a000 +Adding number conversion cast (unumber) 0 in load::verify = 0 +Adding number conversion cast (unumber) 8 in bnkcpy_vram_address::$8 = bnkcpy_vram_address::$7 << 8 +Adding number conversion cast (unumber) 5 in bnkcpy_vram_address::$13 = bnkcpy_vram_address::$12 >> 5 +Adding number conversion cast (unumber) 3 in bnkcpy_vram_address::$15 = bnkcpy_vram_address::$14 << 3 +Adding number conversion cast (unumber) $1fff in bnkcpy_vram_address::$19 = bnkcpy_vram_address::$18 & $1fff +Adding number conversion cast (unumber) bnkcpy_vram_address::$19 in bnkcpy_vram_address::$19 = bnkcpy_vram_address::$18 & (unumber)$1fff +Adding number conversion cast (unumber) $a000 in bnkcpy_vram_address::addr#1 = bnkcpy_vram_address::addr#0 + $a000 +Adding number conversion cast (unumber) $c000 in bnkcpy_vram_address::$21 = bnkcpy_vram_address::addr#4 == $c000 +Adding number conversion cast (unumber) 0 in vera_layer_get_color::$4 = 0 != vera_layer_get_color::$0 +Adding number conversion cast (unumber) 4 in vera_layer_get_color::$1 = vera_layer_backcolor[vera_layer_get_color::layer#4] << 4 +Adding number conversion cast (unumber) 1 in if(vera_layer_mode_tile::color_depth#1==1) goto vera_layer_mode_tile::@4 +Adding number conversion cast (unumber) 2 in if(vera_layer_mode_tile::color_depth#2==2) goto vera_layer_mode_tile::@5 +Adding number conversion cast (unumber) 4 in if(vera_layer_mode_tile::color_depth#3==4) goto vera_layer_mode_tile::@6 +Adding number conversion cast (unumber) 8 in if(vera_layer_mode_tile::color_depth#4==8) goto vera_layer_mode_tile::@7 +Adding number conversion cast (unumber) $20 in if(vera_layer_mode_tile::mapwidth#1==$20) goto vera_layer_mode_tile::@12 +Adding number conversion cast (unumber) 6 in vera_layer_rowshift[vera_layer_mode_tile::layer#1] = 6 +Adding number conversion cast (unumber) $40 in vera_layer_rowskip[vera_layer_mode_tile::$13] = $40 +Adding number conversion cast (unumber) $40 in if(vera_layer_mode_tile::mapwidth#2==$40) goto vera_layer_mode_tile::@13 +Adding number conversion cast (unumber) 7 in vera_layer_rowshift[vera_layer_mode_tile::layer#2] = 7 +Adding number conversion cast (unumber) $80 in vera_layer_rowskip[vera_layer_mode_tile::$14] = $80 +Adding number conversion cast (unumber) $80 in if(vera_layer_mode_tile::mapwidth#3==$80) goto vera_layer_mode_tile::@14 +Adding number conversion cast (unumber) 8 in vera_layer_rowshift[vera_layer_mode_tile::layer#3] = 8 +Adding number conversion cast (unumber) $100 in vera_layer_rowskip[vera_layer_mode_tile::$15] = $100 +Adding number conversion cast (unumber) $100 in if(vera_layer_mode_tile::mapwidth#4==$100) goto vera_layer_mode_tile::@15 +Adding number conversion cast (unumber) 9 in vera_layer_rowshift[vera_layer_mode_tile::layer#4] = 9 +Adding number conversion cast (unumber) $200 in vera_layer_rowskip[vera_layer_mode_tile::$16] = $200 +Adding number conversion cast (unumber) $20 in if(vera_layer_mode_tile::mapheight#1==$20) goto vera_layer_mode_tile::@20 +Adding number conversion cast (unumber) $40 in if(vera_layer_mode_tile::mapheight#2==$40) goto vera_layer_mode_tile::@21 +Adding number conversion cast (unumber) $80 in if(vera_layer_mode_tile::mapheight#3==$80) goto vera_layer_mode_tile::@22 +Adding number conversion cast (unumber) $100 in if(vera_layer_mode_tile::mapheight#4==$100) goto vera_layer_mode_tile::@23 +Adding number conversion cast (unumber) 1 in vera_layer_mode_tile::$3 = vera_layer_mode_tile::mapbase_address#2 >> 1 +Adding number conversion cast (unumber) 1 in vera_layer_mode_tile::$9 = vera_layer_mode_tile::tilebase_address#2 >> 1 +Adding number conversion cast (unumber) 8 in if(vera_layer_mode_tile::tilewidth#1==8) goto vera_layer_mode_tile::@26 +Adding number conversion cast (unumber) $10 in if(vera_layer_mode_tile::tilewidth#2==$10) goto vera_layer_mode_tile::@27 +Adding number conversion cast (unumber) 8 in if(vera_layer_mode_tile::tileheight#1==8) goto vera_layer_mode_tile::@30 +Adding number conversion cast (unumber) $10 in if(vera_layer_mode_tile::tileheight#2==$10) goto vera_layer_mode_tile::@31 +Adding number conversion cast (unumber) 1 in vera_layer_mode_tile::color_depth#0 = 1 +Adding number conversion cast (unumber) $10 in if(vera_layer_mode_text::color_mode#1==$10) goto vera_layer_mode_text::@2 +Adding number conversion cast (unumber) $100 in if(vera_layer_mode_text::color_mode#2==$100) goto vera_layer_mode_text::@3 +Adding number conversion cast (unumber) 1 in vera_layer_mode_text::layer#0 = 1 +Adding number conversion cast (unumber) $80 in vera_layer_mode_text::mapwidth#0 = $80 +Adding number conversion cast (unumber) $40 in vera_layer_mode_text::mapheight#0 = $40 +Adding number conversion cast (unumber) 8 in vera_layer_mode_text::tilewidth#0 = 8 +Adding number conversion cast (unumber) 8 in vera_layer_mode_text::tileheight#0 = 8 +Adding number conversion cast (unumber) $10 in vera_layer_mode_text::color_mode#0 = $10 +Adding number conversion cast (unumber) 1 in screenlayer::layer#0 = 1 +Adding number conversion cast (unumber) 1 in vera_layer_set_textcolor::layer#0 = 1 +Adding number conversion cast (unumber) 1 in vera_layer_set_backcolor::layer#0 = 1 +Adding number conversion cast (unumber) 0 in vera_layer_set_mapbase::layer#1 = 0 +Adding number conversion cast (unumber) $20 in vera_layer_set_mapbase::mapbase#1 = $20 +Adding number conversion cast (unumber) 1 in vera_layer_set_mapbase::layer#2 = 1 +Adding number conversion cast (unumber) 0 in vera_layer_set_mapbase::mapbase#2 = 0 +Adding number conversion cast (unumber) 0 in gotoxy::x#0 = 0 +Adding number conversion cast (unumber) 1 in conio_x16_init::$9 = conio_screen_height - 1 +Adding number conversion cast (unumber) conio_x16_init::$9 in conio_x16_init::$9 = conio_screen_height - (unumber)1 +Adding number conversion cast (unumber) 4 in clrscr::$1 = clrscr::$0 << 4 +Adding number conversion cast (unumber) 0 in conio_cursor_x[conio_screen_layer] = 0 +Adding number conversion cast (unumber) 0 in conio_cursor_y[conio_screen_layer] = 0 +Adding number conversion cast (unumber) 0 in conio_line_text[clrscr::$9] = 0 +Adding number conversion cast (unumber) 0 in gotoxy::y#1 = 0 +Adding number conversion cast (unumber) 0 in gotoxy::x#1 = 0 +Adding number conversion cast (unumber) 7 in screensize::$0 = *VERA_DC_HSCALE >> 7 +Adding number conversion cast (unumber) $28 in screensize::$1 = $28 << screensize::hscale#0 +Adding number conversion cast (unumber) screensize::$1 in screensize::$1 = (unumber)$28 << screensize::hscale#0 +Adding number conversion cast (unumber) 7 in screensize::$2 = *VERA_DC_VSCALE >> 7 +Adding number conversion cast (unumber) $1e in screensize::$3 = $1e << screensize::vscale#0 +Adding number conversion cast (unumber) screensize::$3 in screensize::$3 = (unumber)$1e << screensize::vscale#0 +Adding number conversion cast (unumber) 1 in cputc::$2 = conio_cursor_x[conio_screen_layer] << 1 +Adding number conversion cast (unumber) 0 in cputc::$17 = 0 != cputc::scroll_enable#0 +Adding number conversion cast (unumber) 0 in conio_cursor_x[conio_screen_layer] = 0 +Adding number conversion cast (unumber) 0 in conio_cursor_x[conio_screen_layer] = 0 +Adding number conversion cast (unumber) 2 in insertup::$0 = conio_screen_width * 2 +Adding number conversion cast (unumber) insertup::$0 in insertup::$0 = conio_screen_width * (unumber)2 +Adding number conversion cast (unumber) 1 in insertup::$3 = insertup::i#3 - 1 +Adding number conversion cast (unumber) insertup::$3 in insertup::$3 = insertup::i#3 - (unumber)1 +Adding number conversion cast (unumber) insertup::$4 in insertup::$4 = insertup::$3 << conio_rowshift +Adding number conversion cast (unumber) 0 in memcpy_in_vram::dest_bank#0 = 0 +Adding number conversion cast (unumber) 0 in memcpy_in_vram::src_bank#0 = 0 +Adding number conversion cast (unumber) 0 in cscroll::$7 = 0 != conio_scroll_enable[conio_screen_layer] +Adding number conversion cast (unumber) 1 in cscroll::$5 = conio_screen_height - 1 +Adding number conversion cast (unumber) cscroll::$5 in cscroll::$5 = conio_screen_height - (unumber)1 +Adding number conversion cast (unumber) 0 in gotoxy::x#2 = 0 +Adding number conversion cast (unumber) 0 in cputs::$2 = 0 != cputs::$0 +Adding number conversion cast (unumber) 4 in screenlayer::vera_layer_get_width1_$1 = screenlayer::vera_layer_get_width1_$0 >> 4 +Adding number conversion cast (unumber) 6 in screenlayer::vera_layer_get_height1_$1 = screenlayer::vera_layer_get_height1_$0 >> 6 +Adding number conversion cast (unumber) 1 in vera_layer_set_text_color_mode::layer#2 = 1 +Adding number conversion cast (unumber) 1 in screenlayer::layer#1 = 1 +Adding number conversion cast (unumber) 8 in LoadFileBanked::device#0 = 8 +Adding number conversion cast (unumber) VERA_PALETTE+$20 in bnkcpy_vram_address::vdest#0 = VERA_PALETTE+$20 +Adding number conversion cast (unumber) $20 in bnkcpy_vram_address::vdest#0 = ((unumber)) VERA_PALETTE+$20 +Adding number conversion cast (unumber) main::BANK_SPRITE-2 in bnkcpy_vram_address::src#0 = main::BANK_SPRITE-2 +Adding number conversion cast (unumber) 2 in bnkcpy_vram_address::src#0 = ((unumber)) main::BANK_SPRITE-2 +Adding number conversion cast (unumber) $20 in bnkcpy_vram_address::num#0 = $20 +Adding number conversion cast (unumber) main::BANK_SPRITE+$20-2 in bnkcpy_vram_address::src#1 = main::BANK_SPRITE+$20-2 +Adding number conversion cast (unumber) $20 in bnkcpy_vram_address::src#1 = ((unumber)) main::BANK_SPRITE+$20-2 +Adding number conversion cast (unumber) $40*$20 in bnkcpy_vram_address::num#1 = $40*$20 +Adding number conversion cast (unumber) = conio_screen_height +Inversing boolean not [478] gotoxy::$1 = gotoxy::y#3 <= conio_screen_height from [477] gotoxy::$0 = gotoxy::y#3 > conio_screen_height +Inversing boolean not [482] gotoxy::$3 = gotoxy::x#3 < conio_screen_width from [481] gotoxy::$2 = gotoxy::x#3 >= conio_screen_width +Inversing boolean not [539] cputc::$12 = conio_cursor_x[conio_screen_layer] != conio_screen_width from [538] cputc::$11 = conio_cursor_x[conio_screen_layer] == conio_screen_width +Inversing boolean not [544] cputc::$9 = cputc::$16 != conio_width from [543] cputc::$8 = cputc::$16 == conio_width +Inversing boolean not [617] cscroll::$1 = conio_cursor_y[conio_screen_layer] < conio_screen_height from [616] cscroll::$0 = conio_cursor_y[conio_screen_layer] >= conio_screen_height +Inversing boolean not [629] cscroll::$3 = conio_cursor_y[conio_screen_layer] < conio_height from [628] cscroll::$2 = conio_cursor_y[conio_screen_layer] >= conio_height +Successful SSA optimization Pass2UnaryNotSimplification +Alias candidate removed (volatile)load::return#0 = load::status load::return#3 load::return#1 +Alias candidate removed (volatile)screenlayer::vera_layer_get_width1_return#0 = screenlayer::vera_layer_get_width1_return#2 screenlayer::vera_layer_get_width1_return#1 screenlayer::vera_layer_get_width1_return#3 screenlayer::$2 conio_width +Alias candidate removed (volatile)conio_rowshift = screenlayer::$3 +Alias candidate removed (volatile)conio_rowskip = screenlayer::$4 +Alias candidate removed (volatile)screenlayer::vera_layer_get_height1_return#0 = screenlayer::vera_layer_get_height1_return#2 screenlayer::vera_layer_get_height1_return#1 screenlayer::vera_layer_get_height1_return#3 screenlayer::$5 conio_height +Alias strlen::len#2 = strlen::len#4 strlen::len#3 strlen::return#0 strlen::return#3 strlen::return#1 +Alias strlen::str#2 = strlen::str#3 +Alias strlen::return#2 = strlen::return#4 +Alias LoadFileBanked::device#1 = LoadFileBanked::device#2 +Alias LoadFileBanked::address#1 = LoadFileBanked::address#2 LoadFileBanked::address#3 +Alias load::return#2 = load::return#4 +Alias LoadFileBanked::return#0 = LoadFileBanked::$15 LoadFileBanked::return#3 LoadFileBanked::return#1 +Alias memcpy_to_vram::end#0 = memcpy_to_vram::$3 +Alias memcpy_to_vram::s#2 = memcpy_to_vram::s#3 +Alias memcpy_to_vram::end#1 = memcpy_to_vram::end#2 +Alias bnkcpy_vram_address::beg#0 = bnkcpy_vram_address::src#2 bnkcpy_vram_address::pos#0 +Alias bnkcpy_vram_address::end#0 = bnkcpy_vram_address::$6 +Alias bnkcpy_vram_address::addr#4 = bnkcpy_vram_address::addr#6 +Alias bnkcpy_vram_address::pos#2 = bnkcpy_vram_address::pos#4 bnkcpy_vram_address::pos#5 +Alias bnkcpy_vram_address::bank#2 = bnkcpy_vram_address::bank#3 bnkcpy_vram_address::bank#4 +Alias bnkcpy_vram_address::end#1 = bnkcpy_vram_address::end#3 bnkcpy_vram_address::end#4 +Alias memcpy_in_vram::i#2 = memcpy_in_vram::i#3 +Alias memcpy_in_vram::num#1 = memcpy_in_vram::num#3 +Alias vera_layer_get_mapbase_bank::return#0 = vera_layer_get_mapbase_bank::return#3 vera_layer_get_mapbase_bank::return#1 +Alias vera_layer_get_mapbase_offset::return#0 = vera_layer_get_mapbase_offset::return#3 vera_layer_get_mapbase_offset::return#1 +Alias vera_layer_set_textcolor::return#0 = vera_layer_set_textcolor::old#0 vera_layer_set_textcolor::return#3 vera_layer_set_textcolor::return#1 +Alias vera_layer_get_textcolor::return#0 = vera_layer_get_textcolor::return#3 vera_layer_get_textcolor::return#1 +Alias vera_layer_set_backcolor::return#0 = vera_layer_set_backcolor::old#0 vera_layer_set_backcolor::return#3 vera_layer_set_backcolor::return#1 +Alias vera_layer_get_backcolor::return#0 = vera_layer_get_backcolor::return#3 vera_layer_get_backcolor::return#1 +Alias vera_layer_get_color::layer#2 = vera_layer_get_color::layer#3 vera_layer_get_color::layer#4 +Alias vera_layer_get_color::return#1 = vera_layer_get_color::$2 +Alias vera_layer_get_color::return#2 = vera_layer_get_color::return#5 +Alias vera_layer_get_rowshift::return#0 = vera_layer_get_rowshift::return#3 vera_layer_get_rowshift::return#1 +Alias vera_layer_get_rowskip::return#0 = vera_layer_get_rowskip::return#3 vera_layer_get_rowskip::return#1 +Alias vera_layer_mode_tile::config#0 = vera_layer_mode_tile::config#13 vera_layer_mode_tile::config#26 vera_layer_mode_tile::config#14 vera_layer_mode_tile::config#27 vera_layer_mode_tile::config#15 vera_layer_mode_tile::config#28 vera_layer_mode_tile::config#16 +Alias vera_layer_mode_tile::mapwidth#10 = vera_layer_mode_tile::mapwidth#6 vera_layer_mode_tile::mapwidth#11 vera_layer_mode_tile::mapwidth#7 vera_layer_mode_tile::mapwidth#12 vera_layer_mode_tile::mapwidth#8 vera_layer_mode_tile::mapwidth#5 vera_layer_mode_tile::mapwidth#9 +Alias vera_layer_mode_tile::layer#21 = vera_layer_mode_tile::layer#22 vera_layer_mode_tile::layer#30 vera_layer_mode_tile::layer#31 vera_layer_mode_tile::layer#23 vera_layer_mode_tile::layer#32 vera_layer_mode_tile::layer#24 vera_layer_mode_tile::layer#25 +Alias vera_layer_mode_tile::mapheight#13 = vera_layer_mode_tile::mapheight#14 vera_layer_mode_tile::mapheight#18 vera_layer_mode_tile::mapheight#19 vera_layer_mode_tile::mapheight#15 vera_layer_mode_tile::mapheight#20 vera_layer_mode_tile::mapheight#16 vera_layer_mode_tile::mapheight#17 +Alias vera_layer_mode_tile::mapbase_address#20 = vera_layer_mode_tile::mapbase_address#21 vera_layer_mode_tile::mapbase_address#25 vera_layer_mode_tile::mapbase_address#26 vera_layer_mode_tile::mapbase_address#22 vera_layer_mode_tile::mapbase_address#27 vera_layer_mode_tile::mapbase_address#23 vera_layer_mode_tile::mapbase_address#24 +Alias vera_layer_mode_tile::tilebase_address#21 = vera_layer_mode_tile::tilebase_address#22 vera_layer_mode_tile::tilebase_address#26 vera_layer_mode_tile::tilebase_address#27 vera_layer_mode_tile::tilebase_address#23 vera_layer_mode_tile::tilebase_address#28 vera_layer_mode_tile::tilebase_address#24 vera_layer_mode_tile::tilebase_address#25 +Alias vera_layer_mode_tile::tilewidth#21 = vera_layer_mode_tile::tilewidth#22 vera_layer_mode_tile::tilewidth#26 vera_layer_mode_tile::tilewidth#27 vera_layer_mode_tile::tilewidth#23 vera_layer_mode_tile::tilewidth#28 vera_layer_mode_tile::tilewidth#24 vera_layer_mode_tile::tilewidth#25 +Alias vera_layer_mode_tile::tileheight#25 = vera_layer_mode_tile::tileheight#26 vera_layer_mode_tile::tileheight#30 vera_layer_mode_tile::tileheight#31 vera_layer_mode_tile::tileheight#27 vera_layer_mode_tile::tileheight#32 vera_layer_mode_tile::tileheight#28 vera_layer_mode_tile::tileheight#29 +Alias vera_layer_mode_tile::color_depth#1 = vera_layer_mode_tile::color_depth#2 vera_layer_mode_tile::color_depth#3 vera_layer_mode_tile::color_depth#4 +Alias vera_layer_mode_tile::config#17 = vera_layer_mode_tile::config#29 vera_layer_mode_tile::config#30 vera_layer_mode_tile::config#18 vera_layer_mode_tile::config#31 vera_layer_mode_tile::config#19 vera_layer_mode_tile::config#32 vera_layer_mode_tile::config#20 +Alias vera_layer_mode_tile::layer#1 = vera_layer_mode_tile::layer#9 vera_layer_mode_tile::layer#10 vera_layer_mode_tile::layer#2 vera_layer_mode_tile::layer#11 vera_layer_mode_tile::layer#3 vera_layer_mode_tile::layer#12 vera_layer_mode_tile::layer#4 +Alias vera_layer_mode_tile::mapheight#10 = vera_layer_mode_tile::mapheight#6 vera_layer_mode_tile::mapheight#11 vera_layer_mode_tile::mapheight#7 vera_layer_mode_tile::mapheight#12 vera_layer_mode_tile::mapheight#8 vera_layer_mode_tile::mapheight#5 vera_layer_mode_tile::mapheight#9 +Alias vera_layer_mode_tile::mapbase_address#12 = vera_layer_mode_tile::mapbase_address#13 vera_layer_mode_tile::mapbase_address#17 vera_layer_mode_tile::mapbase_address#18 vera_layer_mode_tile::mapbase_address#14 vera_layer_mode_tile::mapbase_address#19 vera_layer_mode_tile::mapbase_address#15 vera_layer_mode_tile::mapbase_address#16 +Alias vera_layer_mode_tile::tilebase_address#13 = vera_layer_mode_tile::tilebase_address#14 vera_layer_mode_tile::tilebase_address#18 vera_layer_mode_tile::tilebase_address#19 vera_layer_mode_tile::tilebase_address#15 vera_layer_mode_tile::tilebase_address#20 vera_layer_mode_tile::tilebase_address#16 vera_layer_mode_tile::tilebase_address#17 +Alias vera_layer_mode_tile::tilewidth#13 = vera_layer_mode_tile::tilewidth#14 vera_layer_mode_tile::tilewidth#18 vera_layer_mode_tile::tilewidth#19 vera_layer_mode_tile::tilewidth#15 vera_layer_mode_tile::tilewidth#20 vera_layer_mode_tile::tilewidth#16 vera_layer_mode_tile::tilewidth#17 +Alias vera_layer_mode_tile::tileheight#17 = vera_layer_mode_tile::tileheight#18 vera_layer_mode_tile::tileheight#22 vera_layer_mode_tile::tileheight#23 vera_layer_mode_tile::tileheight#19 vera_layer_mode_tile::tileheight#24 vera_layer_mode_tile::tileheight#20 vera_layer_mode_tile::tileheight#21 +Alias vera_layer_mode_tile::mapwidth#1 = vera_layer_mode_tile::mapwidth#2 vera_layer_mode_tile::mapwidth#3 vera_layer_mode_tile::mapwidth#4 +Alias vera_layer_mode_tile::config#21 = vera_layer_mode_tile::config#33 vera_layer_mode_tile::config#34 vera_layer_mode_tile::config#22 vera_layer_mode_tile::config#35 vera_layer_mode_tile::config#23 vera_layer_mode_tile::config#36 vera_layer_mode_tile::config#24 +Alias vera_layer_mode_tile::layer#13 = vera_layer_mode_tile::layer#14 vera_layer_mode_tile::layer#26 vera_layer_mode_tile::layer#27 vera_layer_mode_tile::layer#15 vera_layer_mode_tile::layer#28 vera_layer_mode_tile::layer#16 vera_layer_mode_tile::layer#17 +Alias vera_layer_mode_tile::mapbase_address#10 = vera_layer_mode_tile::mapbase_address#5 vera_layer_mode_tile::mapbase_address#9 vera_layer_mode_tile::mapbase_address#6 vera_layer_mode_tile::mapbase_address#11 vera_layer_mode_tile::mapbase_address#7 vera_layer_mode_tile::mapbase_address#4 vera_layer_mode_tile::mapbase_address#8 +Alias vera_layer_mode_tile::tilebase_address#10 = vera_layer_mode_tile::tilebase_address#6 vera_layer_mode_tile::tilebase_address#11 vera_layer_mode_tile::tilebase_address#7 vera_layer_mode_tile::tilebase_address#12 vera_layer_mode_tile::tilebase_address#8 vera_layer_mode_tile::tilebase_address#5 vera_layer_mode_tile::tilebase_address#9 +Alias vera_layer_mode_tile::tilewidth#10 = vera_layer_mode_tile::tilewidth#6 vera_layer_mode_tile::tilewidth#11 vera_layer_mode_tile::tilewidth#7 vera_layer_mode_tile::tilewidth#12 vera_layer_mode_tile::tilewidth#8 vera_layer_mode_tile::tilewidth#5 vera_layer_mode_tile::tilewidth#9 +Alias vera_layer_mode_tile::tileheight#10 = vera_layer_mode_tile::tileheight#14 vera_layer_mode_tile::tileheight#15 vera_layer_mode_tile::tileheight#11 vera_layer_mode_tile::tileheight#16 vera_layer_mode_tile::tileheight#12 vera_layer_mode_tile::tileheight#9 vera_layer_mode_tile::tileheight#13 +Alias vera_layer_mode_tile::mapheight#1 = vera_layer_mode_tile::mapheight#2 vera_layer_mode_tile::mapheight#3 vera_layer_mode_tile::mapheight#4 +Alias vera_layer_mode_tile::mapbase_address#2 = vera_layer_mode_tile::mapbase_address#3 +Alias vera_layer_mode_tile::layer#33 = vera_layer_mode_tile::layer#6 vera_layer_mode_tile::layer#5 vera_layer_mode_tile::layer#7 vera_layer_mode_tile::layer#34 vera_layer_mode_tile::layer#35 +Alias vera_layer_mode_tile::tilebase_address#2 = vera_layer_mode_tile::tilebase_address#3 vera_layer_mode_tile::tilebase_address#4 +Alias vera_layer_mode_tile::tilewidth#1 = vera_layer_mode_tile::tilewidth#3 vera_layer_mode_tile::tilewidth#4 vera_layer_mode_tile::tilewidth#2 +Alias vera_layer_mode_tile::tileheight#3 = vera_layer_mode_tile::tileheight#7 vera_layer_mode_tile::tileheight#8 vera_layer_mode_tile::tileheight#6 vera_layer_mode_tile::tileheight#4 vera_layer_mode_tile::tileheight#5 +Alias vera_layer_mode_tile::mapbase_address#0 = vera_layer_mode_tile::$3 +Alias vera_layer_mode_tile::mapbase#0 = vera_layer_mode_tile::$5 +Alias vera_layer_mode_tile::tilebase_address#0 = vera_layer_mode_tile::$9 +Alias vera_layer_mode_tile::tilebase#0 = vera_layer_mode_tile::$11 +Alias vera_layer_mode_tile::tilebase#1 = vera_layer_mode_tile::tilebase#6 vera_layer_mode_tile::tilebase#11 vera_layer_mode_tile::tilebase#7 +Alias vera_layer_mode_tile::tilebase#12 = vera_layer_mode_tile::tilebase#8 vera_layer_mode_tile::tilebase#13 vera_layer_mode_tile::tilebase#9 +Alias vera_layer_mode_tile::layer#18 = vera_layer_mode_tile::layer#19 vera_layer_mode_tile::layer#29 vera_layer_mode_tile::layer#20 +Alias vera_layer_mode_tile::tileheight#1 = vera_layer_mode_tile::tileheight#2 +Alias vera_layer_mode_text::color_mode#1 = vera_layer_mode_text::color_mode#3 vera_layer_mode_text::color_mode#2 +Alias vera_layer_mode_text::layer#1 = vera_layer_mode_text::layer#4 vera_layer_mode_text::layer#2 vera_layer_mode_text::layer#5 vera_layer_mode_text::layer#3 +Alias CONIO_SCREEN_BANK#20 = CONIO_SCREEN_BANK#28 CONIO_SCREEN_BANK#36 +Alias CONIO_SCREEN_TEXT#22 = CONIO_SCREEN_TEXT#31 CONIO_SCREEN_TEXT#39 +Alias conio_x16_init::line#0 = conio_x16_init::line#9 conio_x16_init::line#8 conio_x16_init::line#7 conio_x16_init::line#6 conio_x16_init::line#5 conio_x16_init::line#4 conio_x16_init::line#2 +Alias CONIO_SCREEN_BANK#0 = CONIO_SCREEN_BANK#10 CONIO_SCREEN_BANK#55 CONIO_SCREEN_BANK#50 CONIO_SCREEN_BANK#44 CONIO_SCREEN_BANK#38 CONIO_SCREEN_BANK#37 +Alias CONIO_SCREEN_TEXT#0 = CONIO_SCREEN_TEXT#10 CONIO_SCREEN_TEXT#57 CONIO_SCREEN_TEXT#52 CONIO_SCREEN_TEXT#46 CONIO_SCREEN_TEXT#41 CONIO_SCREEN_TEXT#40 +Alias CONIO_SCREEN_BANK#1 = CONIO_SCREEN_BANK#21 CONIO_SCREEN_BANK#29 CONIO_SCREEN_BANK#11 +Alias CONIO_SCREEN_TEXT#1 = CONIO_SCREEN_TEXT#23 CONIO_SCREEN_TEXT#32 CONIO_SCREEN_TEXT#11 +Alias conio_x16_init::line#1 = conio_x16_init::$9 +Alias vera_layer_get_backcolor::return#2 = vera_layer_get_backcolor::return#4 +Alias clrscr::line_text#0 = clrscr::line_text#8 clrscr::line_text#6 +Alias CONIO_SCREEN_BANK#31 = CONIO_SCREEN_BANK#39 CONIO_SCREEN_BANK#45 +Alias vera_layer_get_textcolor::return#2 = vera_layer_get_textcolor::return#4 +Alias clrscr::color#0 = clrscr::$3 +Alias clrscr::line_text#2 = clrscr::line_text#4 clrscr::ch#0 +Alias CONIO_SCREEN_BANK#12 = CONIO_SCREEN_BANK#22 +Alias clrscr::color#3 = clrscr::color#4 +Alias clrscr::l#2 = clrscr::l#5 +Alias clrscr::color#1 = clrscr::color#2 clrscr::color#5 +Alias clrscr::c#2 = clrscr::c#3 +Alias clrscr::line_text#3 = clrscr::line_text#7 clrscr::line_text#5 +Alias clrscr::l#3 = clrscr::l#6 clrscr::l#4 +Alias CONIO_SCREEN_BANK#30 = CONIO_SCREEN_BANK#46 CONIO_SCREEN_BANK#40 +Alias gotoxy::x#5 = gotoxy::x#6 +Alias gotoxy::line_offset#0 = gotoxy::$4 +Alias gotoxy::y#5 = gotoxy::y#6 +Alias screensize::hscale#0 = screensize::$0 +Alias screensize::vscale#0 = screensize::$2 +Alias vera_layer_get_color::return#3 = vera_layer_get_color::return#6 +Alias CONIO_SCREEN_TEXT#13 = CONIO_SCREEN_TEXT#24 CONIO_SCREEN_TEXT#60 CONIO_SCREEN_TEXT#67 CONIO_SCREEN_TEXT#65 CONIO_SCREEN_TEXT#64 CONIO_SCREEN_TEXT#61 CONIO_SCREEN_TEXT#62 +Alias cputc::c#1 = cputc::c#3 cputc::c#2 +Alias CONIO_SCREEN_BANK#13 = CONIO_SCREEN_BANK#23 CONIO_SCREEN_BANK#32 +Alias cputc::color#0 = cputc::$0 cputc::color#1 +Alias cputc::conio_addr#0 = cputc::$1 +Alias cputc::conio_addr#1 = cputc::conio_addr#2 +Alias clearline::addr#0 = clearline::$0 +Alias vera_layer_get_color::return#4 = vera_layer_get_color::return#7 +Alias clearline::color#0 = clearline::$3 +Alias clearline::color#1 = clearline::color#2 +Alias clearline::c#2 = clearline::c#3 +Alias insertup::width#0 = insertup::$0 +Alias insertup::i#2 = insertup::i#3 insertup::i#4 +Alias CONIO_SCREEN_TEXT#15 = CONIO_SCREEN_TEXT#26 CONIO_SCREEN_TEXT#35 CONIO_SCREEN_TEXT#25 +Alias insertup::width#1 = insertup::width#2 insertup::width#3 +Alias insertup::cy#1 = insertup::cy#3 insertup::cy#2 +Alias insertup::line#0 = insertup::$4 +Alias insertup::start#0 = insertup::$5 +Alias CONIO_SCREEN_TEXT#42 = CONIO_SCREEN_TEXT#47 CONIO_SCREEN_TEXT#53 +Alias gotoxy::y#2 = cscroll::$5 +Alias cputs::c#1 = cputs::$0 cputs::c#2 +Alias CONIO_SCREEN_TEXT#33 = CONIO_SCREEN_TEXT#43 CONIO_SCREEN_TEXT#49 +Alias cputs::s#0 = cputs::s#5 cputs::s#4 +Alias CONIO_SCREEN_BANK#41 = CONIO_SCREEN_BANK#47 CONIO_SCREEN_BANK#52 +Alias vera_layer_get_mapbase_bank::return#2 = vera_layer_get_mapbase_bank::return#4 +Alias CONIO_SCREEN_BANK#14 = CONIO_SCREEN_BANK#2 screenlayer::$0 CONIO_SCREEN_BANK#60 CONIO_SCREEN_BANK#59 CONIO_SCREEN_BANK#58 CONIO_SCREEN_BANK#57 CONIO_SCREEN_BANK#53 CONIO_SCREEN_BANK#48 CONIO_SCREEN_BANK#42 CONIO_SCREEN_BANK#33 CONIO_SCREEN_BANK#24 CONIO_SCREEN_BANK#3 +Alias vera_layer_get_mapbase_offset::return#2 = vera_layer_get_mapbase_offset::return#4 +Alias screenlayer::vera_layer_get_width1_layer#0 = screenlayer::vera_layer_get_width1_layer#1 +Alias CONIO_SCREEN_TEXT#16 = CONIO_SCREEN_TEXT#66 CONIO_SCREEN_TEXT#2 CONIO_SCREEN_TEXT#63 CONIO_SCREEN_TEXT#59 CONIO_SCREEN_TEXT#55 CONIO_SCREEN_TEXT#50 CONIO_SCREEN_TEXT#44 CONIO_SCREEN_TEXT#36 CONIO_SCREEN_TEXT#27 CONIO_SCREEN_TEXT#3 +Alias vera_layer_get_rowshift::return#2 = vera_layer_get_rowshift::return#4 +Alias vera_layer_get_rowskip::return#2 = vera_layer_get_rowskip::return#4 +Alias screenlayer::vera_layer_get_height1_layer#0 = screenlayer::vera_layer_get_height1_layer#1 +Alias CONIO_SCREEN_BANK#25 = CONIO_SCREEN_BANK#34 +Alias CONIO_SCREEN_TEXT#28 = CONIO_SCREEN_TEXT#37 +Alias CONIO_SCREEN_BANK#15 = CONIO_SCREEN_BANK#4 CONIO_SCREEN_BANK#56 CONIO_SCREEN_BANK#54 CONIO_SCREEN_BANK#49 CONIO_SCREEN_BANK#43 CONIO_SCREEN_BANK#35 CONIO_SCREEN_BANK#26 CONIO_SCREEN_BANK#16 CONIO_SCREEN_BANK#5 +Alias CONIO_SCREEN_TEXT#17 = CONIO_SCREEN_TEXT#4 CONIO_SCREEN_TEXT#54 CONIO_SCREEN_TEXT#56 CONIO_SCREEN_TEXT#51 CONIO_SCREEN_TEXT#45 CONIO_SCREEN_TEXT#38 CONIO_SCREEN_TEXT#29 CONIO_SCREEN_TEXT#18 CONIO_SCREEN_TEXT#5 +Alias memcpy_to_vram::num#0 = main::$7 +Alias CONIO_SCREEN_BANK#17 = CONIO_SCREEN_BANK#7 CONIO_SCREEN_BANK#27 +Alias CONIO_SCREEN_TEXT#19 = CONIO_SCREEN_TEXT#7 CONIO_SCREEN_TEXT#30 +Alias CONIO_SCREEN_BANK#18 = CONIO_SCREEN_BANK#8 CONIO_SCREEN_BANK#19 CONIO_SCREEN_BANK#9 +Alias CONIO_SCREEN_TEXT#20 = CONIO_SCREEN_TEXT#8 CONIO_SCREEN_TEXT#21 CONIO_SCREEN_TEXT#9 +Successful SSA optimization Pass2AliasElimination +Alias candidate removed (volatile)load::return#0 = load::status load::return#3 load::return#1 +Alias candidate removed (volatile)screenlayer::vera_layer_get_width1_return#0 = screenlayer::vera_layer_get_width1_return#2 screenlayer::vera_layer_get_width1_return#1 screenlayer::vera_layer_get_width1_return#3 screenlayer::$2 conio_width +Alias candidate removed (volatile)conio_rowshift = screenlayer::$3 +Alias candidate removed (volatile)conio_rowskip = screenlayer::$4 +Alias candidate removed (volatile)screenlayer::vera_layer_get_height1_return#0 = screenlayer::vera_layer_get_height1_return#2 screenlayer::vera_layer_get_height1_return#1 screenlayer::vera_layer_get_height1_return#3 screenlayer::$5 conio_height +Alias bnkcpy_vram_address::pos#2 = bnkcpy_vram_address::pos#3 +Alias bnkcpy_vram_address::end#1 = bnkcpy_vram_address::end#2 +Alias vera_layer_mode_tile::mapwidth#1 = vera_layer_mode_tile::mapwidth#10 +Alias vera_layer_mode_tile::layer#1 = vera_layer_mode_tile::layer#21 vera_layer_mode_tile::layer#13 vera_layer_mode_tile::layer#33 vera_layer_mode_tile::layer#18 vera_layer_mode_tile::layer#8 +Alias vera_layer_mode_tile::mapheight#1 = vera_layer_mode_tile::mapheight#10 vera_layer_mode_tile::mapheight#13 +Alias vera_layer_mode_tile::mapbase_address#10 = vera_layer_mode_tile::mapbase_address#12 vera_layer_mode_tile::mapbase_address#20 vera_layer_mode_tile::mapbase_address#2 +Alias vera_layer_mode_tile::tilebase_address#10 = vera_layer_mode_tile::tilebase_address#13 vera_layer_mode_tile::tilebase_address#21 vera_layer_mode_tile::tilebase_address#2 +Alias vera_layer_mode_tile::tilewidth#1 = vera_layer_mode_tile::tilewidth#13 vera_layer_mode_tile::tilewidth#21 vera_layer_mode_tile::tilewidth#10 +Alias vera_layer_mode_tile::tileheight#1 = vera_layer_mode_tile::tileheight#17 vera_layer_mode_tile::tileheight#25 vera_layer_mode_tile::tileheight#10 vera_layer_mode_tile::tileheight#3 +Alias CONIO_SCREEN_BANK#0 = CONIO_SCREEN_BANK#1 +Alias CONIO_SCREEN_TEXT#0 = CONIO_SCREEN_TEXT#1 +Alias gotoxy::x#3 = gotoxy::x#5 +Alias gotoxy::y#4 = gotoxy::y#5 +Successful SSA optimization Pass2AliasElimination +Alias candidate removed (volatile)load::return#0 = load::status load::return#3 load::return#1 +Alias candidate removed (volatile)screenlayer::vera_layer_get_width1_return#0 = screenlayer::vera_layer_get_width1_return#2 screenlayer::vera_layer_get_width1_return#1 screenlayer::vera_layer_get_width1_return#3 screenlayer::$2 conio_width +Alias candidate removed (volatile)conio_rowshift = screenlayer::$3 +Alias candidate removed (volatile)conio_rowskip = screenlayer::$4 +Alias candidate removed (volatile)screenlayer::vera_layer_get_height1_return#0 = screenlayer::vera_layer_get_height1_return#2 screenlayer::vera_layer_get_height1_return#1 screenlayer::vera_layer_get_height1_return#3 screenlayer::$5 conio_height +Identical Phi Values strlen::str#4 strlen::str#1 +Identical Phi Values load::return#3 load::return#0 +Identical Phi Values LoadFileBanked::filename#1 LoadFileBanked::filename#0 +Identical Phi Values LoadFileBanked::device#1 LoadFileBanked::device#0 +Identical Phi Values LoadFileBanked::address#1 LoadFileBanked::address#0 +Identical Phi Values memcpy_to_vram::vdest#1 memcpy_to_vram::vdest#0 +Identical Phi Values memcpy_to_vram::vbank#1 memcpy_to_vram::vbank#0 +Identical Phi Values memcpy_to_vram::src#1 memcpy_to_vram::src#0 +Identical Phi Values memcpy_to_vram::num#1 memcpy_to_vram::num#0 +Identical Phi Values memcpy_to_vram::end#1 memcpy_to_vram::end#0 +Identical Phi Values bnkcpy_vram_address::end#1 bnkcpy_vram_address::end#0 +Identical Phi Values memcpy_in_vram::src#1 memcpy_in_vram::src#0 +Identical Phi Values memcpy_in_vram::src_increment#1 memcpy_in_vram::src_increment#0 +Identical Phi Values memcpy_in_vram::src_bank#1 memcpy_in_vram::src_bank#0 +Identical Phi Values memcpy_in_vram::dest#1 memcpy_in_vram::dest#0 +Identical Phi Values memcpy_in_vram::dest_increment#1 memcpy_in_vram::dest_increment#0 +Identical Phi Values memcpy_in_vram::dest_bank#1 memcpy_in_vram::dest_bank#0 +Identical Phi Values memcpy_in_vram::num#2 memcpy_in_vram::num#0 +Identical Phi Values memcpy_in_vram::num#1 memcpy_in_vram::num#2 +Identical Phi Values vera_layer_set_config::layer#1 vera_layer_set_config::layer#0 +Identical Phi Values vera_layer_set_config::config#1 vera_layer_set_config::config#0 +Identical Phi Values vera_layer_get_mapbase_bank::layer#1 vera_layer_get_mapbase_bank::layer#0 +Identical Phi Values vera_layer_get_mapbase_offset::layer#1 vera_layer_get_mapbase_offset::layer#0 +Identical Phi Values vera_layer_set_tilebase::layer#1 vera_layer_set_tilebase::layer#0 +Identical Phi Values vera_layer_set_tilebase::tilebase#1 vera_layer_set_tilebase::tilebase#0 +Identical Phi Values vera_layer_set_textcolor::layer#1 vera_layer_set_textcolor::layer#0 +Identical Phi Values vera_layer_set_textcolor::color#1 vera_layer_set_textcolor::color#0 +Identical Phi Values vera_layer_get_textcolor::layer#1 vera_layer_get_textcolor::layer#0 +Identical Phi Values vera_layer_set_backcolor::layer#1 vera_layer_set_backcolor::layer#0 +Identical Phi Values vera_layer_set_backcolor::color#1 vera_layer_set_backcolor::color#0 +Identical Phi Values vera_layer_get_backcolor::layer#1 vera_layer_get_backcolor::layer#0 +Identical Phi Values vera_layer_get_rowshift::layer#1 vera_layer_get_rowshift::layer#0 +Identical Phi Values vera_layer_get_rowskip::layer#1 vera_layer_get_rowskip::layer#0 +Identical Phi Values vera_layer_mode_tile::color_depth#1 vera_layer_mode_tile::color_depth#0 +Identical Phi Values vera_layer_mode_tile::mapwidth#1 vera_layer_mode_tile::mapwidth#0 +Identical Phi Values vera_layer_mode_tile::layer#1 vera_layer_mode_tile::layer#0 +Identical Phi Values vera_layer_mode_tile::mapheight#1 vera_layer_mode_tile::mapheight#0 +Identical Phi Values vera_layer_mode_tile::mapbase_address#10 vera_layer_mode_tile::mapbase_address#1 +Identical Phi Values vera_layer_mode_tile::tilebase_address#10 vera_layer_mode_tile::tilebase_address#1 +Identical Phi Values vera_layer_mode_tile::tilewidth#1 vera_layer_mode_tile::tilewidth#0 +Identical Phi Values vera_layer_mode_tile::tileheight#1 vera_layer_mode_tile::tileheight#0 +Identical Phi Values vera_layer_mode_text::layer#1 vera_layer_mode_text::layer#0 +Identical Phi Values vera_layer_mode_text::mapbase_address#1 vera_layer_mode_text::mapbase_address#0 +Identical Phi Values vera_layer_mode_text::tilebase_address#1 vera_layer_mode_text::tilebase_address#0 +Identical Phi Values vera_layer_mode_text::mapwidth#1 vera_layer_mode_text::mapwidth#0 +Identical Phi Values vera_layer_mode_text::mapheight#1 vera_layer_mode_text::mapheight#0 +Identical Phi Values vera_layer_mode_text::tilewidth#1 vera_layer_mode_text::tilewidth#0 +Identical Phi Values vera_layer_mode_text::tileheight#1 vera_layer_mode_text::tileheight#0 +Identical Phi Values vera_layer_mode_text::color_mode#1 vera_layer_mode_text::color_mode#0 +Identical Phi Values CONIO_SCREEN_BANK#20 CONIO_SCREEN_BANK#6 +Identical Phi Values CONIO_SCREEN_TEXT#22 CONIO_SCREEN_TEXT#6 +Identical Phi Values CONIO_SCREEN_BANK#0 CONIO_SCREEN_BANK#14 +Identical Phi Values CONIO_SCREEN_TEXT#0 CONIO_SCREEN_TEXT#16 +Identical Phi Values CONIO_SCREEN_TEXT#12 CONIO_SCREEN_TEXT#17 +Identical Phi Values CONIO_SCREEN_BANK#31 CONIO_SCREEN_BANK#15 +Identical Phi Values clrscr::color#1 clrscr::color#3 +Identical Phi Values clrscr::line_text#3 clrscr::line_text#2 +Identical Phi Values clrscr::l#3 clrscr::l#2 +Identical Phi Values CONIO_SCREEN_BANK#30 CONIO_SCREEN_BANK#12 +Identical Phi Values screensize::x#1 screensize::x#0 +Identical Phi Values screensize::y#1 screensize::y#0 +Identical Phi Values CONIO_SCREEN_TEXT#13 CONIO_SCREEN_TEXT#33 +Identical Phi Values cputc::c#1 cputc::c#0 +Identical Phi Values CONIO_SCREEN_BANK#13 CONIO_SCREEN_BANK#41 +Identical Phi Values CONIO_SCREEN_TEXT#58 CONIO_SCREEN_TEXT#13 +Identical Phi Values CONIO_SCREEN_TEXT#14 CONIO_SCREEN_TEXT#15 +Identical Phi Values clearline::color#1 clearline::color#0 +Identical Phi Values CONIO_SCREEN_TEXT#34 CONIO_SCREEN_TEXT#42 +Identical Phi Values insertup::cy#1 insertup::cy#0 +Identical Phi Values CONIO_SCREEN_TEXT#15 CONIO_SCREEN_TEXT#34 +Identical Phi Values insertup::width#1 insertup::width#0 +Identical Phi Values CONIO_SCREEN_TEXT#42 CONIO_SCREEN_TEXT#58 +Identical Phi Values cputs::s#3 cputs::s#1 +Identical Phi Values CONIO_SCREEN_TEXT#48 CONIO_SCREEN_TEXT#17 +Identical Phi Values CONIO_SCREEN_BANK#51 CONIO_SCREEN_BANK#15 +Identical Phi Values CONIO_SCREEN_TEXT#33 CONIO_SCREEN_TEXT#48 +Identical Phi Values CONIO_SCREEN_BANK#41 CONIO_SCREEN_BANK#51 +Identical Phi Values screenlayer::vera_layer_get_width1_return#2 screenlayer::vera_layer_get_width1_return#0 +Identical Phi Values screenlayer::vera_layer_get_width1_return#3 screenlayer::vera_layer_get_width1_return#1 +Identical Phi Values screenlayer::vera_layer_get_height1_return#2 screenlayer::vera_layer_get_height1_return#0 +Identical Phi Values screenlayer::vera_layer_get_height1_return#3 screenlayer::vera_layer_get_height1_return#1 +Identical Phi Values CONIO_SCREEN_BANK#25 CONIO_SCREEN_BANK#17 +Identical Phi Values CONIO_SCREEN_TEXT#28 CONIO_SCREEN_TEXT#19 +Identical Phi Values CONIO_SCREEN_BANK#15 CONIO_SCREEN_BANK#14 +Identical Phi Values CONIO_SCREEN_TEXT#17 CONIO_SCREEN_TEXT#16 +Identical Phi Values CONIO_SCREEN_BANK#17 CONIO_SCREEN_BANK#0 +Identical Phi Values CONIO_SCREEN_TEXT#19 CONIO_SCREEN_TEXT#0 +Identical Phi Values CONIO_SCREEN_BANK#18 CONIO_SCREEN_BANK#15 +Identical Phi Values CONIO_SCREEN_TEXT#20 CONIO_SCREEN_TEXT#17 +Successful SSA optimization Pass2IdenticalPhiElimination +Identical Phi Values CONIO_SCREEN_BANK#12 CONIO_SCREEN_BANK#14 +Identical Phi Values clrscr::color#3 clrscr::color#0 +Successful SSA optimization Pass2IdenticalPhiElimination +Simple Condition strlen::$0 [4] if(0!=*strlen::str#2) goto strlen::@2 +Simple Condition memcpy_to_vram::$4 [66] if(memcpy_to_vram::s#2!=memcpy_to_vram::end#0) goto memcpy_to_vram::@2 +Simple Condition bnkcpy_vram_address::$20 [104] if(bnkcpy_vram_address::pos#2VERA_SPRITE_ATTR +Constant memcpy_to_vram::vdest#0 = (void*) LoadFileBanked::address#0 +Constant right-side identified [24] LoadFileBanked::$5 = < LoadFileBanked::address#0 +Constant right-side identified [29] LoadFileBanked::$9 = > LoadFileBanked::address#0 +Constant right-side identified [35] LoadFileBanked::$13 = < LoadFileBanked::address#0 +Constant right-side identified [45] memcpy_to_vram::$0 = < memcpy_to_vram::vdest#0 +Constant right-side identified [47] memcpy_to_vram::$1 = > memcpy_to_vram::vdest#0 +Constant right-side identified [49] memcpy_to_vram::$2 = VERA_INC_1 | memcpy_to_vram::vbank#0 +Constant right-side identified [51] memcpy_to_vram::end#0 = memcpy_to_vram::$5 + memcpy_to_vram::num#0 +Constant right-side identified [118] vera_layer_set_config::$0 = vera_layer_set_config::layer#0 * SIZEOF_POINTER +Constant right-side identified [138] vera_layer_set_tilebase::$0 = vera_layer_set_tilebase::layer#0 * SIZEOF_POINTER +Constant right-side identified [168] vera_layer_mode_tile::$15 = vera_layer_mode_tile::layer#0 * SIZEOF_WORD +Constant right-side identified [173] vera_layer_mode_tile::$1 = < vera_layer_mode_tile::mapbase_address#1 +Constant right-side identified [174] vera_layer_mode_tile::$17 = vera_layer_mode_tile::layer#0 * SIZEOF_WORD +Constant right-side identified [176] vera_layer_mode_tile::$2 = > vera_layer_mode_tile::mapbase_address#1 +Constant right-side identified [178] vera_layer_mode_tile::$18 = vera_layer_mode_tile::layer#0 * SIZEOF_DWORD +Constant right-side identified [180] vera_layer_mode_tile::mapbase_address#0 = vera_layer_mode_tile::mapbase_address#1 >> 1 +Constant right-side identified [185] vera_layer_mode_tile::$7 = < vera_layer_mode_tile::tilebase_address#1 +Constant right-side identified [186] vera_layer_mode_tile::$19 = vera_layer_mode_tile::layer#0 * SIZEOF_WORD +Constant right-side identified [188] vera_layer_mode_tile::$8 = > vera_layer_mode_tile::tilebase_address#1 +Constant right-side identified [190] vera_layer_mode_tile::$20 = vera_layer_mode_tile::layer#0 * SIZEOF_DWORD +Constant right-side identified [192] vera_layer_mode_tile::tilebase_address#0 = vera_layer_mode_tile::tilebase_address#1 >> 1 +Successful SSA optimization Pass2ConstantRValueConsolidation +Constant LoadFileBanked::$2 = >LoadFileBanked::address#0 +Constant LoadFileBanked::$5 = LoadFileBanked::address#0 +Constant LoadFileBanked::$13 = memcpy_to_vram::vdest#0 +Constant memcpy_to_vram::$2 = VERA_INC_1|memcpy_to_vram::vbank#0 +Constant memcpy_to_vram::end#0 = memcpy_to_vram::$5+memcpy_to_vram::num#0 +Constant memcpy_in_vram::$2 = memcpy_in_vram::src_increment#0 +Constant memcpy_in_vram::$5 = memcpy_in_vram::dest_increment#0 +Constant vera_layer_set_config::$0 = vera_layer_set_config::layer#0*SIZEOF_POINTER +Constant vera_layer_set_tilebase::$0 = vera_layer_set_tilebase::layer#0*SIZEOF_POINTER +Constant vera_layer_mode_tile::config#1 = VERA_LAYER_COLOR_DEPTH_1BPP +Constant vera_layer_mode_tile::$15 = vera_layer_mode_tile::layer#0*SIZEOF_WORD +Constant vera_layer_mode_tile::$1 = vera_layer_mode_tile::mapbase_address#1 +Constant vera_layer_mode_tile::$18 = vera_layer_mode_tile::layer#0*SIZEOF_DWORD +Constant vera_layer_mode_tile::mapbase_address#0 = vera_layer_mode_tile::mapbase_address#1>>1 +Constant vera_layer_mode_tile::$7 = vera_layer_mode_tile::tilebase_address#1 +Constant vera_layer_mode_tile::$20 = vera_layer_mode_tile::layer#0*SIZEOF_DWORD +Constant vera_layer_mode_tile::tilebase_address#0 = vera_layer_mode_tile::tilebase_address#1>>1 +Successful SSA optimization Pass2ConstantIdentification +Constant value identified (byte)vera_layer_mode_tile::$2 in [177] vera_mapbase_bank[vera_layer_mode_tile::layer#0] = (byte)vera_layer_mode_tile::$2 +Constant value identified (byte)vera_layer_mode_tile::$8 in [189] vera_tilebase_bank[vera_layer_mode_tile::layer#0] = (byte)vera_layer_mode_tile::$8 +Successful SSA optimization Pass2ConstantValues +Simplifying constant evaluating to zero vera_layer_mode_tile::mapbase_address#1 in +Simplifying constant evaluating to zero vera_layer_mode_tile::mapbase_address#1>>1 in +Simplifying constant evaluating to zero >vera_layer_mode_tile::tilebase_address#1 in +Simplifying constant evaluating to zero (byte)vera_layer_mode_tile::$2 in [177] vera_mapbase_bank[vera_layer_mode_tile::layer#0] = (byte)vera_layer_mode_tile::$2 +Simplifying constant evaluating to zero (byte)vera_layer_mode_tile::$8 in [189] vera_tilebase_bank[vera_layer_mode_tile::layer#0] = (byte)vera_layer_mode_tile::$8 +Successful SSA optimization PassNSimplifyConstantZero +Simplifying expression containing zero VERA_LAYER_WIDTH_128 in [166] vera_layer_mode_tile::config#21 = vera_layer_mode_tile::config#1 | VERA_LAYER_WIDTH_128 +Successful SSA optimization PassNSimplifyExpressionWithZero +Eliminating unused constant VERA_LAYER_WIDTH_64 +Eliminating unused constant VERA_LAYER_WIDTH_256 +Eliminating unused constant VERA_LAYER_HEIGHT_128 +Eliminating unused constant VERA_LAYER_HEIGHT_256 +Eliminating unused constant VERA_LAYER_COLOR_DEPTH_2BPP +Eliminating unused constant VERA_LAYER_COLOR_DEPTH_4BPP +Eliminating unused constant VERA_LAYER_COLOR_DEPTH_8BPP +Eliminating unused constant VERA_TILEBASE_WIDTH_16 +Eliminating unused constant VERA_TILEBASE_HEIGHT_16 +Eliminating unused constant vera_layer_set_text_color_mode::color_mode#1 +Eliminating unused constant vera_layer_set_text_color_mode::layer#1 +Eliminating unused constant vera_layer_mode_tile::config#0 +Eliminating unused constant vera_layer_mode_tile::config#1 +Eliminating unused constant vera_layer_mode_tile::$2 +Eliminating unused constant vera_layer_mode_tile::$8 +Successful SSA optimization PassNEliminateUnusedVars +Eliminating unused constant VERA_LAYER_COLOR_DEPTH_1BPP +Successful SSA optimization PassNEliminateUnusedVars +Alias candidate removed (volatile)screenlayer::vera_layer_get_width1_return#0 = screenlayer::vera_layer_get_width1_return#1 screenlayer::$2 conio_width +Alias candidate removed (volatile)conio_rowshift = screenlayer::$3 +Alias candidate removed (volatile)conio_rowskip = screenlayer::$4 +Alias candidate removed (volatile)screenlayer::vera_layer_get_height1_return#0 = screenlayer::vera_layer_get_height1_return#1 screenlayer::$5 conio_height +Constant right-side identified [21] LoadFileBanked::$3 = LoadFileBanked::$2 << 8 +Constant right-side identified [23] LoadFileBanked::$6 = > LoadFileBanked::$5 +Constant right-side identified [27] LoadFileBanked::$10 = LoadFileBanked::$9 << 3 +Constant right-side identified [32] LoadFileBanked::$14 = LoadFileBanked::$13 & $1fff +Constant right-side identified [162] vera_layer_mode_tile::$4 = < vera_layer_mode_tile::mapbase_address#0 +Constant right-side identified [169] vera_layer_mode_tile::$10 = < vera_layer_mode_tile::tilebase_address#0 +Successful SSA optimization Pass2ConstantRValueConsolidation +Constant LoadFileBanked::$3 = LoadFileBanked::$2<<8 +Constant LoadFileBanked::$6 = >LoadFileBanked::$5 +Constant LoadFileBanked::$10 = LoadFileBanked::$9<<3 +Constant LoadFileBanked::$14 = LoadFileBanked::$13&$1fff +Constant vera_layer_mode_tile::config#21 = VERA_LAYER_WIDTH_128 +Constant vera_layer_mode_tile::$4 = vera_layer_mode_tile::$4 +Constant right-side identified [162] vera_layer_mode_tile::tilebase#0 = > vera_layer_mode_tile::$10 +Successful SSA optimization Pass2ConstantRValueConsolidation +Constant LoadFileBanked::$4 = vera_layer_mode_tile::$4 +Constant vera_layer_mode_tile::tilebase#0 = >vera_layer_mode_tile::$10 +Successful SSA optimization Pass2ConstantIdentification +Constant LoadFileBanked::$16 = (word)LoadFileBanked::$4 +Constant LoadFileBanked::$17 = (word)LoadFileBanked::$11 +Constant vera_layer_set_config::config#0 = vera_layer_mode_tile::config#10 +Constant vera_layer_set_mapbase::mapbase#0 = vera_layer_mode_tile::mapbase#0 +Successful SSA optimization Pass2ConstantIdentification +Simplifying constant evaluating to zero vera_layer_mode_tile::$4 in +Successful SSA optimization PassNSimplifyConstantZero +Simplifying expression containing zero LoadFileBanked::$6 in [23] LoadFileBanked::$7 = LoadFileBanked::$16 | LoadFileBanked::$6 +Successful SSA optimization PassNSimplifyExpressionWithZero +Eliminating unused constant LoadFileBanked::$3 +Eliminating unused constant LoadFileBanked::$4 +Eliminating unused constant LoadFileBanked::$16 +Eliminating unused constant vera_layer_mode_tile::$4 +Successful SSA optimization PassNEliminateUnusedVars +Eliminating unused constant LoadFileBanked::$2 +Successful SSA optimization PassNEliminateUnusedVars +Alias candidate removed (volatile)screenlayer::vera_layer_get_width1_return#0 = screenlayer::vera_layer_get_width1_return#1 screenlayer::$2 conio_width +Alias candidate removed (volatile)conio_rowshift = screenlayer::$3 +Alias candidate removed (volatile)conio_rowskip = screenlayer::$4 +Alias candidate removed (volatile)screenlayer::vera_layer_get_height1_return#0 = screenlayer::vera_layer_get_height1_return#1 screenlayer::$5 conio_height +Constant right-side identified [153] vera_layer_mode_tile::tilebase#1 = vera_layer_mode_tile::tilebase#0 & VERA_LAYER_TILEBASE_MASK +Successful SSA optimization Pass2ConstantRValueConsolidation +Constant LoadFileBanked::$7 = LoadFileBanked::$6 +Constant vera_layer_mode_tile::tilebase#1 = vera_layer_mode_tile::tilebase#0&VERA_LAYER_TILEBASE_MASK +Successful SSA optimization Pass2ConstantIdentification +Constant vera_layer_set_tilebase::tilebase#0 = vera_layer_mode_tile::tilebase#1 +Successful SSA optimization Pass2ConstantIdentification +Alias candidate removed (volatile)screenlayer::vera_layer_get_width1_return#0 = screenlayer::vera_layer_get_width1_return#1 screenlayer::$2 conio_width +Alias candidate removed (volatile)conio_rowshift = screenlayer::$3 +Alias candidate removed (volatile)conio_rowskip = screenlayer::$4 +Alias candidate removed (volatile)screenlayer::vera_layer_get_height1_return#0 = screenlayer::vera_layer_get_height1_return#1 screenlayer::$5 conio_height +Constant right-side identified [21] LoadFileBanked::$8 = LoadFileBanked::$7 >> 5 +Successful SSA optimization Pass2ConstantRValueConsolidation +Constant LoadFileBanked::$8 = LoadFileBanked::$7>>5 +Successful SSA optimization Pass2ConstantIdentification +Alias candidate removed (volatile)screenlayer::vera_layer_get_width1_return#0 = screenlayer::vera_layer_get_width1_return#1 screenlayer::$2 conio_width +Alias candidate removed (volatile)conio_rowshift = screenlayer::$3 +Alias candidate removed (volatile)conio_rowskip = screenlayer::$4 +Alias candidate removed (volatile)screenlayer::vera_layer_get_height1_return#0 = screenlayer::vera_layer_get_height1_return#1 screenlayer::$5 conio_height +Constant right-side identified [21] LoadFileBanked::$12 = LoadFileBanked::$8 + LoadFileBanked::$17 +Successful SSA optimization Pass2ConstantRValueConsolidation +Constant LoadFileBanked::$12 = LoadFileBanked::$8+LoadFileBanked::$17 +Successful SSA optimization Pass2ConstantIdentification +Constant LoadFileBanked::bank#0 = (byte)LoadFileBanked::$12 +Successful SSA optimization Pass2ConstantIdentification +Alias candidate removed (volatile)screenlayer::vera_layer_get_width1_return#0 = screenlayer::vera_layer_get_width1_return#1 screenlayer::$2 conio_width +Alias candidate removed (volatile)conio_rowshift = screenlayer::$3 +Alias candidate removed (volatile)conio_rowskip = screenlayer::$4 +Alias candidate removed (volatile)screenlayer::vera_layer_get_height1_return#0 = screenlayer::vera_layer_get_height1_return#1 screenlayer::$5 conio_height +Inlining Noop Cast [64] bnkcpy_vram_address::addr#0 = (byte*)bnkcpy_vram_address::$19 keeping bnkcpy_vram_address::addr#0 +Inlining Noop Cast [284] memcpy_in_vram::src#0 = (void*)insertup::$6 keeping memcpy_in_vram::src#0 +Inlining Noop Cast [314] CONIO_SCREEN_TEXT#16 = (byte*)screenlayer::$1 keeping CONIO_SCREEN_TEXT#16 +Successful SSA optimization Pass2NopCastInlining +Rewriting multiplication to use shift [98] vera_layer_set_text_color_mode::$0 = vera_layer_set_text_color_mode::layer#3 * SIZEOF_POINTER +Rewriting multiplication to use shift [104] vera_layer_set_mapbase::$0 = vera_layer_set_mapbase::layer#3 * SIZEOF_POINTER +Rewriting multiplication to use shift [110] vera_layer_get_mapbase_offset::$0 = vera_layer_get_mapbase_offset::layer#0 * SIZEOF_WORD +Rewriting multiplication to use shift [125] vera_layer_get_color::$3 = vera_layer_get_color::layer#2 * SIZEOF_POINTER +Rewriting multiplication to use shift [136] vera_layer_get_rowskip::$0 = vera_layer_get_rowskip::layer#0 * SIZEOF_WORD +Rewriting multiplication to use shift [190] clrscr::$9 = conio_screen_layer * SIZEOF_WORD +Rewriting multiplication to use shift [209] gotoxy::$5 = conio_screen_layer * SIZEOF_WORD +Rewriting multiplication to use shift [223] cputc::$15 = conio_screen_layer * SIZEOF_WORD +Rewriting multiplication to use shift [247] cputln::$2 = conio_screen_layer * SIZEOF_WORD +Rewriting multiplication to use shift [250] cputln::$3 = conio_screen_layer * SIZEOF_WORD +Rewriting multiplication to use shift [257] clearline::$5 = conio_screen_layer * SIZEOF_WORD +Rewriting multiplication to use shift [276] insertup::width#0 = conio_screen_width * 2 +Rewriting multiplication to use shift [316] screenlayer::vera_layer_get_width1_$2 = screenlayer::vera_layer_get_width1_layer#0 * SIZEOF_POINTER +Rewriting multiplication to use shift [320] screenlayer::vera_layer_get_width1_$3 = screenlayer::vera_layer_get_width1_$1 * SIZEOF_WORD +Rewriting multiplication to use shift [336] screenlayer::vera_layer_get_height1_$2 = screenlayer::vera_layer_get_height1_layer#0 * SIZEOF_POINTER +Rewriting multiplication to use shift [340] screenlayer::vera_layer_get_height1_$3 = screenlayer::vera_layer_get_height1_$1 * SIZEOF_WORD +Successful SSA optimization Pass2MultiplyToShiftRewriting +Inlining constant with var siblings strlen::len#0 +Inlining constant with different constant siblings LoadFileBanked::addr#0 +Inlining constant with different constant siblings LoadFileBanked::addr#1 +Inlining constant with var siblings memcpy_to_vram::s#0 +Inlining constant with var siblings bnkcpy_vram_address::addr#3 +Inlining constant with var siblings bnkcpy_vram_address::vdest#0 +Inlining constant with different constant siblings bnkcpy_vram_address::src#0 +Inlining constant with var siblings bnkcpy_vram_address::num#0 +Inlining constant with var siblings bnkcpy_vram_address::vdest#1 +Inlining constant with different constant siblings bnkcpy_vram_address::src#1 +Inlining constant with var siblings bnkcpy_vram_address::num#1 +Inlining constant with var siblings memcpy_in_vram::i#0 +Inlining constant with var siblings vera_layer_set_text_color_mode::color_mode#0 +Inlining constant with var siblings vera_layer_set_text_color_mode::layer#2 +Inlining constant with var siblings vera_layer_set_text_color_mode::color_mode#2 +Inlining constant with var siblings vera_layer_set_text_color_mode::layer#0 +Inlining constant with var siblings vera_layer_set_mapbase::layer#1 +Inlining constant with var siblings vera_layer_set_mapbase::mapbase#1 +Inlining constant with var siblings vera_layer_set_mapbase::layer#2 +Inlining constant with var siblings vera_layer_set_mapbase::mapbase#2 +Inlining constant with var siblings vera_layer_set_mapbase::layer#0 +Inlining constant with var siblings vera_layer_set_mapbase::mapbase#0 +Inlining constant with different constant siblings vera_layer_mode_tile::tilebase_address#1 +Inlining constant with different constant siblings vera_layer_mode_tile::config#21 +Inlining constant with different constant siblings vera_layer_mode_tile::tilebase#0 +Inlining constant with different constant siblings vera_layer_mode_tile::tilebase#1 +Inlining constant with var siblings clrscr::l#0 +Inlining constant with var siblings clrscr::c#0 +Inlining constant with var siblings gotoxy::x#0 +Inlining constant with var siblings gotoxy::y#1 +Inlining constant with var siblings gotoxy::x#1 +Inlining constant with var siblings gotoxy::x#2 +Inlining constant with var siblings clearline::c#0 +Inlining constant with var siblings insertup::i#0 +Inlining constant with var siblings cputs::s#1 +Inlining constant with var siblings screenlayer::layer#0 +Inlining constant with var siblings screenlayer::layer#1 +Constant inlined vera_layer_set_config::layer#0 = vera_layer_mode_text::layer#0 +Constant inlined LoadFileBanked::address#0 = main::BANK_SPRITE +Constant inlined vera_layer_set_textcolor::color#0 = WHITE +Constant inlined cputs::s#1 = main::s +Constant inlined bnkcpy_vram_address::vdest#1 = main::VRAM_SPRITE +Constant inlined clrscr::l#0 = 0 +Constant inlined strlen::len#0 = 0 +Constant inlined bnkcpy_vram_address::vdest#0 = VERA_PALETTE+$20 +Constant inlined vera_layer_set_tilebase::layer#0 = vera_layer_mode_text::layer#0 +Constant inlined LoadFileBanked::$11 = <>main::BANK_SPRITE<<3 +Constant inlined LoadFileBanked::$10 = >main::BANK_SPRITE<<3 +Constant inlined LoadFileBanked::addr#0 = (byte*)0 +Constant inlined LoadFileBanked::addr#1 = (byte*)0+$a000 +Constant inlined memcpy_in_vram::dest_increment#0 = VERA_INC_1 +Constant inlined vera_layer_set_tilebase::tilebase#0 = >main::BANK_SPRITE<<3 +Constant inlined LoadFileBanked::$14 = 0 +Constant inlined LoadFileBanked::$12 = >>5+(word)<>main::BANK_SPRITE<<3 +Constant inlined vera_layer_mode_tile::$20 = vera_layer_mode_text::layer#0*SIZEOF_DWORD +Constant inlined LoadFileBanked::$6 = >memcpy_to_vram::vdest#0 +Constant inlined vera_layer_set_text_color_mode::color_mode#0 = VERA_LAYER_CONFIG_16C +Constant inlined LoadFileBanked::$9 = >main::BANK_SPRITE +Constant inlined LoadFileBanked::$8 = >>5 +Constant inlined vera_layer_set_text_color_mode::color_mode#2 = VERA_LAYER_CONFIG_16C +Constant inlined LoadFileBanked::$7 = >> 7 + [59] screensize::$1 = $28 << screensize::hscale#0 + [60] *screensize::x#0 = screensize::$1 + [61] screensize::vscale#0 = *VERA_DC_VSCALE >> 7 + [62] screensize::$3 = $1e << screensize::vscale#0 + [63] *screensize::y#0 = screensize::$3 + to:screensize::@return +screensize::@return: scope:[screensize] from screensize + [64] return + to:@return + +void screenlayer(byte screenlayer::layer) +screenlayer: scope:[screenlayer] from conio_x16_init::@4 main::@1 + [65] conio_screen_layer = 1 + [66] vera_layer_get_mapbase_bank::layer#0 = conio_screen_layer + [67] call vera_layer_get_mapbase_bank + [68] vera_layer_get_mapbase_bank::return#2 = vera_layer_get_mapbase_bank::return#0 + to:screenlayer::@3 +screenlayer::@3: scope:[screenlayer] from screenlayer + [69] CONIO_SCREEN_BANK#14 = vera_layer_get_mapbase_bank::return#2 + [70] vera_layer_get_mapbase_offset::layer#0 = conio_screen_layer + [71] call vera_layer_get_mapbase_offset + [72] vera_layer_get_mapbase_offset::return#2 = vera_layer_get_mapbase_offset::return#0 + to:screenlayer::@4 +screenlayer::@4: scope:[screenlayer] from screenlayer::@3 + [73] CONIO_SCREEN_TEXT#16 = vera_layer_get_mapbase_offset::return#2 + [74] screenlayer::vera_layer_get_width1_layer#0 = conio_screen_layer + to:screenlayer::vera_layer_get_width1 +screenlayer::vera_layer_get_width1: scope:[screenlayer] from screenlayer::@4 + [75] screenlayer::vera_layer_get_width1_$2 = screenlayer::vera_layer_get_width1_layer#0 << 1 + [76] screenlayer::vera_layer_get_width1_config#0 = vera_layer_config[screenlayer::vera_layer_get_width1_$2] + [77] screenlayer::vera_layer_get_width1_$0 = *screenlayer::vera_layer_get_width1_config#0 & VERA_LAYER_WIDTH_MASK + [78] screenlayer::vera_layer_get_width1_$1 = screenlayer::vera_layer_get_width1_$0 >> 4 + [79] screenlayer::vera_layer_get_width1_$3 = screenlayer::vera_layer_get_width1_$1 << 1 + [80] screenlayer::vera_layer_get_width1_return#0 = VERA_LAYER_WIDTH[screenlayer::vera_layer_get_width1_$3] + to:screenlayer::vera_layer_get_width1_@return +screenlayer::vera_layer_get_width1_@return: scope:[screenlayer] from screenlayer::vera_layer_get_width1 + [81] screenlayer::vera_layer_get_width1_return#1 = screenlayer::vera_layer_get_width1_return#0 + to:screenlayer::@1 +screenlayer::@1: scope:[screenlayer] from screenlayer::vera_layer_get_width1_@return + [82] screenlayer::$2 = screenlayer::vera_layer_get_width1_return#1 + [83] conio_width = screenlayer::$2 + [84] vera_layer_get_rowshift::layer#0 = conio_screen_layer + [85] call vera_layer_get_rowshift + [86] vera_layer_get_rowshift::return#2 = vera_layer_get_rowshift::return#0 + to:screenlayer::@5 +screenlayer::@5: scope:[screenlayer] from screenlayer::@1 + [87] screenlayer::$3 = vera_layer_get_rowshift::return#2 + [88] conio_rowshift = screenlayer::$3 + [89] vera_layer_get_rowskip::layer#0 = conio_screen_layer + [90] call vera_layer_get_rowskip + [91] vera_layer_get_rowskip::return#2 = vera_layer_get_rowskip::return#0 + to:screenlayer::@6 +screenlayer::@6: scope:[screenlayer] from screenlayer::@5 + [92] screenlayer::$4 = vera_layer_get_rowskip::return#2 + [93] conio_rowskip = screenlayer::$4 + [94] screenlayer::vera_layer_get_height1_layer#0 = conio_screen_layer + to:screenlayer::vera_layer_get_height1 +screenlayer::vera_layer_get_height1: scope:[screenlayer] from screenlayer::@6 + [95] screenlayer::vera_layer_get_height1_$2 = screenlayer::vera_layer_get_height1_layer#0 << 1 + [96] screenlayer::vera_layer_get_height1_config#0 = vera_layer_config[screenlayer::vera_layer_get_height1_$2] + [97] screenlayer::vera_layer_get_height1_$0 = *screenlayer::vera_layer_get_height1_config#0 & VERA_LAYER_HEIGHT_MASK + [98] screenlayer::vera_layer_get_height1_$1 = screenlayer::vera_layer_get_height1_$0 >> 6 + [99] screenlayer::vera_layer_get_height1_$3 = screenlayer::vera_layer_get_height1_$1 << 1 + [100] screenlayer::vera_layer_get_height1_return#0 = VERA_LAYER_HEIGHT[screenlayer::vera_layer_get_height1_$3] + to:screenlayer::vera_layer_get_height1_@return +screenlayer::vera_layer_get_height1_@return: scope:[screenlayer] from screenlayer::vera_layer_get_height1 + [101] screenlayer::vera_layer_get_height1_return#1 = screenlayer::vera_layer_get_height1_return#0 + to:screenlayer::@2 +screenlayer::@2: scope:[screenlayer] from screenlayer::vera_layer_get_height1_@return + [102] screenlayer::$5 = screenlayer::vera_layer_get_height1_return#1 + [103] conio_height = screenlayer::$5 + to:screenlayer::@return +screenlayer::@return: scope:[screenlayer] from screenlayer::@2 + [104] return + to:@return + +byte vera_layer_set_textcolor(byte vera_layer_set_textcolor::layer , byte vera_layer_set_textcolor::color) +vera_layer_set_textcolor: scope:[vera_layer_set_textcolor] from conio_x16_init::@5 + [105] *(vera_layer_textcolor+vera_layer_set_textcolor::layer#0) = WHITE + to:vera_layer_set_textcolor::@return +vera_layer_set_textcolor::@return: scope:[vera_layer_set_textcolor] from vera_layer_set_textcolor + [106] return + to:@return + +byte vera_layer_set_backcolor(byte vera_layer_set_backcolor::layer , byte vera_layer_set_backcolor::color) +vera_layer_set_backcolor: scope:[vera_layer_set_backcolor] from conio_x16_init::@6 + [107] *(vera_layer_backcolor+vera_layer_set_backcolor::layer#0) = BLUE + to:vera_layer_set_backcolor::@return +vera_layer_set_backcolor::@return: scope:[vera_layer_set_backcolor] from vera_layer_set_backcolor + [108] return + to:@return + +void vera_layer_set_mapbase(byte vera_layer_set_mapbase::layer , byte vera_layer_set_mapbase::mapbase) +vera_layer_set_mapbase: scope:[vera_layer_set_mapbase] from conio_x16_init::@7 conio_x16_init::@8 vera_layer_mode_tile::@4 + [109] vera_layer_set_mapbase::mapbase#3 = phi( conio_x16_init::@7/$20, conio_x16_init::@8/0, vera_layer_mode_tile::@4/vera_layer_mode_tile::mapbase#0 ) + [109] vera_layer_set_mapbase::layer#3 = phi( conio_x16_init::@7/0, conio_x16_init::@8/1, vera_layer_mode_tile::@4/vera_layer_mode_text::layer#0 ) + [110] vera_layer_set_mapbase::$0 = vera_layer_set_mapbase::layer#3 << 1 + [111] vera_layer_set_mapbase::addr#0 = vera_layer_mapbase[vera_layer_set_mapbase::$0] + [112] *vera_layer_set_mapbase::addr#0 = vera_layer_set_mapbase::mapbase#3 + to:vera_layer_set_mapbase::@return +vera_layer_set_mapbase::@return: scope:[vera_layer_set_mapbase] from vera_layer_set_mapbase + [113] return + to:@return + +void gotoxy(byte gotoxy::x , byte gotoxy::y) +gotoxy: scope:[gotoxy] from conio_x16_init::@1 cscroll::@5 + [114] gotoxy::y#3 = phi( conio_x16_init::@1/gotoxy::y#0, cscroll::@5/gotoxy::y#2 ) + [115] if(gotoxy::y#3<=conio_screen_height) goto gotoxy::@4 + to:gotoxy::@1 +gotoxy::@4: scope:[gotoxy] from gotoxy + [116] phi() + to:gotoxy::@1 +gotoxy::@1: scope:[gotoxy] from gotoxy gotoxy::@4 + [117] gotoxy::y#4 = phi( gotoxy::@4/gotoxy::y#3, gotoxy/0 ) + [118] if(0 clrscr::line_text#2 + [155] *VERA_ADDRX_M = clrscr::$6 + [156] clrscr::$7 = CONIO_SCREEN_BANK#14 | VERA_INC_1 + [157] *VERA_ADDRX_H = clrscr::$7 + to:clrscr::@4 +clrscr::@4: scope:[clrscr] from clrscr::@2 clrscr::@5 + [158] clrscr::c#2 = phi( clrscr::@2/0, clrscr::@5/clrscr::c#1 ) + [159] if(clrscr::c#2 bnkcpy_vram_address::$2 + [189] *VERA_ADDRX_M = bnkcpy_vram_address::$3 + [190] bnkcpy_vram_address::$4 = > bnkcpy_vram_address::vdest#2 + [191] bnkcpy_vram_address::$5 = < bnkcpy_vram_address::$4 + [192] *VERA_ADDRX_H = bnkcpy_vram_address::$5 + [193] *VERA_ADDRX_H = *VERA_ADDRX_H | VERA_INC_1 + [194] bnkcpy_vram_address::end#0 = bnkcpy_vram_address::beg#0 + bnkcpy_vram_address::num#2 + [195] bnkcpy_vram_address::$7 = > bnkcpy_vram_address::beg#0 + [196] bnkcpy_vram_address::$8 = bnkcpy_vram_address::$7 << 8 + [197] bnkcpy_vram_address::$9 = < bnkcpy_vram_address::$8 + [198] bnkcpy_vram_address::$10 = < bnkcpy_vram_address::beg#0 + [199] bnkcpy_vram_address::$11 = > bnkcpy_vram_address::$10 + [200] bnkcpy_vram_address::$23 = (word)bnkcpy_vram_address::$9 + [201] bnkcpy_vram_address::$12 = bnkcpy_vram_address::$23 | bnkcpy_vram_address::$11 + [202] bnkcpy_vram_address::$13 = bnkcpy_vram_address::$12 >> 5 + [203] bnkcpy_vram_address::$14 = > bnkcpy_vram_address::beg#0 + [204] bnkcpy_vram_address::$15 = bnkcpy_vram_address::$14 << 3 + [205] bnkcpy_vram_address::$16 = < bnkcpy_vram_address::$15 + [206] bnkcpy_vram_address::$24 = (word)bnkcpy_vram_address::$16 + [207] bnkcpy_vram_address::$17 = bnkcpy_vram_address::$13 + bnkcpy_vram_address::$24 + [208] bnkcpy_vram_address::bank#0 = (byte)bnkcpy_vram_address::$17 + [209] bnkcpy_vram_address::$18 = < bnkcpy_vram_address::beg#0 + [210] bnkcpy_vram_address::addr#0 = bnkcpy_vram_address::$18 & $1fff + [211] bnkcpy_vram_address::addr#1 = (byte*)bnkcpy_vram_address::addr#0 + $a000 + [212] *((byte*) 40801) = bnkcpy_vram_address::bank#0 + to:bnkcpy_vram_address::@1 +bnkcpy_vram_address::@1: scope:[bnkcpy_vram_address] from bnkcpy_vram_address bnkcpy_vram_address::@3 + [213] bnkcpy_vram_address::bank#2 = phi( bnkcpy_vram_address/bnkcpy_vram_address::bank#0, bnkcpy_vram_address::@3/bnkcpy_vram_address::bank#5 ) + [213] bnkcpy_vram_address::addr#4 = phi( bnkcpy_vram_address/bnkcpy_vram_address::addr#1, bnkcpy_vram_address::@3/bnkcpy_vram_address::addr#2 ) + [213] bnkcpy_vram_address::pos#2 = phi( bnkcpy_vram_address/bnkcpy_vram_address::beg#0, bnkcpy_vram_address::@3/bnkcpy_vram_address::pos#1 ) + [214] if(bnkcpy_vram_address::pos#2memcpy_to_vram::vdest#0 + [226] *VERA_ADDRX_H = VERA_INC_1|memcpy_to_vram::vbank#0 + to:memcpy_to_vram::@1 +memcpy_to_vram::@1: scope:[memcpy_to_vram] from memcpy_to_vram memcpy_to_vram::@2 + [227] memcpy_to_vram::s#2 = phi( memcpy_to_vram/(byte*)memcpy_to_vram::src#0, memcpy_to_vram::@2/memcpy_to_vram::s#1 ) + [228] if(memcpy_to_vram::s#2!=memcpy_to_vram::end#0) goto memcpy_to_vram::@2 + to:memcpy_to_vram::@return +memcpy_to_vram::@return: scope:[memcpy_to_vram] from memcpy_to_vram::@1 + [229] return + to:@return +memcpy_to_vram::@2: scope:[memcpy_to_vram] from memcpy_to_vram::@1 + [230] *VERA_DATA0 = *memcpy_to_vram::s#2 + [231] memcpy_to_vram::s#1 = ++ memcpy_to_vram::s#2 + to:memcpy_to_vram::@1 + +void vera_layer_mode_tile(byte vera_layer_mode_tile::layer , dword vera_layer_mode_tile::mapbase_address , dword vera_layer_mode_tile::tilebase_address , word vera_layer_mode_tile::mapwidth , word vera_layer_mode_tile::mapheight , byte vera_layer_mode_tile::tilewidth , byte vera_layer_mode_tile::tileheight , byte vera_layer_mode_tile::color_depth) +vera_layer_mode_tile: scope:[vera_layer_mode_tile] from vera_layer_mode_text + [232] phi() + to:vera_layer_mode_tile::@1 +vera_layer_mode_tile::@1: scope:[vera_layer_mode_tile] from vera_layer_mode_tile + [233] *(vera_layer_rowshift+vera_layer_mode_text::layer#0) = 8 + [234] *(vera_layer_rowskip+vera_layer_mode_text::layer#0*SIZEOF_WORD) = $100 + to:vera_layer_mode_tile::@2 +vera_layer_mode_tile::@2: scope:[vera_layer_mode_tile] from vera_layer_mode_tile::@1 + [235] phi() + [236] call vera_layer_set_config + to:vera_layer_mode_tile::@4 +vera_layer_mode_tile::@4: scope:[vera_layer_mode_tile] from vera_layer_mode_tile::@2 + [237] *(vera_mapbase_offset+vera_layer_mode_text::layer#0*SIZEOF_WORD) = 0 + [238] *(vera_mapbase_bank+vera_layer_mode_text::layer#0) = 0 + [239] *(vera_mapbase_address+vera_layer_mode_text::layer#0*SIZEOF_DWORD) = vera_layer_mode_text::mapbase_address#0 + [240] call vera_layer_set_mapbase + to:vera_layer_mode_tile::@5 +vera_layer_mode_tile::@5: scope:[vera_layer_mode_tile] from vera_layer_mode_tile::@4 + [241] *(vera_tilebase_offset+vera_layer_mode_text::layer#0*SIZEOF_WORD) = cputc::conio_addr#1 + [274] *VERA_ADDRX_M = cputc::$5 + [275] cputc::$6 = CONIO_SCREEN_BANK#14 | VERA_INC_1 + [276] *VERA_ADDRX_H = cputc::$6 + [277] *VERA_DATA0 = cputc::c#0 + [278] *VERA_DATA0 = cputc::color#0 + [279] conio_cursor_x[conio_screen_layer] = ++ conio_cursor_x[conio_screen_layer] + [280] cputc::scroll_enable#0 = conio_scroll_enable[conio_screen_layer] + [281] if(0!=cputc::scroll_enable#0) goto cputc::@5 + to:cputc::@3 +cputc::@3: scope:[cputc] from cputc::@2 + [282] cputc::$16 = (word)conio_cursor_x[conio_screen_layer] + [283] if(cputc::$16!=conio_width) goto cputc::@return + to:cputc::@4 +cputc::@4: scope:[cputc] from cputc::@3 + [284] phi() + [285] call cputln + to:cputc::@return +cputc::@return: scope:[cputc] from cputc::@1 cputc::@3 cputc::@4 cputc::@5 cputc::@6 + [286] return + to:@return +cputc::@5: scope:[cputc] from cputc::@2 + [287] if(conio_cursor_x[conio_screen_layer]!=conio_screen_width) goto cputc::@return + to:cputc::@6 +cputc::@6: scope:[cputc] from cputc::@5 + [288] phi() + [289] call cputln + to:cputc::@return +cputc::@1: scope:[cputc] from cputc::@7 + [290] phi() + [291] call cputln + to:cputc::@return + +void setnam(volatile byte* setnam::filename) +setnam: scope:[setnam] from LoadFileBanked + [292] strlen::str#1 = setnam::filename + [293] call strlen + [294] strlen::return#2 = strlen::len#2 + to:setnam::@1 +setnam::@1: scope:[setnam] from setnam + [295] setnam::$0 = strlen::return#2 + [296] setnam::filename_len = (byte)setnam::$0 + asm { ldafilename_len ldxfilename ldyfilename+1 jsr$ffbd } + to:setnam::@return +setnam::@return: scope:[setnam] from setnam::@1 + [298] return + to:@return + +void setlfs(volatile byte setlfs::device) +setlfs: scope:[setlfs] from LoadFileBanked::@1 + asm { ldxdevice lda#1 ldy#0 jsr$ffba } + to:setlfs::@return +setlfs::@return: scope:[setlfs] from setlfs + [300] return + to:@return + +byte load(volatile byte* load::address , volatile byte load::verify) +load: scope:[load] from LoadFileBanked::@2 + [301] load::status = 0 + asm { ldxaddress ldyaddress+1 ldaverify jsr$ffd5 bcserror lda#$ff error: stastatus } + to:load::@return +load::@return: scope:[load] from load + [303] return + to:@return + +void vera_layer_set_config(byte vera_layer_set_config::layer , byte vera_layer_set_config::config) +vera_layer_set_config: scope:[vera_layer_set_config] from vera_layer_mode_tile::@2 + [304] vera_layer_set_config::addr#0 = *(vera_layer_config+vera_layer_mode_text::layer#0*SIZEOF_POINTER) + [305] *vera_layer_set_config::addr#0 = vera_layer_mode_tile::config#10 + to:vera_layer_set_config::@return +vera_layer_set_config::@return: scope:[vera_layer_set_config] from vera_layer_set_config + [306] return + to:@return + +void vera_layer_set_tilebase(byte vera_layer_set_tilebase::layer , byte vera_layer_set_tilebase::tilebase) +vera_layer_set_tilebase: scope:[vera_layer_set_tilebase] from vera_layer_mode_tile::@3 + [307] vera_layer_set_tilebase::addr#0 = *(vera_layer_tilebase+vera_layer_mode_text::layer#0*SIZEOF_POINTER) + [308] *vera_layer_set_tilebase::addr#0 = > clearline::addr#0 + [365] *VERA_ADDRX_M = clearline::$2 + [366] *VERA_ADDRX_H = VERA_INC_1 + [367] vera_layer_get_color::layer#1 = conio_screen_layer + [368] call vera_layer_get_color + [369] vera_layer_get_color::return#4 = vera_layer_get_color::return#2 + to:clearline::@4 +clearline::@4: scope:[clearline] from clearline + [370] clearline::color#0 = vera_layer_get_color::return#4 + to:clearline::@1 +clearline::@1: scope:[clearline] from clearline::@2 clearline::@4 + [371] clearline::c#2 = phi( clearline::@2/clearline::c#1, clearline::@4/0 ) + [372] if(clearline::c#2 (void*)memcpy_in_vram::src#0 + [382] *VERA_ADDRX_M = memcpy_in_vram::$1 + [383] *VERA_ADDRX_H = VERA_INC_1 + [384] *VERA_CTRL = *VERA_CTRL | VERA_ADDRSEL + [385] memcpy_in_vram::$3 = < memcpy_in_vram::dest#0 + [386] *VERA_ADDRX_L = memcpy_in_vram::$3 + [387] memcpy_in_vram::$4 = > memcpy_in_vram::dest#0 + [388] *VERA_ADDRX_M = memcpy_in_vram::$4 + [389] *VERA_ADDRX_H = VERA_INC_1 + to:memcpy_in_vram::@1 +memcpy_in_vram::@1: scope:[memcpy_in_vram] from memcpy_in_vram memcpy_in_vram::@2 + [390] memcpy_in_vram::i#2 = phi( memcpy_in_vram/0, memcpy_in_vram::@2/memcpy_in_vram::i#1 ) + [391] if(memcpy_in_vram::i#2> 7 [ screensize::hscale#0 ] ( screensize:15 [ conio_screen_width conio_screen_height conio_x16_init::line#0 screensize::hscale#0 ] { } conio_x16_init:8::screensize:15 [ main::SPRITE_ATTR conio_screen_width conio_screen_height conio_x16_init::line#0 screensize::hscale#0 ] { } ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp[1]:2 [ conio_x16_init::line#3 conio_x16_init::line#1 conio_x16_init::line#0 ] +Statement [59] screensize::$1 = $28 << screensize::hscale#0 [ screensize::$1 ] ( screensize:15 [ conio_screen_width conio_screen_height conio_x16_init::line#0 screensize::$1 ] { } conio_x16_init:8::screensize:15 [ main::SPRITE_ATTR conio_screen_width conio_screen_height conio_x16_init::line#0 screensize::$1 ] { } ) always clobbers reg byte a +Statement [61] screensize::vscale#0 = *VERA_DC_VSCALE >> 7 [ screensize::vscale#0 ] ( screensize:15 [ conio_screen_width conio_screen_height conio_x16_init::line#0 screensize::vscale#0 ] { } conio_x16_init:8::screensize:15 [ main::SPRITE_ATTR conio_screen_width conio_screen_height conio_x16_init::line#0 screensize::vscale#0 ] { } ) always clobbers reg byte a +Statement [62] screensize::$3 = $1e << screensize::vscale#0 [ screensize::$3 ] ( screensize:15 [ conio_screen_width conio_screen_height conio_x16_init::line#0 screensize::$3 ] { } conio_x16_init:8::screensize:15 [ main::SPRITE_ATTR conio_screen_width conio_screen_height conio_x16_init::line#0 screensize::$3 ] { } ) always clobbers reg byte a +Statement [65] conio_screen_layer = 1 [ conio_screen_layer ] ( screenlayer:17 [ conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer ] { { vera_layer_get_mapbase_bank::layer#0 = conio_screen_layer } { vera_layer_get_mapbase_bank::return#0 = vera_layer_get_mapbase_bank::return#2 } } conio_x16_init:8::screenlayer:17 [ main::SPRITE_ATTR conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer ] { { vera_layer_get_mapbase_bank::layer#0 = conio_screen_layer } { vera_layer_get_mapbase_bank::return#0 = vera_layer_get_mapbase_bank::return#2 } } main:10::screenlayer:35 [ conio_screen_width conio_screen_height main::SPRITE_ATTR conio_screen_layer ] { { vera_layer_get_mapbase_bank::layer#0 = conio_screen_layer } { vera_layer_get_mapbase_bank::return#0 = vera_layer_get_mapbase_bank::return#2 } } ) always clobbers reg byte a +Statement [72] vera_layer_get_mapbase_offset::return#2 = vera_layer_get_mapbase_offset::return#0 [ conio_screen_layer CONIO_SCREEN_BANK#14 vera_layer_get_mapbase_offset::return#2 ] ( screenlayer:17 [ conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer CONIO_SCREEN_BANK#14 vera_layer_get_mapbase_offset::return#2 ] { { vera_layer_get_mapbase_offset::layer#0 = conio_screen_layer } { vera_layer_get_mapbase_offset::return#0 = vera_layer_get_mapbase_offset::return#2 } } conio_x16_init:8::screenlayer:17 [ main::SPRITE_ATTR conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer CONIO_SCREEN_BANK#14 vera_layer_get_mapbase_offset::return#2 ] { { vera_layer_get_mapbase_offset::layer#0 = conio_screen_layer } { vera_layer_get_mapbase_offset::return#0 = vera_layer_get_mapbase_offset::return#2 } } main:10::screenlayer:35 [ conio_screen_width conio_screen_height main::SPRITE_ATTR conio_screen_layer CONIO_SCREEN_BANK#14 vera_layer_get_mapbase_offset::return#2 ] { { vera_layer_get_mapbase_offset::layer#0 = conio_screen_layer } { vera_layer_get_mapbase_offset::return#0 = vera_layer_get_mapbase_offset::return#2 } } ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp[1]:57 [ CONIO_SCREEN_BANK#14 ] +Statement [73] CONIO_SCREEN_TEXT#16 = vera_layer_get_mapbase_offset::return#2 [ conio_screen_layer CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 ] ( screenlayer:17 [ conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 ] { } conio_x16_init:8::screenlayer:17 [ main::SPRITE_ATTR conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 ] { } main:10::screenlayer:35 [ conio_screen_width conio_screen_height main::SPRITE_ATTR conio_screen_layer CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 ] { } ) always clobbers reg byte a +Statement [75] screenlayer::vera_layer_get_width1_$2 = screenlayer::vera_layer_get_width1_layer#0 << 1 [ conio_screen_layer CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_width1_$2 ] ( screenlayer:17 [ conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_width1_$2 ] { } conio_x16_init:8::screenlayer:17 [ main::SPRITE_ATTR conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_width1_$2 ] { } main:10::screenlayer:35 [ conio_screen_width conio_screen_height main::SPRITE_ATTR conio_screen_layer CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_width1_$2 ] { } ) always clobbers reg byte a +Statement [76] screenlayer::vera_layer_get_width1_config#0 = vera_layer_config[screenlayer::vera_layer_get_width1_$2] [ conio_screen_layer CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_width1_config#0 ] ( screenlayer:17 [ conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_width1_config#0 ] { } conio_x16_init:8::screenlayer:17 [ main::SPRITE_ATTR conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_width1_config#0 ] { } main:10::screenlayer:35 [ conio_screen_width conio_screen_height main::SPRITE_ATTR conio_screen_layer CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_width1_config#0 ] { } ) always clobbers reg byte a +Statement [77] screenlayer::vera_layer_get_width1_$0 = *screenlayer::vera_layer_get_width1_config#0 & VERA_LAYER_WIDTH_MASK [ conio_screen_layer CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_width1_$0 ] ( screenlayer:17 [ conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_width1_$0 ] { } conio_x16_init:8::screenlayer:17 [ main::SPRITE_ATTR conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_width1_$0 ] { } main:10::screenlayer:35 [ conio_screen_width conio_screen_height main::SPRITE_ATTR conio_screen_layer CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_width1_$0 ] { } ) always clobbers reg byte a reg byte y +Removing always clobbered register reg byte y as potential for zp[1]:2 [ conio_x16_init::line#3 conio_x16_init::line#1 conio_x16_init::line#0 ] +Removing always clobbered register reg byte y as potential for zp[1]:57 [ CONIO_SCREEN_BANK#14 ] +Statement [78] screenlayer::vera_layer_get_width1_$1 = screenlayer::vera_layer_get_width1_$0 >> 4 [ conio_screen_layer CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_width1_$1 ] ( screenlayer:17 [ conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_width1_$1 ] { } conio_x16_init:8::screenlayer:17 [ main::SPRITE_ATTR conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_width1_$1 ] { } main:10::screenlayer:35 [ conio_screen_width conio_screen_height main::SPRITE_ATTR conio_screen_layer CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_width1_$1 ] { } ) always clobbers reg byte a +Statement [79] screenlayer::vera_layer_get_width1_$3 = screenlayer::vera_layer_get_width1_$1 << 1 [ conio_screen_layer CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_width1_$3 ] ( screenlayer:17 [ conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_width1_$3 ] { } conio_x16_init:8::screenlayer:17 [ main::SPRITE_ATTR conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_width1_$3 ] { } main:10::screenlayer:35 [ conio_screen_width conio_screen_height main::SPRITE_ATTR conio_screen_layer CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_width1_$3 ] { } ) always clobbers reg byte a +Statement [80] screenlayer::vera_layer_get_width1_return#0 = VERA_LAYER_WIDTH[screenlayer::vera_layer_get_width1_$3] [ conio_screen_layer CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_width1_return#0 ] ( screenlayer:17 [ conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_width1_return#0 ] { } conio_x16_init:8::screenlayer:17 [ main::SPRITE_ATTR conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_width1_return#0 ] { } main:10::screenlayer:35 [ conio_screen_width conio_screen_height main::SPRITE_ATTR conio_screen_layer CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_width1_return#0 ] { } ) always clobbers reg byte a +Statement [81] screenlayer::vera_layer_get_width1_return#1 = screenlayer::vera_layer_get_width1_return#0 [ conio_screen_layer CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_width1_return#1 ] ( screenlayer:17 [ conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_width1_return#1 ] { } conio_x16_init:8::screenlayer:17 [ main::SPRITE_ATTR conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_width1_return#1 ] { } main:10::screenlayer:35 [ conio_screen_width conio_screen_height main::SPRITE_ATTR conio_screen_layer CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_width1_return#1 ] { } ) always clobbers reg byte a +Statement [82] screenlayer::$2 = screenlayer::vera_layer_get_width1_return#1 [ conio_screen_layer CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::$2 ] ( screenlayer:17 [ conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::$2 ] { { vera_layer_get_rowshift::layer#0 = conio_screen_layer } { vera_layer_get_rowshift::return#0 = vera_layer_get_rowshift::return#2 } } conio_x16_init:8::screenlayer:17 [ main::SPRITE_ATTR conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::$2 ] { { vera_layer_get_rowshift::layer#0 = conio_screen_layer } { vera_layer_get_rowshift::return#0 = vera_layer_get_rowshift::return#2 } } main:10::screenlayer:35 [ conio_screen_width conio_screen_height main::SPRITE_ATTR conio_screen_layer CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::$2 ] { { vera_layer_get_rowshift::layer#0 = conio_screen_layer } { vera_layer_get_rowshift::return#0 = vera_layer_get_rowshift::return#2 } } ) always clobbers reg byte a +Statement [83] conio_width = screenlayer::$2 [ conio_screen_layer conio_width CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 ] ( screenlayer:17 [ conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 ] { { vera_layer_get_rowshift::layer#0 = conio_screen_layer } { vera_layer_get_rowshift::return#0 = vera_layer_get_rowshift::return#2 } } conio_x16_init:8::screenlayer:17 [ main::SPRITE_ATTR conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 ] { { vera_layer_get_rowshift::layer#0 = conio_screen_layer } { vera_layer_get_rowshift::return#0 = vera_layer_get_rowshift::return#2 } } main:10::screenlayer:35 [ conio_screen_width conio_screen_height main::SPRITE_ATTR conio_screen_layer conio_width CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 ] { { vera_layer_get_rowshift::layer#0 = conio_screen_layer } { vera_layer_get_rowshift::return#0 = vera_layer_get_rowshift::return#2 } } ) always clobbers reg byte a +Statement [91] vera_layer_get_rowskip::return#2 = vera_layer_get_rowskip::return#0 [ conio_screen_layer conio_width conio_rowshift CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 vera_layer_get_rowskip::return#2 ] ( screenlayer:17 [ conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width conio_rowshift CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 vera_layer_get_rowskip::return#2 ] { { vera_layer_get_rowskip::layer#0 = conio_screen_layer } { vera_layer_get_rowskip::return#0 = vera_layer_get_rowskip::return#2 } } conio_x16_init:8::screenlayer:17 [ main::SPRITE_ATTR conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width conio_rowshift CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 vera_layer_get_rowskip::return#2 ] { { vera_layer_get_rowskip::layer#0 = conio_screen_layer } { vera_layer_get_rowskip::return#0 = vera_layer_get_rowskip::return#2 } } main:10::screenlayer:35 [ conio_screen_width conio_screen_height main::SPRITE_ATTR conio_screen_layer conio_width conio_rowshift CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 vera_layer_get_rowskip::return#2 ] { { vera_layer_get_rowskip::layer#0 = conio_screen_layer } { vera_layer_get_rowskip::return#0 = vera_layer_get_rowskip::return#2 } } ) always clobbers reg byte a +Statement [92] screenlayer::$4 = vera_layer_get_rowskip::return#2 [ conio_screen_layer conio_width conio_rowshift CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::$4 ] ( screenlayer:17 [ conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width conio_rowshift CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::$4 ] { } conio_x16_init:8::screenlayer:17 [ main::SPRITE_ATTR conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width conio_rowshift CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::$4 ] { } main:10::screenlayer:35 [ conio_screen_width conio_screen_height main::SPRITE_ATTR conio_screen_layer conio_width conio_rowshift CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::$4 ] { } ) always clobbers reg byte a +Statement [93] conio_rowskip = screenlayer::$4 [ conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 ] ( screenlayer:17 [ conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 ] { } conio_x16_init:8::screenlayer:17 [ main::SPRITE_ATTR conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 ] { } main:10::screenlayer:35 [ conio_screen_width conio_screen_height main::SPRITE_ATTR conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 ] { } ) always clobbers reg byte a +Statement [95] screenlayer::vera_layer_get_height1_$2 = screenlayer::vera_layer_get_height1_layer#0 << 1 [ conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_height1_$2 ] ( screenlayer:17 [ conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_height1_$2 ] { } conio_x16_init:8::screenlayer:17 [ main::SPRITE_ATTR conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_height1_$2 ] { } main:10::screenlayer:35 [ conio_screen_width conio_screen_height main::SPRITE_ATTR conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_height1_$2 ] { } ) always clobbers reg byte a +Statement [96] screenlayer::vera_layer_get_height1_config#0 = vera_layer_config[screenlayer::vera_layer_get_height1_$2] [ conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_height1_config#0 ] ( screenlayer:17 [ conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_height1_config#0 ] { } conio_x16_init:8::screenlayer:17 [ main::SPRITE_ATTR conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_height1_config#0 ] { } main:10::screenlayer:35 [ conio_screen_width conio_screen_height main::SPRITE_ATTR conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_height1_config#0 ] { } ) always clobbers reg byte a +Statement [97] screenlayer::vera_layer_get_height1_$0 = *screenlayer::vera_layer_get_height1_config#0 & VERA_LAYER_HEIGHT_MASK [ conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_height1_$0 ] ( screenlayer:17 [ conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_height1_$0 ] { } conio_x16_init:8::screenlayer:17 [ main::SPRITE_ATTR conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_height1_$0 ] { } main:10::screenlayer:35 [ conio_screen_width conio_screen_height main::SPRITE_ATTR conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_height1_$0 ] { } ) always clobbers reg byte a reg byte y +Statement [98] screenlayer::vera_layer_get_height1_$1 = screenlayer::vera_layer_get_height1_$0 >> 6 [ conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_height1_$1 ] ( screenlayer:17 [ conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_height1_$1 ] { } conio_x16_init:8::screenlayer:17 [ main::SPRITE_ATTR conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_height1_$1 ] { } main:10::screenlayer:35 [ conio_screen_width conio_screen_height main::SPRITE_ATTR conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_height1_$1 ] { } ) always clobbers reg byte a +Statement [99] screenlayer::vera_layer_get_height1_$3 = screenlayer::vera_layer_get_height1_$1 << 1 [ conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_height1_$3 ] ( screenlayer:17 [ conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_height1_$3 ] { } conio_x16_init:8::screenlayer:17 [ main::SPRITE_ATTR conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_height1_$3 ] { } main:10::screenlayer:35 [ conio_screen_width conio_screen_height main::SPRITE_ATTR conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_height1_$3 ] { } ) always clobbers reg byte a +Statement [100] screenlayer::vera_layer_get_height1_return#0 = VERA_LAYER_HEIGHT[screenlayer::vera_layer_get_height1_$3] [ conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_height1_return#0 ] ( screenlayer:17 [ conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_height1_return#0 ] { } conio_x16_init:8::screenlayer:17 [ main::SPRITE_ATTR conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_height1_return#0 ] { } main:10::screenlayer:35 [ conio_screen_width conio_screen_height main::SPRITE_ATTR conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_height1_return#0 ] { } ) always clobbers reg byte a +Statement [101] screenlayer::vera_layer_get_height1_return#1 = screenlayer::vera_layer_get_height1_return#0 [ conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_height1_return#1 ] ( screenlayer:17 [ conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_height1_return#1 ] { } conio_x16_init:8::screenlayer:17 [ main::SPRITE_ATTR conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_height1_return#1 ] { } main:10::screenlayer:35 [ conio_screen_width conio_screen_height main::SPRITE_ATTR conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_height1_return#1 ] { } ) always clobbers reg byte a +Statement [102] screenlayer::$5 = screenlayer::vera_layer_get_height1_return#1 [ conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::$5 ] ( screenlayer:17 [ conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::$5 ] { } conio_x16_init:8::screenlayer:17 [ main::SPRITE_ATTR conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::$5 ] { } main:10::screenlayer:35 [ conio_screen_width conio_screen_height main::SPRITE_ATTR conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::$5 ] { } ) always clobbers reg byte a +Statement [103] conio_height = screenlayer::$5 [ conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 ] ( screenlayer:17 [ conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 ] { } conio_x16_init:8::screenlayer:17 [ main::SPRITE_ATTR conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 ] { } main:10::screenlayer:35 [ conio_screen_width conio_screen_height main::SPRITE_ATTR conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 ] { } ) always clobbers reg byte a +Statement [105] *(vera_layer_textcolor+vera_layer_set_textcolor::layer#0) = WHITE [ ] ( vera_layer_set_textcolor:19 [ conio_screen_width conio_screen_height conio_screen_layer conio_rowshift conio_x16_init::line#0 ] { } conio_x16_init:8::vera_layer_set_textcolor:19 [ main::SPRITE_ATTR conio_screen_width conio_screen_height conio_screen_layer conio_rowshift conio_x16_init::line#0 ] { } ) always clobbers reg byte a +Statement [107] *(vera_layer_backcolor+vera_layer_set_backcolor::layer#0) = BLUE [ ] ( vera_layer_set_backcolor:21 [ conio_screen_width conio_screen_height conio_screen_layer conio_rowshift conio_x16_init::line#0 ] { } conio_x16_init:8::vera_layer_set_backcolor:21 [ main::SPRITE_ATTR conio_screen_width conio_screen_height conio_screen_layer conio_rowshift conio_x16_init::line#0 ] { } ) always clobbers reg byte a +Statement [110] vera_layer_set_mapbase::$0 = vera_layer_set_mapbase::layer#3 << 1 [ vera_layer_set_mapbase::mapbase#3 vera_layer_set_mapbase::$0 ] ( vera_layer_set_mapbase:23 [ conio_screen_width conio_screen_height conio_screen_layer conio_rowshift conio_x16_init::line#0 vera_layer_set_mapbase::mapbase#3 vera_layer_set_mapbase::$0 ] { } conio_x16_init:8::vera_layer_set_mapbase:23 [ main::SPRITE_ATTR conio_screen_width conio_screen_height conio_screen_layer conio_rowshift conio_x16_init::line#0 vera_layer_set_mapbase::mapbase#3 vera_layer_set_mapbase::$0 ] { } vera_layer_set_mapbase:25 [ conio_screen_width conio_screen_height conio_screen_layer conio_rowshift conio_x16_init::line#0 vera_layer_set_mapbase::mapbase#3 vera_layer_set_mapbase::$0 ] { } conio_x16_init:8::vera_layer_set_mapbase:25 [ main::SPRITE_ATTR conio_screen_width conio_screen_height conio_screen_layer conio_rowshift conio_x16_init::line#0 vera_layer_set_mapbase::mapbase#3 vera_layer_set_mapbase::$0 ] { } vera_layer_mode_text:13::vera_layer_mode_tile:54::vera_layer_set_mapbase:240 [ conio_screen_width conio_screen_height conio_x16_init::line#0 vera_layer_set_mapbase::mapbase#3 vera_layer_set_mapbase::$0 ] { } conio_x16_init:8::vera_layer_mode_text:13::vera_layer_mode_tile:54::vera_layer_set_mapbase:240 [ main::SPRITE_ATTR conio_screen_width conio_screen_height conio_x16_init::line#0 vera_layer_set_mapbase::mapbase#3 vera_layer_set_mapbase::$0 ] { } ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp[1]:4 [ vera_layer_set_mapbase::mapbase#3 ] +Statement [111] vera_layer_set_mapbase::addr#0 = vera_layer_mapbase[vera_layer_set_mapbase::$0] [ vera_layer_set_mapbase::mapbase#3 vera_layer_set_mapbase::addr#0 ] ( vera_layer_set_mapbase:23 [ conio_screen_width conio_screen_height conio_screen_layer conio_rowshift conio_x16_init::line#0 vera_layer_set_mapbase::mapbase#3 vera_layer_set_mapbase::addr#0 ] { } conio_x16_init:8::vera_layer_set_mapbase:23 [ main::SPRITE_ATTR conio_screen_width conio_screen_height conio_screen_layer conio_rowshift conio_x16_init::line#0 vera_layer_set_mapbase::mapbase#3 vera_layer_set_mapbase::addr#0 ] { } vera_layer_set_mapbase:25 [ conio_screen_width conio_screen_height conio_screen_layer conio_rowshift conio_x16_init::line#0 vera_layer_set_mapbase::mapbase#3 vera_layer_set_mapbase::addr#0 ] { } conio_x16_init:8::vera_layer_set_mapbase:25 [ main::SPRITE_ATTR conio_screen_width conio_screen_height conio_screen_layer conio_rowshift conio_x16_init::line#0 vera_layer_set_mapbase::mapbase#3 vera_layer_set_mapbase::addr#0 ] { } vera_layer_mode_text:13::vera_layer_mode_tile:54::vera_layer_set_mapbase:240 [ conio_screen_width conio_screen_height conio_x16_init::line#0 vera_layer_set_mapbase::mapbase#3 vera_layer_set_mapbase::addr#0 ] { } conio_x16_init:8::vera_layer_mode_text:13::vera_layer_mode_tile:54::vera_layer_set_mapbase:240 [ main::SPRITE_ATTR conio_screen_width conio_screen_height conio_x16_init::line#0 vera_layer_set_mapbase::mapbase#3 vera_layer_set_mapbase::addr#0 ] { } ) always clobbers reg byte a +Statement [112] *vera_layer_set_mapbase::addr#0 = vera_layer_set_mapbase::mapbase#3 [ ] ( vera_layer_set_mapbase:23 [ conio_screen_width conio_screen_height conio_screen_layer conio_rowshift conio_x16_init::line#0 ] { } conio_x16_init:8::vera_layer_set_mapbase:23 [ main::SPRITE_ATTR conio_screen_width conio_screen_height conio_screen_layer conio_rowshift conio_x16_init::line#0 ] { } vera_layer_set_mapbase:25 [ conio_screen_width conio_screen_height conio_screen_layer conio_rowshift conio_x16_init::line#0 ] { } conio_x16_init:8::vera_layer_set_mapbase:25 [ main::SPRITE_ATTR conio_screen_width conio_screen_height conio_screen_layer conio_rowshift conio_x16_init::line#0 ] { } vera_layer_mode_text:13::vera_layer_mode_tile:54::vera_layer_set_mapbase:240 [ conio_screen_width conio_screen_height conio_x16_init::line#0 ] { } conio_x16_init:8::vera_layer_mode_text:13::vera_layer_mode_tile:54::vera_layer_set_mapbase:240 [ main::SPRITE_ATTR conio_screen_width conio_screen_height conio_x16_init::line#0 ] { } ) always clobbers reg byte a reg byte y +Statement [118] if(0 bnkcpy_vram_address::vdest#2 [ bnkcpy_vram_address::beg#0 bnkcpy_vram_address::num#2 bnkcpy_vram_address::$4 ] ( main:10::bnkcpy_vram_address:43 [ main::SPRITE_ATTR bnkcpy_vram_address::beg#0 bnkcpy_vram_address::num#2 bnkcpy_vram_address::$4 ] { } main:10::bnkcpy_vram_address:45 [ main::SPRITE_ATTR bnkcpy_vram_address::beg#0 bnkcpy_vram_address::num#2 bnkcpy_vram_address::$4 ] { } ) always clobbers reg byte a +Statement [193] *VERA_ADDRX_H = *VERA_ADDRX_H | VERA_INC_1 [ bnkcpy_vram_address::beg#0 bnkcpy_vram_address::num#2 ] ( main:10::bnkcpy_vram_address:43 [ main::SPRITE_ATTR bnkcpy_vram_address::beg#0 bnkcpy_vram_address::num#2 ] { } main:10::bnkcpy_vram_address:45 [ main::SPRITE_ATTR bnkcpy_vram_address::beg#0 bnkcpy_vram_address::num#2 ] { } ) always clobbers reg byte a +Statement [194] bnkcpy_vram_address::end#0 = bnkcpy_vram_address::beg#0 + bnkcpy_vram_address::num#2 [ bnkcpy_vram_address::beg#0 bnkcpy_vram_address::end#0 ] ( main:10::bnkcpy_vram_address:43 [ main::SPRITE_ATTR bnkcpy_vram_address::beg#0 bnkcpy_vram_address::end#0 ] { } main:10::bnkcpy_vram_address:45 [ main::SPRITE_ATTR bnkcpy_vram_address::beg#0 bnkcpy_vram_address::end#0 ] { } ) always clobbers reg byte a +Statement [195] bnkcpy_vram_address::$7 = > bnkcpy_vram_address::beg#0 [ bnkcpy_vram_address::beg#0 bnkcpy_vram_address::end#0 bnkcpy_vram_address::$7 ] ( main:10::bnkcpy_vram_address:43 [ main::SPRITE_ATTR bnkcpy_vram_address::beg#0 bnkcpy_vram_address::end#0 bnkcpy_vram_address::$7 ] { } main:10::bnkcpy_vram_address:45 [ main::SPRITE_ATTR bnkcpy_vram_address::beg#0 bnkcpy_vram_address::end#0 bnkcpy_vram_address::$7 ] { } ) always clobbers reg byte a +Statement [196] bnkcpy_vram_address::$8 = bnkcpy_vram_address::$7 << 8 [ bnkcpy_vram_address::beg#0 bnkcpy_vram_address::end#0 bnkcpy_vram_address::$8 ] ( main:10::bnkcpy_vram_address:43 [ main::SPRITE_ATTR bnkcpy_vram_address::beg#0 bnkcpy_vram_address::end#0 bnkcpy_vram_address::$8 ] { } main:10::bnkcpy_vram_address:45 [ main::SPRITE_ATTR bnkcpy_vram_address::beg#0 bnkcpy_vram_address::end#0 bnkcpy_vram_address::$8 ] { } ) always clobbers reg byte a +Statement [198] bnkcpy_vram_address::$10 = < bnkcpy_vram_address::beg#0 [ bnkcpy_vram_address::beg#0 bnkcpy_vram_address::end#0 bnkcpy_vram_address::$9 bnkcpy_vram_address::$10 ] ( main:10::bnkcpy_vram_address:43 [ main::SPRITE_ATTR bnkcpy_vram_address::beg#0 bnkcpy_vram_address::end#0 bnkcpy_vram_address::$9 bnkcpy_vram_address::$10 ] { } main:10::bnkcpy_vram_address:45 [ main::SPRITE_ATTR bnkcpy_vram_address::beg#0 bnkcpy_vram_address::end#0 bnkcpy_vram_address::$9 bnkcpy_vram_address::$10 ] { } ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp[1]:145 [ bnkcpy_vram_address::$9 ] +Statement [200] bnkcpy_vram_address::$23 = (word)bnkcpy_vram_address::$9 [ bnkcpy_vram_address::beg#0 bnkcpy_vram_address::end#0 bnkcpy_vram_address::$11 bnkcpy_vram_address::$23 ] ( main:10::bnkcpy_vram_address:43 [ main::SPRITE_ATTR bnkcpy_vram_address::beg#0 bnkcpy_vram_address::end#0 bnkcpy_vram_address::$11 bnkcpy_vram_address::$23 ] { } main:10::bnkcpy_vram_address:45 [ main::SPRITE_ATTR bnkcpy_vram_address::beg#0 bnkcpy_vram_address::end#0 bnkcpy_vram_address::$11 bnkcpy_vram_address::$23 ] { } ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp[1]:148 [ bnkcpy_vram_address::$11 ] +Statement [201] bnkcpy_vram_address::$12 = bnkcpy_vram_address::$23 | bnkcpy_vram_address::$11 [ bnkcpy_vram_address::beg#0 bnkcpy_vram_address::end#0 bnkcpy_vram_address::$12 ] ( main:10::bnkcpy_vram_address:43 [ main::SPRITE_ATTR bnkcpy_vram_address::beg#0 bnkcpy_vram_address::end#0 bnkcpy_vram_address::$12 ] { } main:10::bnkcpy_vram_address:45 [ main::SPRITE_ATTR bnkcpy_vram_address::beg#0 bnkcpy_vram_address::end#0 bnkcpy_vram_address::$12 ] { } ) always clobbers reg byte a +Statement [202] bnkcpy_vram_address::$13 = bnkcpy_vram_address::$12 >> 5 [ bnkcpy_vram_address::beg#0 bnkcpy_vram_address::end#0 bnkcpy_vram_address::$13 ] ( main:10::bnkcpy_vram_address:43 [ main::SPRITE_ATTR bnkcpy_vram_address::beg#0 bnkcpy_vram_address::end#0 bnkcpy_vram_address::$13 ] { } main:10::bnkcpy_vram_address:45 [ main::SPRITE_ATTR bnkcpy_vram_address::beg#0 bnkcpy_vram_address::end#0 bnkcpy_vram_address::$13 ] { } ) always clobbers reg byte a +Statement [203] bnkcpy_vram_address::$14 = > bnkcpy_vram_address::beg#0 [ bnkcpy_vram_address::beg#0 bnkcpy_vram_address::end#0 bnkcpy_vram_address::$13 bnkcpy_vram_address::$14 ] ( main:10::bnkcpy_vram_address:43 [ main::SPRITE_ATTR bnkcpy_vram_address::beg#0 bnkcpy_vram_address::end#0 bnkcpy_vram_address::$13 bnkcpy_vram_address::$14 ] { } main:10::bnkcpy_vram_address:45 [ main::SPRITE_ATTR bnkcpy_vram_address::beg#0 bnkcpy_vram_address::end#0 bnkcpy_vram_address::$13 bnkcpy_vram_address::$14 ] { } ) always clobbers reg byte a +Statement [204] bnkcpy_vram_address::$15 = bnkcpy_vram_address::$14 << 3 [ bnkcpy_vram_address::beg#0 bnkcpy_vram_address::end#0 bnkcpy_vram_address::$13 bnkcpy_vram_address::$15 ] ( main:10::bnkcpy_vram_address:43 [ main::SPRITE_ATTR bnkcpy_vram_address::beg#0 bnkcpy_vram_address::end#0 bnkcpy_vram_address::$13 bnkcpy_vram_address::$15 ] { } main:10::bnkcpy_vram_address:45 [ main::SPRITE_ATTR bnkcpy_vram_address::beg#0 bnkcpy_vram_address::end#0 bnkcpy_vram_address::$13 bnkcpy_vram_address::$15 ] { } ) always clobbers reg byte a +Statement [206] bnkcpy_vram_address::$24 = (word)bnkcpy_vram_address::$16 [ bnkcpy_vram_address::beg#0 bnkcpy_vram_address::end#0 bnkcpy_vram_address::$13 bnkcpy_vram_address::$24 ] ( main:10::bnkcpy_vram_address:43 [ main::SPRITE_ATTR bnkcpy_vram_address::beg#0 bnkcpy_vram_address::end#0 bnkcpy_vram_address::$13 bnkcpy_vram_address::$24 ] { } main:10::bnkcpy_vram_address:45 [ main::SPRITE_ATTR bnkcpy_vram_address::beg#0 bnkcpy_vram_address::end#0 bnkcpy_vram_address::$13 bnkcpy_vram_address::$24 ] { } ) always clobbers reg byte a +Statement [207] bnkcpy_vram_address::$17 = bnkcpy_vram_address::$13 + bnkcpy_vram_address::$24 [ bnkcpy_vram_address::beg#0 bnkcpy_vram_address::end#0 bnkcpy_vram_address::$17 ] ( main:10::bnkcpy_vram_address:43 [ main::SPRITE_ATTR bnkcpy_vram_address::beg#0 bnkcpy_vram_address::end#0 bnkcpy_vram_address::$17 ] { } main:10::bnkcpy_vram_address:45 [ main::SPRITE_ATTR bnkcpy_vram_address::beg#0 bnkcpy_vram_address::end#0 bnkcpy_vram_address::$17 ] { } ) always clobbers reg byte a +Statement [208] bnkcpy_vram_address::bank#0 = (byte)bnkcpy_vram_address::$17 [ bnkcpy_vram_address::beg#0 bnkcpy_vram_address::end#0 bnkcpy_vram_address::bank#0 ] ( main:10::bnkcpy_vram_address:43 [ main::SPRITE_ATTR bnkcpy_vram_address::beg#0 bnkcpy_vram_address::end#0 bnkcpy_vram_address::bank#0 ] { } main:10::bnkcpy_vram_address:45 [ main::SPRITE_ATTR bnkcpy_vram_address::beg#0 bnkcpy_vram_address::end#0 bnkcpy_vram_address::bank#0 ] { } ) always clobbers reg byte a +Statement [209] bnkcpy_vram_address::$18 = < bnkcpy_vram_address::beg#0 [ bnkcpy_vram_address::beg#0 bnkcpy_vram_address::end#0 bnkcpy_vram_address::bank#0 bnkcpy_vram_address::$18 ] ( main:10::bnkcpy_vram_address:43 [ main::SPRITE_ATTR bnkcpy_vram_address::beg#0 bnkcpy_vram_address::end#0 bnkcpy_vram_address::bank#0 bnkcpy_vram_address::$18 ] { } main:10::bnkcpy_vram_address:45 [ main::SPRITE_ATTR bnkcpy_vram_address::beg#0 bnkcpy_vram_address::end#0 bnkcpy_vram_address::bank#0 bnkcpy_vram_address::$18 ] { } ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp[1]:25 [ bnkcpy_vram_address::bank#2 bnkcpy_vram_address::bank#0 bnkcpy_vram_address::bank#5 bnkcpy_vram_address::bank#1 ] +Statement [210] bnkcpy_vram_address::addr#0 = bnkcpy_vram_address::$18 & $1fff [ bnkcpy_vram_address::beg#0 bnkcpy_vram_address::end#0 bnkcpy_vram_address::bank#0 bnkcpy_vram_address::addr#0 ] ( main:10::bnkcpy_vram_address:43 [ main::SPRITE_ATTR bnkcpy_vram_address::beg#0 bnkcpy_vram_address::end#0 bnkcpy_vram_address::bank#0 bnkcpy_vram_address::addr#0 ] { } main:10::bnkcpy_vram_address:45 [ main::SPRITE_ATTR bnkcpy_vram_address::beg#0 bnkcpy_vram_address::end#0 bnkcpy_vram_address::bank#0 bnkcpy_vram_address::addr#0 ] { } ) always clobbers reg byte a +Statement [211] bnkcpy_vram_address::addr#1 = (byte*)bnkcpy_vram_address::addr#0 + $a000 [ bnkcpy_vram_address::beg#0 bnkcpy_vram_address::end#0 bnkcpy_vram_address::bank#0 bnkcpy_vram_address::addr#1 ] ( main:10::bnkcpy_vram_address:43 [ main::SPRITE_ATTR bnkcpy_vram_address::beg#0 bnkcpy_vram_address::end#0 bnkcpy_vram_address::bank#0 bnkcpy_vram_address::addr#1 ] { } main:10::bnkcpy_vram_address:45 [ main::SPRITE_ATTR bnkcpy_vram_address::beg#0 bnkcpy_vram_address::end#0 bnkcpy_vram_address::bank#0 bnkcpy_vram_address::addr#1 ] { } ) always clobbers reg byte a +Statement [214] if(bnkcpy_vram_address::pos#2memcpy_to_vram::vdest#0 [ ] ( main:10::memcpy_to_vram:49 [ ] { } ) always clobbers reg byte a +Statement [226] *VERA_ADDRX_H = VERA_INC_1|memcpy_to_vram::vbank#0 [ ] ( main:10::memcpy_to_vram:49 [ ] { } ) always clobbers reg byte a +Statement [228] if(memcpy_to_vram::s#2!=memcpy_to_vram::end#0) goto memcpy_to_vram::@2 [ memcpy_to_vram::s#2 ] ( main:10::memcpy_to_vram:49 [ memcpy_to_vram::s#2 ] { } ) always clobbers reg byte a +Statement [230] *VERA_DATA0 = *memcpy_to_vram::s#2 [ memcpy_to_vram::s#2 ] ( main:10::memcpy_to_vram:49 [ memcpy_to_vram::s#2 ] { } ) always clobbers reg byte a reg byte y +Statement [233] *(vera_layer_rowshift+vera_layer_mode_text::layer#0) = 8 [ ] ( vera_layer_mode_text:13::vera_layer_mode_tile:54 [ conio_screen_width conio_screen_height conio_x16_init::line#0 ] { } conio_x16_init:8::vera_layer_mode_text:13::vera_layer_mode_tile:54 [ main::SPRITE_ATTR conio_screen_width conio_screen_height conio_x16_init::line#0 ] { } ) always clobbers reg byte a +Statement [234] *(vera_layer_rowskip+vera_layer_mode_text::layer#0*SIZEOF_WORD) = $100 [ ] ( vera_layer_mode_text:13::vera_layer_mode_tile:54 [ conio_screen_width conio_screen_height conio_x16_init::line#0 ] { } conio_x16_init:8::vera_layer_mode_text:13::vera_layer_mode_tile:54 [ main::SPRITE_ATTR conio_screen_width conio_screen_height conio_x16_init::line#0 ] { } ) always clobbers reg byte a +Statement [237] *(vera_mapbase_offset+vera_layer_mode_text::layer#0*SIZEOF_WORD) = 0 [ ] ( vera_layer_mode_text:13::vera_layer_mode_tile:54 [ conio_screen_width conio_screen_height conio_x16_init::line#0 ] { } conio_x16_init:8::vera_layer_mode_text:13::vera_layer_mode_tile:54 [ main::SPRITE_ATTR conio_screen_width conio_screen_height conio_x16_init::line#0 ] { } ) always clobbers reg byte a +Statement [238] *(vera_mapbase_bank+vera_layer_mode_text::layer#0) = 0 [ ] ( vera_layer_mode_text:13::vera_layer_mode_tile:54 [ conio_screen_width conio_screen_height conio_x16_init::line#0 ] { } conio_x16_init:8::vera_layer_mode_text:13::vera_layer_mode_tile:54 [ main::SPRITE_ATTR conio_screen_width conio_screen_height conio_x16_init::line#0 ] { } ) always clobbers reg byte a +Statement [239] *(vera_mapbase_address+vera_layer_mode_text::layer#0*SIZEOF_DWORD) = vera_layer_mode_text::mapbase_address#0 [ ] ( vera_layer_mode_text:13::vera_layer_mode_tile:54 [ conio_screen_width conio_screen_height conio_x16_init::line#0 ] { } conio_x16_init:8::vera_layer_mode_text:13::vera_layer_mode_tile:54 [ main::SPRITE_ATTR conio_screen_width conio_screen_height conio_x16_init::line#0 ] { } ) always clobbers reg byte a +Statement [241] *(vera_tilebase_offset+vera_layer_mode_text::layer#0*SIZEOF_WORD) = > 7 [ screensize::hscale#0 ] ( screensize:15 [ conio_screen_width conio_screen_height conio_x16_init::line#0 screensize::hscale#0 ] { } conio_x16_init:8::screensize:15 [ main::SPRITE_ATTR conio_screen_width conio_screen_height conio_x16_init::line#0 screensize::hscale#0 ] { } ) always clobbers reg byte a +Statement [59] screensize::$1 = $28 << screensize::hscale#0 [ screensize::$1 ] ( screensize:15 [ conio_screen_width conio_screen_height conio_x16_init::line#0 screensize::$1 ] { } conio_x16_init:8::screensize:15 [ main::SPRITE_ATTR conio_screen_width conio_screen_height conio_x16_init::line#0 screensize::$1 ] { } ) always clobbers reg byte a +Statement [61] screensize::vscale#0 = *VERA_DC_VSCALE >> 7 [ screensize::vscale#0 ] ( screensize:15 [ conio_screen_width conio_screen_height conio_x16_init::line#0 screensize::vscale#0 ] { } conio_x16_init:8::screensize:15 [ main::SPRITE_ATTR conio_screen_width conio_screen_height conio_x16_init::line#0 screensize::vscale#0 ] { } ) always clobbers reg byte a +Statement [62] screensize::$3 = $1e << screensize::vscale#0 [ screensize::$3 ] ( screensize:15 [ conio_screen_width conio_screen_height conio_x16_init::line#0 screensize::$3 ] { } conio_x16_init:8::screensize:15 [ main::SPRITE_ATTR conio_screen_width conio_screen_height conio_x16_init::line#0 screensize::$3 ] { } ) always clobbers reg byte a +Statement [65] conio_screen_layer = 1 [ conio_screen_layer ] ( screenlayer:17 [ conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer ] { { vera_layer_get_mapbase_bank::layer#0 = conio_screen_layer } { vera_layer_get_mapbase_bank::return#0 = vera_layer_get_mapbase_bank::return#2 } } conio_x16_init:8::screenlayer:17 [ main::SPRITE_ATTR conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer ] { { vera_layer_get_mapbase_bank::layer#0 = conio_screen_layer } { vera_layer_get_mapbase_bank::return#0 = vera_layer_get_mapbase_bank::return#2 } } main:10::screenlayer:35 [ conio_screen_width conio_screen_height main::SPRITE_ATTR conio_screen_layer ] { { vera_layer_get_mapbase_bank::layer#0 = conio_screen_layer } { vera_layer_get_mapbase_bank::return#0 = vera_layer_get_mapbase_bank::return#2 } } ) always clobbers reg byte a +Statement [72] vera_layer_get_mapbase_offset::return#2 = vera_layer_get_mapbase_offset::return#0 [ conio_screen_layer CONIO_SCREEN_BANK#14 vera_layer_get_mapbase_offset::return#2 ] ( screenlayer:17 [ conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer CONIO_SCREEN_BANK#14 vera_layer_get_mapbase_offset::return#2 ] { { vera_layer_get_mapbase_offset::layer#0 = conio_screen_layer } { vera_layer_get_mapbase_offset::return#0 = vera_layer_get_mapbase_offset::return#2 } } conio_x16_init:8::screenlayer:17 [ main::SPRITE_ATTR conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer CONIO_SCREEN_BANK#14 vera_layer_get_mapbase_offset::return#2 ] { { vera_layer_get_mapbase_offset::layer#0 = conio_screen_layer } { vera_layer_get_mapbase_offset::return#0 = vera_layer_get_mapbase_offset::return#2 } } main:10::screenlayer:35 [ conio_screen_width conio_screen_height main::SPRITE_ATTR conio_screen_layer CONIO_SCREEN_BANK#14 vera_layer_get_mapbase_offset::return#2 ] { { vera_layer_get_mapbase_offset::layer#0 = conio_screen_layer } { vera_layer_get_mapbase_offset::return#0 = vera_layer_get_mapbase_offset::return#2 } } ) always clobbers reg byte a +Statement [73] CONIO_SCREEN_TEXT#16 = vera_layer_get_mapbase_offset::return#2 [ conio_screen_layer CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 ] ( screenlayer:17 [ conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 ] { } conio_x16_init:8::screenlayer:17 [ main::SPRITE_ATTR conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 ] { } main:10::screenlayer:35 [ conio_screen_width conio_screen_height main::SPRITE_ATTR conio_screen_layer CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 ] { } ) always clobbers reg byte a +Statement [75] screenlayer::vera_layer_get_width1_$2 = screenlayer::vera_layer_get_width1_layer#0 << 1 [ conio_screen_layer CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_width1_$2 ] ( screenlayer:17 [ conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_width1_$2 ] { } conio_x16_init:8::screenlayer:17 [ main::SPRITE_ATTR conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_width1_$2 ] { } main:10::screenlayer:35 [ conio_screen_width conio_screen_height main::SPRITE_ATTR conio_screen_layer CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_width1_$2 ] { } ) always clobbers reg byte a +Statement [76] screenlayer::vera_layer_get_width1_config#0 = vera_layer_config[screenlayer::vera_layer_get_width1_$2] [ conio_screen_layer CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_width1_config#0 ] ( screenlayer:17 [ conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_width1_config#0 ] { } conio_x16_init:8::screenlayer:17 [ main::SPRITE_ATTR conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_width1_config#0 ] { } main:10::screenlayer:35 [ conio_screen_width conio_screen_height main::SPRITE_ATTR conio_screen_layer CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_width1_config#0 ] { } ) always clobbers reg byte a +Statement [77] screenlayer::vera_layer_get_width1_$0 = *screenlayer::vera_layer_get_width1_config#0 & VERA_LAYER_WIDTH_MASK [ conio_screen_layer CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_width1_$0 ] ( screenlayer:17 [ conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_width1_$0 ] { } conio_x16_init:8::screenlayer:17 [ main::SPRITE_ATTR conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_width1_$0 ] { } main:10::screenlayer:35 [ conio_screen_width conio_screen_height main::SPRITE_ATTR conio_screen_layer CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_width1_$0 ] { } ) always clobbers reg byte a reg byte y +Statement [78] screenlayer::vera_layer_get_width1_$1 = screenlayer::vera_layer_get_width1_$0 >> 4 [ conio_screen_layer CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_width1_$1 ] ( screenlayer:17 [ conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_width1_$1 ] { } conio_x16_init:8::screenlayer:17 [ main::SPRITE_ATTR conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_width1_$1 ] { } main:10::screenlayer:35 [ conio_screen_width conio_screen_height main::SPRITE_ATTR conio_screen_layer CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_width1_$1 ] { } ) always clobbers reg byte a +Statement [79] screenlayer::vera_layer_get_width1_$3 = screenlayer::vera_layer_get_width1_$1 << 1 [ conio_screen_layer CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_width1_$3 ] ( screenlayer:17 [ conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_width1_$3 ] { } conio_x16_init:8::screenlayer:17 [ main::SPRITE_ATTR conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_width1_$3 ] { } main:10::screenlayer:35 [ conio_screen_width conio_screen_height main::SPRITE_ATTR conio_screen_layer CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_width1_$3 ] { } ) always clobbers reg byte a +Statement [80] screenlayer::vera_layer_get_width1_return#0 = VERA_LAYER_WIDTH[screenlayer::vera_layer_get_width1_$3] [ conio_screen_layer CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_width1_return#0 ] ( screenlayer:17 [ conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_width1_return#0 ] { } conio_x16_init:8::screenlayer:17 [ main::SPRITE_ATTR conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_width1_return#0 ] { } main:10::screenlayer:35 [ conio_screen_width conio_screen_height main::SPRITE_ATTR conio_screen_layer CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_width1_return#0 ] { } ) always clobbers reg byte a +Statement [81] screenlayer::vera_layer_get_width1_return#1 = screenlayer::vera_layer_get_width1_return#0 [ conio_screen_layer CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_width1_return#1 ] ( screenlayer:17 [ conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_width1_return#1 ] { } conio_x16_init:8::screenlayer:17 [ main::SPRITE_ATTR conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_width1_return#1 ] { } main:10::screenlayer:35 [ conio_screen_width conio_screen_height main::SPRITE_ATTR conio_screen_layer CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_width1_return#1 ] { } ) always clobbers reg byte a +Statement [82] screenlayer::$2 = screenlayer::vera_layer_get_width1_return#1 [ conio_screen_layer CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::$2 ] ( screenlayer:17 [ conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::$2 ] { { vera_layer_get_rowshift::layer#0 = conio_screen_layer } { vera_layer_get_rowshift::return#0 = vera_layer_get_rowshift::return#2 } } conio_x16_init:8::screenlayer:17 [ main::SPRITE_ATTR conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::$2 ] { { vera_layer_get_rowshift::layer#0 = conio_screen_layer } { vera_layer_get_rowshift::return#0 = vera_layer_get_rowshift::return#2 } } main:10::screenlayer:35 [ conio_screen_width conio_screen_height main::SPRITE_ATTR conio_screen_layer CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::$2 ] { { vera_layer_get_rowshift::layer#0 = conio_screen_layer } { vera_layer_get_rowshift::return#0 = vera_layer_get_rowshift::return#2 } } ) always clobbers reg byte a +Statement [83] conio_width = screenlayer::$2 [ conio_screen_layer conio_width CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 ] ( screenlayer:17 [ conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 ] { { vera_layer_get_rowshift::layer#0 = conio_screen_layer } { vera_layer_get_rowshift::return#0 = vera_layer_get_rowshift::return#2 } } conio_x16_init:8::screenlayer:17 [ main::SPRITE_ATTR conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 ] { { vera_layer_get_rowshift::layer#0 = conio_screen_layer } { vera_layer_get_rowshift::return#0 = vera_layer_get_rowshift::return#2 } } main:10::screenlayer:35 [ conio_screen_width conio_screen_height main::SPRITE_ATTR conio_screen_layer conio_width CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 ] { { vera_layer_get_rowshift::layer#0 = conio_screen_layer } { vera_layer_get_rowshift::return#0 = vera_layer_get_rowshift::return#2 } } ) always clobbers reg byte a +Statement [91] vera_layer_get_rowskip::return#2 = vera_layer_get_rowskip::return#0 [ conio_screen_layer conio_width conio_rowshift CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 vera_layer_get_rowskip::return#2 ] ( screenlayer:17 [ conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width conio_rowshift CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 vera_layer_get_rowskip::return#2 ] { { vera_layer_get_rowskip::layer#0 = conio_screen_layer } { vera_layer_get_rowskip::return#0 = vera_layer_get_rowskip::return#2 } } conio_x16_init:8::screenlayer:17 [ main::SPRITE_ATTR conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width conio_rowshift CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 vera_layer_get_rowskip::return#2 ] { { vera_layer_get_rowskip::layer#0 = conio_screen_layer } { vera_layer_get_rowskip::return#0 = vera_layer_get_rowskip::return#2 } } main:10::screenlayer:35 [ conio_screen_width conio_screen_height main::SPRITE_ATTR conio_screen_layer conio_width conio_rowshift CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 vera_layer_get_rowskip::return#2 ] { { vera_layer_get_rowskip::layer#0 = conio_screen_layer } { vera_layer_get_rowskip::return#0 = vera_layer_get_rowskip::return#2 } } ) always clobbers reg byte a +Statement [92] screenlayer::$4 = vera_layer_get_rowskip::return#2 [ conio_screen_layer conio_width conio_rowshift CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::$4 ] ( screenlayer:17 [ conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width conio_rowshift CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::$4 ] { } conio_x16_init:8::screenlayer:17 [ main::SPRITE_ATTR conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width conio_rowshift CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::$4 ] { } main:10::screenlayer:35 [ conio_screen_width conio_screen_height main::SPRITE_ATTR conio_screen_layer conio_width conio_rowshift CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::$4 ] { } ) always clobbers reg byte a +Statement [93] conio_rowskip = screenlayer::$4 [ conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 ] ( screenlayer:17 [ conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 ] { } conio_x16_init:8::screenlayer:17 [ main::SPRITE_ATTR conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 ] { } main:10::screenlayer:35 [ conio_screen_width conio_screen_height main::SPRITE_ATTR conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 ] { } ) always clobbers reg byte a +Statement [95] screenlayer::vera_layer_get_height1_$2 = screenlayer::vera_layer_get_height1_layer#0 << 1 [ conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_height1_$2 ] ( screenlayer:17 [ conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_height1_$2 ] { } conio_x16_init:8::screenlayer:17 [ main::SPRITE_ATTR conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_height1_$2 ] { } main:10::screenlayer:35 [ conio_screen_width conio_screen_height main::SPRITE_ATTR conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_height1_$2 ] { } ) always clobbers reg byte a +Statement [96] screenlayer::vera_layer_get_height1_config#0 = vera_layer_config[screenlayer::vera_layer_get_height1_$2] [ conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_height1_config#0 ] ( screenlayer:17 [ conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_height1_config#0 ] { } conio_x16_init:8::screenlayer:17 [ main::SPRITE_ATTR conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_height1_config#0 ] { } main:10::screenlayer:35 [ conio_screen_width conio_screen_height main::SPRITE_ATTR conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_height1_config#0 ] { } ) always clobbers reg byte a +Statement [97] screenlayer::vera_layer_get_height1_$0 = *screenlayer::vera_layer_get_height1_config#0 & VERA_LAYER_HEIGHT_MASK [ conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_height1_$0 ] ( screenlayer:17 [ conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_height1_$0 ] { } conio_x16_init:8::screenlayer:17 [ main::SPRITE_ATTR conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_height1_$0 ] { } main:10::screenlayer:35 [ conio_screen_width conio_screen_height main::SPRITE_ATTR conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_height1_$0 ] { } ) always clobbers reg byte a reg byte y +Statement [98] screenlayer::vera_layer_get_height1_$1 = screenlayer::vera_layer_get_height1_$0 >> 6 [ conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_height1_$1 ] ( screenlayer:17 [ conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_height1_$1 ] { } conio_x16_init:8::screenlayer:17 [ main::SPRITE_ATTR conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_height1_$1 ] { } main:10::screenlayer:35 [ conio_screen_width conio_screen_height main::SPRITE_ATTR conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_height1_$1 ] { } ) always clobbers reg byte a +Statement [99] screenlayer::vera_layer_get_height1_$3 = screenlayer::vera_layer_get_height1_$1 << 1 [ conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_height1_$3 ] ( screenlayer:17 [ conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_height1_$3 ] { } conio_x16_init:8::screenlayer:17 [ main::SPRITE_ATTR conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_height1_$3 ] { } main:10::screenlayer:35 [ conio_screen_width conio_screen_height main::SPRITE_ATTR conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_height1_$3 ] { } ) always clobbers reg byte a +Statement [100] screenlayer::vera_layer_get_height1_return#0 = VERA_LAYER_HEIGHT[screenlayer::vera_layer_get_height1_$3] [ conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_height1_return#0 ] ( screenlayer:17 [ conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_height1_return#0 ] { } conio_x16_init:8::screenlayer:17 [ main::SPRITE_ATTR conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_height1_return#0 ] { } main:10::screenlayer:35 [ conio_screen_width conio_screen_height main::SPRITE_ATTR conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_height1_return#0 ] { } ) always clobbers reg byte a +Statement [101] screenlayer::vera_layer_get_height1_return#1 = screenlayer::vera_layer_get_height1_return#0 [ conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_height1_return#1 ] ( screenlayer:17 [ conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_height1_return#1 ] { } conio_x16_init:8::screenlayer:17 [ main::SPRITE_ATTR conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_height1_return#1 ] { } main:10::screenlayer:35 [ conio_screen_width conio_screen_height main::SPRITE_ATTR conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::vera_layer_get_height1_return#1 ] { } ) always clobbers reg byte a +Statement [102] screenlayer::$5 = screenlayer::vera_layer_get_height1_return#1 [ conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::$5 ] ( screenlayer:17 [ conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::$5 ] { } conio_x16_init:8::screenlayer:17 [ main::SPRITE_ATTR conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::$5 ] { } main:10::screenlayer:35 [ conio_screen_width conio_screen_height main::SPRITE_ATTR conio_screen_layer conio_width conio_rowshift conio_rowskip CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 screenlayer::$5 ] { } ) always clobbers reg byte a +Statement [103] conio_height = screenlayer::$5 [ conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 ] ( screenlayer:17 [ conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 ] { } conio_x16_init:8::screenlayer:17 [ main::SPRITE_ATTR conio_screen_width conio_screen_height conio_x16_init::line#0 conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 ] { } main:10::screenlayer:35 [ conio_screen_width conio_screen_height main::SPRITE_ATTR conio_screen_layer conio_width conio_height conio_rowshift conio_rowskip CONIO_SCREEN_BANK#14 CONIO_SCREEN_TEXT#16 ] { } ) always clobbers reg byte a +Statement [105] *(vera_layer_textcolor+vera_layer_set_textcolor::layer#0) = WHITE [ ] ( vera_layer_set_textcolor:19 [ conio_screen_width conio_screen_height conio_screen_layer conio_rowshift conio_x16_init::line#0 ] { } conio_x16_init:8::vera_layer_set_textcolor:19 [ main::SPRITE_ATTR conio_screen_width conio_screen_height conio_screen_layer conio_rowshift conio_x16_init::line#0 ] { } ) always clobbers reg byte a +Statement [107] *(vera_layer_backcolor+vera_layer_set_backcolor::layer#0) = BLUE [ ] ( vera_layer_set_backcolor:21 [ conio_screen_width conio_screen_height conio_screen_layer conio_rowshift conio_x16_init::line#0 ] { } conio_x16_init:8::vera_layer_set_backcolor:21 [ main::SPRITE_ATTR conio_screen_width conio_screen_height conio_screen_layer conio_rowshift conio_x16_init::line#0 ] { } ) always clobbers reg byte a +Statement [110] vera_layer_set_mapbase::$0 = vera_layer_set_mapbase::layer#3 << 1 [ vera_layer_set_mapbase::mapbase#3 vera_layer_set_mapbase::$0 ] ( vera_layer_set_mapbase:23 [ conio_screen_width conio_screen_height conio_screen_layer conio_rowshift conio_x16_init::line#0 vera_layer_set_mapbase::mapbase#3 vera_layer_set_mapbase::$0 ] { } conio_x16_init:8::vera_layer_set_mapbase:23 [ main::SPRITE_ATTR conio_screen_width conio_screen_height conio_screen_layer conio_rowshift conio_x16_init::line#0 vera_layer_set_mapbase::mapbase#3 vera_layer_set_mapbase::$0 ] { } vera_layer_set_mapbase:25 [ conio_screen_width conio_screen_height conio_screen_layer conio_rowshift conio_x16_init::line#0 vera_layer_set_mapbase::mapbase#3 vera_layer_set_mapbase::$0 ] { } conio_x16_init:8::vera_layer_set_mapbase:25 [ main::SPRITE_ATTR conio_screen_width conio_screen_height conio_screen_layer conio_rowshift conio_x16_init::line#0 vera_layer_set_mapbase::mapbase#3 vera_layer_set_mapbase::$0 ] { } vera_layer_mode_text:13::vera_layer_mode_tile:54::vera_layer_set_mapbase:240 [ conio_screen_width conio_screen_height conio_x16_init::line#0 vera_layer_set_mapbase::mapbase#3 vera_layer_set_mapbase::$0 ] { } conio_x16_init:8::vera_layer_mode_text:13::vera_layer_mode_tile:54::vera_layer_set_mapbase:240 [ main::SPRITE_ATTR conio_screen_width conio_screen_height conio_x16_init::line#0 vera_layer_set_mapbase::mapbase#3 vera_layer_set_mapbase::$0 ] { } ) always clobbers reg byte a +Statement [111] vera_layer_set_mapbase::addr#0 = vera_layer_mapbase[vera_layer_set_mapbase::$0] [ vera_layer_set_mapbase::mapbase#3 vera_layer_set_mapbase::addr#0 ] ( vera_layer_set_mapbase:23 [ conio_screen_width conio_screen_height conio_screen_layer conio_rowshift conio_x16_init::line#0 vera_layer_set_mapbase::mapbase#3 vera_layer_set_mapbase::addr#0 ] { } conio_x16_init:8::vera_layer_set_mapbase:23 [ main::SPRITE_ATTR conio_screen_width conio_screen_height conio_screen_layer conio_rowshift conio_x16_init::line#0 vera_layer_set_mapbase::mapbase#3 vera_layer_set_mapbase::addr#0 ] { } vera_layer_set_mapbase:25 [ conio_screen_width conio_screen_height conio_screen_layer conio_rowshift conio_x16_init::line#0 vera_layer_set_mapbase::mapbase#3 vera_layer_set_mapbase::addr#0 ] { } conio_x16_init:8::vera_layer_set_mapbase:25 [ main::SPRITE_ATTR conio_screen_width conio_screen_height conio_screen_layer conio_rowshift conio_x16_init::line#0 vera_layer_set_mapbase::mapbase#3 vera_layer_set_mapbase::addr#0 ] { } vera_layer_mode_text:13::vera_layer_mode_tile:54::vera_layer_set_mapbase:240 [ conio_screen_width conio_screen_height conio_x16_init::line#0 vera_layer_set_mapbase::mapbase#3 vera_layer_set_mapbase::addr#0 ] { } conio_x16_init:8::vera_layer_mode_text:13::vera_layer_mode_tile:54::vera_layer_set_mapbase:240 [ main::SPRITE_ATTR conio_screen_width conio_screen_height conio_x16_init::line#0 vera_layer_set_mapbase::mapbase#3 vera_layer_set_mapbase::addr#0 ] { } ) always clobbers reg byte a +Statement [112] *vera_layer_set_mapbase::addr#0 = vera_layer_set_mapbase::mapbase#3 [ ] ( vera_layer_set_mapbase:23 [ conio_screen_width conio_screen_height conio_screen_layer conio_rowshift conio_x16_init::line#0 ] { } conio_x16_init:8::vera_layer_set_mapbase:23 [ main::SPRITE_ATTR conio_screen_width conio_screen_height conio_screen_layer conio_rowshift conio_x16_init::line#0 ] { } vera_layer_set_mapbase:25 [ conio_screen_width conio_screen_height conio_screen_layer conio_rowshift conio_x16_init::line#0 ] { } conio_x16_init:8::vera_layer_set_mapbase:25 [ main::SPRITE_ATTR conio_screen_width conio_screen_height conio_screen_layer conio_rowshift conio_x16_init::line#0 ] { } vera_layer_mode_text:13::vera_layer_mode_tile:54::vera_layer_set_mapbase:240 [ conio_screen_width conio_screen_height conio_x16_init::line#0 ] { } conio_x16_init:8::vera_layer_mode_text:13::vera_layer_mode_tile:54::vera_layer_set_mapbase:240 [ main::SPRITE_ATTR conio_screen_width conio_screen_height conio_x16_init::line#0 ] { } ) always clobbers reg byte a reg byte y +Statement [115] if(gotoxy::y#3<=conio_screen_height) goto gotoxy::@4 [ conio_screen_width conio_screen_height conio_screen_layer conio_rowshift gotoxy::y#3 ] ( gotoxy:30 [ conio_screen_width conio_screen_height conio_screen_layer conio_rowshift gotoxy::y#3 ] { { gotoxy::y#0 = gotoxy::y#3 conio_x16_init::line#3 } } conio_x16_init:8::gotoxy:30 [ main::SPRITE_ATTR conio_screen_width conio_screen_height conio_screen_layer conio_rowshift gotoxy::y#3 ] { { gotoxy::y#0 = gotoxy::y#3 conio_x16_init::line#3 } } main:10::cputs:39::cputc:172::cputln:285::cscroll:327::gotoxy:343 [ main::SPRITE_ATTR cputs::s#0 conio_width CONIO_SCREEN_BANK#14 conio_height conio_rowskip CONIO_SCREEN_TEXT#16 conio_screen_width conio_screen_height conio_screen_layer conio_rowshift gotoxy::y#3 ] { { cputc::c#0 = cputs::c#1 } { gotoxy::y#2 = gotoxy::y#3 } } main:10::cputs:39::cputc:172::cputln:289::cscroll:327::gotoxy:343 [ main::SPRITE_ATTR cputs::s#0 conio_width CONIO_SCREEN_BANK#14 conio_height conio_rowskip CONIO_SCREEN_TEXT#16 conio_screen_width conio_screen_height conio_screen_layer conio_rowshift gotoxy::y#3 ] { { cputc::c#0 = cputs::c#1 } { gotoxy::y#2 = gotoxy::y#3 } } main:10::cputs:39::cputc:172::cputln:291::cscroll:327::gotoxy:343 [ main::SPRITE_ATTR cputs::s#0 conio_width CONIO_SCREEN_BANK#14 conio_height conio_rowskip CONIO_SCREEN_TEXT#16 conio_screen_width conio_screen_height conio_screen_layer conio_rowshift gotoxy::y#3 ] { { cputc::c#0 = cputs::c#1 } { gotoxy::y#2 = gotoxy::y#3 } } ) always clobbers reg byte a +Statement [118] if(0 bnkcpy_vram_address::vdest#2 [ bnkcpy_vram_address::beg#0 bnkcpy_vram_address::num#2 bnkcpy_vram_address::$4 ] ( main:10::bnkcpy_vram_address:43 [ main::SPRITE_ATTR bnkcpy_vram_address::beg#0 bnkcpy_vram_address::num#2 bnkcpy_vram_address::$4 ] { } main:10::bnkcpy_vram_address:45 [ main::SPRITE_ATTR bnkcpy_vram_address::beg#0 bnkcpy_vram_address::num#2 bnkcpy_vram_address::$4 ] { } ) always clobbers reg byte a +Statement [193] *VERA_ADDRX_H = *VERA_ADDRX_H | VERA_INC_1 [ bnkcpy_vram_address::beg#0 bnkcpy_vram_address::num#2 ] ( main:10::bnkcpy_vram_address:43 [ main::SPRITE_ATTR bnkcpy_vram_address::beg#0 bnkcpy_vram_address::num#2 ] { } main:10::bnkcpy_vram_address:45 [ main::SPRITE_ATTR bnkcpy_vram_address::beg#0 bnkcpy_vram_address::num#2 ] { } ) always clobbers reg byte a +Statement [194] bnkcpy_vram_address::end#0 = bnkcpy_vram_address::beg#0 + bnkcpy_vram_address::num#2 [ bnkcpy_vram_address::beg#0 bnkcpy_vram_address::end#0 ] ( main:10::bnkcpy_vram_address:43 [ main::SPRITE_ATTR bnkcpy_vram_address::beg#0 bnkcpy_vram_address::end#0 ] { } main:10::bnkcpy_vram_address:45 [ main::SPRITE_ATTR bnkcpy_vram_address::beg#0 bnkcpy_vram_address::end#0 ] { } ) always clobbers reg byte a +Statement [195] bnkcpy_vram_address::$7 = > bnkcpy_vram_address::beg#0 [ bnkcpy_vram_address::beg#0 bnkcpy_vram_address::end#0 bnkcpy_vram_address::$7 ] ( main:10::bnkcpy_vram_address:43 [ main::SPRITE_ATTR bnkcpy_vram_address::beg#0 bnkcpy_vram_address::end#0 bnkcpy_vram_address::$7 ] { } main:10::bnkcpy_vram_address:45 [ main::SPRITE_ATTR bnkcpy_vram_address::beg#0 bnkcpy_vram_address::end#0 bnkcpy_vram_address::$7 ] { } ) always clobbers reg byte a +Statement [196] bnkcpy_vram_address::$8 = bnkcpy_vram_address::$7 << 8 [ bnkcpy_vram_address::beg#0 bnkcpy_vram_address::end#0 bnkcpy_vram_address::$8 ] ( main:10::bnkcpy_vram_address:43 [ main::SPRITE_ATTR bnkcpy_vram_address::beg#0 bnkcpy_vram_address::end#0 bnkcpy_vram_address::$8 ] { } main:10::bnkcpy_vram_address:45 [ main::SPRITE_ATTR bnkcpy_vram_address::beg#0 bnkcpy_vram_address::end#0 bnkcpy_vram_address::$8 ] { } ) always clobbers reg byte a +Statement [198] bnkcpy_vram_address::$10 = < bnkcpy_vram_address::beg#0 [ bnkcpy_vram_address::beg#0 bnkcpy_vram_address::end#0 bnkcpy_vram_address::$9 bnkcpy_vram_address::$10 ] ( main:10::bnkcpy_vram_address:43 [ main::SPRITE_ATTR bnkcpy_vram_address::beg#0 bnkcpy_vram_address::end#0 bnkcpy_vram_address::$9 bnkcpy_vram_address::$10 ] { } main:10::bnkcpy_vram_address:45 [ main::SPRITE_ATTR bnkcpy_vram_address::beg#0 bnkcpy_vram_address::end#0 bnkcpy_vram_address::$9 bnkcpy_vram_address::$10 ] { } ) always clobbers reg byte a +Statement [200] bnkcpy_vram_address::$23 = (word)bnkcpy_vram_address::$9 [ bnkcpy_vram_address::beg#0 bnkcpy_vram_address::end#0 bnkcpy_vram_address::$11 bnkcpy_vram_address::$23 ] ( main:10::bnkcpy_vram_address:43 [ main::SPRITE_ATTR bnkcpy_vram_address::beg#0 bnkcpy_vram_address::end#0 bnkcpy_vram_address::$11 bnkcpy_vram_address::$23 ] { } main:10::bnkcpy_vram_address:45 [ main::SPRITE_ATTR bnkcpy_vram_address::beg#0 bnkcpy_vram_address::end#0 bnkcpy_vram_address::$11 bnkcpy_vram_address::$23 ] { } ) always clobbers reg byte a +Statement [201] bnkcpy_vram_address::$12 = bnkcpy_vram_address::$23 | bnkcpy_vram_address::$11 [ bnkcpy_vram_address::beg#0 bnkcpy_vram_address::end#0 bnkcpy_vram_address::$12 ] ( main:10::bnkcpy_vram_address:43 [ main::SPRITE_ATTR bnkcpy_vram_address::beg#0 bnkcpy_vram_address::end#0 bnkcpy_vram_address::$12 ] { } main:10::bnkcpy_vram_address:45 [ main::SPRITE_ATTR bnkcpy_vram_address::beg#0 bnkcpy_vram_address::end#0 bnkcpy_vram_address::$12 ] { } ) always clobbers reg byte a +Statement [202] bnkcpy_vram_address::$13 = bnkcpy_vram_address::$12 >> 5 [ bnkcpy_vram_address::beg#0 bnkcpy_vram_address::end#0 bnkcpy_vram_address::$13 ] ( main:10::bnkcpy_vram_address:43 [ main::SPRITE_ATTR bnkcpy_vram_address::beg#0 bnkcpy_vram_address::end#0 bnkcpy_vram_address::$13 ] { } main:10::bnkcpy_vram_address:45 [ main::SPRITE_ATTR bnkcpy_vram_address::beg#0 bnkcpy_vram_address::end#0 bnkcpy_vram_address::$13 ] { } ) always clobbers reg byte a +Statement [203] bnkcpy_vram_address::$14 = > bnkcpy_vram_address::beg#0 [ bnkcpy_vram_address::beg#0 bnkcpy_vram_address::end#0 bnkcpy_vram_address::$13 bnkcpy_vram_address::$14 ] ( main:10::bnkcpy_vram_address:43 [ main::SPRITE_ATTR bnkcpy_vram_address::beg#0 bnkcpy_vram_address::end#0 bnkcpy_vram_address::$13 bnkcpy_vram_address::$14 ] { } main:10::bnkcpy_vram_address:45 [ main::SPRITE_ATTR bnkcpy_vram_address::beg#0 bnkcpy_vram_address::end#0 bnkcpy_vram_address::$13 bnkcpy_vram_address::$14 ] { } ) always clobbers reg byte a +Statement [204] bnkcpy_vram_address::$15 = bnkcpy_vram_address::$14 << 3 [ bnkcpy_vram_address::beg#0 bnkcpy_vram_address::end#0 bnkcpy_vram_address::$13 bnkcpy_vram_address::$15 ] ( main:10::bnkcpy_vram_address:43 [ main::SPRITE_ATTR bnkcpy_vram_address::beg#0 bnkcpy_vram_address::end#0 bnkcpy_vram_address::$13 bnkcpy_vram_address::$15 ] { } main:10::bnkcpy_vram_address:45 [ main::SPRITE_ATTR bnkcpy_vram_address::beg#0 bnkcpy_vram_address::end#0 bnkcpy_vram_address::$13 bnkcpy_vram_address::$15 ] { } ) always clobbers reg byte a +Statement [206] bnkcpy_vram_address::$24 = (word)bnkcpy_vram_address::$16 [ bnkcpy_vram_address::beg#0 bnkcpy_vram_address::end#0 bnkcpy_vram_address::$13 bnkcpy_vram_address::$24 ] ( main:10::bnkcpy_vram_address:43 [ main::SPRITE_ATTR bnkcpy_vram_address::beg#0 bnkcpy_vram_address::end#0 bnkcpy_vram_address::$13 bnkcpy_vram_address::$24 ] { } main:10::bnkcpy_vram_address:45 [ main::SPRITE_ATTR bnkcpy_vram_address::beg#0 bnkcpy_vram_address::end#0 bnkcpy_vram_address::$13 bnkcpy_vram_address::$24 ] { } ) always clobbers reg byte a +Statement [207] bnkcpy_vram_address::$17 = bnkcpy_vram_address::$13 + bnkcpy_vram_address::$24 [ bnkcpy_vram_address::beg#0 bnkcpy_vram_address::end#0 bnkcpy_vram_address::$17 ] ( main:10::bnkcpy_vram_address:43 [ main::SPRITE_ATTR bnkcpy_vram_address::beg#0 bnkcpy_vram_address::end#0 bnkcpy_vram_address::$17 ] { } main:10::bnkcpy_vram_address:45 [ main::SPRITE_ATTR bnkcpy_vram_address::beg#0 bnkcpy_vram_address::end#0 bnkcpy_vram_address::$17 ] { } ) always clobbers reg byte a +Statement [208] bnkcpy_vram_address::bank#0 = (byte)bnkcpy_vram_address::$17 [ bnkcpy_vram_address::beg#0 bnkcpy_vram_address::end#0 bnkcpy_vram_address::bank#0 ] ( main:10::bnkcpy_vram_address:43 [ main::SPRITE_ATTR bnkcpy_vram_address::beg#0 bnkcpy_vram_address::end#0 bnkcpy_vram_address::bank#0 ] { } main:10::bnkcpy_vram_address:45 [ main::SPRITE_ATTR bnkcpy_vram_address::beg#0 bnkcpy_vram_address::end#0 bnkcpy_vram_address::bank#0 ] { } ) always clobbers reg byte a +Statement [209] bnkcpy_vram_address::$18 = < bnkcpy_vram_address::beg#0 [ bnkcpy_vram_address::beg#0 bnkcpy_vram_address::end#0 bnkcpy_vram_address::bank#0 bnkcpy_vram_address::$18 ] ( main:10::bnkcpy_vram_address:43 [ main::SPRITE_ATTR bnkcpy_vram_address::beg#0 bnkcpy_vram_address::end#0 bnkcpy_vram_address::bank#0 bnkcpy_vram_address::$18 ] { } main:10::bnkcpy_vram_address:45 [ main::SPRITE_ATTR bnkcpy_vram_address::beg#0 bnkcpy_vram_address::end#0 bnkcpy_vram_address::bank#0 bnkcpy_vram_address::$18 ] { } ) always clobbers reg byte a +Statement [210] bnkcpy_vram_address::addr#0 = bnkcpy_vram_address::$18 & $1fff [ bnkcpy_vram_address::beg#0 bnkcpy_vram_address::end#0 bnkcpy_vram_address::bank#0 bnkcpy_vram_address::addr#0 ] ( main:10::bnkcpy_vram_address:43 [ main::SPRITE_ATTR bnkcpy_vram_address::beg#0 bnkcpy_vram_address::end#0 bnkcpy_vram_address::bank#0 bnkcpy_vram_address::addr#0 ] { } main:10::bnkcpy_vram_address:45 [ main::SPRITE_ATTR bnkcpy_vram_address::beg#0 bnkcpy_vram_address::end#0 bnkcpy_vram_address::bank#0 bnkcpy_vram_address::addr#0 ] { } ) always clobbers reg byte a +Statement [211] bnkcpy_vram_address::addr#1 = (byte*)bnkcpy_vram_address::addr#0 + $a000 [ bnkcpy_vram_address::beg#0 bnkcpy_vram_address::end#0 bnkcpy_vram_address::bank#0 bnkcpy_vram_address::addr#1 ] ( main:10::bnkcpy_vram_address:43 [ main::SPRITE_ATTR bnkcpy_vram_address::beg#0 bnkcpy_vram_address::end#0 bnkcpy_vram_address::bank#0 bnkcpy_vram_address::addr#1 ] { } main:10::bnkcpy_vram_address:45 [ main::SPRITE_ATTR bnkcpy_vram_address::beg#0 bnkcpy_vram_address::end#0 bnkcpy_vram_address::bank#0 bnkcpy_vram_address::addr#1 ] { } ) always clobbers reg byte a +Statement [214] if(bnkcpy_vram_address::pos#2memcpy_to_vram::vdest#0 [ ] ( main:10::memcpy_to_vram:49 [ ] { } ) always clobbers reg byte a +Statement [226] *VERA_ADDRX_H = VERA_INC_1|memcpy_to_vram::vbank#0 [ ] ( main:10::memcpy_to_vram:49 [ ] { } ) always clobbers reg byte a +Statement [228] if(memcpy_to_vram::s#2!=memcpy_to_vram::end#0) goto memcpy_to_vram::@2 [ memcpy_to_vram::s#2 ] ( main:10::memcpy_to_vram:49 [ memcpy_to_vram::s#2 ] { } ) always clobbers reg byte a +Statement [230] *VERA_DATA0 = *memcpy_to_vram::s#2 [ memcpy_to_vram::s#2 ] ( main:10::memcpy_to_vram:49 [ memcpy_to_vram::s#2 ] { } ) always clobbers reg byte a reg byte y +Statement [233] *(vera_layer_rowshift+vera_layer_mode_text::layer#0) = 8 [ ] ( vera_layer_mode_text:13::vera_layer_mode_tile:54 [ conio_screen_width conio_screen_height conio_x16_init::line#0 ] { } conio_x16_init:8::vera_layer_mode_text:13::vera_layer_mode_tile:54 [ main::SPRITE_ATTR conio_screen_width conio_screen_height conio_x16_init::line#0 ] { } ) always clobbers reg byte a +Statement [234] *(vera_layer_rowskip+vera_layer_mode_text::layer#0*SIZEOF_WORD) = $100 [ ] ( vera_layer_mode_text:13::vera_layer_mode_tile:54 [ conio_screen_width conio_screen_height conio_x16_init::line#0 ] { } conio_x16_init:8::vera_layer_mode_text:13::vera_layer_mode_tile:54 [ main::SPRITE_ATTR conio_screen_width conio_screen_height conio_x16_init::line#0 ] { } ) always clobbers reg byte a +Statement [237] *(vera_mapbase_offset+vera_layer_mode_text::layer#0*SIZEOF_WORD) = 0 [ ] ( vera_layer_mode_text:13::vera_layer_mode_tile:54 [ conio_screen_width conio_screen_height conio_x16_init::line#0 ] { } conio_x16_init:8::vera_layer_mode_text:13::vera_layer_mode_tile:54 [ main::SPRITE_ATTR conio_screen_width conio_screen_height conio_x16_init::line#0 ] { } ) always clobbers reg byte a +Statement [238] *(vera_mapbase_bank+vera_layer_mode_text::layer#0) = 0 [ ] ( vera_layer_mode_text:13::vera_layer_mode_tile:54 [ conio_screen_width conio_screen_height conio_x16_init::line#0 ] { } conio_x16_init:8::vera_layer_mode_text:13::vera_layer_mode_tile:54 [ main::SPRITE_ATTR conio_screen_width conio_screen_height conio_x16_init::line#0 ] { } ) always clobbers reg byte a +Statement [239] *(vera_mapbase_address+vera_layer_mode_text::layer#0*SIZEOF_DWORD) = vera_layer_mode_text::mapbase_address#0 [ ] ( vera_layer_mode_text:13::vera_layer_mode_tile:54 [ conio_screen_width conio_screen_height conio_x16_init::line#0 ] { } conio_x16_init:8::vera_layer_mode_text:13::vera_layer_mode_tile:54 [ main::SPRITE_ATTR conio_screen_width conio_screen_height conio_x16_init::line#0 ] { } ) always clobbers reg byte a +Statement [241] *(vera_tilebase_offset+vera_layer_mode_text::layer#0*SIZEOF_WORD) = 0 + sta.z conio_width+1 + // [5] conio_height = 0 -- vwuz1=vwuc1 + lda #<0 + sta.z conio_height + lda #>0 + sta.z conio_height+1 + // [6] conio_rowshift = 0 -- vbuz1=vbuc1 + lda #0 + sta.z conio_rowshift + // [7] conio_rowskip = 0 -- vwuz1=vwuc1 + lda #<0 + sta.z conio_rowskip + lda #>0 + sta.z conio_rowskip+1 + // [8] call conio_x16_init + jsr conio_x16_init + // [9] phi from __start::__init1 to __start::@1 [phi:__start::__init1->__start::@1] + __b1_from___init1: + jmp __b1 + // __start::@1 + __b1: + // [10] call main + // [32] phi from __start::@1 to main [phi:__start::@1->main] + main_from___b1: + jsr main + jmp __breturn + // __start::@return + __breturn: + // [11] return + rts +} + // conio_x16_init +// Set initial cursor position +conio_x16_init: { + // Position cursor at current line + .label BASIC_CURSOR_LINE = $d6 + .label line = 2 + // [12] conio_x16_init::line#0 = *conio_x16_init::BASIC_CURSOR_LINE -- vbuz1=_deref_pbuc1 + lda BASIC_CURSOR_LINE + sta.z line + // [13] call vera_layer_mode_text + // [53] phi from conio_x16_init to vera_layer_mode_text [phi:conio_x16_init->vera_layer_mode_text] + vera_layer_mode_text_from_conio_x16_init: + jsr vera_layer_mode_text + // [14] phi from conio_x16_init to conio_x16_init::@3 [phi:conio_x16_init->conio_x16_init::@3] + __b3_from_conio_x16_init: + jmp __b3 + // conio_x16_init::@3 + __b3: + // [15] call screensize + jsr screensize + // [16] phi from conio_x16_init::@3 to conio_x16_init::@4 [phi:conio_x16_init::@3->conio_x16_init::@4] + __b4_from___b3: + jmp __b4 + // conio_x16_init::@4 + __b4: + // [17] call screenlayer + jsr screenlayer + // [18] phi from conio_x16_init::@4 to conio_x16_init::@5 [phi:conio_x16_init::@4->conio_x16_init::@5] + __b5_from___b4: + jmp __b5 + // conio_x16_init::@5 + __b5: + // [19] call vera_layer_set_textcolor + jsr vera_layer_set_textcolor + // [20] phi from conio_x16_init::@5 to conio_x16_init::@6 [phi:conio_x16_init::@5->conio_x16_init::@6] + __b6_from___b5: + jmp __b6 + // conio_x16_init::@6 + __b6: + // [21] call vera_layer_set_backcolor + jsr vera_layer_set_backcolor + // [22] phi from conio_x16_init::@6 to conio_x16_init::@7 [phi:conio_x16_init::@6->conio_x16_init::@7] + __b7_from___b6: + jmp __b7 + // conio_x16_init::@7 + __b7: + // [23] call vera_layer_set_mapbase + // [109] phi from conio_x16_init::@7 to vera_layer_set_mapbase [phi:conio_x16_init::@7->vera_layer_set_mapbase] + vera_layer_set_mapbase_from___b7: + // [109] phi vera_layer_set_mapbase::mapbase#3 = $20 [phi:conio_x16_init::@7->vera_layer_set_mapbase#0] -- vbuxx=vbuc1 + ldx #$20 + // [109] phi vera_layer_set_mapbase::layer#3 = 0 [phi:conio_x16_init::@7->vera_layer_set_mapbase#1] -- vbuaa=vbuc1 + lda #0 + jsr vera_layer_set_mapbase + // [24] phi from conio_x16_init::@7 to conio_x16_init::@8 [phi:conio_x16_init::@7->conio_x16_init::@8] + __b8_from___b7: + jmp __b8 + // conio_x16_init::@8 + __b8: + // [25] call vera_layer_set_mapbase + // [109] phi from conio_x16_init::@8 to vera_layer_set_mapbase [phi:conio_x16_init::@8->vera_layer_set_mapbase] + vera_layer_set_mapbase_from___b8: + // [109] phi vera_layer_set_mapbase::mapbase#3 = 0 [phi:conio_x16_init::@8->vera_layer_set_mapbase#0] -- vbuxx=vbuc1 + ldx #0 + // [109] phi vera_layer_set_mapbase::layer#3 = 1 [phi:conio_x16_init::@8->vera_layer_set_mapbase#1] -- vbuaa=vbuc1 + lda #1 + jsr vera_layer_set_mapbase + jmp __b9 + // conio_x16_init::@9 + __b9: + // [26] if(conio_x16_init::line#0conio_x16_init::@1] + __b1_from___b2: + __b1_from___b9: + // [28] phi conio_x16_init::line#3 = conio_x16_init::line#1 [phi:conio_x16_init::@2/conio_x16_init::@9->conio_x16_init::@1#0] -- register_copy + jmp __b1 + // conio_x16_init::@1 + __b1: + // [29] gotoxy::y#0 = conio_x16_init::line#3 -- vbuxx=vbuz1 + ldx.z line + // [30] call gotoxy + // [114] phi from conio_x16_init::@1 to gotoxy [phi:conio_x16_init::@1->gotoxy] + gotoxy_from___b1: + // [114] phi gotoxy::y#3 = gotoxy::y#0 [phi:conio_x16_init::@1->gotoxy#0] -- register_copy + jsr gotoxy + jmp __breturn + // conio_x16_init::@return + __breturn: + // [31] return + rts +} + // main +main: { + .label BANK_SPRITE = $12000 + // Load in bank 9. + .label VRAM_SPRITE = $10000 + .label SPRITE_ATTR = $43 + // [33] call vera_layer_set_text_color_mode + // [127] phi from main to vera_layer_set_text_color_mode [phi:main->vera_layer_set_text_color_mode] + vera_layer_set_text_color_mode_from_main: + // [127] phi vera_layer_set_text_color_mode::layer#3 = 1 [phi:main->vera_layer_set_text_color_mode#0] -- vbuaa=vbuc1 + lda #1 + jsr vera_layer_set_text_color_mode + // [34] phi from main to main::@1 [phi:main->main::@1] + __b1_from_main: + jmp __b1 + // main::@1 + __b1: + // [35] call screenlayer + jsr screenlayer + // [36] phi from main::@1 to main::@2 [phi:main::@1->main::@2] + __b2_from___b1: + jmp __b2 + // main::@2 + __b2: + // [37] call clrscr + jsr clrscr + // [38] phi from main::@2 to main::@3 [phi:main::@2->main::@3] + __b3_from___b2: + jmp __b3 + // main::@3 + __b3: + // [39] call cputs + // [165] phi from main::@3 to cputs [phi:main::@3->cputs] + cputs_from___b3: + jsr cputs + jmp __b4 + // main::@4 + __b4: + // [40] *(&main::SPRITE_ATTR) = memcpy(*(&$0), struct VERA_SPRITE, SIZEOF_STRUCT_VERA_SPRITE) -- _deref_pssc1=_deref_pssc2_memcpy_vbuc3 + ldy #SIZEOF_STRUCT_VERA_SPRITE + !: + lda __0-1,y + sta SPRITE_ATTR-1,y + dey + bne !- + // [41] call LoadFileBanked + jsr LoadFileBanked + // [42] phi from main::@4 to main::@5 [phi:main::@4->main::@5] + __b5_from___b4: + jmp __b5 + // main::@5 + __b5: + // [43] call bnkcpy_vram_address + // [182] phi from main::@5 to bnkcpy_vram_address [phi:main::@5->bnkcpy_vram_address] + bnkcpy_vram_address_from___b5: + // [182] phi bnkcpy_vram_address::num#2 = $20 [phi:main::@5->bnkcpy_vram_address#0] -- vduz1=vbuc1 + lda #$20 + sta.z bnkcpy_vram_address.num + lda #0 + sta.z bnkcpy_vram_address.num+1 + sta.z bnkcpy_vram_address.num+2 + sta.z bnkcpy_vram_address.num+3 + // [182] phi bnkcpy_vram_address::beg#0 = main::BANK_SPRITE-2 [phi:main::@5->bnkcpy_vram_address#1] -- vduz1=vduc1 + lda #BANK_SPRITE-2 + sta.z bnkcpy_vram_address.beg+1 + lda #>$10 + sta.z bnkcpy_vram_address.beg+2 + lda #>BANK_SPRITE-2>>$10 + sta.z bnkcpy_vram_address.beg+3 + // [182] phi bnkcpy_vram_address::vdest#2 = VERA_PALETTE+$20 [phi:main::@5->bnkcpy_vram_address#2] -- vduz1=vduc1 + lda #VERA_PALETTE+$20 + sta.z bnkcpy_vram_address.vdest+1 + lda #>$10 + sta.z bnkcpy_vram_address.vdest+2 + lda #>VERA_PALETTE+$20>>$10 + sta.z bnkcpy_vram_address.vdest+3 + jsr bnkcpy_vram_address + // [44] phi from main::@5 to main::@6 [phi:main::@5->main::@6] + __b6_from___b5: + jmp __b6 + // main::@6 + __b6: + // [45] call bnkcpy_vram_address + // [182] phi from main::@6 to bnkcpy_vram_address [phi:main::@6->bnkcpy_vram_address] + bnkcpy_vram_address_from___b6: + // [182] phi bnkcpy_vram_address::num#2 = (word)$40*$20 [phi:main::@6->bnkcpy_vram_address#0] -- vduz1=vduc1 + lda #<$40*$20 + sta.z bnkcpy_vram_address.num + lda #>$40*$20 + sta.z bnkcpy_vram_address.num+1 + lda #<$40*$20>>$10 + sta.z bnkcpy_vram_address.num+2 + lda #>$40*$20>>$10 + sta.z bnkcpy_vram_address.num+3 + // [182] phi bnkcpy_vram_address::beg#0 = main::BANK_SPRITE+$20-2 [phi:main::@6->bnkcpy_vram_address#1] -- vduz1=vduc1 + lda #BANK_SPRITE+$20-2 + sta.z bnkcpy_vram_address.beg+1 + lda #>$10 + sta.z bnkcpy_vram_address.beg+2 + lda #>BANK_SPRITE+$20-2>>$10 + sta.z bnkcpy_vram_address.beg+3 + // [182] phi bnkcpy_vram_address::vdest#2 = main::VRAM_SPRITE [phi:main::@6->bnkcpy_vram_address#2] -- vduz1=vduc1 + lda #VRAM_SPRITE + sta.z bnkcpy_vram_address.vdest+1 + lda #>$10 + sta.z bnkcpy_vram_address.vdest+2 + lda #>VRAM_SPRITE>>$10 + sta.z bnkcpy_vram_address.vdest+3 + jsr bnkcpy_vram_address + jmp __b7 + // main::@7 + __b7: + // [46] *((word*)&main::SPRITE_ATTR) = VRAM_SPRITE/$20&$ffff + sta.z SPRITE_ATTR+1 + // [47] *((word*)&main::SPRITE_ATTR+OFFSET_STRUCT_VERA_SPRITE_X) = $64 -- _deref_pwuc1=vbuc2 + lda #0 + sta SPRITE_ATTR+OFFSET_STRUCT_VERA_SPRITE_X+1 + lda #<$64 + sta SPRITE_ATTR+OFFSET_STRUCT_VERA_SPRITE_X + // [48] *((word*)&main::SPRITE_ATTR+OFFSET_STRUCT_VERA_SPRITE_Y) = $64 -- _deref_pwuc1=vbuc2 + lda #0 + sta SPRITE_ATTR+OFFSET_STRUCT_VERA_SPRITE_Y+1 + lda #<$64 + sta SPRITE_ATTR+OFFSET_STRUCT_VERA_SPRITE_Y + // [49] call memcpy_to_vram + jsr memcpy_to_vram + jmp __b8 + // main::@8 + __b8: + // [50] *VERA_CTRL = *VERA_CTRL & ~VERA_DCSEL -- _deref_pbuc1=_deref_pbuc1_band_vbuc2 + // Enable sprites + lda #VERA_DCSEL^$ff + and VERA_CTRL + sta VERA_CTRL + // [51] *VERA_DC_VIDEO = *VERA_DC_VIDEO | VERA_SPRITES_ENABLE -- _deref_pbuc1=_deref_pbuc1_bor_vbuc2 + lda #VERA_SPRITES_ENABLE + ora VERA_DC_VIDEO + sta VERA_DC_VIDEO + jmp __breturn + // main::@return + __breturn: + // [52] return + rts + .segment Data + s: .text @"\n\nsprite banked file load and display demo.\n" + .byte 0 + filename: .text "SPRITE" + .byte 0 +} +.segment Code + // vera_layer_mode_text +// Set a vera layer in text mode and configure the: +// - layer: Value of 0 or 1. +// - mapbase_address: A dword typed address (4 bytes), that specifies the full address of the map base. +// The function does the translation from the dword that contains the 17 bit address, +// to the respective mapbase vera register. +// Note that the register only specifies bits 16:9 of the address, +// so the resulting address in the VERA VRAM is always aligned to a multiple of 512 bytes. +// - tilebase_address: A dword typed address (4 bytes), that specifies the base address of the tile map. +// The function does the translation from the dword that contains the 17 bit address, +// to the respective tilebase vera register. +// Note that the resulting vera register holds only specifies bits 16:11 of the address, +// so the resulting address in the VERA VRAM is always aligned to a multiple of 2048 bytes! +// - mapwidth: The width of the map in number of tiles. +// - mapheight: The height of the map in number of tiles. +// - tilewidth: The width of a tile, which can be 8 or 16 pixels. +// - tileheight: The height of a tile, which can be 8 or 16 pixels. +// - color_mode: The color mode, which can be 16 or 256. +vera_layer_mode_text: { + .label layer = 1 + .label mapbase_address = 0 + .label tilebase_address = $f800 + // [54] call vera_layer_mode_tile + // [232] phi from vera_layer_mode_text to vera_layer_mode_tile [phi:vera_layer_mode_text->vera_layer_mode_tile] + vera_layer_mode_tile_from_vera_layer_mode_text: + jsr vera_layer_mode_tile + // [55] phi from vera_layer_mode_text to vera_layer_mode_text::@1 [phi:vera_layer_mode_text->vera_layer_mode_text::@1] + __b1_from_vera_layer_mode_text: + jmp __b1 + // vera_layer_mode_text::@1 + __b1: + // [56] call vera_layer_set_text_color_mode + // [127] phi from vera_layer_mode_text::@1 to vera_layer_set_text_color_mode [phi:vera_layer_mode_text::@1->vera_layer_set_text_color_mode] + vera_layer_set_text_color_mode_from___b1: + // [127] phi vera_layer_set_text_color_mode::layer#3 = vera_layer_mode_text::layer#0 [phi:vera_layer_mode_text::@1->vera_layer_set_text_color_mode#0] -- vbuaa=vbuc1 + lda #layer + jsr vera_layer_set_text_color_mode + jmp __breturn + // vera_layer_mode_text::@return + __breturn: + // [57] return + rts +} + // screensize +// Return the current screen size. +screensize: { + .label x = conio_screen_width + .label y = conio_screen_height + // [58] screensize::hscale#0 = *VERA_DC_HSCALE >> 7 -- vbuaa=_deref_pbuc1_ror_7 + lda VERA_DC_HSCALE + rol + rol + and #1 + // [59] screensize::$1 = $28 << screensize::hscale#0 -- vbuaa=vbuc1_rol_vbuaa + tay + lda #$28 + cpy #0 + beq !e+ + !: + asl + dey + bne !- + !e: + // [60] *screensize::x#0 = screensize::$1 -- _deref_pbuc1=vbuaa + sta.z x + // [61] screensize::vscale#0 = *VERA_DC_VSCALE >> 7 -- vbuaa=_deref_pbuc1_ror_7 + lda VERA_DC_VSCALE + rol + rol + and #1 + // [62] screensize::$3 = $1e << screensize::vscale#0 -- vbuaa=vbuc1_rol_vbuaa + tay + lda #$1e + cpy #0 + beq !e+ + !: + asl + dey + bne !- + !e: + // [63] *screensize::y#0 = screensize::$3 -- _deref_pbuc1=vbuaa + sta.z y + jmp __breturn + // screensize::@return + __breturn: + // [64] return + rts +} + // screenlayer +// Set the layer with which the conio will interact. +// - layer: value of 0 or 1. +screenlayer: { + .label __2 = $1e + .label __4 = $20 + .label __5 = $31 + .label vera_layer_get_width1_config = $33 + .label vera_layer_get_width1_return = $1e + .label vera_layer_get_height1_config = $22 + .label vera_layer_get_height1_return = $31 + // [65] conio_screen_layer = 1 -- vbuz1=vbuc1 + lda #1 + sta.z conio_screen_layer + // [66] vera_layer_get_mapbase_bank::layer#0 = conio_screen_layer -- vbuxx=vbuz1 + ldx.z conio_screen_layer + // [67] call vera_layer_get_mapbase_bank + jsr vera_layer_get_mapbase_bank + // [68] vera_layer_get_mapbase_bank::return#2 = vera_layer_get_mapbase_bank::return#0 + jmp __b3 + // screenlayer::@3 + __b3: + // [69] CONIO_SCREEN_BANK#14 = vera_layer_get_mapbase_bank::return#2 -- vbuz1=vbuaa + sta.z CONIO_SCREEN_BANK + // [70] vera_layer_get_mapbase_offset::layer#0 = conio_screen_layer -- vbuaa=vbuz1 + lda.z conio_screen_layer + // [71] call vera_layer_get_mapbase_offset + jsr vera_layer_get_mapbase_offset + // [72] vera_layer_get_mapbase_offset::return#2 = vera_layer_get_mapbase_offset::return#0 + jmp __b4 + // screenlayer::@4 + __b4: + // [73] CONIO_SCREEN_TEXT#16 = vera_layer_get_mapbase_offset::return#2 -- vwuz1=vwuz2 + lda.z vera_layer_get_mapbase_offset.return + sta.z CONIO_SCREEN_TEXT + lda.z vera_layer_get_mapbase_offset.return+1 + sta.z CONIO_SCREEN_TEXT+1 + // [74] screenlayer::vera_layer_get_width1_layer#0 = conio_screen_layer -- vbuaa=vbuz1 + lda.z conio_screen_layer + jmp vera_layer_get_width1 + // screenlayer::vera_layer_get_width1 + vera_layer_get_width1: + // [75] screenlayer::vera_layer_get_width1_$2 = screenlayer::vera_layer_get_width1_layer#0 << 1 -- vbuaa=vbuaa_rol_1 + asl + // [76] screenlayer::vera_layer_get_width1_config#0 = vera_layer_config[screenlayer::vera_layer_get_width1_$2] -- pbuz1=qbuc1_derefidx_vbuaa + tay + lda vera_layer_config,y + sta.z vera_layer_get_width1_config + lda vera_layer_config+1,y + sta.z vera_layer_get_width1_config+1 + // [77] screenlayer::vera_layer_get_width1_$0 = *screenlayer::vera_layer_get_width1_config#0 & VERA_LAYER_WIDTH_MASK -- vbuaa=_deref_pbuz1_band_vbuc1 + lda #VERA_LAYER_WIDTH_MASK + ldy #0 + and (vera_layer_get_width1_config),y + // [78] screenlayer::vera_layer_get_width1_$1 = screenlayer::vera_layer_get_width1_$0 >> 4 -- vbuaa=vbuaa_ror_4 + lsr + lsr + lsr + lsr + // [79] screenlayer::vera_layer_get_width1_$3 = screenlayer::vera_layer_get_width1_$1 << 1 -- vbuaa=vbuaa_rol_1 + asl + // [80] screenlayer::vera_layer_get_width1_return#0 = VERA_LAYER_WIDTH[screenlayer::vera_layer_get_width1_$3] -- vwuz1=pwuc1_derefidx_vbuaa + tay + lda VERA_LAYER_WIDTH,y + sta.z vera_layer_get_width1_return + lda VERA_LAYER_WIDTH+1,y + sta.z vera_layer_get_width1_return+1 + jmp vera_layer_get_width1___breturn + // screenlayer::vera_layer_get_width1_@return + vera_layer_get_width1___breturn: + // [81] screenlayer::vera_layer_get_width1_return#1 = screenlayer::vera_layer_get_width1_return#0 + jmp __b1 + // screenlayer::@1 + __b1: + // [82] screenlayer::$2 = screenlayer::vera_layer_get_width1_return#1 + // [83] conio_width = screenlayer::$2 -- vwuz1=vwuz2 + lda.z __2 + sta.z conio_width + lda.z __2+1 + sta.z conio_width+1 + // [84] vera_layer_get_rowshift::layer#0 = conio_screen_layer -- vbuxx=vbuz1 + ldx.z conio_screen_layer + // [85] call vera_layer_get_rowshift + jsr vera_layer_get_rowshift + // [86] vera_layer_get_rowshift::return#2 = vera_layer_get_rowshift::return#0 + jmp __b5 + // screenlayer::@5 + __b5: + // [87] screenlayer::$3 = vera_layer_get_rowshift::return#2 + // [88] conio_rowshift = screenlayer::$3 -- vbuz1=vbuaa + sta.z conio_rowshift + // [89] vera_layer_get_rowskip::layer#0 = conio_screen_layer -- vbuaa=vbuz1 + lda.z conio_screen_layer + // [90] call vera_layer_get_rowskip + jsr vera_layer_get_rowskip + // [91] vera_layer_get_rowskip::return#2 = vera_layer_get_rowskip::return#0 + jmp __b6 + // screenlayer::@6 + __b6: + // [92] screenlayer::$4 = vera_layer_get_rowskip::return#2 + // [93] conio_rowskip = screenlayer::$4 -- vwuz1=vwuz2 + lda.z __4 + sta.z conio_rowskip + lda.z __4+1 + sta.z conio_rowskip+1 + // [94] screenlayer::vera_layer_get_height1_layer#0 = conio_screen_layer -- vbuaa=vbuz1 + lda.z conio_screen_layer + jmp vera_layer_get_height1 + // screenlayer::vera_layer_get_height1 + vera_layer_get_height1: + // [95] screenlayer::vera_layer_get_height1_$2 = screenlayer::vera_layer_get_height1_layer#0 << 1 -- vbuaa=vbuaa_rol_1 + asl + // [96] screenlayer::vera_layer_get_height1_config#0 = vera_layer_config[screenlayer::vera_layer_get_height1_$2] -- pbuz1=qbuc1_derefidx_vbuaa + tay + lda vera_layer_config,y + sta.z vera_layer_get_height1_config + lda vera_layer_config+1,y + sta.z vera_layer_get_height1_config+1 + // [97] screenlayer::vera_layer_get_height1_$0 = *screenlayer::vera_layer_get_height1_config#0 & VERA_LAYER_HEIGHT_MASK -- vbuaa=_deref_pbuz1_band_vbuc1 + lda #VERA_LAYER_HEIGHT_MASK + ldy #0 + and (vera_layer_get_height1_config),y + // [98] screenlayer::vera_layer_get_height1_$1 = screenlayer::vera_layer_get_height1_$0 >> 6 -- vbuaa=vbuaa_ror_6 + rol + rol + rol + and #3 + // [99] screenlayer::vera_layer_get_height1_$3 = screenlayer::vera_layer_get_height1_$1 << 1 -- vbuaa=vbuaa_rol_1 + asl + // [100] screenlayer::vera_layer_get_height1_return#0 = VERA_LAYER_HEIGHT[screenlayer::vera_layer_get_height1_$3] -- vwuz1=pwuc1_derefidx_vbuaa + tay + lda VERA_LAYER_HEIGHT,y + sta.z vera_layer_get_height1_return + lda VERA_LAYER_HEIGHT+1,y + sta.z vera_layer_get_height1_return+1 + jmp vera_layer_get_height1___breturn + // screenlayer::vera_layer_get_height1_@return + vera_layer_get_height1___breturn: + // [101] screenlayer::vera_layer_get_height1_return#1 = screenlayer::vera_layer_get_height1_return#0 + jmp __b2 + // screenlayer::@2 + __b2: + // [102] screenlayer::$5 = screenlayer::vera_layer_get_height1_return#1 + // [103] conio_height = screenlayer::$5 -- vwuz1=vwuz2 + lda.z __5 + sta.z conio_height + lda.z __5+1 + sta.z conio_height+1 + jmp __breturn + // screenlayer::@return + __breturn: + // [104] return + rts +} + // vera_layer_set_textcolor +// Set the front color for text output. The old front text color setting is returned. +// - layer: Value of 0 or 1. +// - color: a 4 bit value ( decimal between 0 and 15) when the VERA works in 16x16 color text mode. +// An 8 bit value (decimal between 0 and 255) when the VERA works in 256 text mode. +// Note that on the VERA, the transparent color has value 0. +vera_layer_set_textcolor: { + .const layer = 1 + // [105] *(vera_layer_textcolor+vera_layer_set_textcolor::layer#0) = WHITE -- _deref_pbuc1=vbuc2 + lda #WHITE + sta vera_layer_textcolor+layer + jmp __breturn + // vera_layer_set_textcolor::@return + __breturn: + // [106] return + rts +} + // vera_layer_set_backcolor +// Set the back color for text output. The old back text color setting is returned. +// - layer: Value of 0 or 1. +// - color: a 4 bit value ( decimal between 0 and 15). +// This will only work when the VERA is in 16 color mode! +// Note that on the VERA, the transparent color has value 0. +vera_layer_set_backcolor: { + .const layer = 1 + // [107] *(vera_layer_backcolor+vera_layer_set_backcolor::layer#0) = BLUE -- _deref_pbuc1=vbuc2 + lda #BLUE + sta vera_layer_backcolor+layer + jmp __breturn + // vera_layer_set_backcolor::@return + __breturn: + // [108] return + rts +} + // vera_layer_set_mapbase +// Set the base of the map layer with which the conio will interact. +// - layer: Value of 0 or 1. +// - mapbase: Specifies the base address of the tile map. +// Note that the register only specifies bits 16:9 of the address, +// so the resulting address in the VERA VRAM is always aligned to a multiple of 512 bytes. +// vera_layer_set_mapbase(byte register(A) layer, byte register(X) mapbase) +vera_layer_set_mapbase: { + .label addr = $1e + // [110] vera_layer_set_mapbase::$0 = vera_layer_set_mapbase::layer#3 << 1 -- vbuaa=vbuaa_rol_1 + asl + // [111] vera_layer_set_mapbase::addr#0 = vera_layer_mapbase[vera_layer_set_mapbase::$0] -- pbuz1=qbuc1_derefidx_vbuaa + tay + lda vera_layer_mapbase,y + sta.z addr + lda vera_layer_mapbase+1,y + sta.z addr+1 + // [112] *vera_layer_set_mapbase::addr#0 = vera_layer_set_mapbase::mapbase#3 -- _deref_pbuz1=vbuxx + txa + ldy #0 + sta (addr),y + jmp __breturn + // vera_layer_set_mapbase::@return + __breturn: + // [113] return + rts +} + // gotoxy +// Set the cursor to the specified position +// gotoxy(byte register(X) y) +gotoxy: { + .label __6 = $20 + .label line_offset = $20 + // [115] if(gotoxy::y#3<=conio_screen_height) goto gotoxy::@4 -- vbuxx_le_vbuz1_then_la1 + lda.z conio_screen_height + stx.z $ff + cmp.z $ff + bcs __b4_from_gotoxy + // [117] phi from gotoxy to gotoxy::@1 [phi:gotoxy->gotoxy::@1] + __b1_from_gotoxy: + // [117] phi gotoxy::y#4 = 0 [phi:gotoxy->gotoxy::@1#0] -- vbuxx=vbuc1 + ldx #0 + jmp __b1 + // [116] phi from gotoxy to gotoxy::@4 [phi:gotoxy->gotoxy::@4] + __b4_from_gotoxy: + jmp __b4 + // gotoxy::@4 + __b4: + // [117] phi from gotoxy::@4 to gotoxy::@1 [phi:gotoxy::@4->gotoxy::@1] + __b1_from___b4: + // [117] phi gotoxy::y#4 = gotoxy::y#3 [phi:gotoxy::@4->gotoxy::@1#0] -- register_copy + jmp __b1 + // gotoxy::@1 + __b1: + // [118] if(0gotoxy::@3] + __b3_from___b1: + jmp __b3 + // gotoxy::@3 + __b3: + jmp __b2 + // gotoxy::@2 + __b2: + // [120] conio_cursor_x[conio_screen_layer] = 0 -- pbuc1_derefidx_vbuz1=vbuc2 + lda #0 + ldy.z conio_screen_layer + sta conio_cursor_x,y + // [121] conio_cursor_y[conio_screen_layer] = gotoxy::y#4 -- pbuc1_derefidx_vbuz1=vbuxx + ldy.z conio_screen_layer + txa + sta conio_cursor_y,y + // [122] gotoxy::$6 = (word)gotoxy::y#4 -- vwuz1=_word_vbuxx + txa + sta.z __6 + lda #0 + sta.z __6+1 + // [123] gotoxy::line_offset#0 = gotoxy::$6 << conio_rowshift -- vwuz1=vwuz1_rol_vbuz2 + ldy.z conio_rowshift + beq !e+ + !: + asl.z line_offset + rol.z line_offset+1 + dey + bne !- + !e: + // [124] gotoxy::$5 = conio_screen_layer << 1 -- vbuaa=vbuz1_rol_1 + lda.z conio_screen_layer + asl + // [125] conio_line_text[gotoxy::$5] = gotoxy::line_offset#0 -- pwuc1_derefidx_vbuaa=vwuz1 + tay + lda.z line_offset + sta conio_line_text,y + lda.z line_offset+1 + sta conio_line_text+1,y + jmp __breturn + // gotoxy::@return + __breturn: + // [126] return + rts +} + // vera_layer_set_text_color_mode +// Set the configuration of the layer text color mode. +// - layer: Value of 0 or 1. +// - color_mode: Specifies the color mode to be VERA_LAYER_CONFIG_16 or VERA_LAYER_CONFIG_256 for text mode. +// vera_layer_set_text_color_mode(byte register(A) layer) +vera_layer_set_text_color_mode: { + .label addr = $22 + // [128] vera_layer_set_text_color_mode::$0 = vera_layer_set_text_color_mode::layer#3 << 1 -- vbuaa=vbuaa_rol_1 + asl + // [129] vera_layer_set_text_color_mode::addr#0 = vera_layer_config[vera_layer_set_text_color_mode::$0] -- pbuz1=qbuc1_derefidx_vbuaa + tay + lda vera_layer_config,y + sta.z addr + lda vera_layer_config+1,y + sta.z addr+1 + // [130] *vera_layer_set_text_color_mode::addr#0 = *vera_layer_set_text_color_mode::addr#0 & ~VERA_LAYER_CONFIG_256C -- _deref_pbuz1=_deref_pbuz1_band_vbuc1 + lda #VERA_LAYER_CONFIG_256C^$ff + ldy #0 + and (addr),y + ldy #0 + sta (addr),y + // [131] *vera_layer_set_text_color_mode::addr#0 = *vera_layer_set_text_color_mode::addr#0 -- _deref_pbuz1=_deref_pbuz1 + ldy #0 + lda (addr),y + ldy #0 + sta (addr),y + jmp __breturn + // vera_layer_set_text_color_mode::@return + __breturn: + // [132] return + rts +} + // clrscr +// clears the screen and moves the cursor to the upper left-hand corner of the screen. +clrscr: { + .label __1 = $24 + .label line_text = $f + .label color = $24 + // [133] clrscr::line_text#0 = (byte*)CONIO_SCREEN_TEXT#16 -- pbuz1=pbuz2 + lda.z CONIO_SCREEN_TEXT + sta.z line_text + lda.z CONIO_SCREEN_TEXT+1 + sta.z line_text+1 + // [134] vera_layer_get_backcolor::layer#0 = conio_screen_layer -- vbuxx=vbuz1 + ldx.z conio_screen_layer + // [135] call vera_layer_get_backcolor + jsr vera_layer_get_backcolor + // [136] vera_layer_get_backcolor::return#2 = vera_layer_get_backcolor::return#0 + jmp __b7 + // clrscr::@7 + __b7: + // [137] clrscr::$0 = vera_layer_get_backcolor::return#2 + // [138] clrscr::$1 = clrscr::$0 << 4 -- vbuz1=vbuaa_rol_4 + asl + asl + asl + asl + sta.z __1 + // [139] vera_layer_get_textcolor::layer#0 = conio_screen_layer -- vbuxx=vbuz1 + ldx.z conio_screen_layer + // [140] call vera_layer_get_textcolor + jsr vera_layer_get_textcolor + // [141] vera_layer_get_textcolor::return#2 = vera_layer_get_textcolor::return#0 + jmp __b8 + // clrscr::@8 + __b8: + // [142] clrscr::$2 = vera_layer_get_textcolor::return#2 + // [143] clrscr::color#0 = clrscr::$1 | clrscr::$2 -- vbuz1=vbuz1_bor_vbuaa + ora.z color + sta.z color + // [144] phi from clrscr::@8 to clrscr::@1 [phi:clrscr::@8->clrscr::@1] + __b1_from___b8: + // [144] phi clrscr::line_text#2 = clrscr::line_text#0 [phi:clrscr::@8->clrscr::@1#0] -- register_copy + // [144] phi clrscr::l#2 = 0 [phi:clrscr::@8->clrscr::@1#1] -- vbuxx=vbuc1 + ldx #0 + jmp __b1 + // clrscr::@1 + __b1: + // [145] if(clrscr::l#2 clrscr::line_text#2 -- vbuaa=_hi_pbuz1 + lda.z line_text+1 + // [155] *VERA_ADDRX_M = clrscr::$6 -- _deref_pbuc1=vbuaa + sta VERA_ADDRX_M + // [156] clrscr::$7 = CONIO_SCREEN_BANK#14 | VERA_INC_1 -- vbuaa=vbuz1_bor_vbuc1 + lda #VERA_INC_1 + ora.z CONIO_SCREEN_BANK + // [157] *VERA_ADDRX_H = clrscr::$7 -- _deref_pbuc1=vbuaa + sta VERA_ADDRX_H + // [158] phi from clrscr::@2 to clrscr::@4 [phi:clrscr::@2->clrscr::@4] + __b4_from___b2: + // [158] phi clrscr::c#2 = 0 [phi:clrscr::@2->clrscr::@4#0] -- vbuyy=vbuc1 + ldy #0 + jmp __b4 + // clrscr::@4 + __b4: + // [159] if(clrscr::c#2clrscr::@1] + __b1_from___b6: + // [144] phi clrscr::line_text#2 = clrscr::line_text#1 [phi:clrscr::@6->clrscr::@1#0] -- register_copy + // [144] phi clrscr::l#2 = clrscr::l#1 [phi:clrscr::@6->clrscr::@1#1] -- register_copy + jmp __b1 + // clrscr::@5 + __b5: + // [162] *VERA_DATA0 = ' ' -- _deref_pbuc1=vbuc2 + lda #' ' + sta VERA_DATA0 + // [163] *VERA_DATA0 = clrscr::color#0 -- _deref_pbuc1=vbuz1 + lda.z color + sta VERA_DATA0 + // [164] clrscr::c#1 = ++ clrscr::c#2 -- vbuyy=_inc_vbuyy + iny + // [158] phi from clrscr::@5 to clrscr::@4 [phi:clrscr::@5->clrscr::@4] + __b4_from___b5: + // [158] phi clrscr::c#2 = clrscr::c#1 [phi:clrscr::@5->clrscr::@4#0] -- register_copy + jmp __b4 +} + // cputs +// Output a NUL-terminated string at the current cursor position +// cputs(byte* zp($f) s) +cputs: { + .label s = $f + // [166] phi from cputs to cputs::@1 [phi:cputs->cputs::@1] + __b1_from_cputs: + // [166] phi cputs::s#2 = main::s [phi:cputs->cputs::@1#0] -- pbuz1=pbuc1 + lda #main.s + sta.z s+1 + jmp __b1 + // cputs::@1 + __b1: + // [167] cputs::c#1 = *cputs::s#2 -- vbuaa=_deref_pbuz1 + ldy #0 + lda (s),y + // [168] cputs::s#0 = ++ cputs::s#2 -- pbuz1=_inc_pbuz1 + inc.z s + bne !+ + inc.z s+1 + !: + // [169] if(0!=cputs::c#1) goto cputs::@2 -- 0_neq_vbuaa_then_la1 + cmp #0 + bne __b2 + jmp __breturn + // cputs::@return + __breturn: + // [170] return + rts + // cputs::@2 + __b2: + // [171] cputc::c#0 = cputs::c#1 -- vbuz1=vbuaa + sta.z cputc.c + // [172] call cputc + jsr cputc + // [166] phi from cputs::@2 to cputs::@1 [phi:cputs::@2->cputs::@1] + __b1_from___b2: + // [166] phi cputs::s#2 = cputs::s#0 [phi:cputs::@2->cputs::@1#0] -- register_copy + jmp __b1 +} + // LoadFileBanked +// Load a file to memory +// Returns a status: +// - 0xff: Success +// - other: Kernal Error Code (https://commodore.ca/manuals/pdfs/commodore_error_messages.pdf) +LoadFileBanked: { + .const device = 8 + .const bank = ((>((main.BANK_SPRITE&$ffff)))>>5)+(<((main.BANK_SPRITE>>$10)<<3)) + // [173] setnam::filename = main::filename -- pbuz1=pbuc1 + lda #main.filename + sta.z setnam.filename+1 + // [174] call setnam + jsr setnam + jmp __b1 + // LoadFileBanked::@1 + __b1: + // [175] setlfs::device = LoadFileBanked::device#0 -- vbuz1=vbuc1 + lda #device + sta.z setlfs.device + // [176] call setlfs + jsr setlfs + jmp __b2 + // LoadFileBanked::@2 + __b2: + // [177] *((byte*)VIA1+OFFSET_STRUCT_MOS6522_VIA_PORT_A) = LoadFileBanked::bank#0 -- _deref_pbuc1=vbuc2 + lda #bank + sta VIA1+OFFSET_STRUCT_MOS6522_VIA_PORT_A + // [178] load::address = (byte*)0+$a000 -- pbuz1=pbuc1 + lda #<0+$a000 + sta.z load.address + lda #>0+$a000 + sta.z load.address+1 + // [179] load::verify = 0 -- vbuz1=vbuc1 + lda #0 + sta.z load.verify + // [180] call load + jsr load + jmp __breturn + // LoadFileBanked::@return + __breturn: + // [181] return + rts +} + // bnkcpy_vram_address +// Copy block of banked internal memory (256 banks at A000-BFFF) to VERA VRAM. +// Copies the values of num bytes from the location pointed to by source directly to the memory block pointed to by destination in VRAM. +// - vdest: dword of the destination address in VRAM +// - src: dword of source banked address in RAM. This address is a linair project of the banked memory of 512K to 2048K. +// - num: dword of the number of bytes to copy +// bnkcpy_vram_address(dword zp(3) vdest, dword zp(7) num) +bnkcpy_vram_address: { + .label __0 = $2b + .label __2 = $2d + .label __4 = $35 + .label __7 = $37 + .label __8 = $37 + .label __10 = $3b + .label __12 = $3d + .label __13 = $3d + .label __14 = $3f + .label __15 = $3f + .label __17 = $3d + .label __18 = $f + .label __23 = $3d + .label __24 = $41 + .label beg = $b + .label end = 7 + // select the bank + .label addr = $f + .label pos = $b + .label vdest = 3 + .label num = 7 + // [183] *VERA_CTRL = *VERA_CTRL & ~VERA_ADDRSEL -- _deref_pbuc1=_deref_pbuc1_band_vbuc2 + // Select DATA0 + lda #VERA_ADDRSEL^$ff + and VERA_CTRL + sta VERA_CTRL + // [184] bnkcpy_vram_address::$0 = < bnkcpy_vram_address::vdest#2 -- vwuz1=_lo_vduz2 + lda.z vdest + sta.z __0 + lda.z vdest+1 + sta.z __0+1 + // [185] bnkcpy_vram_address::$1 = < bnkcpy_vram_address::$0 -- vbuaa=_lo_vwuz1 + lda.z __0 + // [186] *VERA_ADDRX_L = bnkcpy_vram_address::$1 -- _deref_pbuc1=vbuaa + // Set address + sta VERA_ADDRX_L + // [187] bnkcpy_vram_address::$2 = < bnkcpy_vram_address::vdest#2 -- vwuz1=_lo_vduz2 + lda.z vdest + sta.z __2 + lda.z vdest+1 + sta.z __2+1 + // [188] bnkcpy_vram_address::$3 = > bnkcpy_vram_address::$2 -- vbuaa=_hi_vwuz1 + lda.z __2+1 + // [189] *VERA_ADDRX_M = bnkcpy_vram_address::$3 -- _deref_pbuc1=vbuaa + sta VERA_ADDRX_M + // [190] bnkcpy_vram_address::$4 = > bnkcpy_vram_address::vdest#2 -- vwuz1=_hi_vduz2 + lda.z vdest+2 + sta.z __4 + lda.z vdest+3 + sta.z __4+1 + // [191] bnkcpy_vram_address::$5 = < bnkcpy_vram_address::$4 -- vbuaa=_lo_vwuz1 + lda.z __4 + // [192] *VERA_ADDRX_H = bnkcpy_vram_address::$5 -- _deref_pbuc1=vbuaa + sta VERA_ADDRX_H + // [193] *VERA_ADDRX_H = *VERA_ADDRX_H | VERA_INC_1 -- _deref_pbuc1=_deref_pbuc1_bor_vbuc2 + lda #VERA_INC_1 + ora VERA_ADDRX_H + sta VERA_ADDRX_H + // [194] bnkcpy_vram_address::end#0 = bnkcpy_vram_address::beg#0 + bnkcpy_vram_address::num#2 -- vduz1=vduz2_plus_vduz1 + lda.z end + clc + adc.z beg + sta.z end + lda.z end+1 + adc.z beg+1 + sta.z end+1 + lda.z end+2 + adc.z beg+2 + sta.z end+2 + lda.z end+3 + adc.z beg+3 + sta.z end+3 + // [195] bnkcpy_vram_address::$7 = > bnkcpy_vram_address::beg#0 -- vwuz1=_hi_vduz2 + lda.z beg+2 + sta.z __7 + lda.z beg+3 + sta.z __7+1 + // [196] bnkcpy_vram_address::$8 = bnkcpy_vram_address::$7 << 8 -- vwuz1=vwuz1_rol_8 + lda.z __8 + sta.z __8+1 + lda #0 + sta.z __8 + // [197] bnkcpy_vram_address::$9 = < bnkcpy_vram_address::$8 -- vbuyy=_lo_vwuz1 + ldy.z __8 + // [198] bnkcpy_vram_address::$10 = < bnkcpy_vram_address::beg#0 -- vwuz1=_lo_vduz2 + lda.z beg + sta.z __10 + lda.z beg+1 + sta.z __10+1 + // [199] bnkcpy_vram_address::$11 = > bnkcpy_vram_address::$10 -- vbuxx=_hi_vwuz1 + ldx.z __10+1 + // [200] bnkcpy_vram_address::$23 = (word)bnkcpy_vram_address::$9 -- vwuz1=_word_vbuyy + tya + sta.z __23 + lda #0 + sta.z __23+1 + // [201] bnkcpy_vram_address::$12 = bnkcpy_vram_address::$23 | bnkcpy_vram_address::$11 -- vwuz1=vwuz1_bor_vbuxx + txa + ora.z __12 + sta.z __12 + // [202] bnkcpy_vram_address::$13 = bnkcpy_vram_address::$12 >> 5 -- vwuz1=vwuz1_ror_5 + lsr.z __13+1 + ror.z __13 + lsr.z __13+1 + ror.z __13 + lsr.z __13+1 + ror.z __13 + lsr.z __13+1 + ror.z __13 + lsr.z __13+1 + ror.z __13 + // [203] bnkcpy_vram_address::$14 = > bnkcpy_vram_address::beg#0 -- vwuz1=_hi_vduz2 + lda.z beg+2 + sta.z __14 + lda.z beg+3 + sta.z __14+1 + // [204] bnkcpy_vram_address::$15 = bnkcpy_vram_address::$14 << 3 -- vwuz1=vwuz1_rol_3 + asl.z __15 + rol.z __15+1 + asl.z __15 + rol.z __15+1 + asl.z __15 + rol.z __15+1 + // [205] bnkcpy_vram_address::$16 = < bnkcpy_vram_address::$15 -- vbuaa=_lo_vwuz1 + lda.z __15 + // [206] bnkcpy_vram_address::$24 = (word)bnkcpy_vram_address::$16 -- vwuz1=_word_vbuaa + sta.z __24 + lda #0 + sta.z __24+1 + // [207] bnkcpy_vram_address::$17 = bnkcpy_vram_address::$13 + bnkcpy_vram_address::$24 -- vwuz1=vwuz1_plus_vwuz2 + lda.z __17 + clc + adc.z __24 + sta.z __17 + lda.z __17+1 + adc.z __24+1 + sta.z __17+1 + // [208] bnkcpy_vram_address::bank#0 = (byte)bnkcpy_vram_address::$17 -- vbuxx=_byte_vwuz1 + lda.z __17 + tax + // [209] bnkcpy_vram_address::$18 = < bnkcpy_vram_address::beg#0 -- vwuz1=_lo_vduz2 + lda.z beg + sta.z __18 + lda.z beg+1 + sta.z __18+1 + // [210] bnkcpy_vram_address::addr#0 = bnkcpy_vram_address::$18 & $1fff -- vwuz1=vwuz1_band_vwuc1 + lda.z addr + and #<$1fff + sta.z addr + lda.z addr+1 + and #>$1fff + sta.z addr+1 + // [211] bnkcpy_vram_address::addr#1 = (byte*)bnkcpy_vram_address::addr#0 + $a000 -- pbuz1=pbuz1_plus_vwuc1 + // stip off the top 3 bits, which are representing the bank of the word! + clc + lda.z addr + adc #<$a000 + sta.z addr + lda.z addr+1 + adc #>$a000 + sta.z addr+1 + // [212] *((byte*) 40801) = bnkcpy_vram_address::bank#0 -- _deref_pbuc1=vbuxx + stx $9f61 + // [213] phi from bnkcpy_vram_address bnkcpy_vram_address::@3 to bnkcpy_vram_address::@1 [phi:bnkcpy_vram_address/bnkcpy_vram_address::@3->bnkcpy_vram_address::@1] + __b1_from_bnkcpy_vram_address: + __b1_from___b3: + // [213] phi bnkcpy_vram_address::bank#2 = bnkcpy_vram_address::bank#0 [phi:bnkcpy_vram_address/bnkcpy_vram_address::@3->bnkcpy_vram_address::@1#0] -- register_copy + // [213] phi bnkcpy_vram_address::addr#4 = bnkcpy_vram_address::addr#1 [phi:bnkcpy_vram_address/bnkcpy_vram_address::@3->bnkcpy_vram_address::@1#1] -- register_copy + // [213] phi bnkcpy_vram_address::pos#2 = bnkcpy_vram_address::beg#0 [phi:bnkcpy_vram_address/bnkcpy_vram_address::@3->bnkcpy_vram_address::@1#2] -- register_copy + jmp __b1 + // select the bank + // bnkcpy_vram_address::@1 + __b1: + // [214] if(bnkcpy_vram_address::pos#2$c000 + bne __b3_from___b2 + lda.z addr + cmp #<$c000 + bne __b3_from___b2 + jmp __b4 + // bnkcpy_vram_address::@4 + __b4: + // [217] bnkcpy_vram_address::bank#1 = ++ bnkcpy_vram_address::bank#2 -- vbuxx=_inc_vbuxx + inx + // [218] *((byte*) 40801) = bnkcpy_vram_address::bank#1 -- _deref_pbuc1=vbuxx + stx $9f61 + // [219] phi from bnkcpy_vram_address::@4 to bnkcpy_vram_address::@3 [phi:bnkcpy_vram_address::@4->bnkcpy_vram_address::@3] + __b3_from___b4: + // [219] phi bnkcpy_vram_address::bank#5 = bnkcpy_vram_address::bank#1 [phi:bnkcpy_vram_address::@4->bnkcpy_vram_address::@3#0] -- register_copy + // [219] phi bnkcpy_vram_address::addr#5 = (byte*) 40960 [phi:bnkcpy_vram_address::@4->bnkcpy_vram_address::@3#1] -- pbuz1=pbuc1 + lda #<$a000 + sta.z addr + lda #>$a000 + sta.z addr+1 + jmp __b3 + // [219] phi from bnkcpy_vram_address::@2 to bnkcpy_vram_address::@3 [phi:bnkcpy_vram_address::@2->bnkcpy_vram_address::@3] + __b3_from___b2: + // [219] phi bnkcpy_vram_address::bank#5 = bnkcpy_vram_address::bank#2 [phi:bnkcpy_vram_address::@2->bnkcpy_vram_address::@3#0] -- register_copy + // [219] phi bnkcpy_vram_address::addr#5 = bnkcpy_vram_address::addr#4 [phi:bnkcpy_vram_address::@2->bnkcpy_vram_address::@3#1] -- register_copy + jmp __b3 + // bnkcpy_vram_address::@3 + __b3: + // [220] *VERA_DATA0 = *bnkcpy_vram_address::addr#5 -- _deref_pbuc1=_deref_pbuz1 + ldy #0 + lda (addr),y + sta VERA_DATA0 + // [221] bnkcpy_vram_address::addr#2 = ++ bnkcpy_vram_address::addr#5 -- pbuz1=_inc_pbuz1 + inc.z addr + bne !+ + inc.z addr+1 + !: + // [222] bnkcpy_vram_address::pos#1 = ++ bnkcpy_vram_address::pos#2 -- vduz1=_inc_vduz1 + inc.z pos + bne !+ + inc.z pos+1 + bne !+ + inc.z pos+2 + bne !+ + inc.z pos+3 + !: + jmp __b1_from___b3 +} + // memcpy_to_vram +// Copy block of memory (from RAM to VRAM) +// Copies the values of num bytes from the location pointed to by source directly to the memory block pointed to by destination in VRAM. +// - vbank: Which 64K VRAM bank to put data into (0/1) +// - vdest: The destination address in VRAM +// - src: The source address in RAM +// - num: The number of bytes to copy +memcpy_to_vram: { + .const vbank = VERA_SPRITE_ATTR>>$10 + .label vdest = VERA_SPRITE_ATTR&$ffff + .label src = main.SPRITE_ATTR + .label end = src+SIZEOF_STRUCT_VERA_SPRITE + .label s = $f + // [223] *VERA_CTRL = *VERA_CTRL & ~VERA_ADDRSEL -- _deref_pbuc1=_deref_pbuc1_band_vbuc2 + // Select DATA0 + lda #VERA_ADDRSEL^$ff + and VERA_CTRL + sta VERA_CTRL + // [224] *VERA_ADDRX_L = 0 -- _deref_pbuc1=vbuc2 + // Set address + lda #0 + sta VERA_ADDRX_L + // [225] *VERA_ADDRX_M = >memcpy_to_vram::vdest#0 -- _deref_pbuc1=vbuc2 + lda #>vdest + sta VERA_ADDRX_M + // [226] *VERA_ADDRX_H = VERA_INC_1|memcpy_to_vram::vbank#0 -- _deref_pbuc1=vbuc2 + lda #VERA_INC_1|vbank + sta VERA_ADDRX_H + // [227] phi from memcpy_to_vram to memcpy_to_vram::@1 [phi:memcpy_to_vram->memcpy_to_vram::@1] + __b1_from_memcpy_to_vram: + // [227] phi memcpy_to_vram::s#2 = (byte*)memcpy_to_vram::src#0 [phi:memcpy_to_vram->memcpy_to_vram::@1#0] -- pbuz1=pbuc1 + lda #src + sta.z s+1 + jmp __b1 + // memcpy_to_vram::@1 + __b1: + // [228] if(memcpy_to_vram::s#2!=memcpy_to_vram::end#0) goto memcpy_to_vram::@2 -- pbuz1_neq_pbuc1_then_la1 + lda.z s+1 + cmp #>end + bne __b2 + lda.z s + cmp #memcpy_to_vram::@1] + __b1_from___b2: + // [227] phi memcpy_to_vram::s#2 = memcpy_to_vram::s#1 [phi:memcpy_to_vram::@2->memcpy_to_vram::@1#0] -- register_copy + jmp __b1 +} + // vera_layer_mode_tile +// Set a vera layer in tile mode and configure the: +// - layer: Value of 0 or 1. +// - mapbase_address: A dword typed address (4 bytes), that specifies the full address of the map base. +// The function does the translation from the dword that contains the 17 bit address, +// to the respective mapbase vera register. +// Note that the register only specifies bits 16:9 of the address, +// so the resulting address in the VERA VRAM is always aligned to a multiple of 512 bytes. +// - tilebase_address: A dword typed address (4 bytes), that specifies the base address of the tile map. +// The function does the translation from the dword that contains the 17 bit address, +// to the respective tilebase vera register. +// Note that the resulting vera register holds only specifies bits 16:11 of the address, +// so the resulting address in the VERA VRAM is always aligned to a multiple of 2048 bytes! +// - mapwidth: The width of the map in number of tiles. +// - mapheight: The height of the map in number of tiles. +// - tilewidth: The width of a tile, which can be 8 or 16 pixels. +// - tileheight: The height of a tile, which can be 8 or 16 pixels. +// - color_depth: The color depth in bits per pixel (BPP), which can be 1, 2, 4 or 8. +vera_layer_mode_tile: { + .const mapbase = 0 + .label tilebase_address = vera_layer_mode_text.tilebase_address>>1 + // config + .label config = VERA_LAYER_WIDTH_128|VERA_LAYER_HEIGHT_64 + jmp __b1 + // vera_layer_mode_tile::@1 + __b1: + // [233] *(vera_layer_rowshift+vera_layer_mode_text::layer#0) = 8 -- _deref_pbuc1=vbuc2 + lda #8 + sta vera_layer_rowshift+vera_layer_mode_text.layer + // [234] *(vera_layer_rowskip+vera_layer_mode_text::layer#0*SIZEOF_WORD) = $100 -- _deref_pwuc1=vwuc2 + lda #<$100 + sta vera_layer_rowskip+vera_layer_mode_text.layer*SIZEOF_WORD + lda #>$100 + sta vera_layer_rowskip+vera_layer_mode_text.layer*SIZEOF_WORD+1 + // [235] phi from vera_layer_mode_tile::@1 to vera_layer_mode_tile::@2 [phi:vera_layer_mode_tile::@1->vera_layer_mode_tile::@2] + __b2_from___b1: + jmp __b2 + // vera_layer_mode_tile::@2 + __b2: + // [236] call vera_layer_set_config + jsr vera_layer_set_config + jmp __b4 + // vera_layer_mode_tile::@4 + __b4: + // [237] *(vera_mapbase_offset+vera_layer_mode_text::layer#0*SIZEOF_WORD) = 0 -- _deref_pwuc1=vwuc2 + // mapbase + lda #<0 + sta vera_mapbase_offset+vera_layer_mode_text.layer*SIZEOF_WORD + lda #>0 + sta vera_mapbase_offset+vera_layer_mode_text.layer*SIZEOF_WORD+1 + // [238] *(vera_mapbase_bank+vera_layer_mode_text::layer#0) = 0 -- _deref_pbuc1=vbuc2 + lda #0 + sta vera_mapbase_bank+vera_layer_mode_text.layer + // [239] *(vera_mapbase_address+vera_layer_mode_text::layer#0*SIZEOF_DWORD) = vera_layer_mode_text::mapbase_address#0 -- _deref_pduc1=vduc2 + lda #vera_layer_mode_text.mapbase_address + sta vera_mapbase_address+vera_layer_mode_text.layer*SIZEOF_DWORD+1 + lda #>$10 + sta vera_mapbase_address+vera_layer_mode_text.layer*SIZEOF_DWORD+2 + lda #>vera_layer_mode_text.mapbase_address>>$10 + sta vera_mapbase_address+vera_layer_mode_text.layer*SIZEOF_DWORD+3 + // [240] call vera_layer_set_mapbase + // [109] phi from vera_layer_mode_tile::@4 to vera_layer_set_mapbase [phi:vera_layer_mode_tile::@4->vera_layer_set_mapbase] + vera_layer_set_mapbase_from___b4: + // [109] phi vera_layer_set_mapbase::mapbase#3 = vera_layer_mode_tile::mapbase#0 [phi:vera_layer_mode_tile::@4->vera_layer_set_mapbase#0] -- vbuxx=vbuc1 + ldx #mapbase + // [109] phi vera_layer_set_mapbase::layer#3 = vera_layer_mode_text::layer#0 [phi:vera_layer_mode_tile::@4->vera_layer_set_mapbase#1] -- vbuaa=vbuc1 + lda #vera_layer_mode_text.layer + jsr vera_layer_set_mapbase + jmp __b5 + // vera_layer_mode_tile::@5 + __b5: + // [241] *(vera_tilebase_offset+vera_layer_mode_text::layer#0*SIZEOF_WORD) = vera_layer_mode_text.tilebase_address&$ffff + sta vera_tilebase_offset+vera_layer_mode_text.layer*SIZEOF_WORD+1 + // [242] *(vera_tilebase_bank+vera_layer_mode_text::layer#0) = 0 -- _deref_pbuc1=vbuc2 + lda #0 + sta vera_tilebase_bank+vera_layer_mode_text.layer + // [243] *(vera_tilebase_address+vera_layer_mode_text::layer#0*SIZEOF_DWORD) = vera_layer_mode_text::tilebase_address#0 -- _deref_pduc1=vduc2 + lda #vera_layer_mode_text.tilebase_address + sta vera_tilebase_address+vera_layer_mode_text.layer*SIZEOF_DWORD+1 + lda #>$10 + sta vera_tilebase_address+vera_layer_mode_text.layer*SIZEOF_DWORD+2 + lda #>vera_layer_mode_text.tilebase_address>>$10 + sta vera_tilebase_address+vera_layer_mode_text.layer*SIZEOF_DWORD+3 + // [244] phi from vera_layer_mode_tile::@5 to vera_layer_mode_tile::@3 [phi:vera_layer_mode_tile::@5->vera_layer_mode_tile::@3] + __b3_from___b5: + jmp __b3 + // vera_layer_mode_tile::@3 + __b3: + // [245] call vera_layer_set_tilebase + jsr vera_layer_set_tilebase + jmp __breturn + // vera_layer_mode_tile::@return + __breturn: + // [246] return + rts +} + // vera_layer_get_mapbase_bank +// Get the map base bank of the tiles for the layer. +// - layer: Value of 0 or 1. +// - return: Bank in vera vram. +// vera_layer_get_mapbase_bank(byte register(X) layer) +vera_layer_get_mapbase_bank: { + // [247] vera_layer_get_mapbase_bank::return#0 = vera_mapbase_bank[vera_layer_get_mapbase_bank::layer#0] -- vbuaa=pbuc1_derefidx_vbuxx + lda vera_mapbase_bank,x + jmp __breturn + // vera_layer_get_mapbase_bank::@return + __breturn: + // [248] return + rts +} + // vera_layer_get_mapbase_offset +// Get the map base lower 16-bit address (offset) of the tiles for the layer. +// - layer: Value of 0 or 1. +// - return: Offset in vera vram of the specified bank. +// vera_layer_get_mapbase_offset(byte register(A) layer) +vera_layer_get_mapbase_offset: { + .label return = $33 + // [249] vera_layer_get_mapbase_offset::$0 = vera_layer_get_mapbase_offset::layer#0 << 1 -- vbuaa=vbuaa_rol_1 + asl + // [250] vera_layer_get_mapbase_offset::return#0 = vera_mapbase_offset[vera_layer_get_mapbase_offset::$0] -- vwuz1=pwuc1_derefidx_vbuaa + tay + lda vera_mapbase_offset,y + sta.z return + lda vera_mapbase_offset+1,y + sta.z return+1 + jmp __breturn + // vera_layer_get_mapbase_offset::@return + __breturn: + // [251] return + rts +} + // vera_layer_get_rowshift +// Get the bit shift value required to skip a whole line fast. +// - layer: Value of 0 or 1. +// - return: Rowshift value to calculate fast from a y value to line offset in tile mode. +// vera_layer_get_rowshift(byte register(X) layer) +vera_layer_get_rowshift: { + // [252] vera_layer_get_rowshift::return#0 = vera_layer_rowshift[vera_layer_get_rowshift::layer#0] -- vbuaa=pbuc1_derefidx_vbuxx + lda vera_layer_rowshift,x + jmp __breturn + // vera_layer_get_rowshift::@return + __breturn: + // [253] return + rts +} + // vera_layer_get_rowskip +// Get the value required to skip a whole line fast. +// - layer: Value of 0 or 1. +// - return: Skip value to calculate fast from a y value to line offset in tile mode. +// vera_layer_get_rowskip(byte register(A) layer) +vera_layer_get_rowskip: { + .label return = $20 + // [254] vera_layer_get_rowskip::$0 = vera_layer_get_rowskip::layer#0 << 1 -- vbuaa=vbuaa_rol_1 + asl + // [255] vera_layer_get_rowskip::return#0 = vera_layer_rowskip[vera_layer_get_rowskip::$0] -- vwuz1=pwuc1_derefidx_vbuaa + tay + lda vera_layer_rowskip,y + sta.z return + lda vera_layer_rowskip+1,y + sta.z return+1 + jmp __breturn + // vera_layer_get_rowskip::@return + __breturn: + // [256] return + rts +} + // vera_layer_get_backcolor +// Get the back color for text output. The old back text color setting is returned. +// - layer: Value of 0 or 1. +// - return: a 4 bit value ( decimal between 0 and 15). +// This will only work when the VERA is in 16 color mode! +// Note that on the VERA, the transparent color has value 0. +// vera_layer_get_backcolor(byte register(X) layer) +vera_layer_get_backcolor: { + // [257] vera_layer_get_backcolor::return#0 = vera_layer_backcolor[vera_layer_get_backcolor::layer#0] -- vbuaa=pbuc1_derefidx_vbuxx + lda vera_layer_backcolor,x + jmp __breturn + // vera_layer_get_backcolor::@return + __breturn: + // [258] return + rts +} + // vera_layer_get_textcolor +// Get the front color for text output. The old front text color setting is returned. +// - layer: Value of 0 or 1. +// - return: a 4 bit value ( decimal between 0 and 15). +// This will only work when the VERA is in 16 color mode! +// Note that on the VERA, the transparent color has value 0. +// vera_layer_get_textcolor(byte register(X) layer) +vera_layer_get_textcolor: { + // [259] vera_layer_get_textcolor::return#0 = vera_layer_textcolor[vera_layer_get_textcolor::layer#0] -- vbuaa=pbuc1_derefidx_vbuxx + lda vera_layer_textcolor,x + jmp __breturn + // vera_layer_get_textcolor::@return + __breturn: + // [260] return + rts +} + // cputc +// Output one character at the current cursor position +// Moves the cursor forward. Scrolls the entire screen if needed +// cputc(byte zp($24) c) +cputc: { + .label __16 = $2d + .label conio_addr = $2b + .label c = $24 + // [261] vera_layer_get_color::layer#0 = conio_screen_layer -- vbuxx=vbuz1 + ldx.z conio_screen_layer + // [262] call vera_layer_get_color + // [310] phi from cputc to vera_layer_get_color [phi:cputc->vera_layer_get_color] + vera_layer_get_color_from_cputc: + // [310] phi vera_layer_get_color::layer#2 = vera_layer_get_color::layer#0 [phi:cputc->vera_layer_get_color#0] -- register_copy + jsr vera_layer_get_color + // [263] vera_layer_get_color::return#3 = vera_layer_get_color::return#2 + jmp __b7 + // cputc::@7 + __b7: + // [264] cputc::color#0 = vera_layer_get_color::return#3 -- vbuxx=vbuaa + tax + // [265] cputc::$15 = conio_screen_layer << 1 -- vbuaa=vbuz1_rol_1 + lda.z conio_screen_layer + asl + // [266] cputc::conio_addr#0 = (byte*)CONIO_SCREEN_TEXT#16 + conio_line_text[cputc::$15] -- pbuz1=pbuz2_plus_pwuc1_derefidx_vbuaa + tay + clc + lda.z CONIO_SCREEN_TEXT + adc conio_line_text,y + sta.z conio_addr + lda.z CONIO_SCREEN_TEXT+1 + adc conio_line_text+1,y + sta.z conio_addr+1 + // [267] cputc::$2 = conio_cursor_x[conio_screen_layer] << 1 -- vbuaa=pbuc1_derefidx_vbuz1_rol_1 + ldy.z conio_screen_layer + lda conio_cursor_x,y + asl + // [268] cputc::conio_addr#1 = cputc::conio_addr#0 + cputc::$2 -- pbuz1=pbuz1_plus_vbuaa + clc + adc.z conio_addr + sta.z conio_addr + bcc !+ + inc.z conio_addr+1 + !: + // [269] if(cputc::c#0==' ') goto cputc::@1 -- vbuz1_eq_vbuc1_then_la1 + lda #'\n' + cmp.z c + beq __b1_from___b7 + jmp __b2 + // cputc::@2 + __b2: + // [270] *VERA_CTRL = *VERA_CTRL & ~VERA_ADDRSEL -- _deref_pbuc1=_deref_pbuc1_band_vbuc2 + // Select DATA0 + lda #VERA_ADDRSEL^$ff + and VERA_CTRL + sta VERA_CTRL + // [271] cputc::$4 = < cputc::conio_addr#1 -- vbuaa=_lo_pbuz1 + lda.z conio_addr + // [272] *VERA_ADDRX_L = cputc::$4 -- _deref_pbuc1=vbuaa + // Set address + sta VERA_ADDRX_L + // [273] cputc::$5 = > cputc::conio_addr#1 -- vbuaa=_hi_pbuz1 + lda.z conio_addr+1 + // [274] *VERA_ADDRX_M = cputc::$5 -- _deref_pbuc1=vbuaa + sta VERA_ADDRX_M + // [275] cputc::$6 = CONIO_SCREEN_BANK#14 | VERA_INC_1 -- vbuaa=vbuz1_bor_vbuc1 + lda #VERA_INC_1 + ora.z CONIO_SCREEN_BANK + // [276] *VERA_ADDRX_H = cputc::$6 -- _deref_pbuc1=vbuaa + sta VERA_ADDRX_H + // [277] *VERA_DATA0 = cputc::c#0 -- _deref_pbuc1=vbuz1 + lda.z c + sta VERA_DATA0 + // [278] *VERA_DATA0 = cputc::color#0 -- _deref_pbuc1=vbuxx + stx VERA_DATA0 + // [279] conio_cursor_x[conio_screen_layer] = ++ conio_cursor_x[conio_screen_layer] -- pbuc1_derefidx_vbuz1=_inc_pbuc1_derefidx_vbuz1 + ldx.z conio_screen_layer + inc conio_cursor_x,x + // [280] cputc::scroll_enable#0 = conio_scroll_enable[conio_screen_layer] -- vbuaa=pbuc1_derefidx_vbuz1 + ldy.z conio_screen_layer + lda conio_scroll_enable,y + // [281] if(0!=cputc::scroll_enable#0) goto cputc::@5 -- 0_neq_vbuaa_then_la1 + cmp #0 + bne __b5 + jmp __b3 + // cputc::@3 + __b3: + // [282] cputc::$16 = (word)conio_cursor_x[conio_screen_layer] -- vwuz1=_word_pbuc1_derefidx_vbuz2 + ldy.z conio_screen_layer + lda conio_cursor_x,y + sta.z __16 + lda #0 + sta.z __16+1 + // [283] if(cputc::$16!=conio_width) goto cputc::@return -- vwuz1_neq_vwuz2_then_la1 + lda.z __16+1 + cmp.z conio_width+1 + bne __breturn + lda.z __16 + cmp.z conio_width + bne __breturn + // [284] phi from cputc::@3 to cputc::@4 [phi:cputc::@3->cputc::@4] + __b4_from___b3: + jmp __b4 + // cputc::@4 + __b4: + // [285] call cputln + jsr cputln + jmp __breturn + // cputc::@return + __breturn: + // [286] return + rts + // cputc::@5 + __b5: + // [287] if(conio_cursor_x[conio_screen_layer]!=conio_screen_width) goto cputc::@return -- pbuc1_derefidx_vbuz1_neq_vbuz2_then_la1 + lda.z conio_screen_width + ldy.z conio_screen_layer + cmp conio_cursor_x,y + bne __breturn + // [288] phi from cputc::@5 to cputc::@6 [phi:cputc::@5->cputc::@6] + __b6_from___b5: + jmp __b6 + // cputc::@6 + __b6: + // [289] call cputln + jsr cputln + jmp __breturn + // [290] phi from cputc::@7 to cputc::@1 [phi:cputc::@7->cputc::@1] + __b1_from___b7: + jmp __b1 + // cputc::@1 + __b1: + // [291] call cputln + jsr cputln + jmp __breturn +} + // setnam +// Kernal SETNAM function +// SETNAM. Set file name parameters. +// setnam(byte* zp($25) filename) +setnam: { + .label filename = $25 + .label filename_len = $2f + .label __0 = $2d + // [292] strlen::str#1 = setnam::filename -- pbuz1=pbuz2 + lda.z filename + sta.z strlen.str + lda.z filename+1 + sta.z strlen.str+1 + // [293] call strlen + // [329] phi from setnam to strlen [phi:setnam->strlen] + strlen_from_setnam: + jsr strlen + // [294] strlen::return#2 = strlen::len#2 + jmp __b1 + // setnam::@1 + __b1: + // [295] setnam::$0 = strlen::return#2 + // [296] setnam::filename_len = (byte)setnam::$0 -- vbuz1=_byte_vwuz2 + lda.z __0 + sta.z filename_len + // asm { ldafilename_len ldxfilename ldyfilename+1 jsr$ffbd } + lda filename_len + ldx filename + ldy filename+1 + jsr $ffbd + jmp __breturn + // setnam::@return + __breturn: + // [298] return + rts +} + // setlfs +// SETLFS. Set file parameters. +// setlfs(byte zp($27) device) +setlfs: { + .label device = $27 + // asm { ldxdevice lda#1 ldy#0 jsr$ffba } + ldx device + lda #1 + ldy #0 + jsr $ffba + jmp __breturn + // setlfs::@return + __breturn: + // [300] return + rts +} + // load +// LOAD. Load or verify file. (Must call SETLFS and SETNAM beforehands.) +// - verify: 0 = Load, 1-255 = Verify +// +// Returns a status, 0xff: Success other: Kernal Error Code +// load(byte* zp($28) address, byte zp($2a) verify) +load: { + .label address = $28 + .label verify = $2a + .label status = $30 + // [301] load::status = 0 -- vbuz1=vbuc1 + lda #0 + sta.z status + // asm { ldxaddress ldyaddress+1 ldaverify jsr$ffd5 bcserror lda#$ff error: stastatus } + ldx address + ldy address+1 + lda verify + jsr $ffd5 + bcs error + lda #$ff + error: + sta status + jmp __breturn + // load::@return + __breturn: + // [303] return + rts +} + // vera_layer_set_config +// Set the configuration of the layer. +// - layer: Value of 0 or 1. +// - config: Specifies the modes which are specified using T256C / 'Bitmap Mode' / 'Color Depth'. +vera_layer_set_config: { + .label addr = $31 + // [304] vera_layer_set_config::addr#0 = *(vera_layer_config+vera_layer_mode_text::layer#0*SIZEOF_POINTER) -- pbuz1=_deref_qbuc1 + lda vera_layer_config+vera_layer_mode_text.layer*SIZEOF_POINTER + sta.z addr + lda vera_layer_config+vera_layer_mode_text.layer*SIZEOF_POINTER+1 + sta.z addr+1 + // [305] *vera_layer_set_config::addr#0 = vera_layer_mode_tile::config#10 -- _deref_pbuz1=vbuc1 + lda #vera_layer_mode_tile.config + ldy #0 + sta (addr),y + jmp __breturn + // vera_layer_set_config::@return + __breturn: + // [306] return + rts +} + // vera_layer_set_tilebase +// Set the base of the tiles for the layer with which the conio will interact. +// - layer: Value of 0 or 1. +// - tilebase: Specifies the base address of the tile map. +// Note that the register only specifies bits 16:11 of the address, +// so the resulting address in the VERA VRAM is always aligned to a multiple of 2048 bytes! +vera_layer_set_tilebase: { + .label addr = $33 + // [307] vera_layer_set_tilebase::addr#0 = *(vera_layer_tilebase+vera_layer_mode_text::layer#0*SIZEOF_POINTER) -- pbuz1=_deref_qbuc1 + lda vera_layer_tilebase+vera_layer_mode_text.layer*SIZEOF_POINTER + sta.z addr + lda vera_layer_tilebase+vera_layer_mode_text.layer*SIZEOF_POINTER+1 + sta.z addr+1 + // [308] *vera_layer_set_tilebase::addr#0 = >(vera_layer_mode_tile.tilebase_address&$ffff))&VERA_LAYER_TILEBASE_MASK + ldy #0 + sta (addr),y + jmp __breturn + // vera_layer_set_tilebase::@return + __breturn: + // [309] return + rts +} + // vera_layer_get_color +// Get the text and back color for text output in 16 color mode. +// - layer: Value of 0 or 1. +// - return: an 8 bit value with bit 7:4 containing the back color and bit 3:0 containing the front color. +// This will only work when the VERA is in 16 color mode! +// Note that on the VERA, the transparent color has value 0. +// vera_layer_get_color(byte register(X) layer) +vera_layer_get_color: { + .label addr = $35 + // [311] vera_layer_get_color::$3 = vera_layer_get_color::layer#2 << 1 -- vbuaa=vbuxx_rol_1 + txa + asl + // [312] vera_layer_get_color::addr#0 = vera_layer_config[vera_layer_get_color::$3] -- pbuz1=qbuc1_derefidx_vbuaa + tay + lda vera_layer_config,y + sta.z addr + lda vera_layer_config+1,y + sta.z addr+1 + // [313] vera_layer_get_color::$0 = *vera_layer_get_color::addr#0 & VERA_LAYER_CONFIG_256C -- vbuaa=_deref_pbuz1_band_vbuc1 + lda #VERA_LAYER_CONFIG_256C + ldy #0 + and (addr),y + // [314] if(0!=vera_layer_get_color::$0) goto vera_layer_get_color::@1 -- 0_neq_vbuaa_then_la1 + cmp #0 + bne __b1 + jmp __b2 + // vera_layer_get_color::@2 + __b2: + // [315] vera_layer_get_color::$1 = vera_layer_backcolor[vera_layer_get_color::layer#2] << 4 -- vbuaa=pbuc1_derefidx_vbuxx_rol_4 + lda vera_layer_backcolor,x + asl + asl + asl + asl + // [316] vera_layer_get_color::return#1 = vera_layer_get_color::$1 | vera_layer_textcolor[vera_layer_get_color::layer#2] -- vbuaa=vbuaa_bor_pbuc1_derefidx_vbuxx + ora vera_layer_textcolor,x + // [317] phi from vera_layer_get_color::@1 vera_layer_get_color::@2 to vera_layer_get_color::@return [phi:vera_layer_get_color::@1/vera_layer_get_color::@2->vera_layer_get_color::@return] + __breturn_from___b1: + __breturn_from___b2: + // [317] phi vera_layer_get_color::return#2 = vera_layer_get_color::return#0 [phi:vera_layer_get_color::@1/vera_layer_get_color::@2->vera_layer_get_color::@return#0] -- register_copy + jmp __breturn + // vera_layer_get_color::@return + __breturn: + // [318] return + rts + // vera_layer_get_color::@1 + __b1: + // [319] vera_layer_get_color::return#0 = vera_layer_textcolor[vera_layer_get_color::layer#2] -- vbuaa=pbuc1_derefidx_vbuxx + lda vera_layer_textcolor,x + jmp __breturn_from___b1 +} + // cputln +// Print a newline +cputln: { + .label temp = $37 + // [320] cputln::$2 = conio_screen_layer << 1 -- vbuaa=vbuz1_rol_1 + lda.z conio_screen_layer + asl + // [321] cputln::temp#0 = conio_line_text[cputln::$2] -- vwuz1=pwuc1_derefidx_vbuaa + // TODO: This needs to be optimized! other variations don't compile because of sections not available! + tay + lda conio_line_text,y + sta.z temp + lda conio_line_text+1,y + sta.z temp+1 + // [322] cputln::temp#1 = cputln::temp#0 + conio_rowskip -- vwuz1=vwuz1_plus_vwuz2 + lda.z temp + clc + adc.z conio_rowskip + sta.z temp + lda.z temp+1 + adc.z conio_rowskip+1 + sta.z temp+1 + // [323] cputln::$3 = conio_screen_layer << 1 -- vbuaa=vbuz1_rol_1 + lda.z conio_screen_layer + asl + // [324] conio_line_text[cputln::$3] = cputln::temp#1 -- pwuc1_derefidx_vbuaa=vwuz1 + tay + lda.z temp + sta conio_line_text,y + lda.z temp+1 + sta conio_line_text+1,y + // [325] conio_cursor_x[conio_screen_layer] = 0 -- pbuc1_derefidx_vbuz1=vbuc2 + lda #0 + ldy.z conio_screen_layer + sta conio_cursor_x,y + // [326] conio_cursor_y[conio_screen_layer] = ++ conio_cursor_y[conio_screen_layer] -- pbuc1_derefidx_vbuz1=_inc_pbuc1_derefidx_vbuz1 + ldx.z conio_screen_layer + inc conio_cursor_y,x + // [327] call cscroll + jsr cscroll + jmp __breturn + // cputln::@return + __breturn: + // [328] return + rts +} + // strlen +// Computes the length of the string str up to but not including the terminating null character. +// strlen(byte* zp($2b) str) +strlen: { + .label len = $2d + .label str = $2b + .label return = $2d + // [330] phi from strlen to strlen::@1 [phi:strlen->strlen::@1] + __b1_from_strlen: + // [330] phi strlen::len#2 = 0 [phi:strlen->strlen::@1#0] -- vwuz1=vwuc1 + lda #<0 + sta.z len + lda #>0 + sta.z len+1 + // [330] phi strlen::str#2 = strlen::str#1 [phi:strlen->strlen::@1#1] -- register_copy + jmp __b1 + // strlen::@1 + __b1: + // [331] if(0!=*strlen::str#2) goto strlen::@2 -- 0_neq__deref_pbuz1_then_la1 + ldy #0 + lda (str),y + cmp #0 + bne __b2 + jmp __breturn + // strlen::@return + __breturn: + // [332] return + rts + // strlen::@2 + __b2: + // [333] strlen::len#1 = ++ strlen::len#2 -- vwuz1=_inc_vwuz1 + inc.z len + bne !+ + inc.z len+1 + !: + // [334] strlen::str#0 = ++ strlen::str#2 -- pbuz1=_inc_pbuz1 + inc.z str + bne !+ + inc.z str+1 + !: + // [330] phi from strlen::@2 to strlen::@1 [phi:strlen::@2->strlen::@1] + __b1_from___b2: + // [330] phi strlen::len#2 = strlen::len#1 [phi:strlen::@2->strlen::@1#0] -- register_copy + // [330] phi strlen::str#2 = strlen::str#0 [phi:strlen::@2->strlen::@1#1] -- register_copy + jmp __b1 +} + // cscroll +// Scroll the entire screen if the cursor is beyond the last line +cscroll: { + // [335] if(conio_cursor_y[conio_screen_layer]cscroll::@3] + __b3_from___b2: + jmp __b3 + // cscroll::@3 + __b3: + jmp __breturn + // cscroll::@return + __breturn: + // [339] return + rts + // [340] phi from cscroll::@1 to cscroll::@4 [phi:cscroll::@1->cscroll::@4] + __b4_from___b1: + jmp __b4 + // cscroll::@4 + __b4: + // [341] call insertup + jsr insertup + jmp __b5 + // cscroll::@5 + __b5: + // [342] gotoxy::y#2 = conio_screen_height - 1 -- vbuxx=vbuz1_minus_1 + ldx.z conio_screen_height + dex + // [343] call gotoxy + // [114] phi from cscroll::@5 to gotoxy [phi:cscroll::@5->gotoxy] + gotoxy_from___b5: + // [114] phi gotoxy::y#3 = gotoxy::y#2 [phi:cscroll::@5->gotoxy#0] -- register_copy + jsr gotoxy + jmp __breturn +} + // insertup +// Insert a new line, and scroll the upper part of the screen up. +insertup: { + .label cy = $39 + .label width = $3a + .label line = $3b + .label start = $3b + // [344] insertup::cy#0 = conio_cursor_y[conio_screen_layer] -- vbuz1=pbuc1_derefidx_vbuz2 + ldy.z conio_screen_layer + lda conio_cursor_y,y + sta.z cy + // [345] insertup::width#0 = conio_screen_width << 1 -- vbuz1=vbuz2_rol_1 + lda.z conio_screen_width + asl + sta.z width + // [346] phi from insertup to insertup::@1 [phi:insertup->insertup::@1] + __b1_from_insertup: + // [346] phi insertup::i#2 = 1 [phi:insertup->insertup::@1#0] -- vbuxx=vbuc1 + ldx #1 + jmp __b1 + // insertup::@1 + __b1: + // [347] if(insertup::i#2<=insertup::cy#0) goto insertup::@2 -- vbuxx_le_vbuz1_then_la1 + lda.z cy + stx.z $ff + cmp.z $ff + bcs __b2 + // [348] phi from insertup::@1 to insertup::@3 [phi:insertup::@1->insertup::@3] + __b3_from___b1: + jmp __b3 + // insertup::@3 + __b3: + // [349] call clearline + jsr clearline + jmp __breturn + // insertup::@return + __breturn: + // [350] return + rts + // insertup::@2 + __b2: + // [351] insertup::$3 = insertup::i#2 - 1 -- vbuaa=vbuxx_minus_1 + txa + sec + sbc #1 + // [352] insertup::line#0 = insertup::$3 << conio_rowshift -- vwuz1=vbuaa_rol_vbuz2 + ldy.z conio_rowshift + sta.z line + lda #0 + sta.z line+1 + cpy #0 + beq !e+ + !: + asl.z line + rol.z line+1 + dey + bne !- + !e: + // [353] insertup::start#0 = (byte*)CONIO_SCREEN_TEXT#16 + insertup::line#0 -- pbuz1=pbuz2_plus_vwuz1 + lda.z start + clc + adc.z CONIO_SCREEN_TEXT + sta.z start + lda.z start+1 + adc.z CONIO_SCREEN_TEXT+1 + sta.z start+1 + // [354] memcpy_in_vram::src#0 = insertup::start#0 + conio_rowskip -- pbuz1=pbuz2_plus_vwuz3 + lda.z start + clc + adc.z conio_rowskip + sta.z memcpy_in_vram.src + lda.z start+1 + adc.z conio_rowskip+1 + sta.z memcpy_in_vram.src+1 + // [355] memcpy_in_vram::dest#0 = (void*)insertup::start#0 + // [356] memcpy_in_vram::num#0 = insertup::width#0 -- vwuz1=vbuz2 + lda.z width + sta.z memcpy_in_vram.num + lda #0 + sta.z memcpy_in_vram.num+1 + // [357] call memcpy_in_vram + jsr memcpy_in_vram + jmp __b4 + // insertup::@4 + __b4: + // [358] insertup::i#1 = ++ insertup::i#2 -- vbuxx=_inc_vbuxx + inx + // [346] phi from insertup::@4 to insertup::@1 [phi:insertup::@4->insertup::@1] + __b1_from___b4: + // [346] phi insertup::i#2 = insertup::i#1 [phi:insertup::@4->insertup::@1#0] -- register_copy + jmp __b1 +} + // clearline +clearline: { + .label addr = $41 + .label c = $2b + // [359] *VERA_CTRL = *VERA_CTRL & ~VERA_ADDRSEL -- _deref_pbuc1=_deref_pbuc1_band_vbuc2 + // Select DATA0 + lda #VERA_ADDRSEL^$ff + and VERA_CTRL + sta VERA_CTRL + // [360] clearline::$5 = conio_screen_layer << 1 -- vbuaa=vbuz1_rol_1 + lda.z conio_screen_layer + asl + // [361] clearline::addr#0 = (byte*)CONIO_SCREEN_TEXT#16 + conio_line_text[clearline::$5] -- pbuz1=pbuz2_plus_pwuc1_derefidx_vbuaa + tay + clc + lda.z CONIO_SCREEN_TEXT + adc conio_line_text,y + sta.z addr + lda.z CONIO_SCREEN_TEXT+1 + adc conio_line_text+1,y + sta.z addr+1 + // [362] clearline::$1 = < clearline::addr#0 -- vbuaa=_lo_pbuz1 + lda.z addr + // [363] *VERA_ADDRX_L = clearline::$1 -- _deref_pbuc1=vbuaa + sta VERA_ADDRX_L + // [364] clearline::$2 = > clearline::addr#0 -- vbuaa=_hi_pbuz1 + lda.z addr+1 + // [365] *VERA_ADDRX_M = clearline::$2 -- _deref_pbuc1=vbuaa + sta VERA_ADDRX_M + // [366] *VERA_ADDRX_H = VERA_INC_1 -- _deref_pbuc1=vbuc2 + lda #VERA_INC_1 + sta VERA_ADDRX_H + // [367] vera_layer_get_color::layer#1 = conio_screen_layer -- vbuxx=vbuz1 + ldx.z conio_screen_layer + // [368] call vera_layer_get_color + // [310] phi from clearline to vera_layer_get_color [phi:clearline->vera_layer_get_color] + vera_layer_get_color_from_clearline: + // [310] phi vera_layer_get_color::layer#2 = vera_layer_get_color::layer#1 [phi:clearline->vera_layer_get_color#0] -- register_copy + jsr vera_layer_get_color + // [369] vera_layer_get_color::return#4 = vera_layer_get_color::return#2 + jmp __b4 + // clearline::@4 + __b4: + // [370] clearline::color#0 = vera_layer_get_color::return#4 -- vbuxx=vbuaa + tax + // [371] phi from clearline::@4 to clearline::@1 [phi:clearline::@4->clearline::@1] + __b1_from___b4: + // [371] phi clearline::c#2 = 0 [phi:clearline::@4->clearline::@1#0] -- vwuz1=vwuc1 + lda #<0 + sta.z c + lda #>0 + sta.z c+1 + jmp __b1 + // clearline::@1 + __b1: + // [372] if(clearline::c#2clearline::@1] + __b1_from___b2: + // [371] phi clearline::c#2 = clearline::c#1 [phi:clearline::@2->clearline::@1#0] -- register_copy + jmp __b1 +} + // memcpy_in_vram +// Copy block of memory (from VRAM to VRAM) +// Copies the values from the location pointed by src to the location pointed by dest. +// The method uses the VERA access ports 0 and 1 to copy data from and to in VRAM. +// - src_bank: 64K VRAM bank number to copy from (0/1). +// - src: pointer to the location to copy from. Note that the address is a 16 bit value! +// - src_increment: the increment indicator, VERA needs this because addressing increment is automated by VERA at each access. +// - dest_bank: 64K VRAM bank number to copy to (0/1). +// - dest: pointer to the location to copy to. Note that the address is a 16 bit value! +// - dest_increment: the increment indicator, VERA needs this because addressing increment is automated by VERA at each access. +// - num: The number of bytes to copy +// memcpy_in_vram(void* zp($3b) dest, byte* zp($3d) src, word zp($3f) num) +memcpy_in_vram: { + .label i = $2d + .label dest = $3b + .label src = $3d + .label num = $3f + // [378] *VERA_CTRL = *VERA_CTRL & ~VERA_ADDRSEL -- _deref_pbuc1=_deref_pbuc1_band_vbuc2 + // Select DATA0 + lda #VERA_ADDRSEL^$ff + and VERA_CTRL + sta VERA_CTRL + // [379] memcpy_in_vram::$0 = < (void*)memcpy_in_vram::src#0 -- vbuaa=_lo_pvoz1 + lda.z src + // [380] *VERA_ADDRX_L = memcpy_in_vram::$0 -- _deref_pbuc1=vbuaa + // Set address + sta VERA_ADDRX_L + // [381] memcpy_in_vram::$1 = > (void*)memcpy_in_vram::src#0 -- vbuaa=_hi_pvoz1 + lda.z src+1 + // [382] *VERA_ADDRX_M = memcpy_in_vram::$1 -- _deref_pbuc1=vbuaa + sta VERA_ADDRX_M + // [383] *VERA_ADDRX_H = VERA_INC_1 -- _deref_pbuc1=vbuc2 + lda #VERA_INC_1 + sta VERA_ADDRX_H + // [384] *VERA_CTRL = *VERA_CTRL | VERA_ADDRSEL -- _deref_pbuc1=_deref_pbuc1_bor_vbuc2 + // Select DATA1 + lda #VERA_ADDRSEL + ora VERA_CTRL + sta VERA_CTRL + // [385] memcpy_in_vram::$3 = < memcpy_in_vram::dest#0 -- vbuaa=_lo_pvoz1 + lda.z dest + // [386] *VERA_ADDRX_L = memcpy_in_vram::$3 -- _deref_pbuc1=vbuaa + // Set address + sta VERA_ADDRX_L + // [387] memcpy_in_vram::$4 = > memcpy_in_vram::dest#0 -- vbuaa=_hi_pvoz1 + lda.z dest+1 + // [388] *VERA_ADDRX_M = memcpy_in_vram::$4 -- _deref_pbuc1=vbuaa + sta VERA_ADDRX_M + // [389] *VERA_ADDRX_H = VERA_INC_1 -- _deref_pbuc1=vbuc2 + lda #VERA_INC_1 + sta VERA_ADDRX_H + // [390] phi from memcpy_in_vram to memcpy_in_vram::@1 [phi:memcpy_in_vram->memcpy_in_vram::@1] + __b1_from_memcpy_in_vram: + // [390] phi memcpy_in_vram::i#2 = 0 [phi:memcpy_in_vram->memcpy_in_vram::@1#0] -- vwuz1=vwuc1 + lda #<0 + sta.z i + lda #>0 + sta.z i+1 + jmp __b1 + // Transfer the data + // memcpy_in_vram::@1 + __b1: + // [391] if(memcpy_in_vram::i#2memcpy_in_vram::@1] + __b1_from___b2: + // [390] phi memcpy_in_vram::i#2 = memcpy_in_vram::i#1 [phi:memcpy_in_vram::@2->memcpy_in_vram::@1#0] -- register_copy + jmp __b1 +} + // File Data +.segment Data + VERA_LAYER_WIDTH: .word $20, $40, $80, $100 + VERA_LAYER_HEIGHT: .word $20, $40, $80, $100 + // --- VERA function encapsulation --- + vera_mapbase_offset: .word 0, 0 + vera_mapbase_bank: .byte 0, 0 + vera_mapbase_address: .dword 0, 0 + vera_tilebase_offset: .word 0, 0 + vera_tilebase_bank: .byte 0, 0 + vera_tilebase_address: .dword 0, 0 + vera_layer_rowshift: .byte 0, 0 + vera_layer_rowskip: .word 0, 0 + vera_layer_config: .word VERA_L0_CONFIG, VERA_L1_CONFIG + vera_layer_mapbase: .word VERA_L0_MAPBASE, VERA_L1_MAPBASE + vera_layer_tilebase: .word VERA_L0_TILEBASE, VERA_L1_TILEBASE + vera_layer_textcolor: .byte WHITE, WHITE + vera_layer_backcolor: .byte BLUE, BLUE + // The number of bytes on the screen + // The current cursor x-position + conio_cursor_x: .byte 0, 0 + // The current cursor y-position + conio_cursor_y: .byte 0, 0 + // The current text cursor line start + conio_line_text: .word 0, 0 + // Is scrolling enabled when outputting beyond the end of the screen (1: yes, 0: no). + // If disabled the cursor just moves back to (0,0) instead + conio_scroll_enable: .byte 1, 1 +.segment Sprite +SPRITE_PIXELS: +.var pic = LoadPicture("ship.png") + // palette: rgb->idx + .var palette = Hashtable() + // RGB value for each palette index + .var palList = List() + // Next palette index + .var nxt_idx = 0; + // Extract palette while outputting pixels as palete index values + .for (var y=0; y<64; y++) { + .for (var x=0;x<64; x++) { + // Find palette index (add if not known) + .var rgb = pic.getPixel(x,y); + .var idx = palette.get(rgb) + .if(idx==null) { + .eval idx = nxt_idx++; + .eval palette.put(rgb,idx); + .eval palList.add(rgb) + } + } + } + .if(nxt_idx>16) .error "Image has too many colours "+nxt_idx + + .for(var i=0;i<16;i++) { + .var rgb = palList.get(i) + .var red = floor(rgb / [256*256]) + .var green = floor(rgb/256) & 255 + .var blue = rgb & 255 + // bits 4-8: green, bits 0-3 blue + .byte green&$f0 | blue/16 + // bits bits 0-3 red + .byte red/16 + } + + .for (var y=0; y<64; y++) { + .for (var x=0;x<64; x+=2) { + // Find palette index (add if not known) + .var rgb = pic.getPixel(x,y); + .var idx1 = palette.get(rgb) + .if(idx1==null) { + .printnow "unknown rgb value!" + } + // Find palette index (add if not known) + .eval rgb = pic.getPixel(x+1,y); + .var idx2 = palette.get(rgb) + .if(idx2==null) { + .printnow "unknown rgb value!" + } + .byte idx1*16+idx2; + } + } + +.segment Data + __0: .word (main.VRAM_SPRITE/$20&$ffff)|VERA_SPRITE_8BPP, $140-$20, $f0-$20 + .byte $c, $f1 + +ASSEMBLER OPTIMIZATIONS +Removing instruction jmp __init1 +Removing instruction jmp __b1 +Removing instruction jmp __breturn +Removing instruction jmp __b3 +Removing instruction jmp __b4 +Removing instruction jmp __b5 +Removing instruction jmp __b6 +Removing instruction jmp __b7 +Removing instruction jmp __b8 +Removing instruction jmp __b9 +Removing instruction jmp __b2 +Removing instruction jmp __b1 +Removing instruction jmp __breturn +Removing instruction jmp __b1 +Removing instruction jmp __b2 +Removing instruction jmp __b3 +Removing instruction jmp __b4 +Removing instruction jmp __b5 +Removing instruction jmp __b6 +Removing instruction jmp __b7 +Removing instruction jmp __b8 +Removing instruction jmp __breturn +Removing instruction jmp __b1 +Removing instruction jmp __breturn +Removing instruction jmp __breturn +Removing instruction jmp __b3 +Removing instruction jmp __b4 +Removing instruction jmp vera_layer_get_width1 +Removing instruction jmp vera_layer_get_width1___breturn +Removing instruction jmp __b1 +Removing instruction jmp __b5 +Removing instruction jmp __b6 +Removing instruction jmp vera_layer_get_height1 +Removing instruction jmp vera_layer_get_height1___breturn +Removing instruction jmp __b2 +Removing instruction jmp __breturn +Removing instruction jmp __breturn +Removing instruction jmp __breturn +Removing instruction jmp __breturn +Removing instruction jmp __b4 +Removing instruction jmp __b1 +Removing instruction jmp __b3 +Removing instruction jmp __b2 +Removing instruction jmp __breturn +Removing instruction jmp __breturn +Removing instruction jmp __b7 +Removing instruction jmp __b8 +Removing instruction jmp __b1 +Removing instruction jmp __b3 +Removing instruction jmp __breturn +Removing instruction jmp __b4 +Removing instruction jmp __b6 +Removing instruction jmp __b1 +Removing instruction jmp __breturn +Removing instruction jmp __b1 +Removing instruction jmp __b2 +Removing instruction jmp __breturn +Removing instruction jmp __b1 +Removing instruction jmp __breturn +Removing instruction jmp __b4 +Removing instruction jmp __b3 +Removing instruction jmp __b1 +Removing instruction jmp __breturn +Removing instruction jmp __b1 +Removing instruction jmp __b2 +Removing instruction jmp __b4 +Removing instruction jmp __b5 +Removing instruction jmp __b3 +Removing instruction jmp __breturn +Removing instruction jmp __breturn +Removing instruction jmp __breturn +Removing instruction jmp __breturn +Removing instruction jmp __breturn +Removing instruction jmp __breturn +Removing instruction jmp __breturn +Removing instruction jmp __b7 +Removing instruction jmp __b2 +Removing instruction jmp __b3 +Removing instruction jmp __b4 +Removing instruction jmp __breturn +Removing instruction jmp __b6 +Removing instruction jmp __b1 +Removing instruction jmp __b1 +Removing instruction jmp __breturn +Removing instruction jmp __breturn +Removing instruction jmp __breturn +Removing instruction jmp __breturn +Removing instruction jmp __breturn +Removing instruction jmp __b2 +Removing instruction jmp __breturn +Removing instruction jmp __breturn +Removing instruction jmp __b1 +Removing instruction jmp __breturn +Removing instruction jmp __b1 +Removing instruction jmp __b2 +Removing instruction jmp __b3 +Removing instruction jmp __breturn +Removing instruction jmp __b4 +Removing instruction jmp __b5 +Removing instruction jmp __b1 +Removing instruction jmp __b3 +Removing instruction jmp __breturn +Removing instruction jmp __b4 +Removing instruction jmp __b4 +Removing instruction jmp __b1 +Removing instruction jmp __b3 +Removing instruction jmp __breturn +Removing instruction jmp __b1 +Removing instruction jmp __breturn +Succesful ASM optimization Pass5NextJumpElimination +Removing instruction lda #0 +Removing instruction lda #>0 +Removing instruction lda #<0 +Removing instruction lda #>0 +Removing instruction lda #0 +Removing instruction lda #<0 +Removing instruction lda #>0 +Replacing instruction ldx.z conio_screen_layer with TAX +Removing instruction ldy.z conio_screen_layer +Removing instruction ldy #0 +Removing instruction ldy #0 +Removing instruction ldy #0 +Removing instruction lda #0 +Removing instruction ldy.z conio_screen_layer +Replacing instruction lda.z conio_screen_layer with TYA +Removing instruction lda #0 +Removing instruction lda.z __2+1 +Replacing instruction ldy.z __8 with TAY +Replacing instruction ldx.z __10+1 with TAX +Removing instruction lda #>0 +Removing instruction lda #0 +Removing instruction lda.z __16+1 +Removing instruction lda filename_len +Removing instruction lda #>0 +Removing instruction lda #>0 +Removing instruction lda #>0 +Succesful ASM optimization Pass5UnnecesaryLoadElimination +Replacing label __b1_from___b9 with __b1 +Replacing label __b4_from_gotoxy with __b1 +Replacing label __b3_from___b2 with __b3 +Replacing label __b3_from___b2 with __b3 +Replacing label __b1_from___b7 with __b1 +Replacing label __breturn_from___b1 with __breturn +Replacing label __breturn with __b3 +Replacing label __b4_from___b1 with __b4 +Replacing label __breturn with __b3 +Replacing label __breturn with __b3 +Replacing label __breturn with __b3 +Removing instruction __b1_from___init1: +Removing instruction main_from___b1: +Removing instruction __b3_from_conio_x16_init: +Removing instruction __b4_from___b3: +Removing instruction __b5_from___b4: +Removing instruction __b6_from___b5: +Removing instruction __b7_from___b6: +Removing instruction vera_layer_set_mapbase_from___b7: +Removing instruction __b8_from___b7: +Removing instruction vera_layer_set_mapbase_from___b8: +Removing instruction __b1_from___b2: +Removing instruction __b1_from___b9: +Removing instruction __b1_from_main: +Removing instruction __b2_from___b1: +Removing instruction __b3_from___b2: +Removing instruction cputs_from___b3: +Removing instruction __b5_from___b4: +Removing instruction bnkcpy_vram_address_from___b5: +Removing instruction __b6_from___b5: +Removing instruction bnkcpy_vram_address_from___b6: +Removing instruction __b1_from_vera_layer_mode_text: +Removing instruction vera_layer_set_text_color_mode_from___b1: +Removing instruction vera_layer_get_width1___breturn: +Removing instruction vera_layer_get_height1___breturn: +Removing instruction __b4_from_gotoxy: +Removing instruction __b4: +Removing instruction __b1_from___b4: +Removing instruction __b3_from___b1: +Removing instruction __b3: +Removing instruction __b1_from_bnkcpy_vram_address: +Removing instruction __b3_from___b2: +Removing instruction __b2_from___b1: +Removing instruction __b3_from___b5: +Removing instruction __b4_from___b3: +Removing instruction __b6_from___b5: +Removing instruction __b1_from___b7: +Removing instruction __breturn_from___b1: +Removing instruction __breturn_from___b2: +Removing instruction __b3_from___b2: +Removing instruction __breturn: +Removing instruction __b4_from___b1: +Removing instruction __b3_from___b1: +Succesful ASM optimization Pass5RedundantLabelElimination +Removing instruction __init1: +Removing instruction __b1: +Removing instruction __breturn: +Removing instruction vera_layer_mode_text_from_conio_x16_init: +Removing instruction __b3: +Removing instruction __b4: +Removing instruction __b5: +Removing instruction __b6: +Removing instruction __b7: +Removing instruction __b8: +Removing instruction __b9: +Removing instruction __b2: +Removing instruction gotoxy_from___b1: +Removing instruction __breturn: +Removing instruction vera_layer_set_text_color_mode_from_main: +Removing instruction __b1: +Removing instruction __b2: +Removing instruction __b3: +Removing instruction __b4: +Removing instruction __b5: +Removing instruction __b6: +Removing instruction __b7: +Removing instruction __b8: +Removing instruction __breturn: +Removing instruction vera_layer_mode_tile_from_vera_layer_mode_text: +Removing instruction __b1: +Removing instruction __breturn: +Removing instruction __breturn: +Removing instruction __b3: +Removing instruction __b4: +Removing instruction vera_layer_get_width1: +Removing instruction __b1: +Removing instruction __b5: +Removing instruction __b6: +Removing instruction vera_layer_get_height1: +Removing instruction __b2: +Removing instruction __breturn: +Removing instruction __breturn: +Removing instruction __breturn: +Removing instruction __breturn: +Removing instruction __b1_from_gotoxy: +Removing instruction __breturn: +Removing instruction __breturn: +Removing instruction __b7: +Removing instruction __b8: +Removing instruction __b1_from___b8: +Removing instruction __b3: +Removing instruction __breturn: +Removing instruction __b4_from___b2: +Removing instruction __b6: +Removing instruction __b1_from___b6: +Removing instruction __b4_from___b5: +Removing instruction __b1_from_cputs: +Removing instruction __breturn: +Removing instruction __b1_from___b2: +Removing instruction __b1: +Removing instruction __b2: +Removing instruction __breturn: +Removing instruction __b1: +Removing instruction __breturn: +Removing instruction __b4: +Removing instruction __b3_from___b4: +Removing instruction __b1_from_memcpy_to_vram: +Removing instruction __breturn: +Removing instruction __b1_from___b2: +Removing instruction __b1: +Removing instruction __b2: +Removing instruction __b4: +Removing instruction vera_layer_set_mapbase_from___b4: +Removing instruction __b5: +Removing instruction __b3: +Removing instruction __breturn: +Removing instruction __breturn: +Removing instruction __breturn: +Removing instruction __breturn: +Removing instruction __breturn: +Removing instruction __breturn: +Removing instruction __breturn: +Removing instruction vera_layer_get_color_from_cputc: +Removing instruction __b7: +Removing instruction __b2: +Removing instruction __b3: +Removing instruction __b4: +Removing instruction __b6: +Removing instruction strlen_from_setnam: +Removing instruction __b1: +Removing instruction __breturn: +Removing instruction __breturn: +Removing instruction __breturn: +Removing instruction __breturn: +Removing instruction __breturn: +Removing instruction __b2: +Removing instruction __breturn: +Removing instruction __b1_from_strlen: +Removing instruction __breturn: +Removing instruction __b1_from___b2: +Removing instruction __b1: +Removing instruction __b2: +Removing instruction __b5: +Removing instruction gotoxy_from___b5: +Removing instruction __b1_from_insertup: +Removing instruction __b3: +Removing instruction __breturn: +Removing instruction __b4: +Removing instruction __b1_from___b4: +Removing instruction vera_layer_get_color_from_clearline: +Removing instruction __b4: +Removing instruction __b1_from___b4: +Removing instruction __b3: +Removing instruction __breturn: +Removing instruction __b1_from___b2: +Removing instruction __b1_from_memcpy_in_vram: +Removing instruction __breturn: +Removing instruction __b1_from___b2: +Succesful ASM optimization Pass5UnusedLabelElimination +Replacing jump to rts with rts in jmp __breturn +Replacing jump to rts with rts in jmp __breturn +Replacing jump to rts with rts in jmp __breturn +Replacing jump to rts with rts in jmp __b3 +Succesful ASM optimization Pass5DoubleJumpElimination +Relabelling long label __b1_from___b3 to __b1 +Succesful ASM optimization Pass5RelabelLongLabels +Removing instruction jmp __b1 +Removing instruction bne __b2 +Removing instruction jmp __b3 +Removing instruction bcc __b3 +Succesful ASM optimization Pass5NextJumpElimination +Removing instruction lda #0 +Replacing instruction lda #0 with TYA +Removing instruction ldy.z conio_screen_layer +Removing instruction ldy.z conio_screen_layer +Removing instruction ldy.z conio_screen_layer +Succesful ASM optimization Pass5UnnecesaryLoadElimination +Removing instruction __b2: +Removing instruction __breturn: +Succesful ASM optimization Pass5UnusedLabelElimination + +FINAL SYMBOL TABLE +const struct VERA_SPRITE $0 = { ADDR: >5+(word)<>main::BANK_SPRITE<<3 +byte LoadFileBanked::device +const byte LoadFileBanked::device#0 device = 8 +byte* LoadFileBanked::filename +byte LoadFileBanked::return +const byte OFFSET_STRUCT_MOS6522_VIA_PORT_A = 1 +const byte OFFSET_STRUCT_VERA_SPRITE_X = 2 +const byte OFFSET_STRUCT_VERA_SPRITE_Y = 4 +const byte RADIX::BINARY = 2 +const byte RADIX::DECIMAL = $a +const byte RADIX::HEXADECIMAL = $10 +const byte RADIX::OCTAL = 8 +const byte SIZEOF_DWORD = 4 +const byte SIZEOF_POINTER = 2 +const byte SIZEOF_STRUCT_VERA_SPRITE = 8 +const byte SIZEOF_WORD = 2 +const byte* SPRITE_PIXELS[] = kickasm {{ .var pic = LoadPicture("ship.png") + // palette: rgb->idx + .var palette = Hashtable() + // RGB value for each palette index + .var palList = List() + // Next palette index + .var nxt_idx = 0; + // Extract palette while outputting pixels as palete index values + .for (var y=0; y<64; y++) { + .for (var x=0;x<64; x++) { + // Find palette index (add if not known) + .var rgb = pic.getPixel(x,y); + .var idx = palette.get(rgb) + .if(idx==null) { + .eval idx = nxt_idx++; + .eval palette.put(rgb,idx); + .eval palList.add(rgb) + } + } + } + .if(nxt_idx>16) .error "Image has too many colours "+nxt_idx + + .for(var i=0;i<16;i++) { + .var rgb = palList.get(i) + .var red = floor(rgb / [256*256]) + .var green = floor(rgb/256) & 255 + .var blue = rgb & 255 + // bits 4-8: green, bits 0-3 blue + .byte green&$f0 | blue/16 + // bits bits 0-3 red + .byte red/16 + } + + .for (var y=0; y<64; y++) { + .for (var x=0;x<64; x+=2) { + // Find palette index (add if not known) + .var rgb = pic.getPixel(x,y); + .var idx1 = palette.get(rgb) + .if(idx1==null) { + .printnow "unknown rgb value!" + } + // Find palette index (add if not known) + .eval rgb = pic.getPixel(x+1,y); + .var idx2 = palette.get(rgb) + .if(idx2==null) { + .printnow "unknown rgb value!" + } + .byte idx1*16+idx2; + } + } + }} +const nomodify byte VERA_ADDRSEL = 1 +const nomodify byte* VERA_ADDRX_H = (byte*) 40738 +const nomodify byte* VERA_ADDRX_L = (byte*) 40736 +const nomodify byte* VERA_ADDRX_M = (byte*) 40737 +const nomodify byte* VERA_CTRL = (byte*) 40741 +const nomodify byte* VERA_DATA0 = (byte*) 40739 +const nomodify byte* VERA_DATA1 = (byte*) 40740 +const nomodify byte VERA_DCSEL = 2 +const nomodify byte* VERA_DC_HSCALE = (byte*) 40746 +const nomodify byte* VERA_DC_VIDEO = (byte*) 40745 +const nomodify byte* VERA_DC_VSCALE = (byte*) 40747 +const nomodify byte VERA_INC_1 = $10 +const nomodify byte* VERA_L0_CONFIG = (byte*) 40749 +const nomodify byte* VERA_L0_MAPBASE = (byte*) 40750 +const nomodify byte* VERA_L0_TILEBASE = (byte*) 40751 +const nomodify byte* VERA_L1_CONFIG = (byte*) 40756 +const nomodify byte* VERA_L1_MAPBASE = (byte*) 40757 +const nomodify byte* VERA_L1_TILEBASE = (byte*) 40758 +const nomodify byte VERA_LAYER_CONFIG_256C = 8 +const to_nomodify word* VERA_LAYER_HEIGHT[4] = { $20, $40, $80, $100 } +const nomodify byte VERA_LAYER_HEIGHT_64 = $40 +const nomodify byte VERA_LAYER_HEIGHT_MASK = $c0 +const nomodify byte VERA_LAYER_TILEBASE_MASK = $fc +const to_nomodify word* VERA_LAYER_WIDTH[4] = { $20, $40, $80, $100 } +const nomodify byte VERA_LAYER_WIDTH_128 = $20 +const nomodify byte VERA_LAYER_WIDTH_MASK = $30 +const nomodify dword VERA_PALETTE = $1fa00 +const nomodify byte VERA_SPRITES_ENABLE = $40 +const nomodify word VERA_SPRITE_8BPP = $8000 +const nomodify dword VERA_SPRITE_ATTR = $1fc00 +const nomodify struct MOS6522_VIA* VIA1 = (struct MOS6522_VIA*) 40800 +const nomodify byte WHITE = 1 +void __start() +void bnkcpy_vram_address(dword bnkcpy_vram_address::vdest , dword bnkcpy_vram_address::src , dword bnkcpy_vram_address::num) +word~ bnkcpy_vram_address::$0 zp[2]:43 202.0 +byte~ bnkcpy_vram_address::$1 reg byte a 202.0 +word~ bnkcpy_vram_address::$10 zp[2]:59 202.0 +byte~ bnkcpy_vram_address::$11 reg byte x 101.0 +word~ bnkcpy_vram_address::$12 zp[2]:61 202.0 +word~ bnkcpy_vram_address::$13 zp[2]:61 40.4 +word~ bnkcpy_vram_address::$14 zp[2]:63 202.0 +word~ bnkcpy_vram_address::$15 zp[2]:63 202.0 +byte~ bnkcpy_vram_address::$16 reg byte a 101.0 +word~ bnkcpy_vram_address::$17 zp[2]:61 101.0 +word~ bnkcpy_vram_address::$18 zp[2]:15 202.0 +word~ bnkcpy_vram_address::$2 zp[2]:45 202.0 +word~ bnkcpy_vram_address::$23 zp[2]:61 202.0 +word~ bnkcpy_vram_address::$24 zp[2]:65 202.0 +byte~ bnkcpy_vram_address::$3 reg byte a 202.0 +word~ bnkcpy_vram_address::$4 zp[2]:53 202.0 +byte~ bnkcpy_vram_address::$5 reg byte a 202.0 +word~ bnkcpy_vram_address::$7 zp[2]:55 202.0 +word~ bnkcpy_vram_address::$8 zp[2]:55 202.0 +byte~ bnkcpy_vram_address::$9 reg byte y 33.666666666666664 +byte* bnkcpy_vram_address::addr +word bnkcpy_vram_address::addr#0 addr zp[2]:15 101.0 +byte* bnkcpy_vram_address::addr#1 addr zp[2]:15 101.0 +byte* bnkcpy_vram_address::addr#2 addr zp[2]:15 1001.0 +byte* bnkcpy_vram_address::addr#4 addr zp[2]:15 1034.6666666666667 +byte* bnkcpy_vram_address::addr#5 addr zp[2]:15 1501.5 +byte bnkcpy_vram_address::bank +byte bnkcpy_vram_address::bank#0 reg byte x 60.599999999999994 +byte bnkcpy_vram_address::bank#1 reg byte x 1501.5 +byte bnkcpy_vram_address::bank#2 reg byte x 1034.6666666666667 +byte bnkcpy_vram_address::bank#5 reg byte x 750.75 +dword bnkcpy_vram_address::beg +dword bnkcpy_vram_address::beg#0 beg zp[4]:11 19.548387096774196 +dword bnkcpy_vram_address::end +dword bnkcpy_vram_address::end#0 end zp[4]:7 39.357142857142854 +dword bnkcpy_vram_address::num +dword bnkcpy_vram_address::num#2 num zp[4]:7 8.416666666666666 +dword bnkcpy_vram_address::pos +dword bnkcpy_vram_address::pos#1 pos zp[4]:11 2002.0 +dword bnkcpy_vram_address::pos#2 pos zp[4]:11 388.0 +dword bnkcpy_vram_address::src +dword bnkcpy_vram_address::vdest +dword bnkcpy_vram_address::vdest#2 vdest zp[4]:3 37.875 +void clearline() +byte~ clearline::$1 reg byte a 2.00000002E8 +byte~ clearline::$2 reg byte a 2.00000002E8 +byte~ clearline::$5 reg byte a 2.00000002E8 +byte* clearline::addr +byte* clearline::addr#0 addr zp[2]:65 1.00000001E8 +word clearline::c +word clearline::c#1 c zp[2]:43 2.0000000002E10 +word clearline::c#2 c zp[2]:43 7.50000000075E9 +byte clearline::color +byte clearline::color#0 reg byte x 1.6833333336666665E9 +void clrscr() +byte~ clrscr::$0 reg byte a 202.0 +byte~ clrscr::$1 zp[1]:36 40.4 +byte~ clrscr::$2 reg byte a 202.0 +byte~ clrscr::$5 reg byte a 2002.0 +byte~ clrscr::$6 reg byte a 2002.0 +byte~ clrscr::$7 reg byte a 2002.0 +byte~ clrscr::$9 reg byte a 202.0 +byte clrscr::c +byte clrscr::c#1 reg byte y 20002.0 +byte clrscr::c#2 reg byte y 7500.75 +byte* clrscr::ch +byte clrscr::color +byte clrscr::color#0 color zp[1]:36 594.2352941176471 +byte clrscr::l +byte clrscr::l#1 reg byte x 2002.0 +byte clrscr::l#2 reg byte x 200.2 +byte* clrscr::line_text +byte* clrscr::line_text#0 line_text zp[2]:15 18.363636363636363 +byte* clrscr::line_text#1 line_text zp[2]:15 1001.0 +byte* clrscr::line_text#2 line_text zp[2]:15 293.2142857142857 +const byte* conio_cursor_x[2] = { 0, 0 } +const byte* conio_cursor_y[2] = { 0, 0 } +word conio_height loadstore zp[2]:22 10650.053191489362 +const word* conio_line_text[2] = { 0, 0 } +byte conio_rowshift loadstore zp[1]:24 8559322.923728812 +word conio_rowskip loadstore zp[2]:25 8404210.974789916 +volatile byte conio_screen_height loadstore zp[1]:18 115384.875 +byte conio_screen_layer loadstore zp[1]:19 1789433.5208333333 +volatile byte conio_screen_width loadstore zp[1]:17 7.208640292086332E7 +const byte* conio_scroll_enable[2] = { 1, 1 } +word conio_width loadstore zp[2]:20 209.42708333333331 +void conio_x16_init() +const nomodify byte* conio_x16_init::BASIC_CURSOR_LINE = (byte*) 214 +byte conio_x16_init::line +byte conio_x16_init::line#0 line zp[1]:2 2.1999999999999997 +byte conio_x16_init::line#1 line zp[1]:2 22.0 +byte conio_x16_init::line#3 line zp[1]:2 33.0 +void cputc(byte cputc::c) +byte~ cputc::$15 reg byte a 20002.0 +word~ cputc::$16 zp[2]:45 20002.0 +byte~ cputc::$2 reg byte a 20002.0 +byte~ cputc::$4 reg byte a 20002.0 +byte~ cputc::$5 reg byte a 20002.0 +byte~ cputc::$6 reg byte a 20002.0 +byte cputc::c +byte cputc::c#0 c zp[1]:36 1235.4705882352941 +byte cputc::color +byte cputc::color#0 reg byte x 1428.7142857142858 +byte* cputc::conio_addr +byte* cputc::conio_addr#0 conio_addr zp[2]:43 10001.0 +byte* cputc::conio_addr#1 conio_addr zp[2]:43 6000.6 +byte cputc::scroll_enable +byte cputc::scroll_enable#0 reg byte a 20002.0 +void cputln() +byte~ cputln::$2 reg byte a 200002.0 +byte~ cputln::$3 reg byte a 200002.0 +word cputln::temp +word cputln::temp#0 temp zp[2]:55 200002.0 +word cputln::temp#1 temp zp[2]:55 100001.0 +void cputs(to_nomodify byte* cputs::s) +byte cputs::c +byte cputs::c#1 reg byte a 1001.0 +to_nomodify byte* cputs::s +to_nomodify byte* cputs::s#0 s zp[2]:15 500.5 +to_nomodify byte* cputs::s#2 s zp[2]:15 1501.5 +void cscroll() +void gotoxy(byte gotoxy::x , byte gotoxy::y) +byte~ gotoxy::$5 reg byte a 2.0000002E7 +word~ gotoxy::$6 zp[2]:32 2.0000002E7 +word gotoxy::line_offset +word gotoxy::line_offset#0 line_offset zp[2]:32 1.0000001E7 +byte gotoxy::x +byte gotoxy::y +byte gotoxy::y#0 reg byte x 22.0 +byte gotoxy::y#2 reg byte x 2000002.0 +byte gotoxy::y#3 reg byte x 7000004.666666666 +byte gotoxy::y#4 reg byte x 4000000.4 +void insertup() +byte~ insertup::$3 reg byte a 2.000000002E9 +byte insertup::cy +byte insertup::cy#0 cy zp[1]:57 8.416666683333334E7 +byte insertup::i +byte insertup::i#1 reg byte x 2.000000002E9 +byte insertup::i#2 reg byte x 4.444444448888889E8 +word insertup::line +word insertup::line#0 line zp[2]:59 2.000000002E9 +byte* insertup::start +byte* insertup::start#0 start zp[2]:59 1.000000001E9 +byte insertup::width +byte insertup::width#0 width zp[1]:58 9.1818182E7 +byte load(volatile byte* load::address , volatile byte load::verify) +volatile byte* load::address loadstore zp[2]:40 33.666666666666664 +byte load::return +volatile byte load::status loadstore zp[1]:48 1001.0 +volatile byte load::verify loadstore zp[1]:42 50.5 +void main() +const nomodify dword main::BANK_SPRITE = $12000 +struct VERA_SPRITE main::SPRITE_ATTR loadstore zp[8]:67 +const nomodify dword main::VRAM_SPRITE = $10000 +const byte* main::filename[7] = "SPRITE" +const byte* main::s[$2d] = " + +sprite banked file load and display demo. +" +void memcpy_in_vram(byte memcpy_in_vram::dest_bank , void* memcpy_in_vram::dest , byte memcpy_in_vram::dest_increment , byte memcpy_in_vram::src_bank , void* memcpy_in_vram::src , byte memcpy_in_vram::src_increment , word memcpy_in_vram::num) +byte~ memcpy_in_vram::$0 reg byte a 2.0000000002E10 +byte~ memcpy_in_vram::$1 reg byte a 2.0000000002E10 +byte~ memcpy_in_vram::$3 reg byte a 2.0000000002E10 +byte~ memcpy_in_vram::$4 reg byte a 2.0000000002E10 +void* memcpy_in_vram::dest +void* memcpy_in_vram::dest#0 dest zp[2]:59 1.9090909093636363E9 +byte memcpy_in_vram::dest_bank +byte memcpy_in_vram::dest_increment +word memcpy_in_vram::i +word memcpy_in_vram::i#1 i zp[2]:45 2.0000000000002E13 +word memcpy_in_vram::i#2 i zp[2]:45 1.0000000000001E13 +word memcpy_in_vram::num +word memcpy_in_vram::num#0 num zp[2]:63 5.882941176471765E11 +void* memcpy_in_vram::src +byte* memcpy_in_vram::src#0 src zp[2]:61 1.6666666683333334E8 +byte memcpy_in_vram::src_bank +byte memcpy_in_vram::src_increment +void memcpy_to_vram(byte memcpy_to_vram::vbank , void* memcpy_to_vram::vdest , void* memcpy_to_vram::src , word memcpy_to_vram::num) +byte* memcpy_to_vram::end +const byte* memcpy_to_vram::end#0 end = (byte*)memcpy_to_vram::src#0+SIZEOF_STRUCT_VERA_SPRITE +word memcpy_to_vram::num +byte* memcpy_to_vram::s +byte* memcpy_to_vram::s#1 s zp[2]:15 2002.0 +byte* memcpy_to_vram::s#2 s zp[2]:15 1334.6666666666667 +void* memcpy_to_vram::src +const void* memcpy_to_vram::src#0 src = (void*)&main::SPRITE_ATTR +byte memcpy_to_vram::vbank +const byte memcpy_to_vram::vbank#0 vbank = (byte)>VERA_SPRITE_ATTR +void* memcpy_to_vram::vdest +const void* memcpy_to_vram::vdest#0 vdest = (void*)>1 +byte vera_layer_mode_tile::tileheight +byte vera_layer_mode_tile::tilewidth +const byte* vera_layer_rowshift[2] = { 0, 0 } +const word* vera_layer_rowskip[2] = { 0, 0 } +byte vera_layer_set_backcolor(byte vera_layer_set_backcolor::layer , byte vera_layer_set_backcolor::color) +byte vera_layer_set_backcolor::color +byte vera_layer_set_backcolor::layer +const byte vera_layer_set_backcolor::layer#0 layer = 1 +byte vera_layer_set_backcolor::old +byte vera_layer_set_backcolor::return +void vera_layer_set_config(byte vera_layer_set_config::layer , byte vera_layer_set_config::config) +byte* vera_layer_set_config::addr +byte* vera_layer_set_config::addr#0 addr zp[2]:49 20002.0 +byte vera_layer_set_config::config +byte vera_layer_set_config::layer +void vera_layer_set_mapbase(byte vera_layer_set_mapbase::layer , byte vera_layer_set_mapbase::mapbase) +byte~ vera_layer_set_mapbase::$0 reg byte a 20002.0 +byte* vera_layer_set_mapbase::addr +byte* vera_layer_set_mapbase::addr#0 addr zp[2]:30 20002.0 +byte vera_layer_set_mapbase::layer +byte vera_layer_set_mapbase::layer#3 reg byte a 10001.0 +byte vera_layer_set_mapbase::mapbase +byte vera_layer_set_mapbase::mapbase#3 reg byte x 3333.6666666666665 +void vera_layer_set_text_color_mode(byte vera_layer_set_text_color_mode::layer , byte vera_layer_set_text_color_mode::color_mode) +byte~ vera_layer_set_text_color_mode::$0 reg byte a 2002.0 +byte* vera_layer_set_text_color_mode::addr +byte* vera_layer_set_text_color_mode::addr#0 addr zp[2]:34 2502.5 +byte vera_layer_set_text_color_mode::color_mode +byte vera_layer_set_text_color_mode::layer +byte vera_layer_set_text_color_mode::layer#3 reg byte a 1001.0 +byte vera_layer_set_textcolor(byte vera_layer_set_textcolor::layer , byte vera_layer_set_textcolor::color) +byte vera_layer_set_textcolor::color +byte vera_layer_set_textcolor::layer +const byte vera_layer_set_textcolor::layer#0 layer = 1 +byte vera_layer_set_textcolor::old +byte vera_layer_set_textcolor::return +void vera_layer_set_tilebase(byte vera_layer_set_tilebase::layer , byte vera_layer_set_tilebase::tilebase) +byte* vera_layer_set_tilebase::addr +byte* vera_layer_set_tilebase::addr#0 addr zp[2]:51 20002.0 +byte vera_layer_set_tilebase::layer +byte vera_layer_set_tilebase::tilebase +const byte* vera_layer_textcolor[2] = { WHITE, WHITE } +const byte** vera_layer_tilebase[2] = { VERA_L0_TILEBASE, VERA_L1_TILEBASE } +const dword* vera_mapbase_address[2] = { 0, 0 } +const byte* vera_mapbase_bank[2] = { 0, 0 } +const word* vera_mapbase_offset[2] = { 0, 0 } +const dword* vera_tilebase_address[2] = { 0, 0 } +const byte* vera_tilebase_bank[2] = { 0, 0 } +const word* vera_tilebase_offset[2] = { 0, 0 } + +zp[1]:2 [ conio_x16_init::line#3 conio_x16_init::line#1 conio_x16_init::line#0 ] +reg byte a [ vera_layer_set_mapbase::layer#3 ] +reg byte x [ vera_layer_set_mapbase::mapbase#3 ] +reg byte x [ gotoxy::y#4 gotoxy::y#3 gotoxy::y#0 gotoxy::y#2 ] +reg byte a [ vera_layer_set_text_color_mode::layer#3 ] +reg byte x [ clrscr::l#2 clrscr::l#1 ] +reg byte y [ clrscr::c#2 clrscr::c#1 ] +zp[4]:3 [ bnkcpy_vram_address::vdest#2 ] +zp[4]:7 [ bnkcpy_vram_address::num#2 bnkcpy_vram_address::end#0 ] +zp[4]:11 [ bnkcpy_vram_address::pos#2 bnkcpy_vram_address::beg#0 bnkcpy_vram_address::pos#1 ] +reg byte x [ bnkcpy_vram_address::bank#2 bnkcpy_vram_address::bank#0 bnkcpy_vram_address::bank#5 bnkcpy_vram_address::bank#1 ] +zp[2]:15 [ memcpy_to_vram::s#2 memcpy_to_vram::s#1 bnkcpy_vram_address::addr#5 bnkcpy_vram_address::addr#4 bnkcpy_vram_address::addr#1 bnkcpy_vram_address::addr#2 bnkcpy_vram_address::addr#0 bnkcpy_vram_address::$18 cputs::s#2 cputs::s#0 clrscr::line_text#2 clrscr::line_text#1 clrscr::line_text#0 ] +reg byte x [ vera_layer_get_color::layer#2 vera_layer_get_color::layer#1 vera_layer_get_color::layer#0 ] +reg byte a [ vera_layer_get_color::return#2 vera_layer_get_color::return#0 vera_layer_get_color::return#1 ] +reg byte x [ insertup::i#2 insertup::i#1 ] +zp[1]:17 [ conio_screen_width ] +zp[1]:18 [ conio_screen_height ] +zp[1]:19 [ conio_screen_layer ] +zp[2]:20 [ conio_width ] +zp[2]:22 [ conio_height ] +zp[1]:24 [ conio_rowshift ] +zp[2]:25 [ conio_rowskip ] +reg byte a [ screensize::hscale#0 ] +reg byte a [ screensize::$1 ] +reg byte a [ screensize::vscale#0 ] +reg byte a [ screensize::$3 ] +reg byte x [ vera_layer_get_mapbase_bank::layer#0 ] +reg byte a [ vera_layer_get_mapbase_bank::return#2 ] +zp[1]:27 [ CONIO_SCREEN_BANK#14 ] +reg byte a [ vera_layer_get_mapbase_offset::layer#0 ] +zp[2]:28 [ CONIO_SCREEN_TEXT#16 ] +reg byte a [ screenlayer::vera_layer_get_width1_layer#0 ] +reg byte a [ screenlayer::vera_layer_get_width1_$2 ] +reg byte a [ screenlayer::vera_layer_get_width1_$0 ] +reg byte a [ screenlayer::vera_layer_get_width1_$1 ] +reg byte a [ screenlayer::vera_layer_get_width1_$3 ] +reg byte x [ vera_layer_get_rowshift::layer#0 ] +reg byte a [ vera_layer_get_rowshift::return#2 ] +reg byte a [ screenlayer::$3 ] +reg byte a [ vera_layer_get_rowskip::layer#0 ] +reg byte a [ screenlayer::vera_layer_get_height1_layer#0 ] +reg byte a [ screenlayer::vera_layer_get_height1_$2 ] +reg byte a [ screenlayer::vera_layer_get_height1_$0 ] +reg byte a [ screenlayer::vera_layer_get_height1_$1 ] +reg byte a [ screenlayer::vera_layer_get_height1_$3 ] +reg byte a [ vera_layer_set_mapbase::$0 ] +zp[2]:30 [ vera_layer_set_mapbase::addr#0 screenlayer::vera_layer_get_width1_return#0 screenlayer::vera_layer_get_width1_return#1 screenlayer::$2 ] +zp[2]:32 [ gotoxy::$6 gotoxy::line_offset#0 vera_layer_get_rowskip::return#2 screenlayer::$4 vera_layer_get_rowskip::return#0 ] +reg byte a [ gotoxy::$5 ] +reg byte a [ vera_layer_set_text_color_mode::$0 ] +zp[2]:34 [ vera_layer_set_text_color_mode::addr#0 screenlayer::vera_layer_get_height1_config#0 ] +reg byte x [ vera_layer_get_backcolor::layer#0 ] +reg byte a [ vera_layer_get_backcolor::return#2 ] +reg byte a [ clrscr::$0 ] +reg byte x [ vera_layer_get_textcolor::layer#0 ] +reg byte a [ vera_layer_get_textcolor::return#2 ] +reg byte a [ clrscr::$2 ] +reg byte a [ clrscr::$9 ] +reg byte a [ clrscr::$5 ] +reg byte a [ clrscr::$6 ] +reg byte a [ clrscr::$7 ] +reg byte a [ cputs::c#1 ] +zp[1]:36 [ cputc::c#0 clrscr::$1 clrscr::color#0 ] +zp[2]:37 [ setnam::filename ] +zp[1]:39 [ setlfs::device ] +zp[2]:40 [ load::address ] +zp[1]:42 [ load::verify ] +reg byte a [ bnkcpy_vram_address::$1 ] +reg byte a [ bnkcpy_vram_address::$3 ] +reg byte a [ bnkcpy_vram_address::$5 ] +reg byte y [ bnkcpy_vram_address::$9 ] +reg byte x [ bnkcpy_vram_address::$11 ] +reg byte a [ bnkcpy_vram_address::$16 ] +reg byte a [ vera_layer_get_mapbase_bank::return#0 ] +reg byte a [ vera_layer_get_mapbase_offset::$0 ] +reg byte a [ vera_layer_get_rowshift::return#0 ] +reg byte a [ vera_layer_get_rowskip::$0 ] +reg byte a [ vera_layer_get_backcolor::return#0 ] +reg byte a [ vera_layer_get_textcolor::return#0 ] +reg byte a [ vera_layer_get_color::return#3 ] +reg byte x [ cputc::color#0 ] +reg byte a [ cputc::$15 ] +zp[2]:43 [ cputc::conio_addr#0 cputc::conio_addr#1 bnkcpy_vram_address::$0 clearline::c#2 clearline::c#1 strlen::str#2 strlen::str#1 strlen::str#0 ] +reg byte a [ cputc::$2 ] +reg byte a [ cputc::$4 ] +reg byte a [ cputc::$5 ] +reg byte a [ cputc::$6 ] +reg byte a [ cputc::scroll_enable#0 ] +zp[2]:45 [ cputc::$16 bnkcpy_vram_address::$2 memcpy_in_vram::i#2 memcpy_in_vram::i#1 strlen::len#2 strlen::len#1 strlen::return#2 setnam::$0 ] +zp[1]:47 [ setnam::filename_len ] +zp[1]:48 [ load::status ] +zp[2]:49 [ vera_layer_set_config::addr#0 screenlayer::vera_layer_get_height1_return#0 screenlayer::vera_layer_get_height1_return#1 screenlayer::$5 ] +zp[2]:51 [ vera_layer_set_tilebase::addr#0 screenlayer::vera_layer_get_width1_config#0 vera_layer_get_mapbase_offset::return#2 vera_layer_get_mapbase_offset::return#0 ] +reg byte a [ vera_layer_get_color::$3 ] +zp[2]:53 [ vera_layer_get_color::addr#0 bnkcpy_vram_address::$4 ] +reg byte a [ vera_layer_get_color::$0 ] +reg byte a [ vera_layer_get_color::$1 ] +reg byte a [ cputln::$2 ] +zp[2]:55 [ cputln::temp#0 cputln::temp#1 bnkcpy_vram_address::$7 bnkcpy_vram_address::$8 ] +reg byte a [ cputln::$3 ] +zp[1]:57 [ insertup::cy#0 ] +zp[1]:58 [ insertup::width#0 ] +reg byte a [ insertup::$3 ] +zp[2]:59 [ insertup::line#0 insertup::start#0 memcpy_in_vram::dest#0 bnkcpy_vram_address::$10 ] +zp[2]:61 [ memcpy_in_vram::src#0 bnkcpy_vram_address::$23 bnkcpy_vram_address::$12 bnkcpy_vram_address::$13 bnkcpy_vram_address::$17 ] +zp[2]:63 [ memcpy_in_vram::num#0 bnkcpy_vram_address::$14 bnkcpy_vram_address::$15 ] +reg byte a [ clearline::$5 ] +zp[2]:65 [ clearline::addr#0 bnkcpy_vram_address::$24 ] +reg byte a [ clearline::$1 ] +reg byte a [ clearline::$2 ] +reg byte a [ vera_layer_get_color::return#4 ] +reg byte x [ clearline::color#0 ] +reg byte a [ memcpy_in_vram::$0 ] +reg byte a [ memcpy_in_vram::$1 ] +reg byte a [ memcpy_in_vram::$3 ] +reg byte a [ memcpy_in_vram::$4 ] +zp[8]:67 [ main::SPRITE_ATTR ] + + +FINAL ASSEMBLER +Score: 75871 + + // File Comments +// Commander X16 Load a file to a memory bank + // Upstart +.cpu _65c02 + // Create a bunch of files +.file [name="cx16-bankload.prg", type="prg", segments="Program"] +.file [name="SPRITE", type="bin", segments="Sprite"] +.segmentdef Program [segments="Basic, Code, Data"] +.segmentdef Basic [start=$0801] +.segmentdef Code [start=$80d] +.segmentdef Data [startAfter="Code"] +.segment Basic +:BasicUpstart(__start) +.segmentdef Sprite + + // Global Constants & labels + .const WHITE = 1 + .const BLUE = 6 + .const VERA_INC_1 = $10 + .const VERA_DCSEL = 2 + .const VERA_ADDRSEL = 1 + .const VERA_SPRITES_ENABLE = $40 + .const VERA_LAYER_WIDTH_128 = $20 + .const VERA_LAYER_WIDTH_MASK = $30 + .const VERA_LAYER_HEIGHT_64 = $40 + .const VERA_LAYER_HEIGHT_MASK = $c0 + .const VERA_LAYER_CONFIG_256C = 8 + .const VERA_LAYER_TILEBASE_MASK = $fc + // VERA Palette address in VRAM $1FA00 - $1FBFF + // 256 entries of 2 bytes + // byte 0 bits 4-7: Green + // byte 0 bits 0-3: Blue + // byte 1 bits 0-3: Red + .const VERA_PALETTE = $1fa00 + // Sprite Attributes address in VERA VRAM $1FC00 - $1FFFF + .const VERA_SPRITE_ATTR = $1fc00 + // 8BPP sprite mode (add to VERA_SPRITE.ADDR to enable) + .const VERA_SPRITE_8BPP = $8000 + .const SIZEOF_WORD = 2 + .const SIZEOF_POINTER = 2 + .const SIZEOF_DWORD = 4 + .const SIZEOF_STRUCT_VERA_SPRITE = 8 + .const OFFSET_STRUCT_MOS6522_VIA_PORT_A = 1 + .const OFFSET_STRUCT_VERA_SPRITE_X = 2 + .const OFFSET_STRUCT_VERA_SPRITE_Y = 4 + // $9F20 VRAM Address (7:0) + .label VERA_ADDRX_L = $9f20 + // $9F21 VRAM Address (15:8) + .label VERA_ADDRX_M = $9f21 + // $9F22 VRAM Address (7:0) + // Bit 4-7: Address Increment The following is the amount incremented per value value:increment + // 0:0, 1:1, 2:2, 3:4, 4:8, 5:16, 6:32, 7:64, 8:128, 9:256, 10:512, 11:40, 12:80, 13:160, 14:320, 15:640 + // Bit 3: DECR Setting the DECR bit, will decrement instead of increment by the value set by the 'Address Increment' field. + // Bit 0: VRAM Address (16) + .label VERA_ADDRX_H = $9f22 + // $9F23 DATA0 VRAM Data port 0 + .label VERA_DATA0 = $9f23 + // $9F24 DATA1 VRAM Data port 1 + .label VERA_DATA1 = $9f24 + // $9F25 CTRL Control + // Bit 7: Reset + // Bit 1: DCSEL + // Bit 2: ADDRSEL + .label VERA_CTRL = $9f25 + // $9F29 DC_VIDEO (DCSEL=0) + // Bit 7: Current Field Read-only bit which reflects the active interlaced field in composite and RGB modes. (0: even, 1: odd) + // Bit 6: Sprites Enable Enable output from the Sprites renderer + // Bit 5: Layer1 Enable Enable output from the Layer1 renderer + // Bit 4: Layer0 Enable Enable output from the Layer0 renderer + // Bit 2: Chroma Disable Setting 'Chroma Disable' disables output of chroma in NTSC composite mode and will give a better picture on a monochrome display. (Setting this bit will also disable the chroma output on the S-video output.) + // Bit 0-1: Output Mode 0: Video disabled, 1: VGA output, 2: NTSC composite, 3: RGB interlaced, composite sync (via VGA connector) + .label VERA_DC_VIDEO = $9f29 + // $9F2A DC_HSCALE (DCSEL=0) Active Display H-Scale + .label VERA_DC_HSCALE = $9f2a + // $9F2B DC_VSCALE (DCSEL=0) Active Display V-Scale + .label VERA_DC_VSCALE = $9f2b + // $9F2D L0_CONFIG Layer 0 Configuration + .label VERA_L0_CONFIG = $9f2d + // $9F2E L0_MAPBASE Layer 0 Map Base Address (16:9) + .label VERA_L0_MAPBASE = $9f2e + // Bit 0: Tile Width (0:8 pixels, 1:16 pixels) + .label VERA_L0_TILEBASE = $9f2f + // $9F34 L1_CONFIG Layer 1 Configuration + .label VERA_L1_CONFIG = $9f34 + // $9F35 L1_MAPBASE Layer 1 Map Base Address (16:9) + .label VERA_L1_MAPBASE = $9f35 + // $9F36 L1_TILEBASE Layer 1 Tile Base + // Bit 2-7: Tile Base Address (16:11) + // Bit 1: Tile Height (0:8 pixels, 1:16 pixels) + // Bit 0: Tile Width (0:8 pixels, 1:16 pixels) + .label VERA_L1_TILEBASE = $9f36 + // The VIA#1: ROM/RAM Bank Control + // Port A Bits 0-7 RAM bank + // Port B Bits 0-2 ROM bank + // Port B Bits 3-7 [TBD] + .label VIA1 = $9f60 + // Variable holding the screen width; + .label conio_screen_width = $11 + // Variable holding the screen height; + .label conio_screen_height = $12 + // Variable holding the screen layer on the VERA card with which conio interacts; + .label conio_screen_layer = $13 + // Variables holding the current map width and map height of the layer. + .label conio_width = $14 + .label conio_height = $16 + .label conio_rowshift = $18 + .label conio_rowskip = $19 + .label CONIO_SCREEN_BANK = $1b + // The screen width + // The screen height + // The text screen base address, which is a 16:0 bit value in VERA VRAM. + // That is 128KB addressable space, thus 17 bits in total. + // CONIO_SCREEN_TEXT contains bits 15:0 of the address. + // CONIO_SCREEN_BANK contains bit 16, the the 64K memory bank in VERA VRAM (the upper 17th bit). + // !!! note that these values are not const for the cx16! + // This conio implements the two layers of VERA, which can be layer 0 or layer 1. + // Configuring conio to output to a different layer, will change these fields to the address base + // configured using VERA_L0_MAPBASE = 0x9f2e or VERA_L1_MAPBASE = 0x9f35. + // Using the function setscreenlayer(layer) will re-calculate using CONIO_SCREEN_TEXT and CONIO_SCREEN_BASE + // based on the values of VERA_L0_MAPBASE or VERA_L1_MAPBASE, mapping the base address of the selected layer. + // The function setscreenlayermapbase(layer,mapbase) allows to configure bit 16:9 of the + // mapbase address of the time map in VRAM of the selected layer VERA_L0_MAPBASE or VERA_L1_MAPBASE. + .label CONIO_SCREEN_TEXT = $1c +.segment Code + // __start +__start: { + // __start::__init1 + // conio_screen_width = 0 + // [1] conio_screen_width = 0 -- vbuz1=vbuc1 + lda #0 + sta.z conio_screen_width + // conio_screen_height = 0 + // [2] conio_screen_height = 0 -- vbuz1=vbuc1 + sta.z conio_screen_height + // conio_screen_layer = 1 + // [3] conio_screen_layer = 1 -- vbuz1=vbuc1 + lda #1 + sta.z conio_screen_layer + // conio_width = 0 + // [4] conio_width = 0 -- vwuz1=vwuc1 + lda #<0 + sta.z conio_width + sta.z conio_width+1 + // conio_height = 0 + // [5] conio_height = 0 -- vwuz1=vwuc1 + sta.z conio_height + sta.z conio_height+1 + // conio_rowshift = 0 + // [6] conio_rowshift = 0 -- vbuz1=vbuc1 + sta.z conio_rowshift + // conio_rowskip = 0 + // [7] conio_rowskip = 0 -- vwuz1=vwuc1 + sta.z conio_rowskip + sta.z conio_rowskip+1 + // #pragma constructor_for(conio_x16_init, cputc, clrscr, cscroll) + // [8] call conio_x16_init + jsr conio_x16_init + // [9] phi from __start::__init1 to __start::@1 [phi:__start::__init1->__start::@1] + // __start::@1 + // [10] call main + // [32] phi from __start::@1 to main [phi:__start::@1->main] + jsr main + // __start::@return + // [11] return + rts +} + // conio_x16_init +// Set initial cursor position +conio_x16_init: { + // Position cursor at current line + .label BASIC_CURSOR_LINE = $d6 + .label line = 2 + // line = *BASIC_CURSOR_LINE + // [12] conio_x16_init::line#0 = *conio_x16_init::BASIC_CURSOR_LINE -- vbuz1=_deref_pbuc1 + lda BASIC_CURSOR_LINE + sta.z line + // vera_layer_mode_text(1,(dword)0x00000,(dword)0x0F800,128,64,8,8,16) + // [13] call vera_layer_mode_text + // [53] phi from conio_x16_init to vera_layer_mode_text [phi:conio_x16_init->vera_layer_mode_text] + jsr vera_layer_mode_text + // [14] phi from conio_x16_init to conio_x16_init::@3 [phi:conio_x16_init->conio_x16_init::@3] + // conio_x16_init::@3 + // screensize(&conio_screen_width, &conio_screen_height) + // [15] call screensize + jsr screensize + // [16] phi from conio_x16_init::@3 to conio_x16_init::@4 [phi:conio_x16_init::@3->conio_x16_init::@4] + // conio_x16_init::@4 + // screenlayer(1) + // [17] call screenlayer + jsr screenlayer + // [18] phi from conio_x16_init::@4 to conio_x16_init::@5 [phi:conio_x16_init::@4->conio_x16_init::@5] + // conio_x16_init::@5 + // vera_layer_set_textcolor(1, WHITE) + // [19] call vera_layer_set_textcolor + jsr vera_layer_set_textcolor + // [20] phi from conio_x16_init::@5 to conio_x16_init::@6 [phi:conio_x16_init::@5->conio_x16_init::@6] + // conio_x16_init::@6 + // vera_layer_set_backcolor(1, BLUE) + // [21] call vera_layer_set_backcolor + jsr vera_layer_set_backcolor + // [22] phi from conio_x16_init::@6 to conio_x16_init::@7 [phi:conio_x16_init::@6->conio_x16_init::@7] + // conio_x16_init::@7 + // vera_layer_set_mapbase(0,0x20) + // [23] call vera_layer_set_mapbase + // [109] phi from conio_x16_init::@7 to vera_layer_set_mapbase [phi:conio_x16_init::@7->vera_layer_set_mapbase] + // [109] phi vera_layer_set_mapbase::mapbase#3 = $20 [phi:conio_x16_init::@7->vera_layer_set_mapbase#0] -- vbuxx=vbuc1 + ldx #$20 + // [109] phi vera_layer_set_mapbase::layer#3 = 0 [phi:conio_x16_init::@7->vera_layer_set_mapbase#1] -- vbuaa=vbuc1 + lda #0 + jsr vera_layer_set_mapbase + // [24] phi from conio_x16_init::@7 to conio_x16_init::@8 [phi:conio_x16_init::@7->conio_x16_init::@8] + // conio_x16_init::@8 + // vera_layer_set_mapbase(1,0x00) + // [25] call vera_layer_set_mapbase + // [109] phi from conio_x16_init::@8 to vera_layer_set_mapbase [phi:conio_x16_init::@8->vera_layer_set_mapbase] + // [109] phi vera_layer_set_mapbase::mapbase#3 = 0 [phi:conio_x16_init::@8->vera_layer_set_mapbase#0] -- vbuxx=vbuc1 + ldx #0 + // [109] phi vera_layer_set_mapbase::layer#3 = 1 [phi:conio_x16_init::@8->vera_layer_set_mapbase#1] -- vbuaa=vbuc1 + lda #1 + jsr vera_layer_set_mapbase + // conio_x16_init::@9 + // if(line>=CONIO_HEIGHT) + // [26] if(conio_x16_init::line#0conio_x16_init::@1] + // [28] phi conio_x16_init::line#3 = conio_x16_init::line#1 [phi:conio_x16_init::@2/conio_x16_init::@9->conio_x16_init::@1#0] -- register_copy + // conio_x16_init::@1 + __b1: + // gotoxy(0, line) + // [29] gotoxy::y#0 = conio_x16_init::line#3 -- vbuxx=vbuz1 + ldx.z line + // [30] call gotoxy + // [114] phi from conio_x16_init::@1 to gotoxy [phi:conio_x16_init::@1->gotoxy] + // [114] phi gotoxy::y#3 = gotoxy::y#0 [phi:conio_x16_init::@1->gotoxy#0] -- register_copy + jsr gotoxy + // conio_x16_init::@return + // } + // [31] return + rts +} + // main +main: { + .label BANK_SPRITE = $12000 + // Load in bank 9. + .label VRAM_SPRITE = $10000 + .label SPRITE_ATTR = $43 + // vera_layer_set_text_color_mode( 1, VERA_LAYER_CONFIG_16C ) + // [33] call vera_layer_set_text_color_mode + // [127] phi from main to vera_layer_set_text_color_mode [phi:main->vera_layer_set_text_color_mode] + // [127] phi vera_layer_set_text_color_mode::layer#3 = 1 [phi:main->vera_layer_set_text_color_mode#0] -- vbuaa=vbuc1 + lda #1 + jsr vera_layer_set_text_color_mode + // [34] phi from main to main::@1 [phi:main->main::@1] + // main::@1 + // screenlayer(1) + // [35] call screenlayer + jsr screenlayer + // [36] phi from main::@1 to main::@2 [phi:main::@1->main::@2] + // main::@2 + // clrscr() + // [37] call clrscr + jsr clrscr + // [38] phi from main::@2 to main::@3 [phi:main::@2->main::@3] + // main::@3 + // printf("\n\nsprite banked file load and display demo.\n") + // [39] call cputs + // [165] phi from main::@3 to cputs [phi:main::@3->cputs] + jsr cputs + // main::@4 + // SPRITE_ATTR = { <(VRAM_SPRITE/32)|VERA_SPRITE_8BPP, 320-32, 240-32, 0x0c, 0xf1 } + // [40] *(&main::SPRITE_ATTR) = memcpy(*(&$0), struct VERA_SPRITE, SIZEOF_STRUCT_VERA_SPRITE) -- _deref_pssc1=_deref_pssc2_memcpy_vbuc3 + ldy #SIZEOF_STRUCT_VERA_SPRITE + !: + lda __0-1,y + sta SPRITE_ATTR-1,y + dey + bne !- + // LoadFileBanked(8, "SPRITE", BANK_SPRITE ) + // [41] call LoadFileBanked + jsr LoadFileBanked + // [42] phi from main::@4 to main::@5 [phi:main::@4->main::@5] + // main::@5 + // bnkcpy_vram_address(VERA_PALETTE+32, BANK_SPRITE-2, 32) + // [43] call bnkcpy_vram_address + // [182] phi from main::@5 to bnkcpy_vram_address [phi:main::@5->bnkcpy_vram_address] + // [182] phi bnkcpy_vram_address::num#2 = $20 [phi:main::@5->bnkcpy_vram_address#0] -- vduz1=vbuc1 + lda #$20 + sta.z bnkcpy_vram_address.num + lda #0 + sta.z bnkcpy_vram_address.num+1 + sta.z bnkcpy_vram_address.num+2 + sta.z bnkcpy_vram_address.num+3 + // [182] phi bnkcpy_vram_address::beg#0 = main::BANK_SPRITE-2 [phi:main::@5->bnkcpy_vram_address#1] -- vduz1=vduc1 + lda #BANK_SPRITE-2 + sta.z bnkcpy_vram_address.beg+1 + lda #>$10 + sta.z bnkcpy_vram_address.beg+2 + lda #>BANK_SPRITE-2>>$10 + sta.z bnkcpy_vram_address.beg+3 + // [182] phi bnkcpy_vram_address::vdest#2 = VERA_PALETTE+$20 [phi:main::@5->bnkcpy_vram_address#2] -- vduz1=vduc1 + lda #VERA_PALETTE+$20 + sta.z bnkcpy_vram_address.vdest+1 + lda #>$10 + sta.z bnkcpy_vram_address.vdest+2 + lda #>VERA_PALETTE+$20>>$10 + sta.z bnkcpy_vram_address.vdest+3 + jsr bnkcpy_vram_address + // [44] phi from main::@5 to main::@6 [phi:main::@5->main::@6] + // main::@6 + // bnkcpy_vram_address(VRAM_SPRITE, BANK_SPRITE+32-2, 64*32) + // [45] call bnkcpy_vram_address + // [182] phi from main::@6 to bnkcpy_vram_address [phi:main::@6->bnkcpy_vram_address] + // [182] phi bnkcpy_vram_address::num#2 = (word)$40*$20 [phi:main::@6->bnkcpy_vram_address#0] -- vduz1=vduc1 + lda #<$40*$20 + sta.z bnkcpy_vram_address.num + lda #>$40*$20 + sta.z bnkcpy_vram_address.num+1 + lda #<$40*$20>>$10 + sta.z bnkcpy_vram_address.num+2 + lda #>$40*$20>>$10 + sta.z bnkcpy_vram_address.num+3 + // [182] phi bnkcpy_vram_address::beg#0 = main::BANK_SPRITE+$20-2 [phi:main::@6->bnkcpy_vram_address#1] -- vduz1=vduc1 + lda #BANK_SPRITE+$20-2 + sta.z bnkcpy_vram_address.beg+1 + lda #>$10 + sta.z bnkcpy_vram_address.beg+2 + lda #>BANK_SPRITE+$20-2>>$10 + sta.z bnkcpy_vram_address.beg+3 + // [182] phi bnkcpy_vram_address::vdest#2 = main::VRAM_SPRITE [phi:main::@6->bnkcpy_vram_address#2] -- vduz1=vduc1 + lda #VRAM_SPRITE + sta.z bnkcpy_vram_address.vdest+1 + lda #>$10 + sta.z bnkcpy_vram_address.vdest+2 + lda #>VRAM_SPRITE>>$10 + sta.z bnkcpy_vram_address.vdest+3 + jsr bnkcpy_vram_address + // main::@7 + // SPRITE_ATTR.ADDR = <(VRAM_SPRITE/32)|VERA_SPRITE_4BPP + // [46] *((word*)&main::SPRITE_ATTR) = VRAM_SPRITE/$20&$ffff + sta.z SPRITE_ATTR+1 + // SPRITE_ATTR.X = 100 + // [47] *((word*)&main::SPRITE_ATTR+OFFSET_STRUCT_VERA_SPRITE_X) = $64 -- _deref_pwuc1=vbuc2 + lda #0 + sta SPRITE_ATTR+OFFSET_STRUCT_VERA_SPRITE_X+1 + lda #<$64 + sta SPRITE_ATTR+OFFSET_STRUCT_VERA_SPRITE_X + // SPRITE_ATTR.Y = 100 + // [48] *((word*)&main::SPRITE_ATTR+OFFSET_STRUCT_VERA_SPRITE_Y) = $64 -- _deref_pwuc1=vbuc2 + lda #0 + sta SPRITE_ATTR+OFFSET_STRUCT_VERA_SPRITE_Y+1 + lda #<$64 + sta SPRITE_ATTR+OFFSET_STRUCT_VERA_SPRITE_Y + // memcpy_to_vram((char)>VERA_SPRITE_ATTR, vera_layer_mode_tile] + jsr vera_layer_mode_tile + // [55] phi from vera_layer_mode_text to vera_layer_mode_text::@1 [phi:vera_layer_mode_text->vera_layer_mode_text::@1] + // vera_layer_mode_text::@1 + // vera_layer_set_text_color_mode( layer, VERA_LAYER_CONFIG_16C ) + // [56] call vera_layer_set_text_color_mode + // [127] phi from vera_layer_mode_text::@1 to vera_layer_set_text_color_mode [phi:vera_layer_mode_text::@1->vera_layer_set_text_color_mode] + // [127] phi vera_layer_set_text_color_mode::layer#3 = vera_layer_mode_text::layer#0 [phi:vera_layer_mode_text::@1->vera_layer_set_text_color_mode#0] -- vbuaa=vbuc1 + lda #layer + jsr vera_layer_set_text_color_mode + // vera_layer_mode_text::@return + // } + // [57] return + rts +} + // screensize +// Return the current screen size. +screensize: { + .label x = conio_screen_width + .label y = conio_screen_height + // hscale = (*VERA_DC_HSCALE) >> 7 + // [58] screensize::hscale#0 = *VERA_DC_HSCALE >> 7 -- vbuaa=_deref_pbuc1_ror_7 + lda VERA_DC_HSCALE + rol + rol + and #1 + // 40 << hscale + // [59] screensize::$1 = $28 << screensize::hscale#0 -- vbuaa=vbuc1_rol_vbuaa + tay + lda #$28 + cpy #0 + beq !e+ + !: + asl + dey + bne !- + !e: + // *x = 40 << hscale + // [60] *screensize::x#0 = screensize::$1 -- _deref_pbuc1=vbuaa + sta.z x + // vscale = (*VERA_DC_VSCALE) >> 7 + // [61] screensize::vscale#0 = *VERA_DC_VSCALE >> 7 -- vbuaa=_deref_pbuc1_ror_7 + lda VERA_DC_VSCALE + rol + rol + and #1 + // 30 << vscale + // [62] screensize::$3 = $1e << screensize::vscale#0 -- vbuaa=vbuc1_rol_vbuaa + tay + lda #$1e + cpy #0 + beq !e+ + !: + asl + dey + bne !- + !e: + // *y = 30 << vscale + // [63] *screensize::y#0 = screensize::$3 -- _deref_pbuc1=vbuaa + sta.z y + // screensize::@return + // } + // [64] return + rts +} + // screenlayer +// Set the layer with which the conio will interact. +// - layer: value of 0 or 1. +screenlayer: { + .label __2 = $1e + .label __4 = $20 + .label __5 = $31 + .label vera_layer_get_width1_config = $33 + .label vera_layer_get_width1_return = $1e + .label vera_layer_get_height1_config = $22 + .label vera_layer_get_height1_return = $31 + // conio_screen_layer = layer + // [65] conio_screen_layer = 1 -- vbuz1=vbuc1 + lda #1 + sta.z conio_screen_layer + // vera_layer_get_mapbase_bank(conio_screen_layer) + // [66] vera_layer_get_mapbase_bank::layer#0 = conio_screen_layer -- vbuxx=vbuz1 + tax + // [67] call vera_layer_get_mapbase_bank + jsr vera_layer_get_mapbase_bank + // [68] vera_layer_get_mapbase_bank::return#2 = vera_layer_get_mapbase_bank::return#0 + // screenlayer::@3 + // [69] CONIO_SCREEN_BANK#14 = vera_layer_get_mapbase_bank::return#2 -- vbuz1=vbuaa + sta.z CONIO_SCREEN_BANK + // vera_layer_get_mapbase_offset(conio_screen_layer) + // [70] vera_layer_get_mapbase_offset::layer#0 = conio_screen_layer -- vbuaa=vbuz1 + lda.z conio_screen_layer + // [71] call vera_layer_get_mapbase_offset + jsr vera_layer_get_mapbase_offset + // [72] vera_layer_get_mapbase_offset::return#2 = vera_layer_get_mapbase_offset::return#0 + // screenlayer::@4 + // [73] CONIO_SCREEN_TEXT#16 = vera_layer_get_mapbase_offset::return#2 -- vwuz1=vwuz2 + lda.z vera_layer_get_mapbase_offset.return + sta.z CONIO_SCREEN_TEXT + lda.z vera_layer_get_mapbase_offset.return+1 + sta.z CONIO_SCREEN_TEXT+1 + // vera_layer_get_width(conio_screen_layer) + // [74] screenlayer::vera_layer_get_width1_layer#0 = conio_screen_layer -- vbuaa=vbuz1 + lda.z conio_screen_layer + // screenlayer::vera_layer_get_width1 + // config = vera_layer_config[layer] + // [75] screenlayer::vera_layer_get_width1_$2 = screenlayer::vera_layer_get_width1_layer#0 << 1 -- vbuaa=vbuaa_rol_1 + asl + // [76] screenlayer::vera_layer_get_width1_config#0 = vera_layer_config[screenlayer::vera_layer_get_width1_$2] -- pbuz1=qbuc1_derefidx_vbuaa + tay + lda vera_layer_config,y + sta.z vera_layer_get_width1_config + lda vera_layer_config+1,y + sta.z vera_layer_get_width1_config+1 + // *config & VERA_LAYER_WIDTH_MASK + // [77] screenlayer::vera_layer_get_width1_$0 = *screenlayer::vera_layer_get_width1_config#0 & VERA_LAYER_WIDTH_MASK -- vbuaa=_deref_pbuz1_band_vbuc1 + lda #VERA_LAYER_WIDTH_MASK + ldy #0 + and (vera_layer_get_width1_config),y + // (*config & VERA_LAYER_WIDTH_MASK) >> 4 + // [78] screenlayer::vera_layer_get_width1_$1 = screenlayer::vera_layer_get_width1_$0 >> 4 -- vbuaa=vbuaa_ror_4 + lsr + lsr + lsr + lsr + // return VERA_LAYER_WIDTH[ (*config & VERA_LAYER_WIDTH_MASK) >> 4]; + // [79] screenlayer::vera_layer_get_width1_$3 = screenlayer::vera_layer_get_width1_$1 << 1 -- vbuaa=vbuaa_rol_1 + asl + // [80] screenlayer::vera_layer_get_width1_return#0 = VERA_LAYER_WIDTH[screenlayer::vera_layer_get_width1_$3] -- vwuz1=pwuc1_derefidx_vbuaa + tay + lda VERA_LAYER_WIDTH,y + sta.z vera_layer_get_width1_return + lda VERA_LAYER_WIDTH+1,y + sta.z vera_layer_get_width1_return+1 + // screenlayer::vera_layer_get_width1_@return + // } + // [81] screenlayer::vera_layer_get_width1_return#1 = screenlayer::vera_layer_get_width1_return#0 + // screenlayer::@1 + // vera_layer_get_width(conio_screen_layer) + // [82] screenlayer::$2 = screenlayer::vera_layer_get_width1_return#1 + // conio_width = vera_layer_get_width(conio_screen_layer) + // [83] conio_width = screenlayer::$2 -- vwuz1=vwuz2 + lda.z __2 + sta.z conio_width + lda.z __2+1 + sta.z conio_width+1 + // vera_layer_get_rowshift(conio_screen_layer) + // [84] vera_layer_get_rowshift::layer#0 = conio_screen_layer -- vbuxx=vbuz1 + ldx.z conio_screen_layer + // [85] call vera_layer_get_rowshift + jsr vera_layer_get_rowshift + // [86] vera_layer_get_rowshift::return#2 = vera_layer_get_rowshift::return#0 + // screenlayer::@5 + // [87] screenlayer::$3 = vera_layer_get_rowshift::return#2 + // conio_rowshift = vera_layer_get_rowshift(conio_screen_layer) + // [88] conio_rowshift = screenlayer::$3 -- vbuz1=vbuaa + sta.z conio_rowshift + // vera_layer_get_rowskip(conio_screen_layer) + // [89] vera_layer_get_rowskip::layer#0 = conio_screen_layer -- vbuaa=vbuz1 + lda.z conio_screen_layer + // [90] call vera_layer_get_rowskip + jsr vera_layer_get_rowskip + // [91] vera_layer_get_rowskip::return#2 = vera_layer_get_rowskip::return#0 + // screenlayer::@6 + // [92] screenlayer::$4 = vera_layer_get_rowskip::return#2 + // conio_rowskip = vera_layer_get_rowskip(conio_screen_layer) + // [93] conio_rowskip = screenlayer::$4 -- vwuz1=vwuz2 + lda.z __4 + sta.z conio_rowskip + lda.z __4+1 + sta.z conio_rowskip+1 + // vera_layer_get_height(conio_screen_layer) + // [94] screenlayer::vera_layer_get_height1_layer#0 = conio_screen_layer -- vbuaa=vbuz1 + lda.z conio_screen_layer + // screenlayer::vera_layer_get_height1 + // config = vera_layer_config[layer] + // [95] screenlayer::vera_layer_get_height1_$2 = screenlayer::vera_layer_get_height1_layer#0 << 1 -- vbuaa=vbuaa_rol_1 + asl + // [96] screenlayer::vera_layer_get_height1_config#0 = vera_layer_config[screenlayer::vera_layer_get_height1_$2] -- pbuz1=qbuc1_derefidx_vbuaa + tay + lda vera_layer_config,y + sta.z vera_layer_get_height1_config + lda vera_layer_config+1,y + sta.z vera_layer_get_height1_config+1 + // *config & VERA_LAYER_HEIGHT_MASK + // [97] screenlayer::vera_layer_get_height1_$0 = *screenlayer::vera_layer_get_height1_config#0 & VERA_LAYER_HEIGHT_MASK -- vbuaa=_deref_pbuz1_band_vbuc1 + lda #VERA_LAYER_HEIGHT_MASK + ldy #0 + and (vera_layer_get_height1_config),y + // (*config & VERA_LAYER_HEIGHT_MASK) >> 6 + // [98] screenlayer::vera_layer_get_height1_$1 = screenlayer::vera_layer_get_height1_$0 >> 6 -- vbuaa=vbuaa_ror_6 + rol + rol + rol + and #3 + // return VERA_LAYER_HEIGHT[ (*config & VERA_LAYER_HEIGHT_MASK) >> 6]; + // [99] screenlayer::vera_layer_get_height1_$3 = screenlayer::vera_layer_get_height1_$1 << 1 -- vbuaa=vbuaa_rol_1 + asl + // [100] screenlayer::vera_layer_get_height1_return#0 = VERA_LAYER_HEIGHT[screenlayer::vera_layer_get_height1_$3] -- vwuz1=pwuc1_derefidx_vbuaa + tay + lda VERA_LAYER_HEIGHT,y + sta.z vera_layer_get_height1_return + lda VERA_LAYER_HEIGHT+1,y + sta.z vera_layer_get_height1_return+1 + // screenlayer::vera_layer_get_height1_@return + // } + // [101] screenlayer::vera_layer_get_height1_return#1 = screenlayer::vera_layer_get_height1_return#0 + // screenlayer::@2 + // vera_layer_get_height(conio_screen_layer) + // [102] screenlayer::$5 = screenlayer::vera_layer_get_height1_return#1 + // conio_height = vera_layer_get_height(conio_screen_layer) + // [103] conio_height = screenlayer::$5 -- vwuz1=vwuz2 + lda.z __5 + sta.z conio_height + lda.z __5+1 + sta.z conio_height+1 + // screenlayer::@return + // } + // [104] return + rts +} + // vera_layer_set_textcolor +// Set the front color for text output. The old front text color setting is returned. +// - layer: Value of 0 or 1. +// - color: a 4 bit value ( decimal between 0 and 15) when the VERA works in 16x16 color text mode. +// An 8 bit value (decimal between 0 and 255) when the VERA works in 256 text mode. +// Note that on the VERA, the transparent color has value 0. +vera_layer_set_textcolor: { + .const layer = 1 + // vera_layer_textcolor[layer] = color + // [105] *(vera_layer_textcolor+vera_layer_set_textcolor::layer#0) = WHITE -- _deref_pbuc1=vbuc2 + lda #WHITE + sta vera_layer_textcolor+layer + // vera_layer_set_textcolor::@return + // } + // [106] return + rts +} + // vera_layer_set_backcolor +// Set the back color for text output. The old back text color setting is returned. +// - layer: Value of 0 or 1. +// - color: a 4 bit value ( decimal between 0 and 15). +// This will only work when the VERA is in 16 color mode! +// Note that on the VERA, the transparent color has value 0. +vera_layer_set_backcolor: { + .const layer = 1 + // vera_layer_backcolor[layer] = color + // [107] *(vera_layer_backcolor+vera_layer_set_backcolor::layer#0) = BLUE -- _deref_pbuc1=vbuc2 + lda #BLUE + sta vera_layer_backcolor+layer + // vera_layer_set_backcolor::@return + // } + // [108] return + rts +} + // vera_layer_set_mapbase +// Set the base of the map layer with which the conio will interact. +// - layer: Value of 0 or 1. +// - mapbase: Specifies the base address of the tile map. +// Note that the register only specifies bits 16:9 of the address, +// so the resulting address in the VERA VRAM is always aligned to a multiple of 512 bytes. +// vera_layer_set_mapbase(byte register(A) layer, byte register(X) mapbase) +vera_layer_set_mapbase: { + .label addr = $1e + // addr = vera_layer_mapbase[layer] + // [110] vera_layer_set_mapbase::$0 = vera_layer_set_mapbase::layer#3 << 1 -- vbuaa=vbuaa_rol_1 + asl + // [111] vera_layer_set_mapbase::addr#0 = vera_layer_mapbase[vera_layer_set_mapbase::$0] -- pbuz1=qbuc1_derefidx_vbuaa + tay + lda vera_layer_mapbase,y + sta.z addr + lda vera_layer_mapbase+1,y + sta.z addr+1 + // *addr = mapbase + // [112] *vera_layer_set_mapbase::addr#0 = vera_layer_set_mapbase::mapbase#3 -- _deref_pbuz1=vbuxx + txa + ldy #0 + sta (addr),y + // vera_layer_set_mapbase::@return + // } + // [113] return + rts +} + // gotoxy +// Set the cursor to the specified position +// gotoxy(byte register(X) y) +gotoxy: { + .label __6 = $20 + .label line_offset = $20 + // if(y>CONIO_HEIGHT) + // [115] if(gotoxy::y#3<=conio_screen_height) goto gotoxy::@4 -- vbuxx_le_vbuz1_then_la1 + lda.z conio_screen_height + stx.z $ff + cmp.z $ff + bcs __b1 + // [117] phi from gotoxy to gotoxy::@1 [phi:gotoxy->gotoxy::@1] + // [117] phi gotoxy::y#4 = 0 [phi:gotoxy->gotoxy::@1#0] -- vbuxx=vbuc1 + ldx #0 + // [116] phi from gotoxy to gotoxy::@4 [phi:gotoxy->gotoxy::@4] + // gotoxy::@4 + // [117] phi from gotoxy::@4 to gotoxy::@1 [phi:gotoxy::@4->gotoxy::@1] + // [117] phi gotoxy::y#4 = gotoxy::y#3 [phi:gotoxy::@4->gotoxy::@1#0] -- register_copy + // gotoxy::@1 + __b1: + // if(x>=CONIO_WIDTH) + // [118] if(0gotoxy::@3] + // gotoxy::@3 + // gotoxy::@2 + // conio_cursor_x[conio_screen_layer] = x + // [120] conio_cursor_x[conio_screen_layer] = 0 -- pbuc1_derefidx_vbuz1=vbuc2 + lda #0 + ldy.z conio_screen_layer + sta conio_cursor_x,y + // conio_cursor_y[conio_screen_layer] = y + // [121] conio_cursor_y[conio_screen_layer] = gotoxy::y#4 -- pbuc1_derefidx_vbuz1=vbuxx + txa + sta conio_cursor_y,y + // (unsigned int)y << conio_rowshift + // [122] gotoxy::$6 = (word)gotoxy::y#4 -- vwuz1=_word_vbuxx + txa + sta.z __6 + lda #0 + sta.z __6+1 + // line_offset = (unsigned int)y << conio_rowshift + // [123] gotoxy::line_offset#0 = gotoxy::$6 << conio_rowshift -- vwuz1=vwuz1_rol_vbuz2 + ldy.z conio_rowshift + beq !e+ + !: + asl.z line_offset + rol.z line_offset+1 + dey + bne !- + !e: + // conio_line_text[conio_screen_layer] = line_offset + // [124] gotoxy::$5 = conio_screen_layer << 1 -- vbuaa=vbuz1_rol_1 + lda.z conio_screen_layer + asl + // [125] conio_line_text[gotoxy::$5] = gotoxy::line_offset#0 -- pwuc1_derefidx_vbuaa=vwuz1 + tay + lda.z line_offset + sta conio_line_text,y + lda.z line_offset+1 + sta conio_line_text+1,y + // gotoxy::@return + // } + // [126] return + rts +} + // vera_layer_set_text_color_mode +// Set the configuration of the layer text color mode. +// - layer: Value of 0 or 1. +// - color_mode: Specifies the color mode to be VERA_LAYER_CONFIG_16 or VERA_LAYER_CONFIG_256 for text mode. +// vera_layer_set_text_color_mode(byte register(A) layer) +vera_layer_set_text_color_mode: { + .label addr = $22 + // addr = vera_layer_config[layer] + // [128] vera_layer_set_text_color_mode::$0 = vera_layer_set_text_color_mode::layer#3 << 1 -- vbuaa=vbuaa_rol_1 + asl + // [129] vera_layer_set_text_color_mode::addr#0 = vera_layer_config[vera_layer_set_text_color_mode::$0] -- pbuz1=qbuc1_derefidx_vbuaa + tay + lda vera_layer_config,y + sta.z addr + lda vera_layer_config+1,y + sta.z addr+1 + // *addr &= ~VERA_LAYER_CONFIG_256C + // [130] *vera_layer_set_text_color_mode::addr#0 = *vera_layer_set_text_color_mode::addr#0 & ~VERA_LAYER_CONFIG_256C -- _deref_pbuz1=_deref_pbuz1_band_vbuc1 + lda #VERA_LAYER_CONFIG_256C^$ff + ldy #0 + and (addr),y + sta (addr),y + // *addr |= color_mode + // [131] *vera_layer_set_text_color_mode::addr#0 = *vera_layer_set_text_color_mode::addr#0 -- _deref_pbuz1=_deref_pbuz1 + lda (addr),y + sta (addr),y + // vera_layer_set_text_color_mode::@return + // } + // [132] return + rts +} + // clrscr +// clears the screen and moves the cursor to the upper left-hand corner of the screen. +clrscr: { + .label __1 = $24 + .label line_text = $f + .label color = $24 + // line_text = CONIO_SCREEN_TEXT + // [133] clrscr::line_text#0 = (byte*)CONIO_SCREEN_TEXT#16 -- pbuz1=pbuz2 + lda.z CONIO_SCREEN_TEXT + sta.z line_text + lda.z CONIO_SCREEN_TEXT+1 + sta.z line_text+1 + // vera_layer_get_backcolor(conio_screen_layer) + // [134] vera_layer_get_backcolor::layer#0 = conio_screen_layer -- vbuxx=vbuz1 + ldx.z conio_screen_layer + // [135] call vera_layer_get_backcolor + jsr vera_layer_get_backcolor + // [136] vera_layer_get_backcolor::return#2 = vera_layer_get_backcolor::return#0 + // clrscr::@7 + // [137] clrscr::$0 = vera_layer_get_backcolor::return#2 + // vera_layer_get_backcolor(conio_screen_layer) << 4 + // [138] clrscr::$1 = clrscr::$0 << 4 -- vbuz1=vbuaa_rol_4 + asl + asl + asl + asl + sta.z __1 + // vera_layer_get_textcolor(conio_screen_layer) + // [139] vera_layer_get_textcolor::layer#0 = conio_screen_layer -- vbuxx=vbuz1 + ldx.z conio_screen_layer + // [140] call vera_layer_get_textcolor + jsr vera_layer_get_textcolor + // [141] vera_layer_get_textcolor::return#2 = vera_layer_get_textcolor::return#0 + // clrscr::@8 + // [142] clrscr::$2 = vera_layer_get_textcolor::return#2 + // color = ( vera_layer_get_backcolor(conio_screen_layer) << 4 ) | vera_layer_get_textcolor(conio_screen_layer) + // [143] clrscr::color#0 = clrscr::$1 | clrscr::$2 -- vbuz1=vbuz1_bor_vbuaa + ora.z color + sta.z color + // [144] phi from clrscr::@8 to clrscr::@1 [phi:clrscr::@8->clrscr::@1] + // [144] phi clrscr::line_text#2 = clrscr::line_text#0 [phi:clrscr::@8->clrscr::@1#0] -- register_copy + // [144] phi clrscr::l#2 = 0 [phi:clrscr::@8->clrscr::@1#1] -- vbuxx=vbuc1 + ldx #0 + // clrscr::@1 + __b1: + // for( char l=0;lch + // [154] clrscr::$6 = > clrscr::line_text#2 -- vbuaa=_hi_pbuz1 + lda.z line_text+1 + // *VERA_ADDRX_M = >ch + // [155] *VERA_ADDRX_M = clrscr::$6 -- _deref_pbuc1=vbuaa + sta VERA_ADDRX_M + // CONIO_SCREEN_BANK | VERA_INC_1 + // [156] clrscr::$7 = CONIO_SCREEN_BANK#14 | VERA_INC_1 -- vbuaa=vbuz1_bor_vbuc1 + lda #VERA_INC_1 + ora.z CONIO_SCREEN_BANK + // *VERA_ADDRX_H = CONIO_SCREEN_BANK | VERA_INC_1 + // [157] *VERA_ADDRX_H = clrscr::$7 -- _deref_pbuc1=vbuaa + sta VERA_ADDRX_H + // [158] phi from clrscr::@2 to clrscr::@4 [phi:clrscr::@2->clrscr::@4] + // [158] phi clrscr::c#2 = 0 [phi:clrscr::@2->clrscr::@4#0] -- vbuyy=vbuc1 + ldy #0 + // clrscr::@4 + __b4: + // for( char c=0;cclrscr::@1] + // [144] phi clrscr::line_text#2 = clrscr::line_text#1 [phi:clrscr::@6->clrscr::@1#0] -- register_copy + // [144] phi clrscr::l#2 = clrscr::l#1 [phi:clrscr::@6->clrscr::@1#1] -- register_copy + jmp __b1 + // clrscr::@5 + __b5: + // *VERA_DATA0 = ' ' + // [162] *VERA_DATA0 = ' ' -- _deref_pbuc1=vbuc2 + lda #' ' + sta VERA_DATA0 + // *VERA_DATA0 = color + // [163] *VERA_DATA0 = clrscr::color#0 -- _deref_pbuc1=vbuz1 + lda.z color + sta VERA_DATA0 + // for( char c=0;cclrscr::@4] + // [158] phi clrscr::c#2 = clrscr::c#1 [phi:clrscr::@5->clrscr::@4#0] -- register_copy + jmp __b4 +} + // cputs +// Output a NUL-terminated string at the current cursor position +// cputs(byte* zp($f) s) +cputs: { + .label s = $f + // [166] phi from cputs to cputs::@1 [phi:cputs->cputs::@1] + // [166] phi cputs::s#2 = main::s [phi:cputs->cputs::@1#0] -- pbuz1=pbuc1 + lda #main.s + sta.z s+1 + // cputs::@1 + __b1: + // while(c=*s++) + // [167] cputs::c#1 = *cputs::s#2 -- vbuaa=_deref_pbuz1 + ldy #0 + lda (s),y + // [168] cputs::s#0 = ++ cputs::s#2 -- pbuz1=_inc_pbuz1 + inc.z s + bne !+ + inc.z s+1 + !: + // [169] if(0!=cputs::c#1) goto cputs::@2 -- 0_neq_vbuaa_then_la1 + cmp #0 + bne __b2 + // cputs::@return + // } + // [170] return + rts + // cputs::@2 + __b2: + // cputc(c) + // [171] cputc::c#0 = cputs::c#1 -- vbuz1=vbuaa + sta.z cputc.c + // [172] call cputc + jsr cputc + // [166] phi from cputs::@2 to cputs::@1 [phi:cputs::@2->cputs::@1] + // [166] phi cputs::s#2 = cputs::s#0 [phi:cputs::@2->cputs::@1#0] -- register_copy + jmp __b1 +} + // LoadFileBanked +// Load a file to memory +// Returns a status: +// - 0xff: Success +// - other: Kernal Error Code (https://commodore.ca/manuals/pdfs/commodore_error_messages.pdf) +LoadFileBanked: { + .const device = 8 + .const bank = ((>((main.BANK_SPRITE&$ffff)))>>5)+(<((main.BANK_SPRITE>>$10)<<3)) + // setnam(filename) + // [173] setnam::filename = main::filename -- pbuz1=pbuc1 + lda #main.filename + sta.z setnam.filename+1 + // [174] call setnam + jsr setnam + // LoadFileBanked::@1 + // setlfs(device) + // [175] setlfs::device = LoadFileBanked::device#0 -- vbuz1=vbuc1 + lda #device + sta.z setlfs.device + // [176] call setlfs + jsr setlfs + // LoadFileBanked::@2 + // VIA1->PORT_A = (char)bank + // [177] *((byte*)VIA1+OFFSET_STRUCT_MOS6522_VIA_PORT_A) = LoadFileBanked::bank#0 -- _deref_pbuc1=vbuc2 + lda #bank + sta VIA1+OFFSET_STRUCT_MOS6522_VIA_PORT_A + // load(addr, 0) + // [178] load::address = (byte*)0+$a000 -- pbuz1=pbuc1 + lda #<0+$a000 + sta.z load.address + lda #>0+$a000 + sta.z load.address+1 + // [179] load::verify = 0 -- vbuz1=vbuc1 + lda #0 + sta.z load.verify + // [180] call load + jsr load + // LoadFileBanked::@return + // } + // [181] return + rts +} + // bnkcpy_vram_address +// Copy block of banked internal memory (256 banks at A000-BFFF) to VERA VRAM. +// Copies the values of num bytes from the location pointed to by source directly to the memory block pointed to by destination in VRAM. +// - vdest: dword of the destination address in VRAM +// - src: dword of source banked address in RAM. This address is a linair project of the banked memory of 512K to 2048K. +// - num: dword of the number of bytes to copy +// bnkcpy_vram_address(dword zp(3) vdest, dword zp(7) num) +bnkcpy_vram_address: { + .label __0 = $2b + .label __2 = $2d + .label __4 = $35 + .label __7 = $37 + .label __8 = $37 + .label __10 = $3b + .label __12 = $3d + .label __13 = $3d + .label __14 = $3f + .label __15 = $3f + .label __17 = $3d + .label __18 = $f + .label __23 = $3d + .label __24 = $41 + .label beg = $b + .label end = 7 + // select the bank + .label addr = $f + .label pos = $b + .label vdest = 3 + .label num = 7 + // *VERA_CTRL &= ~VERA_ADDRSEL + // [183] *VERA_CTRL = *VERA_CTRL & ~VERA_ADDRSEL -- _deref_pbuc1=_deref_pbuc1_band_vbuc2 + // Select DATA0 + lda #VERA_ADDRSEL^$ff + and VERA_CTRL + sta VERA_CTRL + // ( bnkcpy_vram_address::$2 -- vbuaa=_hi_vwuz1 + // *VERA_ADDRX_M = >(vdest + // [190] bnkcpy_vram_address::$4 = > bnkcpy_vram_address::vdest#2 -- vwuz1=_hi_vduz2 + lda.z vdest+2 + sta.z __4 + lda.z vdest+3 + sta.z __4+1 + // <(>vdest) + // [191] bnkcpy_vram_address::$5 = < bnkcpy_vram_address::$4 -- vbuaa=_lo_vwuz1 + lda.z __4 + // *VERA_ADDRX_H = <(>vdest) + // [192] *VERA_ADDRX_H = bnkcpy_vram_address::$5 -- _deref_pbuc1=vbuaa + sta VERA_ADDRX_H + // *VERA_ADDRX_H |= VERA_INC_1 + // [193] *VERA_ADDRX_H = *VERA_ADDRX_H | VERA_INC_1 -- _deref_pbuc1=_deref_pbuc1_bor_vbuc2 + lda #VERA_INC_1 + ora VERA_ADDRX_H + sta VERA_ADDRX_H + // end = src+num + // [194] bnkcpy_vram_address::end#0 = bnkcpy_vram_address::beg#0 + bnkcpy_vram_address::num#2 -- vduz1=vduz2_plus_vduz1 + lda.z end + clc + adc.z beg + sta.z end + lda.z end+1 + adc.z beg+1 + sta.z end+1 + lda.z end+2 + adc.z beg+2 + sta.z end+2 + lda.z end+3 + adc.z beg+3 + sta.z end+3 + // >beg + // [195] bnkcpy_vram_address::$7 = > bnkcpy_vram_address::beg#0 -- vwuz1=_hi_vduz2 + lda.z beg+2 + sta.z __7 + lda.z beg+3 + sta.z __7+1 + // (>beg)<<8 + // [196] bnkcpy_vram_address::$8 = bnkcpy_vram_address::$7 << 8 -- vwuz1=vwuz1_rol_8 + lda.z __8 + sta.z __8+1 + lda #0 + sta.z __8 + // <(>beg)<<8 + // [197] bnkcpy_vram_address::$9 = < bnkcpy_vram_address::$8 -- vbuyy=_lo_vwuz1 + tay + // ( bnkcpy_vram_address::$10 -- vbuxx=_hi_vwuz1 + tax + // ((word)<(>beg)<<8)|>(beg)<<8)|>(>5 + // [202] bnkcpy_vram_address::$13 = bnkcpy_vram_address::$12 >> 5 -- vwuz1=vwuz1_ror_5 + lsr.z __13+1 + ror.z __13 + lsr.z __13+1 + ror.z __13 + lsr.z __13+1 + ror.z __13 + lsr.z __13+1 + ror.z __13 + lsr.z __13+1 + ror.z __13 + // >beg + // [203] bnkcpy_vram_address::$14 = > bnkcpy_vram_address::beg#0 -- vwuz1=_hi_vduz2 + lda.z beg+2 + sta.z __14 + lda.z beg+3 + sta.z __14+1 + // (>beg)<<3 + // [204] bnkcpy_vram_address::$15 = bnkcpy_vram_address::$14 << 3 -- vwuz1=vwuz1_rol_3 + asl.z __15 + rol.z __15+1 + asl.z __15 + rol.z __15+1 + asl.z __15 + rol.z __15+1 + // <(>beg)<<3 + // [205] bnkcpy_vram_address::$16 = < bnkcpy_vram_address::$15 -- vbuaa=_lo_vwuz1 + lda.z __15 + // ((((word)<(>beg)<<8)|>(>5)+((word)<(>beg)<<3) + // [206] bnkcpy_vram_address::$24 = (word)bnkcpy_vram_address::$16 -- vwuz1=_word_vbuaa + sta.z __24 + tya + sta.z __24+1 + // [207] bnkcpy_vram_address::$17 = bnkcpy_vram_address::$13 + bnkcpy_vram_address::$24 -- vwuz1=vwuz1_plus_vwuz2 + lda.z __17 + clc + adc.z __24 + sta.z __17 + lda.z __17+1 + adc.z __24+1 + sta.z __17+1 + // bank = (byte)(((((word)<(>beg)<<8)|>(>5)+((word)<(>beg)<<3)) + // [208] bnkcpy_vram_address::bank#0 = (byte)bnkcpy_vram_address::$17 -- vbuxx=_byte_vwuz1 + lda.z __17 + tax + // $1fff + sta.z addr+1 + // addr += 0xA000 + // [211] bnkcpy_vram_address::addr#1 = (byte*)bnkcpy_vram_address::addr#0 + $a000 -- pbuz1=pbuz1_plus_vwuc1 + // stip off the top 3 bits, which are representing the bank of the word! + clc + lda.z addr + adc #<$a000 + sta.z addr + lda.z addr+1 + adc #>$a000 + sta.z addr+1 + // POKE + // [212] *((byte*) 40801) = bnkcpy_vram_address::bank#0 -- _deref_pbuc1=vbuxx + stx $9f61 + // [213] phi from bnkcpy_vram_address bnkcpy_vram_address::@3 to bnkcpy_vram_address::@1 [phi:bnkcpy_vram_address/bnkcpy_vram_address::@3->bnkcpy_vram_address::@1] + __b1: + // [213] phi bnkcpy_vram_address::bank#2 = bnkcpy_vram_address::bank#0 [phi:bnkcpy_vram_address/bnkcpy_vram_address::@3->bnkcpy_vram_address::@1#0] -- register_copy + // [213] phi bnkcpy_vram_address::addr#4 = bnkcpy_vram_address::addr#1 [phi:bnkcpy_vram_address/bnkcpy_vram_address::@3->bnkcpy_vram_address::@1#1] -- register_copy + // [213] phi bnkcpy_vram_address::pos#2 = bnkcpy_vram_address::beg#0 [phi:bnkcpy_vram_address/bnkcpy_vram_address::@3->bnkcpy_vram_address::@1#2] -- register_copy + // select the bank + // bnkcpy_vram_address::@1 + // for(dword pos=beg; pos$c000 + bne __b3 + lda.z addr + cmp #<$c000 + bne __b3 + // bnkcpy_vram_address::@4 + // POKE(0x9f61, (byte)++bank); + // [217] bnkcpy_vram_address::bank#1 = ++ bnkcpy_vram_address::bank#2 -- vbuxx=_inc_vbuxx + inx + // POKE + // [218] *((byte*) 40801) = bnkcpy_vram_address::bank#1 -- _deref_pbuc1=vbuxx + stx $9f61 + // [219] phi from bnkcpy_vram_address::@4 to bnkcpy_vram_address::@3 [phi:bnkcpy_vram_address::@4->bnkcpy_vram_address::@3] + // [219] phi bnkcpy_vram_address::bank#5 = bnkcpy_vram_address::bank#1 [phi:bnkcpy_vram_address::@4->bnkcpy_vram_address::@3#0] -- register_copy + // [219] phi bnkcpy_vram_address::addr#5 = (byte*) 40960 [phi:bnkcpy_vram_address::@4->bnkcpy_vram_address::@3#1] -- pbuz1=pbuc1 + lda #<$a000 + sta.z addr + lda #>$a000 + sta.z addr+1 + // [219] phi from bnkcpy_vram_address::@2 to bnkcpy_vram_address::@3 [phi:bnkcpy_vram_address::@2->bnkcpy_vram_address::@3] + // [219] phi bnkcpy_vram_address::bank#5 = bnkcpy_vram_address::bank#2 [phi:bnkcpy_vram_address::@2->bnkcpy_vram_address::@3#0] -- register_copy + // [219] phi bnkcpy_vram_address::addr#5 = bnkcpy_vram_address::addr#4 [phi:bnkcpy_vram_address::@2->bnkcpy_vram_address::@3#1] -- register_copy + // bnkcpy_vram_address::@3 + __b3: + // *VERA_DATA0 = *addr + // [220] *VERA_DATA0 = *bnkcpy_vram_address::addr#5 -- _deref_pbuc1=_deref_pbuz1 + ldy #0 + lda (addr),y + sta VERA_DATA0 + // addr++; + // [221] bnkcpy_vram_address::addr#2 = ++ bnkcpy_vram_address::addr#5 -- pbuz1=_inc_pbuz1 + inc.z addr + bne !+ + inc.z addr+1 + !: + // for(dword pos=beg; pos>$10 + .label vdest = VERA_SPRITE_ATTR&$ffff + .label src = main.SPRITE_ATTR + .label end = src+SIZEOF_STRUCT_VERA_SPRITE + .label s = $f + // *VERA_CTRL &= ~VERA_ADDRSEL + // [223] *VERA_CTRL = *VERA_CTRL & ~VERA_ADDRSEL -- _deref_pbuc1=_deref_pbuc1_band_vbuc2 + // Select DATA0 + lda #VERA_ADDRSEL^$ff + and VERA_CTRL + sta VERA_CTRL + // *VERA_ADDRX_L = vdest + // [225] *VERA_ADDRX_M = >memcpy_to_vram::vdest#0 -- _deref_pbuc1=vbuc2 + lda #>vdest + sta VERA_ADDRX_M + // *VERA_ADDRX_H = VERA_INC_1 | vbank + // [226] *VERA_ADDRX_H = VERA_INC_1|memcpy_to_vram::vbank#0 -- _deref_pbuc1=vbuc2 + lda #VERA_INC_1|vbank + sta VERA_ADDRX_H + // [227] phi from memcpy_to_vram to memcpy_to_vram::@1 [phi:memcpy_to_vram->memcpy_to_vram::@1] + // [227] phi memcpy_to_vram::s#2 = (byte*)memcpy_to_vram::src#0 [phi:memcpy_to_vram->memcpy_to_vram::@1#0] -- pbuz1=pbuc1 + lda #src + sta.z s+1 + // memcpy_to_vram::@1 + __b1: + // for(char *s = src; s!=end; s++) + // [228] if(memcpy_to_vram::s#2!=memcpy_to_vram::end#0) goto memcpy_to_vram::@2 -- pbuz1_neq_pbuc1_then_la1 + lda.z s+1 + cmp #>end + bne __b2 + lda.z s + cmp #memcpy_to_vram::@1] + // [227] phi memcpy_to_vram::s#2 = memcpy_to_vram::s#1 [phi:memcpy_to_vram::@2->memcpy_to_vram::@1#0] -- register_copy + jmp __b1 +} + // vera_layer_mode_tile +// Set a vera layer in tile mode and configure the: +// - layer: Value of 0 or 1. +// - mapbase_address: A dword typed address (4 bytes), that specifies the full address of the map base. +// The function does the translation from the dword that contains the 17 bit address, +// to the respective mapbase vera register. +// Note that the register only specifies bits 16:9 of the address, +// so the resulting address in the VERA VRAM is always aligned to a multiple of 512 bytes. +// - tilebase_address: A dword typed address (4 bytes), that specifies the base address of the tile map. +// The function does the translation from the dword that contains the 17 bit address, +// to the respective tilebase vera register. +// Note that the resulting vera register holds only specifies bits 16:11 of the address, +// so the resulting address in the VERA VRAM is always aligned to a multiple of 2048 bytes! +// - mapwidth: The width of the map in number of tiles. +// - mapheight: The height of the map in number of tiles. +// - tilewidth: The width of a tile, which can be 8 or 16 pixels. +// - tileheight: The height of a tile, which can be 8 or 16 pixels. +// - color_depth: The color depth in bits per pixel (BPP), which can be 1, 2, 4 or 8. +vera_layer_mode_tile: { + .const mapbase = 0 + .label tilebase_address = vera_layer_mode_text.tilebase_address>>1 + // config + .label config = VERA_LAYER_WIDTH_128|VERA_LAYER_HEIGHT_64 + // vera_layer_mode_tile::@1 + // vera_layer_rowshift[layer] = 8 + // [233] *(vera_layer_rowshift+vera_layer_mode_text::layer#0) = 8 -- _deref_pbuc1=vbuc2 + lda #8 + sta vera_layer_rowshift+vera_layer_mode_text.layer + // vera_layer_rowskip[layer] = 256 + // [234] *(vera_layer_rowskip+vera_layer_mode_text::layer#0*SIZEOF_WORD) = $100 -- _deref_pwuc1=vwuc2 + lda #<$100 + sta vera_layer_rowskip+vera_layer_mode_text.layer*SIZEOF_WORD + lda #>$100 + sta vera_layer_rowskip+vera_layer_mode_text.layer*SIZEOF_WORD+1 + // [235] phi from vera_layer_mode_tile::@1 to vera_layer_mode_tile::@2 [phi:vera_layer_mode_tile::@1->vera_layer_mode_tile::@2] + // vera_layer_mode_tile::@2 + // vera_layer_set_config(layer, config) + // [236] call vera_layer_set_config + jsr vera_layer_set_config + // vera_layer_mode_tile::@4 + // vera_mapbase_offset[layer] = mapbase_address) + // [238] *(vera_mapbase_bank+vera_layer_mode_text::layer#0) = 0 -- _deref_pbuc1=vbuc2 + sta vera_mapbase_bank+vera_layer_mode_text.layer + // vera_mapbase_address[layer] = mapbase_address + // [239] *(vera_mapbase_address+vera_layer_mode_text::layer#0*SIZEOF_DWORD) = vera_layer_mode_text::mapbase_address#0 -- _deref_pduc1=vduc2 + lda #vera_layer_mode_text.mapbase_address + sta vera_mapbase_address+vera_layer_mode_text.layer*SIZEOF_DWORD+1 + lda #>$10 + sta vera_mapbase_address+vera_layer_mode_text.layer*SIZEOF_DWORD+2 + lda #>vera_layer_mode_text.mapbase_address>>$10 + sta vera_mapbase_address+vera_layer_mode_text.layer*SIZEOF_DWORD+3 + // vera_layer_set_mapbase(layer,mapbase) + // [240] call vera_layer_set_mapbase + // [109] phi from vera_layer_mode_tile::@4 to vera_layer_set_mapbase [phi:vera_layer_mode_tile::@4->vera_layer_set_mapbase] + // [109] phi vera_layer_set_mapbase::mapbase#3 = vera_layer_mode_tile::mapbase#0 [phi:vera_layer_mode_tile::@4->vera_layer_set_mapbase#0] -- vbuxx=vbuc1 + ldx #mapbase + // [109] phi vera_layer_set_mapbase::layer#3 = vera_layer_mode_text::layer#0 [phi:vera_layer_mode_tile::@4->vera_layer_set_mapbase#1] -- vbuaa=vbuc1 + lda #vera_layer_mode_text.layer + jsr vera_layer_set_mapbase + // vera_layer_mode_tile::@5 + // vera_tilebase_offset[layer] = vera_layer_mode_text.tilebase_address&$ffff + sta vera_tilebase_offset+vera_layer_mode_text.layer*SIZEOF_WORD+1 + // vera_tilebase_bank[layer] = (byte)>tilebase_address + // [242] *(vera_tilebase_bank+vera_layer_mode_text::layer#0) = 0 -- _deref_pbuc1=vbuc2 + lda #0 + sta vera_tilebase_bank+vera_layer_mode_text.layer + // vera_tilebase_address[layer] = tilebase_address + // [243] *(vera_tilebase_address+vera_layer_mode_text::layer#0*SIZEOF_DWORD) = vera_layer_mode_text::tilebase_address#0 -- _deref_pduc1=vduc2 + lda #vera_layer_mode_text.tilebase_address + sta vera_tilebase_address+vera_layer_mode_text.layer*SIZEOF_DWORD+1 + lda #>$10 + sta vera_tilebase_address+vera_layer_mode_text.layer*SIZEOF_DWORD+2 + lda #>vera_layer_mode_text.tilebase_address>>$10 + sta vera_tilebase_address+vera_layer_mode_text.layer*SIZEOF_DWORD+3 + // [244] phi from vera_layer_mode_tile::@5 to vera_layer_mode_tile::@3 [phi:vera_layer_mode_tile::@5->vera_layer_mode_tile::@3] + // vera_layer_mode_tile::@3 + // vera_layer_set_tilebase(layer,tilebase) + // [245] call vera_layer_set_tilebase + jsr vera_layer_set_tilebase + // vera_layer_mode_tile::@return + // } + // [246] return + rts +} + // vera_layer_get_mapbase_bank +// Get the map base bank of the tiles for the layer. +// - layer: Value of 0 or 1. +// - return: Bank in vera vram. +// vera_layer_get_mapbase_bank(byte register(X) layer) +vera_layer_get_mapbase_bank: { + // return vera_mapbase_bank[layer]; + // [247] vera_layer_get_mapbase_bank::return#0 = vera_mapbase_bank[vera_layer_get_mapbase_bank::layer#0] -- vbuaa=pbuc1_derefidx_vbuxx + lda vera_mapbase_bank,x + // vera_layer_get_mapbase_bank::@return + // } + // [248] return + rts +} + // vera_layer_get_mapbase_offset +// Get the map base lower 16-bit address (offset) of the tiles for the layer. +// - layer: Value of 0 or 1. +// - return: Offset in vera vram of the specified bank. +// vera_layer_get_mapbase_offset(byte register(A) layer) +vera_layer_get_mapbase_offset: { + .label return = $33 + // return vera_mapbase_offset[layer]; + // [249] vera_layer_get_mapbase_offset::$0 = vera_layer_get_mapbase_offset::layer#0 << 1 -- vbuaa=vbuaa_rol_1 + asl + // [250] vera_layer_get_mapbase_offset::return#0 = vera_mapbase_offset[vera_layer_get_mapbase_offset::$0] -- vwuz1=pwuc1_derefidx_vbuaa + tay + lda vera_mapbase_offset,y + sta.z return + lda vera_mapbase_offset+1,y + sta.z return+1 + // vera_layer_get_mapbase_offset::@return + // } + // [251] return + rts +} + // vera_layer_get_rowshift +// Get the bit shift value required to skip a whole line fast. +// - layer: Value of 0 or 1. +// - return: Rowshift value to calculate fast from a y value to line offset in tile mode. +// vera_layer_get_rowshift(byte register(X) layer) +vera_layer_get_rowshift: { + // return vera_layer_rowshift[layer]; + // [252] vera_layer_get_rowshift::return#0 = vera_layer_rowshift[vera_layer_get_rowshift::layer#0] -- vbuaa=pbuc1_derefidx_vbuxx + lda vera_layer_rowshift,x + // vera_layer_get_rowshift::@return + // } + // [253] return + rts +} + // vera_layer_get_rowskip +// Get the value required to skip a whole line fast. +// - layer: Value of 0 or 1. +// - return: Skip value to calculate fast from a y value to line offset in tile mode. +// vera_layer_get_rowskip(byte register(A) layer) +vera_layer_get_rowskip: { + .label return = $20 + // return vera_layer_rowskip[layer]; + // [254] vera_layer_get_rowskip::$0 = vera_layer_get_rowskip::layer#0 << 1 -- vbuaa=vbuaa_rol_1 + asl + // [255] vera_layer_get_rowskip::return#0 = vera_layer_rowskip[vera_layer_get_rowskip::$0] -- vwuz1=pwuc1_derefidx_vbuaa + tay + lda vera_layer_rowskip,y + sta.z return + lda vera_layer_rowskip+1,y + sta.z return+1 + // vera_layer_get_rowskip::@return + // } + // [256] return + rts +} + // vera_layer_get_backcolor +// Get the back color for text output. The old back text color setting is returned. +// - layer: Value of 0 or 1. +// - return: a 4 bit value ( decimal between 0 and 15). +// This will only work when the VERA is in 16 color mode! +// Note that on the VERA, the transparent color has value 0. +// vera_layer_get_backcolor(byte register(X) layer) +vera_layer_get_backcolor: { + // return vera_layer_backcolor[layer]; + // [257] vera_layer_get_backcolor::return#0 = vera_layer_backcolor[vera_layer_get_backcolor::layer#0] -- vbuaa=pbuc1_derefidx_vbuxx + lda vera_layer_backcolor,x + // vera_layer_get_backcolor::@return + // } + // [258] return + rts +} + // vera_layer_get_textcolor +// Get the front color for text output. The old front text color setting is returned. +// - layer: Value of 0 or 1. +// - return: a 4 bit value ( decimal between 0 and 15). +// This will only work when the VERA is in 16 color mode! +// Note that on the VERA, the transparent color has value 0. +// vera_layer_get_textcolor(byte register(X) layer) +vera_layer_get_textcolor: { + // return vera_layer_textcolor[layer]; + // [259] vera_layer_get_textcolor::return#0 = vera_layer_textcolor[vera_layer_get_textcolor::layer#0] -- vbuaa=pbuc1_derefidx_vbuxx + lda vera_layer_textcolor,x + // vera_layer_get_textcolor::@return + // } + // [260] return + rts +} + // cputc +// Output one character at the current cursor position +// Moves the cursor forward. Scrolls the entire screen if needed +// cputc(byte zp($24) c) +cputc: { + .label __16 = $2d + .label conio_addr = $2b + .label c = $24 + // vera_layer_get_color( conio_screen_layer) + // [261] vera_layer_get_color::layer#0 = conio_screen_layer -- vbuxx=vbuz1 + ldx.z conio_screen_layer + // [262] call vera_layer_get_color + // [310] phi from cputc to vera_layer_get_color [phi:cputc->vera_layer_get_color] + // [310] phi vera_layer_get_color::layer#2 = vera_layer_get_color::layer#0 [phi:cputc->vera_layer_get_color#0] -- register_copy + jsr vera_layer_get_color + // vera_layer_get_color( conio_screen_layer) + // [263] vera_layer_get_color::return#3 = vera_layer_get_color::return#2 + // cputc::@7 + // color = vera_layer_get_color( conio_screen_layer) + // [264] cputc::color#0 = vera_layer_get_color::return#3 -- vbuxx=vbuaa + tax + // CONIO_SCREEN_TEXT + conio_line_text[conio_screen_layer] + // [265] cputc::$15 = conio_screen_layer << 1 -- vbuaa=vbuz1_rol_1 + lda.z conio_screen_layer + asl + // conio_addr = CONIO_SCREEN_TEXT + conio_line_text[conio_screen_layer] + // [266] cputc::conio_addr#0 = (byte*)CONIO_SCREEN_TEXT#16 + conio_line_text[cputc::$15] -- pbuz1=pbuz2_plus_pwuc1_derefidx_vbuaa + tay + clc + lda.z CONIO_SCREEN_TEXT + adc conio_line_text,y + sta.z conio_addr + lda.z CONIO_SCREEN_TEXT+1 + adc conio_line_text+1,y + sta.z conio_addr+1 + // conio_cursor_x[conio_screen_layer] << 1 + // [267] cputc::$2 = conio_cursor_x[conio_screen_layer] << 1 -- vbuaa=pbuc1_derefidx_vbuz1_rol_1 + ldy.z conio_screen_layer + lda conio_cursor_x,y + asl + // conio_addr += conio_cursor_x[conio_screen_layer] << 1 + // [268] cputc::conio_addr#1 = cputc::conio_addr#0 + cputc::$2 -- pbuz1=pbuz1_plus_vbuaa + clc + adc.z conio_addr + sta.z conio_addr + bcc !+ + inc.z conio_addr+1 + !: + // if(c=='\n') + // [269] if(cputc::c#0==' ') goto cputc::@1 -- vbuz1_eq_vbuc1_then_la1 + lda #'\n' + cmp.z c + beq __b1 + // cputc::@2 + // *VERA_CTRL &= ~VERA_ADDRSEL + // [270] *VERA_CTRL = *VERA_CTRL & ~VERA_ADDRSEL -- _deref_pbuc1=_deref_pbuc1_band_vbuc2 + // Select DATA0 + lda #VERA_ADDRSEL^$ff + and VERA_CTRL + sta VERA_CTRL + // conio_addr + // [273] cputc::$5 = > cputc::conio_addr#1 -- vbuaa=_hi_pbuz1 + lda.z conio_addr+1 + // *VERA_ADDRX_M = >conio_addr + // [274] *VERA_ADDRX_M = cputc::$5 -- _deref_pbuc1=vbuaa + sta VERA_ADDRX_M + // CONIO_SCREEN_BANK | VERA_INC_1 + // [275] cputc::$6 = CONIO_SCREEN_BANK#14 | VERA_INC_1 -- vbuaa=vbuz1_bor_vbuc1 + lda #VERA_INC_1 + ora.z CONIO_SCREEN_BANK + // *VERA_ADDRX_H = CONIO_SCREEN_BANK | VERA_INC_1 + // [276] *VERA_ADDRX_H = cputc::$6 -- _deref_pbuc1=vbuaa + sta VERA_ADDRX_H + // *VERA_DATA0 = c + // [277] *VERA_DATA0 = cputc::c#0 -- _deref_pbuc1=vbuz1 + lda.z c + sta VERA_DATA0 + // *VERA_DATA0 = color + // [278] *VERA_DATA0 = cputc::color#0 -- _deref_pbuc1=vbuxx + stx VERA_DATA0 + // conio_cursor_x[conio_screen_layer]++; + // [279] conio_cursor_x[conio_screen_layer] = ++ conio_cursor_x[conio_screen_layer] -- pbuc1_derefidx_vbuz1=_inc_pbuc1_derefidx_vbuz1 + ldx.z conio_screen_layer + inc conio_cursor_x,x + // scroll_enable = conio_scroll_enable[conio_screen_layer] + // [280] cputc::scroll_enable#0 = conio_scroll_enable[conio_screen_layer] -- vbuaa=pbuc1_derefidx_vbuz1 + ldy.z conio_screen_layer + lda conio_scroll_enable,y + // if(scroll_enable) + // [281] if(0!=cputc::scroll_enable#0) goto cputc::@5 -- 0_neq_vbuaa_then_la1 + cmp #0 + bne __b5 + // cputc::@3 + // (unsigned int)conio_cursor_x[conio_screen_layer] == conio_width + // [282] cputc::$16 = (word)conio_cursor_x[conio_screen_layer] -- vwuz1=_word_pbuc1_derefidx_vbuz2 + lda conio_cursor_x,y + sta.z __16 + lda #0 + sta.z __16+1 + // if((unsigned int)conio_cursor_x[conio_screen_layer] == conio_width) + // [283] if(cputc::$16!=conio_width) goto cputc::@return -- vwuz1_neq_vwuz2_then_la1 + cmp.z conio_width+1 + bne __breturn + lda.z __16 + cmp.z conio_width + bne __breturn + // [284] phi from cputc::@3 to cputc::@4 [phi:cputc::@3->cputc::@4] + // cputc::@4 + // cputln() + // [285] call cputln + jsr cputln + // cputc::@return + __breturn: + // } + // [286] return + rts + // cputc::@5 + __b5: + // if(conio_cursor_x[conio_screen_layer] == CONIO_WIDTH) + // [287] if(conio_cursor_x[conio_screen_layer]!=conio_screen_width) goto cputc::@return -- pbuc1_derefidx_vbuz1_neq_vbuz2_then_la1 + lda.z conio_screen_width + ldy.z conio_screen_layer + cmp conio_cursor_x,y + bne __breturn + // [288] phi from cputc::@5 to cputc::@6 [phi:cputc::@5->cputc::@6] + // cputc::@6 + // cputln() + // [289] call cputln + jsr cputln + rts + // [290] phi from cputc::@7 to cputc::@1 [phi:cputc::@7->cputc::@1] + // cputc::@1 + __b1: + // cputln() + // [291] call cputln + jsr cputln + rts +} + // setnam +// Kernal SETNAM function +// SETNAM. Set file name parameters. +// setnam(byte* zp($25) filename) +setnam: { + .label filename = $25 + .label filename_len = $2f + .label __0 = $2d + // strlen(filename) + // [292] strlen::str#1 = setnam::filename -- pbuz1=pbuz2 + lda.z filename + sta.z strlen.str + lda.z filename+1 + sta.z strlen.str+1 + // [293] call strlen + // [329] phi from setnam to strlen [phi:setnam->strlen] + jsr strlen + // strlen(filename) + // [294] strlen::return#2 = strlen::len#2 + // setnam::@1 + // [295] setnam::$0 = strlen::return#2 + // filename_len = (char)strlen(filename) + // [296] setnam::filename_len = (byte)setnam::$0 -- vbuz1=_byte_vwuz2 + lda.z __0 + sta.z filename_len + // asm + // asm { ldafilename_len ldxfilename ldyfilename+1 jsr$ffbd } + ldx filename + ldy filename+1 + jsr $ffbd + // setnam::@return + // } + // [298] return + rts +} + // setlfs +// SETLFS. Set file parameters. +// setlfs(byte zp($27) device) +setlfs: { + .label device = $27 + // asm + // asm { ldxdevice lda#1 ldy#0 jsr$ffba } + ldx device + lda #1 + ldy #0 + jsr $ffba + // setlfs::@return + // } + // [300] return + rts +} + // load +// LOAD. Load or verify file. (Must call SETLFS and SETNAM beforehands.) +// - verify: 0 = Load, 1-255 = Verify +// +// Returns a status, 0xff: Success other: Kernal Error Code +// load(byte* zp($28) address, byte zp($2a) verify) +load: { + .label address = $28 + .label verify = $2a + .label status = $30 + // status + // [301] load::status = 0 -- vbuz1=vbuc1 + lda #0 + sta.z status + // asm + // asm { ldxaddress ldyaddress+1 ldaverify jsr$ffd5 bcserror lda#$ff error: stastatus } + ldx address + ldy address+1 + lda verify + jsr $ffd5 + bcs error + lda #$ff + error: + sta status + // load::@return + // } + // [303] return + rts +} + // vera_layer_set_config +// Set the configuration of the layer. +// - layer: Value of 0 or 1. +// - config: Specifies the modes which are specified using T256C / 'Bitmap Mode' / 'Color Depth'. +vera_layer_set_config: { + .label addr = $31 + // addr = vera_layer_config[layer] + // [304] vera_layer_set_config::addr#0 = *(vera_layer_config+vera_layer_mode_text::layer#0*SIZEOF_POINTER) -- pbuz1=_deref_qbuc1 + lda vera_layer_config+vera_layer_mode_text.layer*SIZEOF_POINTER + sta.z addr + lda vera_layer_config+vera_layer_mode_text.layer*SIZEOF_POINTER+1 + sta.z addr+1 + // *addr = config + // [305] *vera_layer_set_config::addr#0 = vera_layer_mode_tile::config#10 -- _deref_pbuz1=vbuc1 + lda #vera_layer_mode_tile.config + ldy #0 + sta (addr),y + // vera_layer_set_config::@return + // } + // [306] return + rts +} + // vera_layer_set_tilebase +// Set the base of the tiles for the layer with which the conio will interact. +// - layer: Value of 0 or 1. +// - tilebase: Specifies the base address of the tile map. +// Note that the register only specifies bits 16:11 of the address, +// so the resulting address in the VERA VRAM is always aligned to a multiple of 2048 bytes! +vera_layer_set_tilebase: { + .label addr = $33 + // addr = vera_layer_tilebase[layer] + // [307] vera_layer_set_tilebase::addr#0 = *(vera_layer_tilebase+vera_layer_mode_text::layer#0*SIZEOF_POINTER) -- pbuz1=_deref_qbuc1 + lda vera_layer_tilebase+vera_layer_mode_text.layer*SIZEOF_POINTER + sta.z addr + lda vera_layer_tilebase+vera_layer_mode_text.layer*SIZEOF_POINTER+1 + sta.z addr+1 + // *addr = tilebase + // [308] *vera_layer_set_tilebase::addr#0 = >(vera_layer_mode_tile.tilebase_address&$ffff))&VERA_LAYER_TILEBASE_MASK + ldy #0 + sta (addr),y + // vera_layer_set_tilebase::@return + // } + // [309] return + rts +} + // vera_layer_get_color +// Get the text and back color for text output in 16 color mode. +// - layer: Value of 0 or 1. +// - return: an 8 bit value with bit 7:4 containing the back color and bit 3:0 containing the front color. +// This will only work when the VERA is in 16 color mode! +// Note that on the VERA, the transparent color has value 0. +// vera_layer_get_color(byte register(X) layer) +vera_layer_get_color: { + .label addr = $35 + // addr = vera_layer_config[layer] + // [311] vera_layer_get_color::$3 = vera_layer_get_color::layer#2 << 1 -- vbuaa=vbuxx_rol_1 + txa + asl + // [312] vera_layer_get_color::addr#0 = vera_layer_config[vera_layer_get_color::$3] -- pbuz1=qbuc1_derefidx_vbuaa + tay + lda vera_layer_config,y + sta.z addr + lda vera_layer_config+1,y + sta.z addr+1 + // *addr & VERA_LAYER_CONFIG_256C + // [313] vera_layer_get_color::$0 = *vera_layer_get_color::addr#0 & VERA_LAYER_CONFIG_256C -- vbuaa=_deref_pbuz1_band_vbuc1 + lda #VERA_LAYER_CONFIG_256C + ldy #0 + and (addr),y + // if( *addr & VERA_LAYER_CONFIG_256C ) + // [314] if(0!=vera_layer_get_color::$0) goto vera_layer_get_color::@1 -- 0_neq_vbuaa_then_la1 + cmp #0 + bne __b1 + // vera_layer_get_color::@2 + // vera_layer_backcolor[layer] << 4 + // [315] vera_layer_get_color::$1 = vera_layer_backcolor[vera_layer_get_color::layer#2] << 4 -- vbuaa=pbuc1_derefidx_vbuxx_rol_4 + lda vera_layer_backcolor,x + asl + asl + asl + asl + // return ((vera_layer_backcolor[layer] << 4) | vera_layer_textcolor[layer]); + // [316] vera_layer_get_color::return#1 = vera_layer_get_color::$1 | vera_layer_textcolor[vera_layer_get_color::layer#2] -- vbuaa=vbuaa_bor_pbuc1_derefidx_vbuxx + ora vera_layer_textcolor,x + // [317] phi from vera_layer_get_color::@1 vera_layer_get_color::@2 to vera_layer_get_color::@return [phi:vera_layer_get_color::@1/vera_layer_get_color::@2->vera_layer_get_color::@return] + // [317] phi vera_layer_get_color::return#2 = vera_layer_get_color::return#0 [phi:vera_layer_get_color::@1/vera_layer_get_color::@2->vera_layer_get_color::@return#0] -- register_copy + // vera_layer_get_color::@return + // } + // [318] return + rts + // vera_layer_get_color::@1 + __b1: + // return (vera_layer_textcolor[layer]); + // [319] vera_layer_get_color::return#0 = vera_layer_textcolor[vera_layer_get_color::layer#2] -- vbuaa=pbuc1_derefidx_vbuxx + lda vera_layer_textcolor,x + rts +} + // cputln +// Print a newline +cputln: { + .label temp = $37 + // temp = conio_line_text[conio_screen_layer] + // [320] cputln::$2 = conio_screen_layer << 1 -- vbuaa=vbuz1_rol_1 + lda.z conio_screen_layer + asl + // [321] cputln::temp#0 = conio_line_text[cputln::$2] -- vwuz1=pwuc1_derefidx_vbuaa + // TODO: This needs to be optimized! other variations don't compile because of sections not available! + tay + lda conio_line_text,y + sta.z temp + lda conio_line_text+1,y + sta.z temp+1 + // temp += conio_rowskip + // [322] cputln::temp#1 = cputln::temp#0 + conio_rowskip -- vwuz1=vwuz1_plus_vwuz2 + lda.z temp + clc + adc.z conio_rowskip + sta.z temp + lda.z temp+1 + adc.z conio_rowskip+1 + sta.z temp+1 + // conio_line_text[conio_screen_layer] = temp + // [323] cputln::$3 = conio_screen_layer << 1 -- vbuaa=vbuz1_rol_1 + lda.z conio_screen_layer + asl + // [324] conio_line_text[cputln::$3] = cputln::temp#1 -- pwuc1_derefidx_vbuaa=vwuz1 + tay + lda.z temp + sta conio_line_text,y + lda.z temp+1 + sta conio_line_text+1,y + // conio_cursor_x[conio_screen_layer] = 0 + // [325] conio_cursor_x[conio_screen_layer] = 0 -- pbuc1_derefidx_vbuz1=vbuc2 + lda #0 + ldy.z conio_screen_layer + sta conio_cursor_x,y + // conio_cursor_y[conio_screen_layer]++; + // [326] conio_cursor_y[conio_screen_layer] = ++ conio_cursor_y[conio_screen_layer] -- pbuc1_derefidx_vbuz1=_inc_pbuc1_derefidx_vbuz1 + ldx.z conio_screen_layer + inc conio_cursor_y,x + // cscroll() + // [327] call cscroll + jsr cscroll + // cputln::@return + // } + // [328] return + rts +} + // strlen +// Computes the length of the string str up to but not including the terminating null character. +// strlen(byte* zp($2b) str) +strlen: { + .label len = $2d + .label str = $2b + .label return = $2d + // [330] phi from strlen to strlen::@1 [phi:strlen->strlen::@1] + // [330] phi strlen::len#2 = 0 [phi:strlen->strlen::@1#0] -- vwuz1=vwuc1 + lda #<0 + sta.z len + sta.z len+1 + // [330] phi strlen::str#2 = strlen::str#1 [phi:strlen->strlen::@1#1] -- register_copy + // strlen::@1 + __b1: + // while(*str) + // [331] if(0!=*strlen::str#2) goto strlen::@2 -- 0_neq__deref_pbuz1_then_la1 + ldy #0 + lda (str),y + cmp #0 + bne __b2 + // strlen::@return + // } + // [332] return + rts + // strlen::@2 + __b2: + // len++; + // [333] strlen::len#1 = ++ strlen::len#2 -- vwuz1=_inc_vwuz1 + inc.z len + bne !+ + inc.z len+1 + !: + // str++; + // [334] strlen::str#0 = ++ strlen::str#2 -- pbuz1=_inc_pbuz1 + inc.z str + bne !+ + inc.z str+1 + !: + // [330] phi from strlen::@2 to strlen::@1 [phi:strlen::@2->strlen::@1] + // [330] phi strlen::len#2 = strlen::len#1 [phi:strlen::@2->strlen::@1#0] -- register_copy + // [330] phi strlen::str#2 = strlen::str#0 [phi:strlen::@2->strlen::@1#1] -- register_copy + jmp __b1 +} + // cscroll +// Scroll the entire screen if the cursor is beyond the last line +cscroll: { + // if(conio_cursor_y[conio_screen_layer]>=CONIO_HEIGHT) + // [335] if(conio_cursor_y[conio_screen_layer]=conio_height) + // [337] if(conio_cursor_y[conio_screen_layer]cscroll::@3] + // cscroll::@3 + __b3: + // cscroll::@return + // } + // [339] return + rts + // [340] phi from cscroll::@1 to cscroll::@4 [phi:cscroll::@1->cscroll::@4] + // cscroll::@4 + __b4: + // insertup() + // [341] call insertup + jsr insertup + // cscroll::@5 + // gotoxy( 0, CONIO_HEIGHT-1) + // [342] gotoxy::y#2 = conio_screen_height - 1 -- vbuxx=vbuz1_minus_1 + ldx.z conio_screen_height + dex + // [343] call gotoxy + // [114] phi from cscroll::@5 to gotoxy [phi:cscroll::@5->gotoxy] + // [114] phi gotoxy::y#3 = gotoxy::y#2 [phi:cscroll::@5->gotoxy#0] -- register_copy + jsr gotoxy + rts +} + // insertup +// Insert a new line, and scroll the upper part of the screen up. +insertup: { + .label cy = $39 + .label width = $3a + .label line = $3b + .label start = $3b + // cy = conio_cursor_y[conio_screen_layer] + // [344] insertup::cy#0 = conio_cursor_y[conio_screen_layer] -- vbuz1=pbuc1_derefidx_vbuz2 + ldy.z conio_screen_layer + lda conio_cursor_y,y + sta.z cy + // width = CONIO_WIDTH * 2 + // [345] insertup::width#0 = conio_screen_width << 1 -- vbuz1=vbuz2_rol_1 + lda.z conio_screen_width + asl + sta.z width + // [346] phi from insertup to insertup::@1 [phi:insertup->insertup::@1] + // [346] phi insertup::i#2 = 1 [phi:insertup->insertup::@1#0] -- vbuxx=vbuc1 + ldx #1 + // insertup::@1 + __b1: + // for(unsigned byte i=1; i<=cy; i++) + // [347] if(insertup::i#2<=insertup::cy#0) goto insertup::@2 -- vbuxx_le_vbuz1_then_la1 + lda.z cy + stx.z $ff + cmp.z $ff + bcs __b2 + // [348] phi from insertup::@1 to insertup::@3 [phi:insertup::@1->insertup::@3] + // insertup::@3 + // clearline() + // [349] call clearline + jsr clearline + // insertup::@return + // } + // [350] return + rts + // insertup::@2 + __b2: + // i-1 + // [351] insertup::$3 = insertup::i#2 - 1 -- vbuaa=vbuxx_minus_1 + txa + sec + sbc #1 + // line = (i-1) << conio_rowshift + // [352] insertup::line#0 = insertup::$3 << conio_rowshift -- vwuz1=vbuaa_rol_vbuz2 + ldy.z conio_rowshift + sta.z line + lda #0 + sta.z line+1 + cpy #0 + beq !e+ + !: + asl.z line + rol.z line+1 + dey + bne !- + !e: + // start = CONIO_SCREEN_TEXT + line + // [353] insertup::start#0 = (byte*)CONIO_SCREEN_TEXT#16 + insertup::line#0 -- pbuz1=pbuz2_plus_vwuz1 + lda.z start + clc + adc.z CONIO_SCREEN_TEXT + sta.z start + lda.z start+1 + adc.z CONIO_SCREEN_TEXT+1 + sta.z start+1 + // start+conio_rowskip + // [354] memcpy_in_vram::src#0 = insertup::start#0 + conio_rowskip -- pbuz1=pbuz2_plus_vwuz3 + lda.z start + clc + adc.z conio_rowskip + sta.z memcpy_in_vram.src + lda.z start+1 + adc.z conio_rowskip+1 + sta.z memcpy_in_vram.src+1 + // memcpy_in_vram(0, start, VERA_INC_1, 0, start+conio_rowskip, VERA_INC_1, width) + // [355] memcpy_in_vram::dest#0 = (void*)insertup::start#0 + // [356] memcpy_in_vram::num#0 = insertup::width#0 -- vwuz1=vbuz2 + lda.z width + sta.z memcpy_in_vram.num + lda #0 + sta.z memcpy_in_vram.num+1 + // [357] call memcpy_in_vram + jsr memcpy_in_vram + // insertup::@4 + // for(unsigned byte i=1; i<=cy; i++) + // [358] insertup::i#1 = ++ insertup::i#2 -- vbuxx=_inc_vbuxx + inx + // [346] phi from insertup::@4 to insertup::@1 [phi:insertup::@4->insertup::@1] + // [346] phi insertup::i#2 = insertup::i#1 [phi:insertup::@4->insertup::@1#0] -- register_copy + jmp __b1 +} + // clearline +clearline: { + .label addr = $41 + .label c = $2b + // *VERA_CTRL &= ~VERA_ADDRSEL + // [359] *VERA_CTRL = *VERA_CTRL & ~VERA_ADDRSEL -- _deref_pbuc1=_deref_pbuc1_band_vbuc2 + // Select DATA0 + lda #VERA_ADDRSEL^$ff + and VERA_CTRL + sta VERA_CTRL + // CONIO_SCREEN_TEXT + conio_line_text[conio_screen_layer] + // [360] clearline::$5 = conio_screen_layer << 1 -- vbuaa=vbuz1_rol_1 + lda.z conio_screen_layer + asl + // addr = CONIO_SCREEN_TEXT + conio_line_text[conio_screen_layer] + // [361] clearline::addr#0 = (byte*)CONIO_SCREEN_TEXT#16 + conio_line_text[clearline::$5] -- pbuz1=pbuz2_plus_pwuc1_derefidx_vbuaa + tay + clc + lda.z CONIO_SCREEN_TEXT + adc conio_line_text,y + sta.z addr + lda.z CONIO_SCREEN_TEXT+1 + adc conio_line_text+1,y + sta.z addr+1 + // addr + // [364] clearline::$2 = > clearline::addr#0 -- vbuaa=_hi_pbuz1 + lda.z addr+1 + // *VERA_ADDRX_M = >addr + // [365] *VERA_ADDRX_M = clearline::$2 -- _deref_pbuc1=vbuaa + sta VERA_ADDRX_M + // *VERA_ADDRX_H = VERA_INC_1 + // [366] *VERA_ADDRX_H = VERA_INC_1 -- _deref_pbuc1=vbuc2 + lda #VERA_INC_1 + sta VERA_ADDRX_H + // vera_layer_get_color( conio_screen_layer) + // [367] vera_layer_get_color::layer#1 = conio_screen_layer -- vbuxx=vbuz1 + ldx.z conio_screen_layer + // [368] call vera_layer_get_color + // [310] phi from clearline to vera_layer_get_color [phi:clearline->vera_layer_get_color] + // [310] phi vera_layer_get_color::layer#2 = vera_layer_get_color::layer#1 [phi:clearline->vera_layer_get_color#0] -- register_copy + jsr vera_layer_get_color + // vera_layer_get_color( conio_screen_layer) + // [369] vera_layer_get_color::return#4 = vera_layer_get_color::return#2 + // clearline::@4 + // color = vera_layer_get_color( conio_screen_layer) + // [370] clearline::color#0 = vera_layer_get_color::return#4 -- vbuxx=vbuaa + tax + // [371] phi from clearline::@4 to clearline::@1 [phi:clearline::@4->clearline::@1] + // [371] phi clearline::c#2 = 0 [phi:clearline::@4->clearline::@1#0] -- vwuz1=vwuc1 + lda #<0 + sta.z c + sta.z c+1 + // clearline::@1 + __b1: + // for( unsigned int c=0;cclearline::@1] + // [371] phi clearline::c#2 = clearline::c#1 [phi:clearline::@2->clearline::@1#0] -- register_copy + jmp __b1 +} + // memcpy_in_vram +// Copy block of memory (from VRAM to VRAM) +// Copies the values from the location pointed by src to the location pointed by dest. +// The method uses the VERA access ports 0 and 1 to copy data from and to in VRAM. +// - src_bank: 64K VRAM bank number to copy from (0/1). +// - src: pointer to the location to copy from. Note that the address is a 16 bit value! +// - src_increment: the increment indicator, VERA needs this because addressing increment is automated by VERA at each access. +// - dest_bank: 64K VRAM bank number to copy to (0/1). +// - dest: pointer to the location to copy to. Note that the address is a 16 bit value! +// - dest_increment: the increment indicator, VERA needs this because addressing increment is automated by VERA at each access. +// - num: The number of bytes to copy +// memcpy_in_vram(void* zp($3b) dest, byte* zp($3d) src, word zp($3f) num) +memcpy_in_vram: { + .label i = $2d + .label dest = $3b + .label src = $3d + .label num = $3f + // *VERA_CTRL &= ~VERA_ADDRSEL + // [378] *VERA_CTRL = *VERA_CTRL & ~VERA_ADDRSEL -- _deref_pbuc1=_deref_pbuc1_band_vbuc2 + // Select DATA0 + lda #VERA_ADDRSEL^$ff + and VERA_CTRL + sta VERA_CTRL + // src + // [381] memcpy_in_vram::$1 = > (void*)memcpy_in_vram::src#0 -- vbuaa=_hi_pvoz1 + lda.z src+1 + // *VERA_ADDRX_M = >src + // [382] *VERA_ADDRX_M = memcpy_in_vram::$1 -- _deref_pbuc1=vbuaa + sta VERA_ADDRX_M + // *VERA_ADDRX_H = src_increment | src_bank + // [383] *VERA_ADDRX_H = VERA_INC_1 -- _deref_pbuc1=vbuc2 + lda #VERA_INC_1 + sta VERA_ADDRX_H + // *VERA_CTRL |= VERA_ADDRSEL + // [384] *VERA_CTRL = *VERA_CTRL | VERA_ADDRSEL -- _deref_pbuc1=_deref_pbuc1_bor_vbuc2 + // Select DATA1 + lda #VERA_ADDRSEL + ora VERA_CTRL + sta VERA_CTRL + // dest + // [387] memcpy_in_vram::$4 = > memcpy_in_vram::dest#0 -- vbuaa=_hi_pvoz1 + lda.z dest+1 + // *VERA_ADDRX_M = >dest + // [388] *VERA_ADDRX_M = memcpy_in_vram::$4 -- _deref_pbuc1=vbuaa + sta VERA_ADDRX_M + // *VERA_ADDRX_H = dest_increment | dest_bank + // [389] *VERA_ADDRX_H = VERA_INC_1 -- _deref_pbuc1=vbuc2 + lda #VERA_INC_1 + sta VERA_ADDRX_H + // [390] phi from memcpy_in_vram to memcpy_in_vram::@1 [phi:memcpy_in_vram->memcpy_in_vram::@1] + // [390] phi memcpy_in_vram::i#2 = 0 [phi:memcpy_in_vram->memcpy_in_vram::@1#0] -- vwuz1=vwuc1 + lda #<0 + sta.z i + sta.z i+1 + // Transfer the data + // memcpy_in_vram::@1 + __b1: + // for(unsigned int i=0; imemcpy_in_vram::@1] + // [390] phi memcpy_in_vram::i#2 = memcpy_in_vram::i#1 [phi:memcpy_in_vram::@2->memcpy_in_vram::@1#0] -- register_copy + jmp __b1 +} + // File Data +.segment Data + VERA_LAYER_WIDTH: .word $20, $40, $80, $100 + VERA_LAYER_HEIGHT: .word $20, $40, $80, $100 + // --- VERA function encapsulation --- + vera_mapbase_offset: .word 0, 0 + vera_mapbase_bank: .byte 0, 0 + vera_mapbase_address: .dword 0, 0 + vera_tilebase_offset: .word 0, 0 + vera_tilebase_bank: .byte 0, 0 + vera_tilebase_address: .dword 0, 0 + vera_layer_rowshift: .byte 0, 0 + vera_layer_rowskip: .word 0, 0 + vera_layer_config: .word VERA_L0_CONFIG, VERA_L1_CONFIG + vera_layer_mapbase: .word VERA_L0_MAPBASE, VERA_L1_MAPBASE + vera_layer_tilebase: .word VERA_L0_TILEBASE, VERA_L1_TILEBASE + vera_layer_textcolor: .byte WHITE, WHITE + vera_layer_backcolor: .byte BLUE, BLUE + // The number of bytes on the screen + // The current cursor x-position + conio_cursor_x: .byte 0, 0 + // The current cursor y-position + conio_cursor_y: .byte 0, 0 + // The current text cursor line start + conio_line_text: .word 0, 0 + // Is scrolling enabled when outputting beyond the end of the screen (1: yes, 0: no). + // If disabled the cursor just moves back to (0,0) instead + conio_scroll_enable: .byte 1, 1 +.segment Sprite +SPRITE_PIXELS: +.var pic = LoadPicture("ship.png") + // palette: rgb->idx + .var palette = Hashtable() + // RGB value for each palette index + .var palList = List() + // Next palette index + .var nxt_idx = 0; + // Extract palette while outputting pixels as palete index values + .for (var y=0; y<64; y++) { + .for (var x=0;x<64; x++) { + // Find palette index (add if not known) + .var rgb = pic.getPixel(x,y); + .var idx = palette.get(rgb) + .if(idx==null) { + .eval idx = nxt_idx++; + .eval palette.put(rgb,idx); + .eval palList.add(rgb) + } + } + } + .if(nxt_idx>16) .error "Image has too many colours "+nxt_idx + + .for(var i=0;i<16;i++) { + .var rgb = palList.get(i) + .var red = floor(rgb / [256*256]) + .var green = floor(rgb/256) & 255 + .var blue = rgb & 255 + // bits 4-8: green, bits 0-3 blue + .byte green&$f0 | blue/16 + // bits bits 0-3 red + .byte red/16 + } + + .for (var y=0; y<64; y++) { + .for (var x=0;x<64; x+=2) { + // Find palette index (add if not known) + .var rgb = pic.getPixel(x,y); + .var idx1 = palette.get(rgb) + .if(idx1==null) { + .printnow "unknown rgb value!" + } + // Find palette index (add if not known) + .eval rgb = pic.getPixel(x+1,y); + .var idx2 = palette.get(rgb) + .if(idx2==null) { + .printnow "unknown rgb value!" + } + .byte idx1*16+idx2; + } + } + +.segment Data + __0: .word (main.VRAM_SPRITE/$20&$ffff)|VERA_SPRITE_8BPP, $140-$20, $f0-$20 + .byte $c, $f1 + diff --git a/src/test/ref/examples/cx16/cx16-bankload.sym b/src/test/ref/examples/cx16/cx16-bankload.sym new file mode 100644 index 000000000..097494b04 --- /dev/null +++ b/src/test/ref/examples/cx16/cx16-bankload.sym @@ -0,0 +1,605 @@ +const struct VERA_SPRITE $0 = { ADDR: >5+(word)<>main::BANK_SPRITE<<3 +byte LoadFileBanked::device +const byte LoadFileBanked::device#0 device = 8 +byte* LoadFileBanked::filename +byte LoadFileBanked::return +const byte OFFSET_STRUCT_MOS6522_VIA_PORT_A = 1 +const byte OFFSET_STRUCT_VERA_SPRITE_X = 2 +const byte OFFSET_STRUCT_VERA_SPRITE_Y = 4 +const byte RADIX::BINARY = 2 +const byte RADIX::DECIMAL = $a +const byte RADIX::HEXADECIMAL = $10 +const byte RADIX::OCTAL = 8 +const byte SIZEOF_DWORD = 4 +const byte SIZEOF_POINTER = 2 +const byte SIZEOF_STRUCT_VERA_SPRITE = 8 +const byte SIZEOF_WORD = 2 +const byte* SPRITE_PIXELS[] = kickasm {{ .var pic = LoadPicture("ship.png") + // palette: rgb->idx + .var palette = Hashtable() + // RGB value for each palette index + .var palList = List() + // Next palette index + .var nxt_idx = 0; + // Extract palette while outputting pixels as palete index values + .for (var y=0; y<64; y++) { + .for (var x=0;x<64; x++) { + // Find palette index (add if not known) + .var rgb = pic.getPixel(x,y); + .var idx = palette.get(rgb) + .if(idx==null) { + .eval idx = nxt_idx++; + .eval palette.put(rgb,idx); + .eval palList.add(rgb) + } + } + } + .if(nxt_idx>16) .error "Image has too many colours "+nxt_idx + + .for(var i=0;i<16;i++) { + .var rgb = palList.get(i) + .var red = floor(rgb / [256*256]) + .var green = floor(rgb/256) & 255 + .var blue = rgb & 255 + // bits 4-8: green, bits 0-3 blue + .byte green&$f0 | blue/16 + // bits bits 0-3 red + .byte red/16 + } + + .for (var y=0; y<64; y++) { + .for (var x=0;x<64; x+=2) { + // Find palette index (add if not known) + .var rgb = pic.getPixel(x,y); + .var idx1 = palette.get(rgb) + .if(idx1==null) { + .printnow "unknown rgb value!" + } + // Find palette index (add if not known) + .eval rgb = pic.getPixel(x+1,y); + .var idx2 = palette.get(rgb) + .if(idx2==null) { + .printnow "unknown rgb value!" + } + .byte idx1*16+idx2; + } + } + }} +const nomodify byte VERA_ADDRSEL = 1 +const nomodify byte* VERA_ADDRX_H = (byte*) 40738 +const nomodify byte* VERA_ADDRX_L = (byte*) 40736 +const nomodify byte* VERA_ADDRX_M = (byte*) 40737 +const nomodify byte* VERA_CTRL = (byte*) 40741 +const nomodify byte* VERA_DATA0 = (byte*) 40739 +const nomodify byte* VERA_DATA1 = (byte*) 40740 +const nomodify byte VERA_DCSEL = 2 +const nomodify byte* VERA_DC_HSCALE = (byte*) 40746 +const nomodify byte* VERA_DC_VIDEO = (byte*) 40745 +const nomodify byte* VERA_DC_VSCALE = (byte*) 40747 +const nomodify byte VERA_INC_1 = $10 +const nomodify byte* VERA_L0_CONFIG = (byte*) 40749 +const nomodify byte* VERA_L0_MAPBASE = (byte*) 40750 +const nomodify byte* VERA_L0_TILEBASE = (byte*) 40751 +const nomodify byte* VERA_L1_CONFIG = (byte*) 40756 +const nomodify byte* VERA_L1_MAPBASE = (byte*) 40757 +const nomodify byte* VERA_L1_TILEBASE = (byte*) 40758 +const nomodify byte VERA_LAYER_CONFIG_256C = 8 +const to_nomodify word* VERA_LAYER_HEIGHT[4] = { $20, $40, $80, $100 } +const nomodify byte VERA_LAYER_HEIGHT_64 = $40 +const nomodify byte VERA_LAYER_HEIGHT_MASK = $c0 +const nomodify byte VERA_LAYER_TILEBASE_MASK = $fc +const to_nomodify word* VERA_LAYER_WIDTH[4] = { $20, $40, $80, $100 } +const nomodify byte VERA_LAYER_WIDTH_128 = $20 +const nomodify byte VERA_LAYER_WIDTH_MASK = $30 +const nomodify dword VERA_PALETTE = $1fa00 +const nomodify byte VERA_SPRITES_ENABLE = $40 +const nomodify word VERA_SPRITE_8BPP = $8000 +const nomodify dword VERA_SPRITE_ATTR = $1fc00 +const nomodify struct MOS6522_VIA* VIA1 = (struct MOS6522_VIA*) 40800 +const nomodify byte WHITE = 1 +void __start() +void bnkcpy_vram_address(dword bnkcpy_vram_address::vdest , dword bnkcpy_vram_address::src , dword bnkcpy_vram_address::num) +word~ bnkcpy_vram_address::$0 zp[2]:43 202.0 +byte~ bnkcpy_vram_address::$1 reg byte a 202.0 +word~ bnkcpy_vram_address::$10 zp[2]:59 202.0 +byte~ bnkcpy_vram_address::$11 reg byte x 101.0 +word~ bnkcpy_vram_address::$12 zp[2]:61 202.0 +word~ bnkcpy_vram_address::$13 zp[2]:61 40.4 +word~ bnkcpy_vram_address::$14 zp[2]:63 202.0 +word~ bnkcpy_vram_address::$15 zp[2]:63 202.0 +byte~ bnkcpy_vram_address::$16 reg byte a 101.0 +word~ bnkcpy_vram_address::$17 zp[2]:61 101.0 +word~ bnkcpy_vram_address::$18 zp[2]:15 202.0 +word~ bnkcpy_vram_address::$2 zp[2]:45 202.0 +word~ bnkcpy_vram_address::$23 zp[2]:61 202.0 +word~ bnkcpy_vram_address::$24 zp[2]:65 202.0 +byte~ bnkcpy_vram_address::$3 reg byte a 202.0 +word~ bnkcpy_vram_address::$4 zp[2]:53 202.0 +byte~ bnkcpy_vram_address::$5 reg byte a 202.0 +word~ bnkcpy_vram_address::$7 zp[2]:55 202.0 +word~ bnkcpy_vram_address::$8 zp[2]:55 202.0 +byte~ bnkcpy_vram_address::$9 reg byte y 33.666666666666664 +byte* bnkcpy_vram_address::addr +word bnkcpy_vram_address::addr#0 addr zp[2]:15 101.0 +byte* bnkcpy_vram_address::addr#1 addr zp[2]:15 101.0 +byte* bnkcpy_vram_address::addr#2 addr zp[2]:15 1001.0 +byte* bnkcpy_vram_address::addr#4 addr zp[2]:15 1034.6666666666667 +byte* bnkcpy_vram_address::addr#5 addr zp[2]:15 1501.5 +byte bnkcpy_vram_address::bank +byte bnkcpy_vram_address::bank#0 reg byte x 60.599999999999994 +byte bnkcpy_vram_address::bank#1 reg byte x 1501.5 +byte bnkcpy_vram_address::bank#2 reg byte x 1034.6666666666667 +byte bnkcpy_vram_address::bank#5 reg byte x 750.75 +dword bnkcpy_vram_address::beg +dword bnkcpy_vram_address::beg#0 beg zp[4]:11 19.548387096774196 +dword bnkcpy_vram_address::end +dword bnkcpy_vram_address::end#0 end zp[4]:7 39.357142857142854 +dword bnkcpy_vram_address::num +dword bnkcpy_vram_address::num#2 num zp[4]:7 8.416666666666666 +dword bnkcpy_vram_address::pos +dword bnkcpy_vram_address::pos#1 pos zp[4]:11 2002.0 +dword bnkcpy_vram_address::pos#2 pos zp[4]:11 388.0 +dword bnkcpy_vram_address::src +dword bnkcpy_vram_address::vdest +dword bnkcpy_vram_address::vdest#2 vdest zp[4]:3 37.875 +void clearline() +byte~ clearline::$1 reg byte a 2.00000002E8 +byte~ clearline::$2 reg byte a 2.00000002E8 +byte~ clearline::$5 reg byte a 2.00000002E8 +byte* clearline::addr +byte* clearline::addr#0 addr zp[2]:65 1.00000001E8 +word clearline::c +word clearline::c#1 c zp[2]:43 2.0000000002E10 +word clearline::c#2 c zp[2]:43 7.50000000075E9 +byte clearline::color +byte clearline::color#0 reg byte x 1.6833333336666665E9 +void clrscr() +byte~ clrscr::$0 reg byte a 202.0 +byte~ clrscr::$1 zp[1]:36 40.4 +byte~ clrscr::$2 reg byte a 202.0 +byte~ clrscr::$5 reg byte a 2002.0 +byte~ clrscr::$6 reg byte a 2002.0 +byte~ clrscr::$7 reg byte a 2002.0 +byte~ clrscr::$9 reg byte a 202.0 +byte clrscr::c +byte clrscr::c#1 reg byte y 20002.0 +byte clrscr::c#2 reg byte y 7500.75 +byte* clrscr::ch +byte clrscr::color +byte clrscr::color#0 color zp[1]:36 594.2352941176471 +byte clrscr::l +byte clrscr::l#1 reg byte x 2002.0 +byte clrscr::l#2 reg byte x 200.2 +byte* clrscr::line_text +byte* clrscr::line_text#0 line_text zp[2]:15 18.363636363636363 +byte* clrscr::line_text#1 line_text zp[2]:15 1001.0 +byte* clrscr::line_text#2 line_text zp[2]:15 293.2142857142857 +const byte* conio_cursor_x[2] = { 0, 0 } +const byte* conio_cursor_y[2] = { 0, 0 } +word conio_height loadstore zp[2]:22 10650.053191489362 +const word* conio_line_text[2] = { 0, 0 } +byte conio_rowshift loadstore zp[1]:24 8559322.923728812 +word conio_rowskip loadstore zp[2]:25 8404210.974789916 +volatile byte conio_screen_height loadstore zp[1]:18 115384.875 +byte conio_screen_layer loadstore zp[1]:19 1789433.5208333333 +volatile byte conio_screen_width loadstore zp[1]:17 7.208640292086332E7 +const byte* conio_scroll_enable[2] = { 1, 1 } +word conio_width loadstore zp[2]:20 209.42708333333331 +void conio_x16_init() +const nomodify byte* conio_x16_init::BASIC_CURSOR_LINE = (byte*) 214 +byte conio_x16_init::line +byte conio_x16_init::line#0 line zp[1]:2 2.1999999999999997 +byte conio_x16_init::line#1 line zp[1]:2 22.0 +byte conio_x16_init::line#3 line zp[1]:2 33.0 +void cputc(byte cputc::c) +byte~ cputc::$15 reg byte a 20002.0 +word~ cputc::$16 zp[2]:45 20002.0 +byte~ cputc::$2 reg byte a 20002.0 +byte~ cputc::$4 reg byte a 20002.0 +byte~ cputc::$5 reg byte a 20002.0 +byte~ cputc::$6 reg byte a 20002.0 +byte cputc::c +byte cputc::c#0 c zp[1]:36 1235.4705882352941 +byte cputc::color +byte cputc::color#0 reg byte x 1428.7142857142858 +byte* cputc::conio_addr +byte* cputc::conio_addr#0 conio_addr zp[2]:43 10001.0 +byte* cputc::conio_addr#1 conio_addr zp[2]:43 6000.6 +byte cputc::scroll_enable +byte cputc::scroll_enable#0 reg byte a 20002.0 +void cputln() +byte~ cputln::$2 reg byte a 200002.0 +byte~ cputln::$3 reg byte a 200002.0 +word cputln::temp +word cputln::temp#0 temp zp[2]:55 200002.0 +word cputln::temp#1 temp zp[2]:55 100001.0 +void cputs(to_nomodify byte* cputs::s) +byte cputs::c +byte cputs::c#1 reg byte a 1001.0 +to_nomodify byte* cputs::s +to_nomodify byte* cputs::s#0 s zp[2]:15 500.5 +to_nomodify byte* cputs::s#2 s zp[2]:15 1501.5 +void cscroll() +void gotoxy(byte gotoxy::x , byte gotoxy::y) +byte~ gotoxy::$5 reg byte a 2.0000002E7 +word~ gotoxy::$6 zp[2]:32 2.0000002E7 +word gotoxy::line_offset +word gotoxy::line_offset#0 line_offset zp[2]:32 1.0000001E7 +byte gotoxy::x +byte gotoxy::y +byte gotoxy::y#0 reg byte x 22.0 +byte gotoxy::y#2 reg byte x 2000002.0 +byte gotoxy::y#3 reg byte x 7000004.666666666 +byte gotoxy::y#4 reg byte x 4000000.4 +void insertup() +byte~ insertup::$3 reg byte a 2.000000002E9 +byte insertup::cy +byte insertup::cy#0 cy zp[1]:57 8.416666683333334E7 +byte insertup::i +byte insertup::i#1 reg byte x 2.000000002E9 +byte insertup::i#2 reg byte x 4.444444448888889E8 +word insertup::line +word insertup::line#0 line zp[2]:59 2.000000002E9 +byte* insertup::start +byte* insertup::start#0 start zp[2]:59 1.000000001E9 +byte insertup::width +byte insertup::width#0 width zp[1]:58 9.1818182E7 +byte load(volatile byte* load::address , volatile byte load::verify) +volatile byte* load::address loadstore zp[2]:40 33.666666666666664 +byte load::return +volatile byte load::status loadstore zp[1]:48 1001.0 +volatile byte load::verify loadstore zp[1]:42 50.5 +void main() +const nomodify dword main::BANK_SPRITE = $12000 +struct VERA_SPRITE main::SPRITE_ATTR loadstore zp[8]:67 +const nomodify dword main::VRAM_SPRITE = $10000 +const byte* main::filename[7] = "SPRITE" +const byte* main::s[$2d] = " + +sprite banked file load and display demo. +" +void memcpy_in_vram(byte memcpy_in_vram::dest_bank , void* memcpy_in_vram::dest , byte memcpy_in_vram::dest_increment , byte memcpy_in_vram::src_bank , void* memcpy_in_vram::src , byte memcpy_in_vram::src_increment , word memcpy_in_vram::num) +byte~ memcpy_in_vram::$0 reg byte a 2.0000000002E10 +byte~ memcpy_in_vram::$1 reg byte a 2.0000000002E10 +byte~ memcpy_in_vram::$3 reg byte a 2.0000000002E10 +byte~ memcpy_in_vram::$4 reg byte a 2.0000000002E10 +void* memcpy_in_vram::dest +void* memcpy_in_vram::dest#0 dest zp[2]:59 1.9090909093636363E9 +byte memcpy_in_vram::dest_bank +byte memcpy_in_vram::dest_increment +word memcpy_in_vram::i +word memcpy_in_vram::i#1 i zp[2]:45 2.0000000000002E13 +word memcpy_in_vram::i#2 i zp[2]:45 1.0000000000001E13 +word memcpy_in_vram::num +word memcpy_in_vram::num#0 num zp[2]:63 5.882941176471765E11 +void* memcpy_in_vram::src +byte* memcpy_in_vram::src#0 src zp[2]:61 1.6666666683333334E8 +byte memcpy_in_vram::src_bank +byte memcpy_in_vram::src_increment +void memcpy_to_vram(byte memcpy_to_vram::vbank , void* memcpy_to_vram::vdest , void* memcpy_to_vram::src , word memcpy_to_vram::num) +byte* memcpy_to_vram::end +const byte* memcpy_to_vram::end#0 end = (byte*)memcpy_to_vram::src#0+SIZEOF_STRUCT_VERA_SPRITE +word memcpy_to_vram::num +byte* memcpy_to_vram::s +byte* memcpy_to_vram::s#1 s zp[2]:15 2002.0 +byte* memcpy_to_vram::s#2 s zp[2]:15 1334.6666666666667 +void* memcpy_to_vram::src +const void* memcpy_to_vram::src#0 src = (void*)&main::SPRITE_ATTR +byte memcpy_to_vram::vbank +const byte memcpy_to_vram::vbank#0 vbank = (byte)>VERA_SPRITE_ATTR +void* memcpy_to_vram::vdest +const void* memcpy_to_vram::vdest#0 vdest = (void*)>1 +byte vera_layer_mode_tile::tileheight +byte vera_layer_mode_tile::tilewidth +const byte* vera_layer_rowshift[2] = { 0, 0 } +const word* vera_layer_rowskip[2] = { 0, 0 } +byte vera_layer_set_backcolor(byte vera_layer_set_backcolor::layer , byte vera_layer_set_backcolor::color) +byte vera_layer_set_backcolor::color +byte vera_layer_set_backcolor::layer +const byte vera_layer_set_backcolor::layer#0 layer = 1 +byte vera_layer_set_backcolor::old +byte vera_layer_set_backcolor::return +void vera_layer_set_config(byte vera_layer_set_config::layer , byte vera_layer_set_config::config) +byte* vera_layer_set_config::addr +byte* vera_layer_set_config::addr#0 addr zp[2]:49 20002.0 +byte vera_layer_set_config::config +byte vera_layer_set_config::layer +void vera_layer_set_mapbase(byte vera_layer_set_mapbase::layer , byte vera_layer_set_mapbase::mapbase) +byte~ vera_layer_set_mapbase::$0 reg byte a 20002.0 +byte* vera_layer_set_mapbase::addr +byte* vera_layer_set_mapbase::addr#0 addr zp[2]:30 20002.0 +byte vera_layer_set_mapbase::layer +byte vera_layer_set_mapbase::layer#3 reg byte a 10001.0 +byte vera_layer_set_mapbase::mapbase +byte vera_layer_set_mapbase::mapbase#3 reg byte x 3333.6666666666665 +void vera_layer_set_text_color_mode(byte vera_layer_set_text_color_mode::layer , byte vera_layer_set_text_color_mode::color_mode) +byte~ vera_layer_set_text_color_mode::$0 reg byte a 2002.0 +byte* vera_layer_set_text_color_mode::addr +byte* vera_layer_set_text_color_mode::addr#0 addr zp[2]:34 2502.5 +byte vera_layer_set_text_color_mode::color_mode +byte vera_layer_set_text_color_mode::layer +byte vera_layer_set_text_color_mode::layer#3 reg byte a 1001.0 +byte vera_layer_set_textcolor(byte vera_layer_set_textcolor::layer , byte vera_layer_set_textcolor::color) +byte vera_layer_set_textcolor::color +byte vera_layer_set_textcolor::layer +const byte vera_layer_set_textcolor::layer#0 layer = 1 +byte vera_layer_set_textcolor::old +byte vera_layer_set_textcolor::return +void vera_layer_set_tilebase(byte vera_layer_set_tilebase::layer , byte vera_layer_set_tilebase::tilebase) +byte* vera_layer_set_tilebase::addr +byte* vera_layer_set_tilebase::addr#0 addr zp[2]:51 20002.0 +byte vera_layer_set_tilebase::layer +byte vera_layer_set_tilebase::tilebase +const byte* vera_layer_textcolor[2] = { WHITE, WHITE } +const byte** vera_layer_tilebase[2] = { VERA_L0_TILEBASE, VERA_L1_TILEBASE } +const dword* vera_mapbase_address[2] = { 0, 0 } +const byte* vera_mapbase_bank[2] = { 0, 0 } +const word* vera_mapbase_offset[2] = { 0, 0 } +const dword* vera_tilebase_address[2] = { 0, 0 } +const byte* vera_tilebase_bank[2] = { 0, 0 } +const word* vera_tilebase_offset[2] = { 0, 0 } + +zp[1]:2 [ conio_x16_init::line#3 conio_x16_init::line#1 conio_x16_init::line#0 ] +reg byte a [ vera_layer_set_mapbase::layer#3 ] +reg byte x [ vera_layer_set_mapbase::mapbase#3 ] +reg byte x [ gotoxy::y#4 gotoxy::y#3 gotoxy::y#0 gotoxy::y#2 ] +reg byte a [ vera_layer_set_text_color_mode::layer#3 ] +reg byte x [ clrscr::l#2 clrscr::l#1 ] +reg byte y [ clrscr::c#2 clrscr::c#1 ] +zp[4]:3 [ bnkcpy_vram_address::vdest#2 ] +zp[4]:7 [ bnkcpy_vram_address::num#2 bnkcpy_vram_address::end#0 ] +zp[4]:11 [ bnkcpy_vram_address::pos#2 bnkcpy_vram_address::beg#0 bnkcpy_vram_address::pos#1 ] +reg byte x [ bnkcpy_vram_address::bank#2 bnkcpy_vram_address::bank#0 bnkcpy_vram_address::bank#5 bnkcpy_vram_address::bank#1 ] +zp[2]:15 [ memcpy_to_vram::s#2 memcpy_to_vram::s#1 bnkcpy_vram_address::addr#5 bnkcpy_vram_address::addr#4 bnkcpy_vram_address::addr#1 bnkcpy_vram_address::addr#2 bnkcpy_vram_address::addr#0 bnkcpy_vram_address::$18 cputs::s#2 cputs::s#0 clrscr::line_text#2 clrscr::line_text#1 clrscr::line_text#0 ] +reg byte x [ vera_layer_get_color::layer#2 vera_layer_get_color::layer#1 vera_layer_get_color::layer#0 ] +reg byte a [ vera_layer_get_color::return#2 vera_layer_get_color::return#0 vera_layer_get_color::return#1 ] +reg byte x [ insertup::i#2 insertup::i#1 ] +zp[1]:17 [ conio_screen_width ] +zp[1]:18 [ conio_screen_height ] +zp[1]:19 [ conio_screen_layer ] +zp[2]:20 [ conio_width ] +zp[2]:22 [ conio_height ] +zp[1]:24 [ conio_rowshift ] +zp[2]:25 [ conio_rowskip ] +reg byte a [ screensize::hscale#0 ] +reg byte a [ screensize::$1 ] +reg byte a [ screensize::vscale#0 ] +reg byte a [ screensize::$3 ] +reg byte x [ vera_layer_get_mapbase_bank::layer#0 ] +reg byte a [ vera_layer_get_mapbase_bank::return#2 ] +zp[1]:27 [ CONIO_SCREEN_BANK#14 ] +reg byte a [ vera_layer_get_mapbase_offset::layer#0 ] +zp[2]:28 [ CONIO_SCREEN_TEXT#16 ] +reg byte a [ screenlayer::vera_layer_get_width1_layer#0 ] +reg byte a [ screenlayer::vera_layer_get_width1_$2 ] +reg byte a [ screenlayer::vera_layer_get_width1_$0 ] +reg byte a [ screenlayer::vera_layer_get_width1_$1 ] +reg byte a [ screenlayer::vera_layer_get_width1_$3 ] +reg byte x [ vera_layer_get_rowshift::layer#0 ] +reg byte a [ vera_layer_get_rowshift::return#2 ] +reg byte a [ screenlayer::$3 ] +reg byte a [ vera_layer_get_rowskip::layer#0 ] +reg byte a [ screenlayer::vera_layer_get_height1_layer#0 ] +reg byte a [ screenlayer::vera_layer_get_height1_$2 ] +reg byte a [ screenlayer::vera_layer_get_height1_$0 ] +reg byte a [ screenlayer::vera_layer_get_height1_$1 ] +reg byte a [ screenlayer::vera_layer_get_height1_$3 ] +reg byte a [ vera_layer_set_mapbase::$0 ] +zp[2]:30 [ vera_layer_set_mapbase::addr#0 screenlayer::vera_layer_get_width1_return#0 screenlayer::vera_layer_get_width1_return#1 screenlayer::$2 ] +zp[2]:32 [ gotoxy::$6 gotoxy::line_offset#0 vera_layer_get_rowskip::return#2 screenlayer::$4 vera_layer_get_rowskip::return#0 ] +reg byte a [ gotoxy::$5 ] +reg byte a [ vera_layer_set_text_color_mode::$0 ] +zp[2]:34 [ vera_layer_set_text_color_mode::addr#0 screenlayer::vera_layer_get_height1_config#0 ] +reg byte x [ vera_layer_get_backcolor::layer#0 ] +reg byte a [ vera_layer_get_backcolor::return#2 ] +reg byte a [ clrscr::$0 ] +reg byte x [ vera_layer_get_textcolor::layer#0 ] +reg byte a [ vera_layer_get_textcolor::return#2 ] +reg byte a [ clrscr::$2 ] +reg byte a [ clrscr::$9 ] +reg byte a [ clrscr::$5 ] +reg byte a [ clrscr::$6 ] +reg byte a [ clrscr::$7 ] +reg byte a [ cputs::c#1 ] +zp[1]:36 [ cputc::c#0 clrscr::$1 clrscr::color#0 ] +zp[2]:37 [ setnam::filename ] +zp[1]:39 [ setlfs::device ] +zp[2]:40 [ load::address ] +zp[1]:42 [ load::verify ] +reg byte a [ bnkcpy_vram_address::$1 ] +reg byte a [ bnkcpy_vram_address::$3 ] +reg byte a [ bnkcpy_vram_address::$5 ] +reg byte y [ bnkcpy_vram_address::$9 ] +reg byte x [ bnkcpy_vram_address::$11 ] +reg byte a [ bnkcpy_vram_address::$16 ] +reg byte a [ vera_layer_get_mapbase_bank::return#0 ] +reg byte a [ vera_layer_get_mapbase_offset::$0 ] +reg byte a [ vera_layer_get_rowshift::return#0 ] +reg byte a [ vera_layer_get_rowskip::$0 ] +reg byte a [ vera_layer_get_backcolor::return#0 ] +reg byte a [ vera_layer_get_textcolor::return#0 ] +reg byte a [ vera_layer_get_color::return#3 ] +reg byte x [ cputc::color#0 ] +reg byte a [ cputc::$15 ] +zp[2]:43 [ cputc::conio_addr#0 cputc::conio_addr#1 bnkcpy_vram_address::$0 clearline::c#2 clearline::c#1 strlen::str#2 strlen::str#1 strlen::str#0 ] +reg byte a [ cputc::$2 ] +reg byte a [ cputc::$4 ] +reg byte a [ cputc::$5 ] +reg byte a [ cputc::$6 ] +reg byte a [ cputc::scroll_enable#0 ] +zp[2]:45 [ cputc::$16 bnkcpy_vram_address::$2 memcpy_in_vram::i#2 memcpy_in_vram::i#1 strlen::len#2 strlen::len#1 strlen::return#2 setnam::$0 ] +zp[1]:47 [ setnam::filename_len ] +zp[1]:48 [ load::status ] +zp[2]:49 [ vera_layer_set_config::addr#0 screenlayer::vera_layer_get_height1_return#0 screenlayer::vera_layer_get_height1_return#1 screenlayer::$5 ] +zp[2]:51 [ vera_layer_set_tilebase::addr#0 screenlayer::vera_layer_get_width1_config#0 vera_layer_get_mapbase_offset::return#2 vera_layer_get_mapbase_offset::return#0 ] +reg byte a [ vera_layer_get_color::$3 ] +zp[2]:53 [ vera_layer_get_color::addr#0 bnkcpy_vram_address::$4 ] +reg byte a [ vera_layer_get_color::$0 ] +reg byte a [ vera_layer_get_color::$1 ] +reg byte a [ cputln::$2 ] +zp[2]:55 [ cputln::temp#0 cputln::temp#1 bnkcpy_vram_address::$7 bnkcpy_vram_address::$8 ] +reg byte a [ cputln::$3 ] +zp[1]:57 [ insertup::cy#0 ] +zp[1]:58 [ insertup::width#0 ] +reg byte a [ insertup::$3 ] +zp[2]:59 [ insertup::line#0 insertup::start#0 memcpy_in_vram::dest#0 bnkcpy_vram_address::$10 ] +zp[2]:61 [ memcpy_in_vram::src#0 bnkcpy_vram_address::$23 bnkcpy_vram_address::$12 bnkcpy_vram_address::$13 bnkcpy_vram_address::$17 ] +zp[2]:63 [ memcpy_in_vram::num#0 bnkcpy_vram_address::$14 bnkcpy_vram_address::$15 ] +reg byte a [ clearline::$5 ] +zp[2]:65 [ clearline::addr#0 bnkcpy_vram_address::$24 ] +reg byte a [ clearline::$1 ] +reg byte a [ clearline::$2 ] +reg byte a [ vera_layer_get_color::return#4 ] +reg byte x [ clearline::color#0 ] +reg byte a [ memcpy_in_vram::$0 ] +reg byte a [ memcpy_in_vram::$1 ] +reg byte a [ memcpy_in_vram::$3 ] +reg byte a [ memcpy_in_vram::$4 ] +zp[8]:67 [ main::SPRITE_ATTR ] diff --git a/src/test/ref/examples/cx16/cx16-rasterbars.log b/src/test/ref/examples/cx16/cx16-rasterbars.log index 97535fd18..acd74a190 100644 --- a/src/test/ref/examples/cx16/cx16-rasterbars.log +++ b/src/test/ref/examples/cx16/cx16-rasterbars.log @@ -1,4 +1,11 @@ Resolved forward reference irq_line to __interrupt(rom_min_cx16) void irq_line() +Setting inferred volatile on symbol affected by address-of: setnam::filename_len in asm { ldafilename_len ldxfilename ldyfilename+1 jsr$ffbd } +Setting inferred volatile on symbol affected by address-of: setnam::filename in asm { ldafilename_len ldxfilename ldyfilename+1 jsr$ffbd } +Setting inferred volatile on symbol affected by address-of: setlfs::device in asm { ldxdevice lda#1 ldy#0 jsr$ffba } +Setting inferred volatile on symbol affected by address-of: load::address in asm { ldxaddress ldyaddress+1 ldaverify jsr$ffd5 bcserror lda#$ff error: stastatus } +Setting inferred volatile on symbol affected by address-of: load::verify in asm { ldxaddress ldyaddress+1 ldaverify jsr$ffd5 bcserror lda#$ff error: stastatus } +Setting inferred volatile on symbol affected by address-of: load::status in asm { ldxaddress ldyaddress+1 ldaverify jsr$ffd5 bcserror lda#$ff error: stastatus } +Setting inferred volatile on symbol affected by address-of: getin::ch in asm { jsr$ffe4 stach } Inlined call call SEI Inlined call call CLI Inlined call call __init diff --git a/src/test/ref/examples/cx16/cx16-sprites.asm b/src/test/ref/examples/cx16/cx16-sprites.asm index d50d8f9f4..8885a5ac7 100644 --- a/src/test/ref/examples/cx16/cx16-sprites.asm +++ b/src/test/ref/examples/cx16/cx16-sprites.asm @@ -462,7 +462,7 @@ memcpy_to_vram: { } .segment Data // A 64*64 8bpp TUT sprite and palette - .align $1000 + .align $400 SPRITE_PIXELS: .var pic = LoadPicture("tut.png") // palette: rgb->idx diff --git a/src/test/ref/examples/cx16/cx16-sprites.log b/src/test/ref/examples/cx16/cx16-sprites.log index a7c9a02e5..f66ae0635 100644 --- a/src/test/ref/examples/cx16/cx16-sprites.log +++ b/src/test/ref/examples/cx16/cx16-sprites.log @@ -1,6 +1,13 @@ Resolved forward reference irq_vsync to __interrupt(rom_sys_cx16) void irq_vsync() Setting struct to load/store in variable affected by address-of main::$6 = call memcpy_to_vram (byte)>VERA_SPRITE_ATTR main::vram_sprite_attr &SPRITE_ATTR main::$5 Setting struct to load/store in variable affected by address-of irq_vsync::$5 = call memcpy_to_vram irq_vsync::vram_sprite_attr_bank irq_vsync::vram_sprite_pos &SPRITE_ATTR+2 4 +Setting inferred volatile on symbol affected by address-of: setnam::filename_len in asm { ldafilename_len ldxfilename ldyfilename+1 jsr$ffbd } +Setting inferred volatile on symbol affected by address-of: setnam::filename in asm { ldafilename_len ldxfilename ldyfilename+1 jsr$ffbd } +Setting inferred volatile on symbol affected by address-of: setlfs::device in asm { ldxdevice lda#1 ldy#0 jsr$ffba } +Setting inferred volatile on symbol affected by address-of: load::address in asm { ldxaddress ldyaddress+1 ldaverify jsr$ffd5 bcserror lda#$ff error: stastatus } +Setting inferred volatile on symbol affected by address-of: load::verify in asm { ldxaddress ldyaddress+1 ldaverify jsr$ffd5 bcserror lda#$ff error: stastatus } +Setting inferred volatile on symbol affected by address-of: load::status in asm { ldxaddress ldyaddress+1 ldaverify jsr$ffd5 bcserror lda#$ff error: stastatus } +Setting inferred volatile on symbol affected by address-of: getin::ch in asm { jsr$ffe4 stach } Resolving sizeof() main::$5 = sizeof SPRITE_ATTR Resolving sizeof() main::$7 = sizeof SPRITE_ATTR Resolving sizeof() irq_vsync::$6 = sizeof SPRITE_ATTR @@ -1669,7 +1676,7 @@ memcpy_to_vram: { // File Data .segment Data // A 64*64 8bpp TUT sprite and palette - .align $1000 + .align $400 SPRITE_PIXELS: .var pic = LoadPicture("tut.png") // palette: rgb->idx @@ -2537,7 +2544,7 @@ memcpy_to_vram: { // File Data .segment Data // A 64*64 8bpp TUT sprite and palette - .align $1000 + .align $400 SPRITE_PIXELS: .var pic = LoadPicture("tut.png") // palette: rgb->idx diff --git a/src/test/ref/examples/cx16/cx16-text.log b/src/test/ref/examples/cx16/cx16-text.log index 831a0155a..1cddc658c 100644 --- a/src/test/ref/examples/cx16/cx16-text.log +++ b/src/test/ref/examples/cx16/cx16-text.log @@ -1,3 +1,10 @@ +Setting inferred volatile on symbol affected by address-of: setnam::filename_len in asm { ldafilename_len ldxfilename ldyfilename+1 jsr$ffbd } +Setting inferred volatile on symbol affected by address-of: setnam::filename in asm { ldafilename_len ldxfilename ldyfilename+1 jsr$ffbd } +Setting inferred volatile on symbol affected by address-of: setlfs::device in asm { ldxdevice lda#1 ldy#0 jsr$ffba } +Setting inferred volatile on symbol affected by address-of: load::address in asm { ldxaddress ldyaddress+1 ldaverify jsr$ffd5 bcserror lda#$ff error: stastatus } +Setting inferred volatile on symbol affected by address-of: load::verify in asm { ldxaddress ldyaddress+1 ldaverify jsr$ffd5 bcserror lda#$ff error: stastatus } +Setting inferred volatile on symbol affected by address-of: load::status in asm { ldxaddress ldyaddress+1 ldaverify jsr$ffd5 bcserror lda#$ff error: stastatus } +Setting inferred volatile on symbol affected by address-of: getin::ch in asm { jsr$ffe4 stach } CONTROL FLOW GRAPH SSA diff --git a/src/test/ref/examples/cx16/cx16-tilemap.log b/src/test/ref/examples/cx16/cx16-tilemap.log index e70c5b8a9..8e21d2b11 100644 --- a/src/test/ref/examples/cx16/cx16-tilemap.log +++ b/src/test/ref/examples/cx16/cx16-tilemap.log @@ -6,6 +6,13 @@ Fixing struct type SIZE_OF struct printf_buffer_number to 12 Setting inferred volatile on symbol affected by address-of kbhit::ch Setting inferred volatile on symbol affected by address-of conio_x16_init::$1 = call screensize &conio_screen_width &conio_screen_height Setting inferred volatile on symbol affected by address-of conio_x16_init::$1 = call screensize &conio_screen_width &conio_screen_height +Setting inferred volatile on symbol affected by address-of: setnam::filename_len in asm { ldafilename_len ldxfilename ldyfilename+1 jsr$ffbd } +Setting inferred volatile on symbol affected by address-of: setnam::filename in asm { ldafilename_len ldxfilename ldyfilename+1 jsr$ffbd } +Setting inferred volatile on symbol affected by address-of: setlfs::device in asm { ldxdevice lda#1 ldy#0 jsr$ffba } +Setting inferred volatile on symbol affected by address-of: load::address in asm { ldxaddress ldyaddress+1 ldaverify jsr$ffd5 bcserror lda#$ff error: stastatus } +Setting inferred volatile on symbol affected by address-of: load::verify in asm { ldxaddress ldyaddress+1 ldaverify jsr$ffd5 bcserror lda#$ff error: stastatus } +Setting inferred volatile on symbol affected by address-of: load::status in asm { ldxaddress ldyaddress+1 ldaverify jsr$ffd5 bcserror lda#$ff error: stastatus } +Setting inferred volatile on symbol affected by address-of: getin::ch in asm { jsr$ffe4 stach } Inlined call call vera_display_set_scale_double Inlined call call vera_display_set_scale_none Inlined call call vera_vram_address0 vera_tile_area::mapbase VERA_INC_1 diff --git a/src/test/ref/examples/cx16/cx16-veralayers.log b/src/test/ref/examples/cx16/cx16-veralayers.log index 29417e862..455543237 100644 --- a/src/test/ref/examples/cx16/cx16-veralayers.log +++ b/src/test/ref/examples/cx16/cx16-veralayers.log @@ -5,6 +5,13 @@ Fixing struct type SIZE_OF struct printf_buffer_number to 12 Setting inferred volatile on symbol affected by address-of kbhit::ch Setting inferred volatile on symbol affected by address-of conio_x16_init::$1 = call screensize &conio_screen_width &conio_screen_height Setting inferred volatile on symbol affected by address-of conio_x16_init::$1 = call screensize &conio_screen_width &conio_screen_height +Setting inferred volatile on symbol affected by address-of: setnam::filename_len in asm { ldafilename_len ldxfilename ldyfilename+1 jsr$ffbd } +Setting inferred volatile on symbol affected by address-of: setnam::filename in asm { ldafilename_len ldxfilename ldyfilename+1 jsr$ffbd } +Setting inferred volatile on symbol affected by address-of: setlfs::device in asm { ldxdevice lda#1 ldy#0 jsr$ffba } +Setting inferred volatile on symbol affected by address-of: load::address in asm { ldxaddress ldyaddress+1 ldaverify jsr$ffd5 bcserror lda#$ff error: stastatus } +Setting inferred volatile on symbol affected by address-of: load::verify in asm { ldxaddress ldyaddress+1 ldaverify jsr$ffd5 bcserror lda#$ff error: stastatus } +Setting inferred volatile on symbol affected by address-of: load::status in asm { ldxaddress ldyaddress+1 ldaverify jsr$ffd5 bcserror lda#$ff error: stastatus } +Setting inferred volatile on symbol affected by address-of: getin::ch in asm { jsr$ffe4 stach } Added struct type cast to parameter value list call printf_uchar main::$10 (struct printf_format_number){ 0, 0, 0, 0, 0, DECIMAL } Added struct type cast to parameter value list call printf_uchar main::$11 (struct printf_format_number){ 0, 0, 0, 0, 0, DECIMAL } Added struct type cast to parameter value list call printf_uchar main::dcvideo (struct printf_format_number){ 0, 0, 0, 0, 0, HEXADECIMAL } @@ -77,6 +84,92 @@ Eliminating unused variable with no statement main::$80 CONTROL FLOW GRAPH SSA +byte toupper(byte toupper::ch) +toupper: scope:[toupper] from strupr::@2 + toupper::ch#1 = phi( strupr::@2/toupper::ch#0 ) + toupper::$0 = toupper::ch#1 >= 'a' + toupper::$1 = toupper::ch#1 <= 'z' + toupper::$2 = toupper::$0 && toupper::$1 + if(toupper::$2) goto toupper::@1 + to:toupper::@2 +toupper::@1: scope:[toupper] from toupper + toupper::ch#2 = phi( toupper/toupper::ch#1 ) + toupper::$3 = toupper::ch#2 + 'A'-'a' + toupper::return#0 = toupper::$3 + to:toupper::@return +toupper::@2: scope:[toupper] from toupper + toupper::ch#3 = phi( toupper/toupper::ch#1 ) + toupper::return#1 = toupper::ch#3 + to:toupper::@return +toupper::@return: scope:[toupper] from toupper::@1 toupper::@2 + toupper::return#4 = phi( toupper::@1/toupper::return#0, toupper::@2/toupper::return#1 ) + toupper::return#2 = toupper::return#4 + return + to:@return + +byte* strupr(byte* strupr::str) +strupr: scope:[strupr] from printf_number_buffer::@11 + strupr::str#1 = phi( printf_number_buffer::@11/strupr::str#0 ) + strupr::src#0 = strupr::str#1 + to:strupr::@1 +strupr::@1: scope:[strupr] from strupr strupr::@4 + strupr::str#3 = phi( strupr/strupr::str#1, strupr::@4/strupr::str#4 ) + strupr::src#2 = phi( strupr/strupr::src#0, strupr::@4/strupr::src#1 ) + strupr::$1 = 0 != *strupr::src#2 + if(strupr::$1) goto strupr::@2 + to:strupr::@3 +strupr::@2: scope:[strupr] from strupr::@1 + strupr::str#5 = phi( strupr::@1/strupr::str#3 ) + strupr::src#3 = phi( strupr::@1/strupr::src#2 ) + toupper::ch#0 = *strupr::src#3 + call toupper + toupper::return#3 = toupper::return#2 + to:strupr::@4 +strupr::@4: scope:[strupr] from strupr::@2 + strupr::str#4 = phi( strupr::@2/strupr::str#5 ) + strupr::src#4 = phi( strupr::@2/strupr::src#3 ) + toupper::return#5 = phi( strupr::@2/toupper::return#3 ) + strupr::$0 = toupper::return#5 + *strupr::src#4 = strupr::$0 + strupr::src#1 = ++ strupr::src#4 + to:strupr::@1 +strupr::@3: scope:[strupr] from strupr::@1 + strupr::str#2 = phi( strupr::@1/strupr::str#3 ) + strupr::return#0 = strupr::str#2 + to:strupr::@return +strupr::@return: scope:[strupr] from strupr::@3 + strupr::return#3 = phi( strupr::@3/strupr::return#0 ) + strupr::return#1 = strupr::return#3 + return + to:@return + +word strlen(byte* strlen::str) +strlen: scope:[strlen] from printf_number_buffer::@6 + strlen::str#4 = phi( printf_number_buffer::@6/strlen::str#1 ) + strlen::len#0 = 0 + to:strlen::@1 +strlen::@1: scope:[strlen] from strlen strlen::@2 + strlen::len#4 = phi( strlen/strlen::len#0, strlen::@2/strlen::len#1 ) + strlen::str#2 = phi( strlen/strlen::str#4, strlen::@2/strlen::str#0 ) + strlen::$0 = 0 != *strlen::str#2 + if(strlen::$0) goto strlen::@2 + to:strlen::@3 +strlen::@2: scope:[strlen] from strlen::@1 + strlen::str#3 = phi( strlen::@1/strlen::str#2 ) + strlen::len#2 = phi( strlen::@1/strlen::len#4 ) + strlen::len#1 = ++ strlen::len#2 + strlen::str#0 = ++ strlen::str#3 + to:strlen::@1 +strlen::@3: scope:[strlen] from strlen::@1 + strlen::len#3 = phi( strlen::@1/strlen::len#4 ) + strlen::return#0 = strlen::len#3 + to:strlen::@return +strlen::@return: scope:[strlen] from strlen::@3 + strlen::return#3 = phi( strlen::@3/strlen::return#0 ) + strlen::return#1 = strlen::return#3 + return + to:@return + void memcpy_in_vram(byte memcpy_in_vram::dest_bank , void* memcpy_in_vram::dest , byte memcpy_in_vram::dest_increment , byte memcpy_in_vram::src_bank , void* memcpy_in_vram::src , byte memcpy_in_vram::src_increment , word memcpy_in_vram::num) memcpy_in_vram: scope:[memcpy_in_vram] from insertup::@2 memcpy_in_vram::num#2 = phi( insertup::@2/memcpy_in_vram::num#0 ) @@ -749,92 +842,6 @@ vera_layer_mode_text::@return: scope:[vera_layer_mode_text] from vera_layer_mod return to:@return -byte toupper(byte toupper::ch) -toupper: scope:[toupper] from strupr::@2 - toupper::ch#1 = phi( strupr::@2/toupper::ch#0 ) - toupper::$0 = toupper::ch#1 >= 'a' - toupper::$1 = toupper::ch#1 <= 'z' - toupper::$2 = toupper::$0 && toupper::$1 - if(toupper::$2) goto toupper::@1 - to:toupper::@2 -toupper::@1: scope:[toupper] from toupper - toupper::ch#2 = phi( toupper/toupper::ch#1 ) - toupper::$3 = toupper::ch#2 + 'A'-'a' - toupper::return#0 = toupper::$3 - to:toupper::@return -toupper::@2: scope:[toupper] from toupper - toupper::ch#3 = phi( toupper/toupper::ch#1 ) - toupper::return#1 = toupper::ch#3 - to:toupper::@return -toupper::@return: scope:[toupper] from toupper::@1 toupper::@2 - toupper::return#4 = phi( toupper::@1/toupper::return#0, toupper::@2/toupper::return#1 ) - toupper::return#2 = toupper::return#4 - return - to:@return - -byte* strupr(byte* strupr::str) -strupr: scope:[strupr] from printf_number_buffer::@11 - strupr::str#1 = phi( printf_number_buffer::@11/strupr::str#0 ) - strupr::src#0 = strupr::str#1 - to:strupr::@1 -strupr::@1: scope:[strupr] from strupr strupr::@4 - strupr::str#3 = phi( strupr/strupr::str#1, strupr::@4/strupr::str#4 ) - strupr::src#2 = phi( strupr/strupr::src#0, strupr::@4/strupr::src#1 ) - strupr::$1 = 0 != *strupr::src#2 - if(strupr::$1) goto strupr::@2 - to:strupr::@3 -strupr::@2: scope:[strupr] from strupr::@1 - strupr::str#5 = phi( strupr::@1/strupr::str#3 ) - strupr::src#3 = phi( strupr::@1/strupr::src#2 ) - toupper::ch#0 = *strupr::src#3 - call toupper - toupper::return#3 = toupper::return#2 - to:strupr::@4 -strupr::@4: scope:[strupr] from strupr::@2 - strupr::str#4 = phi( strupr::@2/strupr::str#5 ) - strupr::src#4 = phi( strupr::@2/strupr::src#3 ) - toupper::return#5 = phi( strupr::@2/toupper::return#3 ) - strupr::$0 = toupper::return#5 - *strupr::src#4 = strupr::$0 - strupr::src#1 = ++ strupr::src#4 - to:strupr::@1 -strupr::@3: scope:[strupr] from strupr::@1 - strupr::str#2 = phi( strupr::@1/strupr::str#3 ) - strupr::return#0 = strupr::str#2 - to:strupr::@return -strupr::@return: scope:[strupr] from strupr::@3 - strupr::return#3 = phi( strupr::@3/strupr::return#0 ) - strupr::return#1 = strupr::return#3 - return - to:@return - -word strlen(byte* strlen::str) -strlen: scope:[strlen] from printf_number_buffer::@6 - strlen::str#4 = phi( printf_number_buffer::@6/strlen::str#1 ) - strlen::len#0 = 0 - to:strlen::@1 -strlen::@1: scope:[strlen] from strlen strlen::@2 - strlen::len#4 = phi( strlen/strlen::len#0, strlen::@2/strlen::len#1 ) - strlen::str#2 = phi( strlen/strlen::str#4, strlen::@2/strlen::str#0 ) - strlen::$0 = 0 != *strlen::str#2 - if(strlen::$0) goto strlen::@2 - to:strlen::@3 -strlen::@2: scope:[strlen] from strlen::@1 - strlen::str#3 = phi( strlen::@1/strlen::str#2 ) - strlen::len#2 = phi( strlen::@1/strlen::len#4 ) - strlen::len#1 = ++ strlen::len#2 - strlen::str#0 = ++ strlen::str#3 - to:strlen::@1 -strlen::@3: scope:[strlen] from strlen::@1 - strlen::len#3 = phi( strlen::@1/strlen::len#4 ) - strlen::return#0 = strlen::len#3 - to:strlen::@return -strlen::@return: scope:[strlen] from strlen::@3 - strlen::return#3 = phi( strlen::@3/strlen::return#0 ) - strlen::return#1 = strlen::return#3 - return - to:@return - void conio_x16_init() conio_x16_init: scope:[conio_x16_init] from __start::__init1 CONIO_SCREEN_TEXT#64 = phi( __start::__init1/CONIO_SCREEN_TEXT#8 ) @@ -5596,6 +5603,8 @@ const dword* vera_tilebase_address[2] = { 0, 0 } const byte* vera_tilebase_bank[2] = { 0, 0 } const word* vera_tilebase_offset[2] = { 0, 0 } +Adding number conversion cast (unumber) 0 in strupr::$1 = 0 != *strupr::src#2 +Adding number conversion cast (unumber) 0 in strlen::$0 = 0 != *strlen::str#2 Adding number conversion cast (unumber) 0 in vera_layer_get_color::$4 = 0 != vera_layer_get_color::$0 Adding number conversion cast (unumber) 4 in vera_layer_get_color::$1 = vera_layer_backcolor[vera_layer_get_color::layer#4] << 4 Adding number conversion cast (unumber) 1 in if(vera_layer_mode_tile::color_depth#1==1) goto vera_layer_mode_tile::@4 @@ -5627,8 +5636,6 @@ Adding number conversion cast (unumber) $10 in if(vera_layer_mode_tile::tileheig Adding number conversion cast (unumber) 1 in vera_layer_mode_tile::color_depth#0 = 1 Adding number conversion cast (unumber) $10 in if(vera_layer_mode_text::color_mode#1==$10) goto vera_layer_mode_text::@2 Adding number conversion cast (unumber) $100 in if(vera_layer_mode_text::color_mode#2==$100) goto vera_layer_mode_text::@3 -Adding number conversion cast (unumber) 0 in strupr::$1 = 0 != *strupr::src#2 -Adding number conversion cast (unumber) 0 in strlen::$0 = 0 != *strlen::str#2 Adding number conversion cast (unumber) 1 in vera_layer_mode_text::layer#0 = 1 Adding number conversion cast (unumber) $80 in vera_layer_mode_text::mapwidth#0 = $80 Adding number conversion cast (unumber) $40 in vera_layer_mode_text::mapheight#0 = $40 @@ -5858,6 +5865,8 @@ Simplifying constant pointer cast (byte*) 214 Simplifying constant pointer cast (byte*) 650 Simplifying constant pointer cast (byte*) 65508 Simplifying constant integer cast 0 +Simplifying constant integer cast 0 +Simplifying constant integer cast 0 Simplifying constant integer cast 4 Simplifying constant integer cast 1 Simplifying constant integer cast 2 @@ -5888,8 +5897,6 @@ Simplifying constant integer cast $10 Simplifying constant integer cast 1 Simplifying constant integer cast $10 Simplifying constant integer cast $100 -Simplifying constant integer cast 0 -Simplifying constant integer cast 0 Simplifying constant integer cast 1 Simplifying constant integer cast 0 Simplifying constant integer cast $f800 @@ -5994,6 +6001,8 @@ Simplifying constant integer cast $13 Simplifying constant integer cast $c Successful SSA optimization PassNCastSimplification Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 0 Finalized unsigned number type (byte) 4 Finalized unsigned number type (byte) 1 Finalized unsigned number type (byte) 2 @@ -6024,8 +6033,6 @@ Finalized unsigned number type (byte) $10 Finalized unsigned number type (byte) 1 Finalized unsigned number type (byte) $10 Finalized unsigned number type (word) $100 -Finalized unsigned number type (byte) 0 -Finalized unsigned number type (byte) 0 Finalized unsigned number type (byte) 1 Finalized unsigned number type (byte) $80 Finalized unsigned number type (byte) $40 @@ -6162,6 +6169,15 @@ Alias candidate removed (volatile)screenlayer::vera_layer_get_width1_return#0 = Alias candidate removed (volatile)conio_rowshift = screenlayer::$3 Alias candidate removed (volatile)conio_rowskip = screenlayer::$4 Alias candidate removed (volatile)screenlayer::vera_layer_get_height1_return#0 = screenlayer::vera_layer_get_height1_return#2 screenlayer::vera_layer_get_height1_return#1 screenlayer::vera_layer_get_height1_return#3 screenlayer::$5 conio_height +Alias toupper::ch#1 = toupper::ch#2 toupper::ch#3 toupper::return#1 +Alias toupper::return#0 = toupper::$3 +Alias toupper::return#2 = toupper::return#4 +Alias strupr::src#0 = strupr::str#1 +Alias strupr::src#2 = strupr::src#3 strupr::src#4 +Alias strupr::str#2 = strupr::str#5 strupr::str#3 strupr::str#4 strupr::return#0 strupr::return#3 strupr::return#1 +Alias toupper::return#3 = toupper::return#5 +Alias strlen::len#2 = strlen::len#4 strlen::len#3 strlen::return#0 strlen::return#3 strlen::return#1 +Alias strlen::str#2 = strlen::str#3 Alias memcpy_in_vram::i#2 = memcpy_in_vram::i#3 Alias memcpy_in_vram::num#1 = memcpy_in_vram::num#3 Alias vera_layer_get_config::return#0 = vera_layer_get_config::return#6 vera_layer_get_config::return#1 @@ -6217,15 +6233,6 @@ Alias vera_layer_mode_tile::layer#18 = vera_layer_mode_tile::layer#19 vera_layer Alias vera_layer_mode_tile::tileheight#1 = vera_layer_mode_tile::tileheight#2 Alias vera_layer_mode_text::color_mode#1 = vera_layer_mode_text::color_mode#3 vera_layer_mode_text::color_mode#2 Alias vera_layer_mode_text::layer#1 = vera_layer_mode_text::layer#4 vera_layer_mode_text::layer#2 vera_layer_mode_text::layer#5 vera_layer_mode_text::layer#3 -Alias toupper::ch#1 = toupper::ch#2 toupper::ch#3 toupper::return#1 -Alias toupper::return#0 = toupper::$3 -Alias toupper::return#2 = toupper::return#4 -Alias strupr::src#0 = strupr::str#1 -Alias strupr::src#2 = strupr::src#3 strupr::src#4 -Alias strupr::str#2 = strupr::str#5 strupr::str#3 strupr::str#4 strupr::return#0 strupr::return#3 strupr::return#1 -Alias toupper::return#3 = toupper::return#5 -Alias strlen::len#2 = strlen::len#4 strlen::len#3 strlen::return#0 strlen::return#3 strlen::return#1 -Alias strlen::str#2 = strlen::str#3 Alias CONIO_SCREEN_BANK#24 = CONIO_SCREEN_BANK#34 CONIO_SCREEN_BANK#44 Alias CONIO_SCREEN_TEXT#26 = CONIO_SCREEN_TEXT#45 CONIO_SCREEN_TEXT#64 Alias conio_x16_init::line#0 = conio_x16_init::line#9 conio_x16_init::line#8 conio_x16_init::line#7 conio_x16_init::line#6 conio_x16_init::line#5 conio_x16_init::line#4 conio_x16_init::line#2 @@ -6521,6 +6528,10 @@ Alias candidate removed (volatile)screenlayer::vera_layer_get_width1_return#0 = Alias candidate removed (volatile)conio_rowshift = screenlayer::$3 Alias candidate removed (volatile)conio_rowskip = screenlayer::$4 Alias candidate removed (volatile)screenlayer::vera_layer_get_height1_return#0 = screenlayer::vera_layer_get_height1_return#2 screenlayer::vera_layer_get_height1_return#1 screenlayer::vera_layer_get_height1_return#3 screenlayer::$5 conio_height +Identical Phi Values toupper::ch#1 toupper::ch#0 +Identical Phi Values strupr::src#0 strupr::str#0 +Identical Phi Values strupr::str#2 strupr::src#0 +Identical Phi Values strlen::str#4 strlen::str#1 Identical Phi Values memcpy_in_vram::src#1 memcpy_in_vram::src#0 Identical Phi Values memcpy_in_vram::src_increment#1 memcpy_in_vram::src_increment#0 Identical Phi Values memcpy_in_vram::src_bank#1 memcpy_in_vram::src_bank#0 @@ -6551,10 +6562,6 @@ Identical Phi Values vera_layer_mode_text::mapheight#1 vera_layer_mode_text::map Identical Phi Values vera_layer_mode_text::tilewidth#1 vera_layer_mode_text::tilewidth#0 Identical Phi Values vera_layer_mode_text::tileheight#1 vera_layer_mode_text::tileheight#0 Identical Phi Values vera_layer_mode_text::color_mode#1 vera_layer_mode_text::color_mode#0 -Identical Phi Values toupper::ch#1 toupper::ch#0 -Identical Phi Values strupr::src#0 strupr::str#0 -Identical Phi Values strupr::str#2 strupr::src#0 -Identical Phi Values strlen::str#4 strlen::str#1 Identical Phi Values CONIO_SCREEN_BANK#24 CONIO_SCREEN_BANK#8 Identical Phi Values CONIO_SCREEN_TEXT#26 CONIO_SCREEN_TEXT#8 Identical Phi Values CONIO_SCREEN_BANK#0 CONIO_SCREEN_BANK#116 @@ -6641,10 +6648,10 @@ Identical Phi Values CONIO_SCREEN_BANK#15 CONIO_SCREEN_BANK#116 Successful SSA optimization Pass2IdenticalPhiElimination Identical Phi Values CONIO_SCREEN_TEXT#16 CONIO_SCREEN_TEXT#134 Successful SSA optimization Pass2IdenticalPhiElimination -Simple Condition memcpy_in_vram::$6 [18] if(memcpy_in_vram::i#2='a') goto toupper::@3 +Simple Condition toupper::$0 [2] if(toupper::ch#0>='a') goto toupper::@3 Simple Condition uctoa::$11 [360] if(0!=uctoa::started#2) goto uctoa::@14 Simple Condition printf_number_buffer::$1 [404] if(0==printf_number_buffer::format_justify_left#0) goto printf_number_buffer::@23 Simple Condition printf_number_buffer::$33 [419] if(0!=printf_number_buffer::format_zero_padding#0) goto printf_number_buffer::@24 @@ -7183,25 +7190,25 @@ Simple Condition printf_number_buffer::$36 [624] if(0!=printf_number_buffer::pad Simple Condition printf_number_buffer::$37 [626] if(0!=printf_number_buffer::padding#10) goto printf_number_buffer::@12 Simple Condition printf_number_buffer::$14 [627] if(0==printf_number_buffer::format_zero_padding#0) goto printf_number_buffer::@25 Successful SSA optimization Pass2ConditionalJumpSimplification -Negating conditional jump and destination [124] if(toupper::ch#0<'a') goto toupper::@2 +Negating conditional jump and destination [2] if(toupper::ch#0<'a') goto toupper::@2 Negating conditional jump and destination [404] if(0!=printf_number_buffer::format_justify_left#0) goto printf_number_buffer::@2 Negating conditional jump and destination [419] if(0==printf_number_buffer::format_zero_padding#0) goto printf_number_buffer::@4 Negating conditional jump and destination [428] if(0==printf_number_buffer::format_justify_left#0) goto printf_number_buffer::@return Negating conditional jump and destination [622] if(0!=printf_number_buffer::format_zero_padding#0) goto printf_number_buffer::@2 Negating conditional jump and destination [627] if(0!=printf_number_buffer::format_zero_padding#0) goto printf_number_buffer::@return Successful SSA optimization Pass2ConditionalJumpSequenceImprovement -Constant right-side identified [30] vera_layer_set_text_color_mode::$0 = vera_layer_set_text_color_mode::layer#0 * SIZEOF_POINTER -Constant right-side identified [88] vera_layer_mode_tile::$15 = vera_layer_mode_tile::layer#0 * SIZEOF_WORD -Constant right-side identified [93] vera_layer_mode_tile::$1 = < vera_layer_mode_tile::mapbase_address#1 -Constant right-side identified [94] vera_layer_mode_tile::$17 = vera_layer_mode_tile::layer#0 * SIZEOF_WORD -Constant right-side identified [96] vera_layer_mode_tile::$2 = > vera_layer_mode_tile::mapbase_address#1 -Constant right-side identified [98] vera_layer_mode_tile::$18 = vera_layer_mode_tile::layer#0 * SIZEOF_DWORD -Constant right-side identified [100] vera_layer_mode_tile::mapbase_address#0 = vera_layer_mode_tile::mapbase_address#1 >> 1 -Constant right-side identified [105] vera_layer_mode_tile::$7 = < vera_layer_mode_tile::tilebase_address#1 -Constant right-side identified [106] vera_layer_mode_tile::$19 = vera_layer_mode_tile::layer#0 * SIZEOF_WORD -Constant right-side identified [108] vera_layer_mode_tile::$8 = > vera_layer_mode_tile::tilebase_address#1 -Constant right-side identified [110] vera_layer_mode_tile::$20 = vera_layer_mode_tile::layer#0 * SIZEOF_DWORD -Constant right-side identified [112] vera_layer_mode_tile::tilebase_address#0 = vera_layer_mode_tile::tilebase_address#1 >> 1 +Constant right-side identified [50] vera_layer_set_text_color_mode::$0 = vera_layer_set_text_color_mode::layer#0 * SIZEOF_POINTER +Constant right-side identified [108] vera_layer_mode_tile::$15 = vera_layer_mode_tile::layer#0 * SIZEOF_WORD +Constant right-side identified [113] vera_layer_mode_tile::$1 = < vera_layer_mode_tile::mapbase_address#1 +Constant right-side identified [114] vera_layer_mode_tile::$17 = vera_layer_mode_tile::layer#0 * SIZEOF_WORD +Constant right-side identified [116] vera_layer_mode_tile::$2 = > vera_layer_mode_tile::mapbase_address#1 +Constant right-side identified [118] vera_layer_mode_tile::$18 = vera_layer_mode_tile::layer#0 * SIZEOF_DWORD +Constant right-side identified [120] vera_layer_mode_tile::mapbase_address#0 = vera_layer_mode_tile::mapbase_address#1 >> 1 +Constant right-side identified [125] vera_layer_mode_tile::$7 = < vera_layer_mode_tile::tilebase_address#1 +Constant right-side identified [126] vera_layer_mode_tile::$19 = vera_layer_mode_tile::layer#0 * SIZEOF_WORD +Constant right-side identified [128] vera_layer_mode_tile::$8 = > vera_layer_mode_tile::tilebase_address#1 +Constant right-side identified [130] vera_layer_mode_tile::$20 = vera_layer_mode_tile::layer#0 * SIZEOF_DWORD +Constant right-side identified [132] vera_layer_mode_tile::tilebase_address#0 = vera_layer_mode_tile::tilebase_address#1 >> 1 Constant right-side identified [346] uctoa::buffer#0 = ++ uctoa::buffer#5 Successful SSA optimization Pass2ConstantRValueConsolidation Constant memcpy_in_vram::$2 = memcpy_in_vram::src_increment#0 @@ -7221,18 +7228,18 @@ Constant vera_layer_mode_tile::$20 = vera_layer_mode_tile::layer#0*SIZEOF_DWORD Constant vera_layer_mode_tile::tilebase_address#0 = vera_layer_mode_tile::tilebase_address#1>>1 Constant uctoa::buffer#0 = ++uctoa::buffer#5 Successful SSA optimization Pass2ConstantIdentification -Constant value identified (byte)vera_layer_mode_tile::$2 in [97] vera_mapbase_bank[vera_layer_mode_tile::layer#0] = (byte)vera_layer_mode_tile::$2 -Constant value identified (byte)vera_layer_mode_tile::$8 in [109] vera_tilebase_bank[vera_layer_mode_tile::layer#0] = (byte)vera_layer_mode_tile::$8 +Constant value identified (byte)vera_layer_mode_tile::$2 in [117] vera_mapbase_bank[vera_layer_mode_tile::layer#0] = (byte)vera_layer_mode_tile::$2 +Constant value identified (byte)vera_layer_mode_tile::$8 in [129] vera_tilebase_bank[vera_layer_mode_tile::layer#0] = (byte)vera_layer_mode_tile::$8 Successful SSA optimization Pass2ConstantValues Simplifying constant evaluating to zero vera_layer_mode_tile::mapbase_address#1 in Simplifying constant evaluating to zero vera_layer_mode_tile::mapbase_address#1>>1 in Simplifying constant evaluating to zero >vera_layer_mode_tile::tilebase_address#1 in -Simplifying constant evaluating to zero (byte)vera_layer_mode_tile::$2 in [97] vera_mapbase_bank[vera_layer_mode_tile::layer#0] = (byte)vera_layer_mode_tile::$2 -Simplifying constant evaluating to zero (byte)vera_layer_mode_tile::$8 in [109] vera_tilebase_bank[vera_layer_mode_tile::layer#0] = (byte)vera_layer_mode_tile::$8 +Simplifying constant evaluating to zero (byte)vera_layer_mode_tile::$2 in [117] vera_mapbase_bank[vera_layer_mode_tile::layer#0] = (byte)vera_layer_mode_tile::$2 +Simplifying constant evaluating to zero (byte)vera_layer_mode_tile::$8 in [129] vera_tilebase_bank[vera_layer_mode_tile::layer#0] = (byte)vera_layer_mode_tile::$8 Successful SSA optimization PassNSimplifyConstantZero -Simplifying expression containing zero *vera_layer_set_text_color_mode::addr#0 in [33] *vera_layer_set_text_color_mode::addr#0 = *vera_layer_set_text_color_mode::addr#0 | vera_layer_set_text_color_mode::color_mode#0 -Simplifying expression containing zero VERA_LAYER_WIDTH_128 in [86] vera_layer_mode_tile::config#21 = vera_layer_mode_tile::config#1 | VERA_LAYER_WIDTH_128 +Simplifying expression containing zero *vera_layer_set_text_color_mode::addr#0 in [53] *vera_layer_set_text_color_mode::addr#0 = *vera_layer_set_text_color_mode::addr#0 | vera_layer_set_text_color_mode::color_mode#0 +Simplifying expression containing zero VERA_LAYER_WIDTH_128 in [106] vera_layer_mode_tile::config#21 = vera_layer_mode_tile::config#1 | VERA_LAYER_WIDTH_128 Successful SSA optimization PassNSimplifyExpressionWithZero Eliminating unused constant VERA_LAYER_WIDTH_64 Eliminating unused constant VERA_LAYER_WIDTH_256 @@ -7259,8 +7266,8 @@ Alias candidate removed (volatile)screenlayer::vera_layer_get_width1_return#0 = Alias candidate removed (volatile)conio_rowshift = screenlayer::$3 Alias candidate removed (volatile)conio_rowskip = screenlayer::$4 Alias candidate removed (volatile)screenlayer::vera_layer_get_height1_return#0 = screenlayer::vera_layer_get_height1_return#1 screenlayer::$5 conio_height -Constant right-side identified [90] vera_layer_mode_tile::$4 = < vera_layer_mode_tile::mapbase_address#0 -Constant right-side identified [97] vera_layer_mode_tile::$10 = < vera_layer_mode_tile::tilebase_address#0 +Constant right-side identified [108] vera_layer_mode_tile::$4 = < vera_layer_mode_tile::mapbase_address#0 +Constant right-side identified [115] vera_layer_mode_tile::$10 = < vera_layer_mode_tile::tilebase_address#0 Constant right-side identified [329] uctoa::buffer#1 = ++ uctoa::buffer#0 Successful SSA optimization Pass2ConstantRValueConsolidation Constant vera_layer_mode_tile::config#21 = VERA_LAYER_WIDTH_128 @@ -7277,9 +7284,9 @@ Alias candidate removed (volatile)screenlayer::vera_layer_get_width1_return#0 = Alias candidate removed (volatile)conio_rowshift = screenlayer::$3 Alias candidate removed (volatile)conio_rowskip = screenlayer::$4 Alias candidate removed (volatile)screenlayer::vera_layer_get_height1_return#0 = screenlayer::vera_layer_get_height1_return#1 screenlayer::$5 conio_height -Constant right-side identified [83] vera_layer_mode_tile::config#10 = vera_layer_mode_tile::config#21 | VERA_LAYER_HEIGHT_64 -Constant right-side identified [89] vera_layer_mode_tile::mapbase#0 = > vera_layer_mode_tile::$4 -Constant right-side identified [95] vera_layer_mode_tile::tilebase#0 = > vera_layer_mode_tile::$10 +Constant right-side identified [101] vera_layer_mode_tile::config#10 = vera_layer_mode_tile::config#21 | VERA_LAYER_HEIGHT_64 +Constant right-side identified [107] vera_layer_mode_tile::mapbase#0 = > vera_layer_mode_tile::$4 +Constant right-side identified [113] vera_layer_mode_tile::tilebase#0 = > vera_layer_mode_tile::$10 Constant right-side identified [327] uctoa::buffer#2 = ++ uctoa::buffer#1 Successful SSA optimization Pass2ConstantRValueConsolidation Constant vera_layer_mode_tile::config#10 = vera_layer_mode_tile::config#21|VERA_LAYER_HEIGHT_64 @@ -7299,7 +7306,7 @@ Alias candidate removed (volatile)screenlayer::vera_layer_get_width1_return#0 = Alias candidate removed (volatile)conio_rowshift = screenlayer::$3 Alias candidate removed (volatile)conio_rowskip = screenlayer::$4 Alias candidate removed (volatile)screenlayer::vera_layer_get_height1_return#0 = screenlayer::vera_layer_get_height1_return#1 screenlayer::$5 conio_height -Constant right-side identified [91] vera_layer_mode_tile::tilebase#1 = vera_layer_mode_tile::tilebase#0 & VERA_LAYER_TILEBASE_MASK +Constant right-side identified [109] vera_layer_mode_tile::tilebase#1 = vera_layer_mode_tile::tilebase#0 & VERA_LAYER_TILEBASE_MASK Successful SSA optimization Pass2ConstantRValueConsolidation Constant vera_layer_mode_tile::tilebase#1 = vera_layer_mode_tile::tilebase#0&VERA_LAYER_TILEBASE_MASK Successful SSA optimization Pass2ConstantIdentification @@ -7315,15 +7322,15 @@ Inlining Noop Cast [281] CONIO_SCREEN_TEXT#134 = (byte*)screenlayer::$1 keeping Successful SSA optimization Pass2NopCastInlining Inlining Noop Cast [376] printf_number_buffer::$25 = (signed byte)printf_number_buffer::format_min_length#0 keeping printf_number_buffer::format_min_length#0 Successful SSA optimization Pass2NopCastInlining -Rewriting multiplication to use shift [18] vera_layer_set_config::$0 = vera_layer_set_config::layer#2 * SIZEOF_POINTER -Rewriting multiplication to use shift [23] vera_layer_get_config::$0 = vera_layer_get_config::layer#4 * SIZEOF_POINTER -Rewriting multiplication to use shift [32] vera_layer_set_mapbase::$0 = vera_layer_set_mapbase::layer#4 * SIZEOF_POINTER -Rewriting multiplication to use shift [38] vera_layer_get_mapbase_offset::$0 = vera_layer_get_mapbase_offset::layer#0 * SIZEOF_WORD -Rewriting multiplication to use shift [42] vera_layer_get_mapbase::$0 = vera_layer_get_mapbase::layer#2 * SIZEOF_POINTER -Rewriting multiplication to use shift [47] vera_layer_set_tilebase::$0 = vera_layer_set_tilebase::layer#2 * SIZEOF_POINTER -Rewriting multiplication to use shift [52] vera_layer_get_tilebase::$0 = vera_layer_get_tilebase::layer#3 * SIZEOF_POINTER -Rewriting multiplication to use shift [67] vera_layer_get_color::$3 = vera_layer_get_color::layer#2 * SIZEOF_POINTER -Rewriting multiplication to use shift [78] vera_layer_get_rowskip::$0 = vera_layer_get_rowskip::layer#0 * SIZEOF_WORD +Rewriting multiplication to use shift [36] vera_layer_set_config::$0 = vera_layer_set_config::layer#2 * SIZEOF_POINTER +Rewriting multiplication to use shift [41] vera_layer_get_config::$0 = vera_layer_get_config::layer#4 * SIZEOF_POINTER +Rewriting multiplication to use shift [50] vera_layer_set_mapbase::$0 = vera_layer_set_mapbase::layer#4 * SIZEOF_POINTER +Rewriting multiplication to use shift [56] vera_layer_get_mapbase_offset::$0 = vera_layer_get_mapbase_offset::layer#0 * SIZEOF_WORD +Rewriting multiplication to use shift [60] vera_layer_get_mapbase::$0 = vera_layer_get_mapbase::layer#2 * SIZEOF_POINTER +Rewriting multiplication to use shift [65] vera_layer_set_tilebase::$0 = vera_layer_set_tilebase::layer#2 * SIZEOF_POINTER +Rewriting multiplication to use shift [70] vera_layer_get_tilebase::$0 = vera_layer_get_tilebase::layer#3 * SIZEOF_POINTER +Rewriting multiplication to use shift [85] vera_layer_get_color::$3 = vera_layer_get_color::layer#2 * SIZEOF_POINTER +Rewriting multiplication to use shift [96] vera_layer_get_rowskip::$0 = vera_layer_get_rowskip::layer#0 * SIZEOF_WORD Rewriting multiplication to use shift [155] clrscr::$9 = conio_screen_layer * SIZEOF_WORD Rewriting multiplication to use shift [174] gotoxy::$5 = conio_screen_layer * SIZEOF_WORD Rewriting multiplication to use shift [189] cputc::$15 = conio_screen_layer * SIZEOF_WORD @@ -7336,6 +7343,8 @@ Rewriting multiplication to use shift [287] screenlayer::vera_layer_get_width1_$ Rewriting multiplication to use shift [303] screenlayer::vera_layer_get_height1_$2 = screenlayer::vera_layer_get_height1_layer#0 * SIZEOF_POINTER Rewriting multiplication to use shift [307] screenlayer::vera_layer_get_height1_$3 = screenlayer::vera_layer_get_height1_$1 * SIZEOF_WORD Successful SSA optimization Pass2MultiplyToShiftRewriting +Inlining constant with var siblings strlen::len#0 +Inlining constant with var siblings strlen::str#1 Inlining constant with var siblings memcpy_in_vram::i#0 Inlining constant with var siblings vera_layer_set_config::layer#1 Inlining constant with var siblings vera_layer_set_config::layer#0 @@ -7389,8 +7398,6 @@ Inlining constant with different constant siblings vera_layer_mode_tile::tilebas Inlining constant with different constant siblings vera_layer_mode_tile::config#21 Inlining constant with different constant siblings vera_layer_mode_tile::tilebase#0 Inlining constant with different constant siblings vera_layer_mode_tile::tilebase#1 -Inlining constant with var siblings strlen::len#0 -Inlining constant with var siblings strlen::str#1 Inlining constant with var siblings clrscr::l#0 Inlining constant with var siblings clrscr::c#0 Inlining constant with var siblings gotoxy::x#0 diff --git a/src/test/ref/examples/cx16/veralib/bitmap_8bpp_320_x_240.log b/src/test/ref/examples/cx16/veralib/bitmap_8bpp_320_x_240.log index de4372503..bf43dbc1a 100644 --- a/src/test/ref/examples/cx16/veralib/bitmap_8bpp_320_x_240.log +++ b/src/test/ref/examples/cx16/veralib/bitmap_8bpp_320_x_240.log @@ -5,6 +5,13 @@ Fixing struct type SIZE_OF struct printf_buffer_number to 12 Setting inferred volatile on symbol affected by address-of kbhit::ch Setting inferred volatile on symbol affected by address-of conio_x16_init::$1 = call screensize &conio_screen_width &conio_screen_height Setting inferred volatile on symbol affected by address-of conio_x16_init::$1 = call screensize &conio_screen_width &conio_screen_height +Setting inferred volatile on symbol affected by address-of: setnam::filename_len in asm { ldafilename_len ldxfilename ldyfilename+1 jsr$ffbd } +Setting inferred volatile on symbol affected by address-of: setnam::filename in asm { ldafilename_len ldxfilename ldyfilename+1 jsr$ffbd } +Setting inferred volatile on symbol affected by address-of: setlfs::device in asm { ldxdevice lda#1 ldy#0 jsr$ffba } +Setting inferred volatile on symbol affected by address-of: load::address in asm { ldxaddress ldyaddress+1 ldaverify jsr$ffd5 bcserror lda#$ff error: stastatus } +Setting inferred volatile on symbol affected by address-of: load::verify in asm { ldxaddress ldyaddress+1 ldaverify jsr$ffd5 bcserror lda#$ff error: stastatus } +Setting inferred volatile on symbol affected by address-of: load::status in asm { ldxaddress ldyaddress+1 ldaverify jsr$ffd5 bcserror lda#$ff error: stastatus } +Setting inferred volatile on symbol affected by address-of: getin::ch in asm { jsr$ffe4 stach } Inlined call call vera_display_set_scale_double Inlined call call vera_display_set_scale_none Inlined call call vera_vram_address0 vera_tile_area::mapbase VERA_INC_1 diff --git a/src/test/ref/examples/cx16/veralib/tilemap_8bpp_16_x_16.log b/src/test/ref/examples/cx16/veralib/tilemap_8bpp_16_x_16.log index 406c6bdcb..f40b81041 100644 --- a/src/test/ref/examples/cx16/veralib/tilemap_8bpp_16_x_16.log +++ b/src/test/ref/examples/cx16/veralib/tilemap_8bpp_16_x_16.log @@ -5,6 +5,13 @@ Fixing struct type SIZE_OF struct printf_buffer_number to 12 Setting inferred volatile on symbol affected by address-of kbhit::ch Setting inferred volatile on symbol affected by address-of conio_x16_init::$1 = call screensize &conio_screen_width &conio_screen_height Setting inferred volatile on symbol affected by address-of conio_x16_init::$1 = call screensize &conio_screen_width &conio_screen_height +Setting inferred volatile on symbol affected by address-of: setnam::filename_len in asm { ldafilename_len ldxfilename ldyfilename+1 jsr$ffbd } +Setting inferred volatile on symbol affected by address-of: setnam::filename in asm { ldafilename_len ldxfilename ldyfilename+1 jsr$ffbd } +Setting inferred volatile on symbol affected by address-of: setlfs::device in asm { ldxdevice lda#1 ldy#0 jsr$ffba } +Setting inferred volatile on symbol affected by address-of: load::address in asm { ldxaddress ldyaddress+1 ldaverify jsr$ffd5 bcserror lda#$ff error: stastatus } +Setting inferred volatile on symbol affected by address-of: load::verify in asm { ldxaddress ldyaddress+1 ldaverify jsr$ffd5 bcserror lda#$ff error: stastatus } +Setting inferred volatile on symbol affected by address-of: load::status in asm { ldxaddress ldyaddress+1 ldaverify jsr$ffd5 bcserror lda#$ff error: stastatus } +Setting inferred volatile on symbol affected by address-of: getin::ch in asm { jsr$ffe4 stach } Inlined call call vera_display_set_scale_double Inlined call call vera_display_set_scale_none Inlined call call vera_vram_address0 vera_tile_area::mapbase VERA_INC_1