mirror of
https://gitlab.com/camelot/kickc.git
synced 2025-04-11 20:37:40 +00:00
Added synthesis for using X/Y registers as intermediates when encountering pb.c1_derefidx_vbuyy/xx.
This commit is contained in:
parent
e48a4538bc
commit
2989f16593
@ -526,18 +526,28 @@ class AsmFragmentTemplateSynthesisRule {
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("pb(.)c1_derefidx_vbuz1=(.*z1.*)", twoC1, null, "vb$1aa=$2", "ldx {z1}\n" + "sta {c1},x", mapC));
|
||||
|
||||
// Convert X/Y-based array indexing of a constant pointer into A-register by prefixing lda cn,x / lda cn,y ( ...pb.c1_derefidx_vbuxx... / ...pb.c1_derefidx_vbuyy... -> ...vb.aa... )
|
||||
|
||||
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)=(.*)pb(.)c1_derefidx_vbuxx(.*)", rvalAa+"|"+twoC1, "lda {c1},x", "$1=$2vb$3aa$4", null, mapC));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)=(.*)pb(.)c1_derefidx_vbuxx(.*)", rvalYy+"|"+twoC1, "ldy {c1},x", "$1=$2vb$3yy$4", null, mapC));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)=(.*c1.*)pb(.)c1_derefidx_vbuxx(.*)", rvalAa, "lda {c1},x", "$1=$2vb$3aa$4", null, null));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)=(.*)pb(.)c1_derefidx_vbuxx(.*c1.*)", rvalAa, "lda {c1},x", "$1=$2vb$3aa$4", null, null));
|
||||
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)=(.*)pb(.)c1_derefidx_vbuyy(.*)", rvalAa+"|"+twoC1, "lda {c1},y", "$1=$2vb$3aa$4", null, mapC));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)=(.*)pb(.)c1_derefidx_vbuyy(.*)", rvalXx+"|"+twoC1, "ldx {c1},y", "$1=$2vb$3xx$4", null, mapC));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)=(.*c1.*)pb(.)c1_derefidx_vbuyy(.*)", rvalAa, "lda {c1},y", "$1=$2vb$3aa$4", null, null));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)=(.*)pb(.)c1_derefidx_vbuyy(.*c1.*)", rvalAa, "lda {c1},y", "$1=$2vb$3aa$4", null, null));
|
||||
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)=(.*)pb(.)c2_derefidx_vbuxx(.*)", rvalAa+"|"+twoC2, "lda {c2},x", "$1=$2vb$3aa$4", null, mapC3));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)=(.*)pb(.)c2_derefidx_vbuxx(.*)", rvalYy+"|"+twoC2, "ldy {c2},x", "$1=$2vb$3yy$4", null, mapC3));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)=(.*c2.*)pb(.)c2_derefidx_vbuxx(.*)", rvalAa, "lda {c2},x", "$1=$2vb$3aa$4", null, null));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)=(.*)pb(.)c2_derefidx_vbuxx(.*c2.*)", rvalAa, "lda {c2},x", "$1=$2vb$3aa$4", null, null));
|
||||
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)=(.*)pb(.)c2_derefidx_vbuyy(.*)", rvalAa+"|"+twoC2, "lda {c2},y", "$1=$2vb$3aa$4", null, mapC3));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)=(.*)pb(.)c2_derefidx_vbuyy(.*)", rvalXx+"|"+twoC2, "ldx {c2},y", "$1=$2vb$3xx$4", null, mapC3));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)=(.*c2.*)pb(.)c2_derefidx_vbuyy(.*)", rvalAa, "lda {c2},y", "$1=$2vb$3aa$4", null, null));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)=(.*)pb(.)c2_derefidx_vbuyy(.*c2.*)", rvalAa, "lda {c2},y", "$1=$2vb$3aa$4", null, null));
|
||||
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)_derefidx_vbuz1_(.*)", rvalYy+"|"+twoZ1, "ldy {z1}", "$1_derefidx_vbuyy_$2", null, mapZ));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)_derefidx_vbuz1_(lt|gt|le|ge|eq|neq)_(.*)", rvalXx+"|"+twoZ1, "ldx {z1}", "$1_derefidx_vbuxx_$2_$3", null, mapZ));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("pb(.)c1_derefidx_vbuyy_(lt|gt|le|ge|eq|neq)_(.*)", rvalAa+"|"+twoC1, "lda {c1},y", "vb$1aa_$2_$3", null, mapC));
|
||||
|
@ -1390,6 +1390,11 @@ public class TestPrograms {
|
||||
tester.testFile(filename, upliftCombinations, null);
|
||||
}
|
||||
|
||||
private void compileAndCompare(String filename, CompileLog log, int upliftCombinations) throws IOException, URISyntaxException {
|
||||
TestPrograms tester = new TestPrograms();
|
||||
tester.testFile(filename, upliftCombinations, log);
|
||||
}
|
||||
|
||||
private void testFile(String fileName, Integer upliftCombinations, CompileLog compileLog) throws IOException, URISyntaxException {
|
||||
System.out.println("Testing output for " + fileName);
|
||||
Compiler compiler = new Compiler();
|
||||
|
@ -8,7 +8,7 @@ byte* SCREEN = $0400;
|
||||
byte* COLS = $d800;
|
||||
|
||||
void main() {
|
||||
for (byte x: 0..200) {
|
||||
for (byte register(y) x: 0..200) {
|
||||
SCREEN[x] = MAPDATA[x];
|
||||
COLS[x] = COLORMAP1[MAPDATA[x]];
|
||||
SCREEN[200+x] = MAPDATA[200+x];
|
||||
|
@ -167,9 +167,9 @@
|
||||
.label form_vic_bg3_lo = form_fields_val+$23
|
||||
.label print_char_cursor = 5
|
||||
.label print_line_cursor = $10
|
||||
.label keyboard_events_size = 9
|
||||
.label keyboard_modifiers = 2
|
||||
.label form_cursor_count = $e
|
||||
.label keyboard_events_size = 8
|
||||
.label form_cursor_count = $d
|
||||
.label form_field_idx = $e
|
||||
main: {
|
||||
sei
|
||||
// Disable normal interrupt (prevent keyboard reading glitches and allows to hide basic/kernal)
|
||||
@ -183,8 +183,8 @@ main: {
|
||||
sta DTV_FEATURE
|
||||
jsr keyboard_init
|
||||
jsr gfx_init
|
||||
ldx #0
|
||||
txa
|
||||
lda #0
|
||||
sta form_field_idx
|
||||
sta keyboard_events_size
|
||||
lda #FORM_CURSOR_BLINK/2
|
||||
sta form_cursor_count
|
||||
@ -195,11 +195,11 @@ main: {
|
||||
}
|
||||
// Change graphics mode to show the selected graphics mode
|
||||
gfx_mode: {
|
||||
.label _31 = $a
|
||||
.label _31 = 9
|
||||
.label _33 = 3
|
||||
.label _35 = 3
|
||||
.label _37 = 3
|
||||
.label _45 = $a
|
||||
.label _45 = 9
|
||||
.label _47 = 3
|
||||
.label _49 = 3
|
||||
.label _51 = 3
|
||||
@ -209,72 +209,71 @@ gfx_mode: {
|
||||
.label _65 = 2
|
||||
.label _66 = 3
|
||||
.label _68 = 3
|
||||
.label plane_a = $a
|
||||
.label plane_b = $a
|
||||
.label plane_a = 9
|
||||
.label plane_b = 9
|
||||
.label vic_colors = 3
|
||||
.label col = 5
|
||||
.label cx = 7
|
||||
.label cy = 2
|
||||
lda form_ctrl_line
|
||||
cmp #0
|
||||
beq b12
|
||||
ldy #0|DTV_LINEAR
|
||||
ldx #0|DTV_LINEAR
|
||||
jmp b1
|
||||
b12:
|
||||
ldy #0
|
||||
ldx #0
|
||||
b1:
|
||||
lda form_ctrl_borof
|
||||
cmp #0
|
||||
beq b2
|
||||
tya
|
||||
txa
|
||||
ora #DTV_BORDER_OFF
|
||||
tay
|
||||
tax
|
||||
b2:
|
||||
lda form_ctrl_hicol
|
||||
cmp #0
|
||||
beq b3
|
||||
tya
|
||||
txa
|
||||
ora #DTV_HIGHCOLOR
|
||||
tay
|
||||
tax
|
||||
b3:
|
||||
lda form_ctrl_overs
|
||||
cmp #0
|
||||
beq b4
|
||||
tya
|
||||
txa
|
||||
ora #DTV_OVERSCAN
|
||||
tay
|
||||
tax
|
||||
b4:
|
||||
lda form_ctrl_colof
|
||||
cmp #0
|
||||
beq b5
|
||||
tya
|
||||
txa
|
||||
ora #DTV_COLORRAM_OFF
|
||||
tay
|
||||
tax
|
||||
b5:
|
||||
lda form_ctrl_chunk
|
||||
cmp #0
|
||||
beq b6
|
||||
tya
|
||||
txa
|
||||
ora #DTV_CHUNKY
|
||||
tay
|
||||
tax
|
||||
b6:
|
||||
sty DTV_CONTROL
|
||||
stx DTV_CONTROL
|
||||
lda form_ctrl_ecm
|
||||
cmp #0
|
||||
beq b14
|
||||
ldy #VIC_DEN|VIC_RSEL|3|VIC_ECM
|
||||
ldx #VIC_DEN|VIC_RSEL|3|VIC_ECM
|
||||
jmp b7
|
||||
b14:
|
||||
ldy #VIC_DEN|VIC_RSEL|3
|
||||
ldx #VIC_DEN|VIC_RSEL|3
|
||||
b7:
|
||||
lda form_ctrl_bmm
|
||||
cmp #0
|
||||
beq b8
|
||||
tya
|
||||
txa
|
||||
ora #VIC_BMM
|
||||
tay
|
||||
tax
|
||||
b8:
|
||||
sty VIC_CONTROL
|
||||
stx VIC_CONTROL
|
||||
lda form_ctrl_mcm
|
||||
cmp #0
|
||||
beq b16
|
||||
@ -290,10 +289,10 @@ gfx_mode: {
|
||||
asl
|
||||
asl
|
||||
ora form_a_start_lo
|
||||
tay
|
||||
tax
|
||||
lda form_a_pattern
|
||||
jsr get_plane
|
||||
tya
|
||||
txa
|
||||
clc
|
||||
adc plane_a
|
||||
sta plane_a
|
||||
@ -345,10 +344,10 @@ gfx_mode: {
|
||||
asl
|
||||
asl
|
||||
ora form_b_start_lo
|
||||
tay
|
||||
tax
|
||||
lda form_b_pattern
|
||||
jsr get_plane
|
||||
tya
|
||||
txa
|
||||
clc
|
||||
adc plane_b
|
||||
sta plane_b
|
||||
@ -439,8 +438,7 @@ gfx_mode: {
|
||||
lda #>COLS
|
||||
sta col+1
|
||||
b10:
|
||||
lda #0
|
||||
sta cx
|
||||
ldx #0
|
||||
b11:
|
||||
ldy #0
|
||||
lda (vic_colors),y
|
||||
@ -453,9 +451,8 @@ gfx_mode: {
|
||||
bne !+
|
||||
inc vic_colors+1
|
||||
!:
|
||||
inc cx
|
||||
lda cx
|
||||
cmp #$28
|
||||
inx
|
||||
cpx #$28
|
||||
bne b11
|
||||
inc cy
|
||||
lda cy
|
||||
@ -496,13 +493,13 @@ gfx_mode: {
|
||||
lda form_dtv_palet
|
||||
cmp #0
|
||||
beq b18
|
||||
ldy #0
|
||||
ldx #0
|
||||
// DTV Palette - Grey Tones
|
||||
b13:
|
||||
tya
|
||||
sta DTV_PALETTE,y
|
||||
iny
|
||||
cpy #$10
|
||||
txa
|
||||
sta DTV_PALETTE,x
|
||||
inx
|
||||
cpx #$10
|
||||
bne b13
|
||||
b19:
|
||||
lda RASTER
|
||||
@ -515,12 +512,12 @@ gfx_mode: {
|
||||
rts
|
||||
// DTV Palette - default
|
||||
b18:
|
||||
ldy #0
|
||||
ldx #0
|
||||
b15:
|
||||
lda DTV_PALETTE_DEFAULT,y
|
||||
sta DTV_PALETTE,y
|
||||
iny
|
||||
cpy #$10
|
||||
lda DTV_PALETTE_DEFAULT,x
|
||||
sta DTV_PALETTE,x
|
||||
inx
|
||||
cpx #$10
|
||||
bne b15
|
||||
jmp b19
|
||||
}
|
||||
@ -546,14 +543,13 @@ keyboard_event_get: {
|
||||
// Also stores current status of modifiers in keyboard_modifiers.
|
||||
keyboard_event_scan: {
|
||||
.label row_scan = $12
|
||||
.label keycode = 8
|
||||
.label keycode = 7
|
||||
.label row = 2
|
||||
.label col = 7
|
||||
lda #0
|
||||
sta keycode
|
||||
sta row
|
||||
b1:
|
||||
lda row
|
||||
ldx row
|
||||
jsr keyboard_matrix_read
|
||||
sta row_scan
|
||||
ldy row
|
||||
@ -573,58 +569,54 @@ keyboard_event_scan: {
|
||||
jsr keyboard_event_pressed
|
||||
cmp #0
|
||||
beq b2
|
||||
lda #0|KEY_MODIFIER_LSHIFT
|
||||
sta keyboard_modifiers
|
||||
ldx #0|KEY_MODIFIER_LSHIFT
|
||||
jmp b9
|
||||
b2:
|
||||
lda #0
|
||||
sta keyboard_modifiers
|
||||
ldx #0
|
||||
b9:
|
||||
lda #KEY_RSHIFT
|
||||
sta keyboard_event_pressed.keycode
|
||||
jsr keyboard_event_pressed
|
||||
cmp #0
|
||||
beq b10
|
||||
lda #KEY_MODIFIER_RSHIFT
|
||||
ora keyboard_modifiers
|
||||
sta keyboard_modifiers
|
||||
txa
|
||||
ora #KEY_MODIFIER_RSHIFT
|
||||
tax
|
||||
b10:
|
||||
lda #KEY_CTRL
|
||||
sta keyboard_event_pressed.keycode
|
||||
jsr keyboard_event_pressed
|
||||
cmp #0
|
||||
beq b11
|
||||
lda #KEY_MODIFIER_CTRL
|
||||
ora keyboard_modifiers
|
||||
sta keyboard_modifiers
|
||||
txa
|
||||
ora #KEY_MODIFIER_CTRL
|
||||
tax
|
||||
b11:
|
||||
lda #KEY_COMMODORE
|
||||
sta keyboard_event_pressed.keycode
|
||||
jsr keyboard_event_pressed
|
||||
cmp #0
|
||||
beq breturn
|
||||
lda #KEY_MODIFIER_COMMODORE
|
||||
ora keyboard_modifiers
|
||||
sta keyboard_modifiers
|
||||
txa
|
||||
ora #KEY_MODIFIER_COMMODORE
|
||||
tax
|
||||
breturn:
|
||||
rts
|
||||
// Something has changed on the keyboard row - check each column
|
||||
b6:
|
||||
lda #0
|
||||
sta col
|
||||
ldx #0
|
||||
b4:
|
||||
lda row_scan
|
||||
ldy row
|
||||
eor keyboard_scan_values,y
|
||||
ldy col
|
||||
and keyboard_matrix_col_bitmask,y
|
||||
and keyboard_matrix_col_bitmask,x
|
||||
cmp #0
|
||||
beq b5
|
||||
lda keyboard_events_size
|
||||
cmp #8
|
||||
beq b5
|
||||
lda row_scan
|
||||
and keyboard_matrix_col_bitmask,y
|
||||
lda keyboard_matrix_col_bitmask,x
|
||||
and row_scan
|
||||
cmp #0
|
||||
beq b7
|
||||
// Key pressed
|
||||
@ -634,9 +626,8 @@ keyboard_event_scan: {
|
||||
inc keyboard_events_size
|
||||
b5:
|
||||
inc keycode
|
||||
inc col
|
||||
lda col
|
||||
cmp #8
|
||||
inx
|
||||
cpx #8
|
||||
bne b4
|
||||
// Store the current keyboard status for the row to debounce
|
||||
lda row_scan
|
||||
@ -654,10 +645,10 @@ keyboard_event_scan: {
|
||||
}
|
||||
// Determine if a specific key is currently pressed based on the last keyboard_event_scan()
|
||||
// Returns 0 is not pressed and non-0 if pressed
|
||||
// keyboard_event_pressed(byte zeropage(7) keycode)
|
||||
// keyboard_event_pressed(byte zeropage(2) keycode)
|
||||
keyboard_event_pressed: {
|
||||
.label row_bits = 8
|
||||
.label keycode = 7
|
||||
.label row_bits = 7
|
||||
.label keycode = 2
|
||||
lda keycode
|
||||
lsr
|
||||
lsr
|
||||
@ -677,10 +668,9 @@ keyboard_event_pressed: {
|
||||
// Returns the keys pressed on the row as bits according to the C64 key matrix.
|
||||
// Notice: If the C64 normal interrupt is still running it will occasionally interrupt right between the read & write
|
||||
// leading to erroneous readings. You must disable kill the normal interrupt or sei/cli around calls to the keyboard matrix reader.
|
||||
// keyboard_matrix_read(byte register(A) rowid)
|
||||
// keyboard_matrix_read(byte register(X) rowid)
|
||||
keyboard_matrix_read: {
|
||||
tay
|
||||
lda keyboard_matrix_row_bitmask,y
|
||||
lda keyboard_matrix_row_bitmask,x
|
||||
sta CIA1_PORT_A
|
||||
lda CIA1_PORT_B
|
||||
eor #$ff
|
||||
@ -755,7 +745,7 @@ get_vic_charset: {
|
||||
// Get plane address from a plane index (from the form)
|
||||
// get_plane(byte register(A) idx)
|
||||
get_plane: {
|
||||
.label return = $a
|
||||
.label return = 9
|
||||
cmp #0
|
||||
beq b1
|
||||
cmp #1
|
||||
@ -1009,13 +999,13 @@ form_mode: {
|
||||
sta DTV_PLANEA_START_MI
|
||||
lda #0
|
||||
sta DTV_PLANEA_START_HI
|
||||
tay
|
||||
tax
|
||||
// DTV Palette - default
|
||||
b1:
|
||||
lda DTV_PALETTE_DEFAULT,y
|
||||
sta DTV_PALETTE,y
|
||||
iny
|
||||
cpy #$10
|
||||
lda DTV_PALETTE_DEFAULT,x
|
||||
sta DTV_PALETTE,x
|
||||
inx
|
||||
cpx #$10
|
||||
bne b1
|
||||
// Screen colors
|
||||
lda #0
|
||||
@ -1029,7 +1019,7 @@ form_mode: {
|
||||
cmp #$ff
|
||||
bne b5
|
||||
jsr form_control
|
||||
tya
|
||||
txa
|
||||
cmp #0
|
||||
beq b8
|
||||
rts
|
||||
@ -1188,10 +1178,10 @@ form_render_values: {
|
||||
lda #0
|
||||
sta idx
|
||||
b1:
|
||||
jsr form_field_ptr
|
||||
ldy idx
|
||||
lda form_fields_val,y
|
||||
tay
|
||||
jsr form_field_ptr
|
||||
ldx idx
|
||||
ldy form_fields_val,x
|
||||
lda print_hextab,y
|
||||
ldy #0
|
||||
sta (field),y
|
||||
@ -1203,19 +1193,15 @@ form_render_values: {
|
||||
}
|
||||
// Get the screen address of a form field
|
||||
// field_idx is the index of the field to get the screen address for
|
||||
// form_field_ptr(byte zeropage(2) field_idx)
|
||||
// form_field_ptr(byte register(Y) field_idx)
|
||||
form_field_ptr: {
|
||||
.label return = 3
|
||||
.label field_idx = 2
|
||||
.label _2 = 3
|
||||
ldy field_idx
|
||||
lda form_fields_y,y
|
||||
tay
|
||||
lda form_line_hi,y
|
||||
ldx form_fields_y,y
|
||||
lda form_line_hi,x
|
||||
sta _2+1
|
||||
lda form_line_lo,y
|
||||
lda form_line_lo,x
|
||||
sta _2
|
||||
ldy field_idx
|
||||
lda form_fields_x,y
|
||||
clc
|
||||
adc return
|
||||
@ -1332,7 +1318,7 @@ apply_preset: {
|
||||
// Returns 0 if space is not pressed, non-0 if space is pressed
|
||||
form_control: {
|
||||
.label field = 3
|
||||
stx form_field_ptr.field_idx
|
||||
ldy form_field_idx
|
||||
jsr form_field_ptr
|
||||
dec form_cursor_count
|
||||
lda form_cursor_count
|
||||
@ -1364,64 +1350,70 @@ form_control: {
|
||||
and (field),y
|
||||
// Unblink the cursor
|
||||
sta (field),y
|
||||
lda #KEY_MODIFIER_SHIFT
|
||||
and keyboard_modifiers
|
||||
txa
|
||||
and #KEY_MODIFIER_SHIFT
|
||||
cmp #0
|
||||
beq b5
|
||||
dex
|
||||
cpx #$ff
|
||||
dec form_field_idx
|
||||
lda form_field_idx
|
||||
cmp #$ff
|
||||
bne b7
|
||||
ldx #form_fields_cnt-1
|
||||
lda #form_fields_cnt-1
|
||||
sta form_field_idx
|
||||
b7:
|
||||
lda #FORM_CURSOR_BLINK/2
|
||||
sta form_cursor_count
|
||||
ldy #0
|
||||
ldx #0
|
||||
breturn:
|
||||
rts
|
||||
b5:
|
||||
inx
|
||||
cpx #form_fields_cnt
|
||||
inc form_field_idx
|
||||
lda form_field_idx
|
||||
cmp #form_fields_cnt
|
||||
bne b7
|
||||
ldx #0
|
||||
lda #0
|
||||
sta form_field_idx
|
||||
jmp b7
|
||||
b4:
|
||||
cmp #KEY_CRSR_RIGHT
|
||||
bne b9
|
||||
lda #KEY_MODIFIER_SHIFT
|
||||
and keyboard_modifiers
|
||||
txa
|
||||
and #KEY_MODIFIER_SHIFT
|
||||
cmp #0
|
||||
beq b10
|
||||
ldx form_field_idx
|
||||
dec form_fields_val,x
|
||||
lda form_fields_val,x
|
||||
ldy form_field_idx
|
||||
lda form_fields_val,y
|
||||
cmp #$ff
|
||||
bne b12
|
||||
lda form_fields_max,x
|
||||
sta form_fields_val,x
|
||||
lda form_fields_max,y
|
||||
sta form_fields_val,y
|
||||
b12:
|
||||
// Render field value
|
||||
lda form_fields_val,x
|
||||
tay
|
||||
ldx form_field_idx
|
||||
ldy form_fields_val,x
|
||||
lda print_hextab,y
|
||||
ldy #0
|
||||
sta (field),y
|
||||
b6:
|
||||
ldy #0
|
||||
ldx #0
|
||||
jmp breturn
|
||||
b10:
|
||||
ldx form_field_idx
|
||||
inc form_fields_val,x
|
||||
txa
|
||||
tay
|
||||
lda form_fields_val,x
|
||||
ldy form_field_idx
|
||||
lda form_fields_val,y
|
||||
cmp form_fields_max,y
|
||||
bcc b12
|
||||
beq b12
|
||||
lda #0
|
||||
sta form_fields_val,x
|
||||
sta form_fields_val,y
|
||||
jmp b12
|
||||
b9:
|
||||
cmp #KEY_SPACE
|
||||
bne b6
|
||||
ldy #$ff
|
||||
ldx #$ff
|
||||
jmp breturn
|
||||
b2:
|
||||
lda #$80
|
||||
@ -1434,16 +1426,16 @@ form_control: {
|
||||
// screen is the start address of the screen to use
|
||||
form_set_screen: {
|
||||
.label line = 3
|
||||
ldy #0
|
||||
ldx #0
|
||||
lda #<FORM_SCREEN
|
||||
sta line
|
||||
lda #>FORM_SCREEN
|
||||
sta line+1
|
||||
b1:
|
||||
lda line
|
||||
sta form_line_lo,y
|
||||
sta form_line_lo,x
|
||||
lda line+1
|
||||
sta form_line_hi,y
|
||||
sta form_line_hi,x
|
||||
lda #$28
|
||||
clc
|
||||
adc line
|
||||
@ -1451,8 +1443,8 @@ form_set_screen: {
|
||||
bcc !+
|
||||
inc line+1
|
||||
!:
|
||||
iny
|
||||
cpy #$19
|
||||
inx
|
||||
cpx #$19
|
||||
bne b1
|
||||
rts
|
||||
}
|
||||
@ -1588,7 +1580,7 @@ gfx_init_plane_full: {
|
||||
rts
|
||||
}
|
||||
// Initialize 320*200 1bpp pixel ($2000) plane with identical bytes
|
||||
// gfx_init_plane_fill(dword zeropage($a) plane_addr, byte zeropage(2) fill)
|
||||
// gfx_init_plane_fill(dword zeropage(9) plane_addr, byte zeropage(2) fill)
|
||||
gfx_init_plane_fill: {
|
||||
.label _0 = $13
|
||||
.label _1 = 3
|
||||
@ -1597,7 +1589,7 @@ gfx_init_plane_fill: {
|
||||
.label _6 = 3
|
||||
.label gfxb = 3
|
||||
.label by = 7
|
||||
.label plane_addr = $a
|
||||
.label plane_addr = 9
|
||||
.label fill = 2
|
||||
lda plane_addr
|
||||
sta _0
|
||||
@ -1834,7 +1826,7 @@ gfx_init_plane_charset8: {
|
||||
.label bits = 8
|
||||
.label chargen = 3
|
||||
.label gfxa = 5
|
||||
.label col = 9
|
||||
.label col = $d
|
||||
.label cr = 7
|
||||
.label ch = 2
|
||||
lda #gfxbCpuBank
|
||||
@ -1992,10 +1984,10 @@ gfx_init_vic_bitmap: {
|
||||
lines_y: .byte 0, 0, $c7, $c7, 0, 0, $64, $c7, $64, 0
|
||||
}
|
||||
// Draw a line on the bitmap
|
||||
// bitmap_line(byte zeropage(9) x0, byte register(X) x1, byte zeropage($f) y0, byte zeropage($12) y1)
|
||||
// bitmap_line(byte zeropage($d) x0, byte register(X) x1, byte zeropage($f) y0, byte zeropage($12) y1)
|
||||
bitmap_line: {
|
||||
.label xd = 8
|
||||
.label x0 = 9
|
||||
.label x0 = $d
|
||||
.label y0 = $f
|
||||
.label y1 = $12
|
||||
txa
|
||||
@ -2099,11 +2091,11 @@ bitmap_line: {
|
||||
jsr bitmap_line_xdyi
|
||||
jmp breturn
|
||||
}
|
||||
// bitmap_line_xdyi(byte zeropage($e) x, byte zeropage($f) y, byte zeropage(9) x1, byte zeropage(8) xd, byte zeropage(7) yd)
|
||||
// bitmap_line_xdyi(byte zeropage($e) x, byte zeropage($f) y, byte zeropage($d) x1, byte zeropage(8) xd, byte zeropage(7) yd)
|
||||
bitmap_line_xdyi: {
|
||||
.label x = $e
|
||||
.label y = $f
|
||||
.label x1 = 9
|
||||
.label x1 = $d
|
||||
.label xd = 8
|
||||
.label yd = 7
|
||||
.label e = $12
|
||||
@ -2166,7 +2158,7 @@ bitmap_line_ydxi: {
|
||||
.label y1 = $12
|
||||
.label yd = 7
|
||||
.label xd = 8
|
||||
.label e = 9
|
||||
.label e = $d
|
||||
lda xd
|
||||
lsr
|
||||
sta e
|
||||
@ -2194,11 +2186,11 @@ bitmap_line_ydxi: {
|
||||
bne b1
|
||||
rts
|
||||
}
|
||||
// bitmap_line_xdyd(byte zeropage($e) x, byte zeropage($f) y, byte zeropage(9) x1, byte zeropage(8) xd, byte zeropage(7) yd)
|
||||
// bitmap_line_xdyd(byte zeropage($e) x, byte zeropage($f) y, byte zeropage($d) x1, byte zeropage(8) xd, byte zeropage(7) yd)
|
||||
bitmap_line_xdyd: {
|
||||
.label x = $e
|
||||
.label y = $f
|
||||
.label x1 = 9
|
||||
.label x1 = $d
|
||||
.label xd = 8
|
||||
.label yd = 7
|
||||
.label e = $12
|
||||
@ -2235,7 +2227,7 @@ bitmap_line_ydxd: {
|
||||
.label y1 = $f
|
||||
.label yd = 7
|
||||
.label xd = 8
|
||||
.label e = 9
|
||||
.label e = $d
|
||||
lda xd
|
||||
lsr
|
||||
sta e
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -437,7 +437,7 @@
|
||||
(label) bitmap_line::@9
|
||||
(label) bitmap_line::@return
|
||||
(byte) bitmap_line::x0
|
||||
(byte) bitmap_line::x0#0 x0 zp ZP_BYTE:9 1.260869565217391
|
||||
(byte) bitmap_line::x0#0 x0 zp ZP_BYTE:13 1.260869565217391
|
||||
(byte) bitmap_line::x1
|
||||
(byte) bitmap_line::x1#0 reg byte x 1.3181818181818181
|
||||
(byte) bitmap_line::xd
|
||||
@ -472,9 +472,9 @@
|
||||
(byte) bitmap_line_xdyd::x#3 x zp ZP_BYTE:14 76.25
|
||||
(byte) bitmap_line_xdyd::x#6 x zp ZP_BYTE:14 3.0
|
||||
(byte) bitmap_line_xdyd::x1
|
||||
(byte) bitmap_line_xdyd::x1#0 x1 zp ZP_BYTE:9 1.3333333333333333
|
||||
(byte) bitmap_line_xdyd::x1#1 x1 zp ZP_BYTE:9 1.3333333333333333
|
||||
(byte) bitmap_line_xdyd::x1#6 x1 zp ZP_BYTE:9 7.5
|
||||
(byte) bitmap_line_xdyd::x1#0 x1 zp ZP_BYTE:13 1.3333333333333333
|
||||
(byte) bitmap_line_xdyd::x1#1 x1 zp ZP_BYTE:13 1.3333333333333333
|
||||
(byte) bitmap_line_xdyd::x1#6 x1 zp ZP_BYTE:13 7.5
|
||||
(byte) bitmap_line_xdyd::xd
|
||||
(byte) bitmap_line_xdyd::xd#0 xd zp ZP_BYTE:8 2.0
|
||||
(byte) bitmap_line_xdyd::xd#1 xd zp ZP_BYTE:8 2.0
|
||||
@ -510,9 +510,9 @@
|
||||
(byte) bitmap_line_xdyi::x#3 x zp ZP_BYTE:14 76.25
|
||||
(byte) bitmap_line_xdyi::x#6 x zp ZP_BYTE:14 3.0
|
||||
(byte) bitmap_line_xdyi::x1
|
||||
(byte) bitmap_line_xdyi::x1#0 x1 zp ZP_BYTE:9 1.3333333333333333
|
||||
(byte) bitmap_line_xdyi::x1#1 x1 zp ZP_BYTE:9 1.3333333333333333
|
||||
(byte) bitmap_line_xdyi::x1#6 x1 zp ZP_BYTE:9 7.5
|
||||
(byte) bitmap_line_xdyi::x1#0 x1 zp ZP_BYTE:13 1.3333333333333333
|
||||
(byte) bitmap_line_xdyi::x1#1 x1 zp ZP_BYTE:13 1.3333333333333333
|
||||
(byte) bitmap_line_xdyi::x1#6 x1 zp ZP_BYTE:13 7.5
|
||||
(byte) bitmap_line_xdyi::xd
|
||||
(byte) bitmap_line_xdyi::xd#0 xd zp ZP_BYTE:8 2.0
|
||||
(byte) bitmap_line_xdyi::xd#1 xd zp ZP_BYTE:8 2.0
|
||||
@ -536,11 +536,11 @@
|
||||
(label) bitmap_line_ydxd::@5
|
||||
(label) bitmap_line_ydxd::@return
|
||||
(byte) bitmap_line_ydxd::e
|
||||
(byte) bitmap_line_ydxd::e#0 e zp ZP_BYTE:9 4.0
|
||||
(byte) bitmap_line_ydxd::e#1 e zp ZP_BYTE:9 134.66666666666666
|
||||
(byte) bitmap_line_ydxd::e#2 e zp ZP_BYTE:9 202.0
|
||||
(byte) bitmap_line_ydxd::e#3 e zp ZP_BYTE:9 40.8
|
||||
(byte) bitmap_line_ydxd::e#6 e zp ZP_BYTE:9 101.0
|
||||
(byte) bitmap_line_ydxd::e#0 e zp ZP_BYTE:13 4.0
|
||||
(byte) bitmap_line_ydxd::e#1 e zp ZP_BYTE:13 134.66666666666666
|
||||
(byte) bitmap_line_ydxd::e#2 e zp ZP_BYTE:13 202.0
|
||||
(byte) bitmap_line_ydxd::e#3 e zp ZP_BYTE:13 40.8
|
||||
(byte) bitmap_line_ydxd::e#6 e zp ZP_BYTE:13 101.0
|
||||
(byte) bitmap_line_ydxd::x
|
||||
(byte) bitmap_line_ydxd::x#0 reg byte x 1.0
|
||||
(byte) bitmap_line_ydxd::x#1 reg byte x 1.0
|
||||
@ -574,11 +574,11 @@
|
||||
(label) bitmap_line_ydxi::@5
|
||||
(label) bitmap_line_ydxi::@return
|
||||
(byte) bitmap_line_ydxi::e
|
||||
(byte) bitmap_line_ydxi::e#0 e zp ZP_BYTE:9 4.0
|
||||
(byte) bitmap_line_ydxi::e#1 e zp ZP_BYTE:9 134.66666666666666
|
||||
(byte) bitmap_line_ydxi::e#2 e zp ZP_BYTE:9 202.0
|
||||
(byte) bitmap_line_ydxi::e#3 e zp ZP_BYTE:9 40.8
|
||||
(byte) bitmap_line_ydxi::e#6 e zp ZP_BYTE:9 101.0
|
||||
(byte) bitmap_line_ydxi::e#0 e zp ZP_BYTE:13 4.0
|
||||
(byte) bitmap_line_ydxi::e#1 e zp ZP_BYTE:13 134.66666666666666
|
||||
(byte) bitmap_line_ydxi::e#2 e zp ZP_BYTE:13 202.0
|
||||
(byte) bitmap_line_ydxi::e#3 e zp ZP_BYTE:13 40.8
|
||||
(byte) bitmap_line_ydxi::e#6 e zp ZP_BYTE:13 101.0
|
||||
(byte) bitmap_line_ydxi::x
|
||||
(byte) bitmap_line_ydxi::x#0 reg byte x 1.0
|
||||
(byte) bitmap_line_ydxi::x#1 reg byte x 1.0
|
||||
@ -707,7 +707,7 @@
|
||||
(byte) form_control::key_event#0 reg byte a 2.6666666666666665
|
||||
(byte) form_control::return
|
||||
(byte) form_control::return#0 reg byte a 2002.0
|
||||
(byte) form_control::return#2 reg byte y 333.6666666666667
|
||||
(byte) form_control::return#2 reg byte x 333.6666666666667
|
||||
(byte*) form_ctrl_bmm
|
||||
(const byte*) form_ctrl_bmm#0 form_ctrl_bmm = (const byte[]) form_fields_val#0+(byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte*) form_ctrl_borof
|
||||
@ -727,28 +727,28 @@
|
||||
(byte*) form_ctrl_overs
|
||||
(const byte*) form_ctrl_overs#0 form_ctrl_overs = (const byte[]) form_fields_val#0+(byte/signed byte/word/signed word/dword/signed dword) 9
|
||||
(signed byte) form_cursor_count
|
||||
(signed byte) form_cursor_count#1 form_cursor_count zp ZP_BYTE:14 0.3333333333333333
|
||||
(signed byte) form_cursor_count#15 form_cursor_count zp ZP_BYTE:14 0.4
|
||||
(signed byte) form_cursor_count#16 form_cursor_count zp ZP_BYTE:14 65.82352941176472
|
||||
(signed byte) form_cursor_count#21 form_cursor_count zp ZP_BYTE:14 158.0
|
||||
(signed byte) form_cursor_count#5 form_cursor_count zp ZP_BYTE:14 2.0
|
||||
(signed byte) form_cursor_count#1 form_cursor_count zp ZP_BYTE:13 0.3333333333333333
|
||||
(signed byte) form_cursor_count#15 form_cursor_count zp ZP_BYTE:13 0.4
|
||||
(signed byte) form_cursor_count#16 form_cursor_count zp ZP_BYTE:13 65.82352941176472
|
||||
(signed byte) form_cursor_count#21 form_cursor_count zp ZP_BYTE:13 158.0
|
||||
(signed byte) form_cursor_count#5 form_cursor_count zp ZP_BYTE:13 2.0
|
||||
(byte*) form_dtv_palet
|
||||
(const byte*) form_dtv_palet#0 form_dtv_palet = (const byte[]) form_fields_val#0+(byte/signed byte/word/signed word/dword/signed dword) $1b
|
||||
(byte) form_field_idx
|
||||
(byte) form_field_idx#1 reg byte x 0.3333333333333333
|
||||
(byte) form_field_idx#18 reg byte x 65.94117647058826
|
||||
(byte) form_field_idx#28 reg byte x 29.17948717948718
|
||||
(byte) form_field_idx#32 reg byte x 6.0
|
||||
(byte) form_field_idx#44 reg byte x 2.0
|
||||
(byte) form_field_idx#45 reg byte x 2.0
|
||||
(byte) form_field_idx#1 form_field_idx zp ZP_BYTE:14 0.3333333333333333
|
||||
(byte) form_field_idx#18 form_field_idx zp ZP_BYTE:14 65.94117647058826
|
||||
(byte) form_field_idx#28 form_field_idx zp ZP_BYTE:14 29.17948717948718
|
||||
(byte) form_field_idx#32 form_field_idx zp ZP_BYTE:14 6.0
|
||||
(byte) form_field_idx#44 form_field_idx zp ZP_BYTE:14 2.0
|
||||
(byte) form_field_idx#45 form_field_idx zp ZP_BYTE:14 2.0
|
||||
(byte*()) form_field_ptr((byte) form_field_ptr::field_idx)
|
||||
(word~) form_field_ptr::$2 $2 zp ZP_WORD:3 1.0
|
||||
(label) form_field_ptr::@return
|
||||
(byte*) form_field_ptr::field
|
||||
(byte) form_field_ptr::field_idx
|
||||
(byte) form_field_ptr::field_idx#0 field_idx zp ZP_BYTE:2 2002.0
|
||||
(byte) form_field_ptr::field_idx#1 field_idx zp ZP_BYTE:2 4.0
|
||||
(byte) form_field_ptr::field_idx#2 field_idx zp ZP_BYTE:2 335.66666666666674
|
||||
(byte) form_field_ptr::field_idx#0 reg byte y 2002.0
|
||||
(byte) form_field_ptr::field_idx#1 reg byte y 4.0
|
||||
(byte) form_field_ptr::field_idx#2 reg byte y 335.66666666666674
|
||||
(byte*) form_field_ptr::line
|
||||
(byte*) form_field_ptr::return
|
||||
(byte*) form_field_ptr::return#0 return zp ZP_WORD:3 251.25
|
||||
@ -757,7 +757,7 @@
|
||||
(byte) form_field_ptr::x
|
||||
(byte) form_field_ptr::x#0 reg byte a 4.0
|
||||
(byte) form_field_ptr::y
|
||||
(byte) form_field_ptr::y#0 reg byte a 6.0
|
||||
(byte) form_field_ptr::y#0 reg byte x 6.0
|
||||
(byte) form_fields_cnt
|
||||
(const byte) form_fields_cnt#0 form_fields_cnt = (byte/signed byte/word/signed word/dword/signed dword) $24
|
||||
(byte[]) form_fields_max
|
||||
@ -795,8 +795,8 @@
|
||||
(label) form_mode::@8
|
||||
(label) form_mode::@return
|
||||
(byte) form_mode::i
|
||||
(byte) form_mode::i#1 reg byte y 151.5
|
||||
(byte) form_mode::i#2 reg byte y 202.0
|
||||
(byte) form_mode::i#1 reg byte x 151.5
|
||||
(byte) form_mode::i#2 reg byte x 202.0
|
||||
(byte) form_mode::preset_current
|
||||
(byte) form_mode::preset_current#0 preset_current zp ZP_BYTE:15 4.0
|
||||
(byte) form_mode::preset_current#1 preset_current zp ZP_BYTE:15 50.5
|
||||
@ -821,8 +821,8 @@
|
||||
(byte*) form_set_screen::line#2 line zp ZP_WORD:3 80.8
|
||||
(byte*) form_set_screen::screen
|
||||
(byte) form_set_screen::y
|
||||
(byte) form_set_screen::y#1 reg byte y 151.5
|
||||
(byte) form_set_screen::y#2 reg byte y 67.33333333333333
|
||||
(byte) form_set_screen::y#1 reg byte x 151.5
|
||||
(byte) form_set_screen::y#2 reg byte x 67.33333333333333
|
||||
(byte*) form_vic_bg0_hi
|
||||
(const byte*) form_vic_bg0_hi#0 form_vic_bg0_hi = (const byte[]) form_fields_val#0+(byte/signed byte/word/signed word/dword/signed dword) $1c
|
||||
(byte*) form_vic_bg0_lo
|
||||
@ -866,9 +866,9 @@
|
||||
(byte) get_plane::idx#1 reg byte a 4.0
|
||||
(byte) get_plane::idx#10 reg byte a 2.285714285714285
|
||||
(dword) get_plane::return
|
||||
(dword) get_plane::return#14 return zp ZP_DWORD:10 1.0
|
||||
(dword) get_plane::return#16 return zp ZP_DWORD:10 4.0
|
||||
(dword) get_plane::return#17 return zp ZP_DWORD:10 4.0
|
||||
(dword) get_plane::return#14 return zp ZP_DWORD:9 1.0
|
||||
(dword) get_plane::return#16 return zp ZP_DWORD:9 4.0
|
||||
(dword) get_plane::return#17 return zp ZP_DWORD:9 4.0
|
||||
(byte*()) get_vic_charset((byte) get_vic_charset::idx)
|
||||
(label) get_vic_charset::@3
|
||||
(label) get_vic_charset::@4
|
||||
@ -986,10 +986,10 @@
|
||||
(byte*) gfx_init_plane_charset8::chargen#2 chargen zp ZP_WORD:3 157.0
|
||||
(byte*) gfx_init_plane_charset8::chargen#3 chargen zp ZP_WORD:3 22.0
|
||||
(byte) gfx_init_plane_charset8::col
|
||||
(byte) gfx_init_plane_charset8::col#1 col zp ZP_BYTE:9 302.0
|
||||
(byte) gfx_init_plane_charset8::col#2 col zp ZP_BYTE:9 388.0
|
||||
(byte) gfx_init_plane_charset8::col#5 col zp ZP_BYTE:9 71.0
|
||||
(byte) gfx_init_plane_charset8::col#6 col zp ZP_BYTE:9 22.0
|
||||
(byte) gfx_init_plane_charset8::col#1 col zp ZP_BYTE:13 302.0
|
||||
(byte) gfx_init_plane_charset8::col#2 col zp ZP_BYTE:13 388.0
|
||||
(byte) gfx_init_plane_charset8::col#5 col zp ZP_BYTE:13 71.0
|
||||
(byte) gfx_init_plane_charset8::col#6 col zp ZP_BYTE:13 22.0
|
||||
(byte) gfx_init_plane_charset8::cp
|
||||
(byte) gfx_init_plane_charset8::cp#1 reg byte x 1501.5
|
||||
(byte) gfx_init_plane_charset8::cp#2 reg byte x 222.44444444444446
|
||||
@ -1032,7 +1032,7 @@
|
||||
(byte) gfx_init_plane_fill::gfxbCpuBank#0 reg byte x 2.0
|
||||
(byte) gfx_init_plane_fill::gfxbCpuBank#1 reg byte x 20.0
|
||||
(dword) gfx_init_plane_fill::plane_addr
|
||||
(dword) gfx_init_plane_fill::plane_addr#3 plane_addr zp ZP_DWORD:10 0.5714285714285714
|
||||
(dword) gfx_init_plane_fill::plane_addr#3 plane_addr zp ZP_DWORD:9 0.5714285714285714
|
||||
(void()) gfx_init_plane_full()
|
||||
(label) gfx_init_plane_full::@return
|
||||
(void()) gfx_init_plane_horisontal()
|
||||
@ -1210,7 +1210,7 @@
|
||||
(const byte[]) gfx_init_vic_bitmap::lines_y#0 lines_y = { (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/word/signed word/dword/signed dword) $c7, (byte/word/signed word/dword/signed dword) $c7, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) $64, (byte/word/signed word/dword/signed dword) $c7, (byte/signed byte/word/signed word/dword/signed dword) $64, (byte/signed byte/word/signed word/dword/signed dword) 0 }
|
||||
(void()) gfx_mode()
|
||||
(byte~) gfx_mode::$29 reg byte a 4.0
|
||||
(dword~) gfx_mode::$31 $31 zp ZP_DWORD:10 4.0
|
||||
(dword~) gfx_mode::$31 $31 zp ZP_DWORD:9 4.0
|
||||
(word~) gfx_mode::$33 $33 zp ZP_WORD:3 4.0
|
||||
(byte~) gfx_mode::$34 reg byte a 4.0
|
||||
(word~) gfx_mode::$35 $35 zp ZP_WORD:3 4.0
|
||||
@ -1222,7 +1222,7 @@
|
||||
(byte~) gfx_mode::$41 reg byte a 4.0
|
||||
(byte~) gfx_mode::$42 reg byte a 4.0
|
||||
(byte~) gfx_mode::$43 reg byte a 4.0
|
||||
(dword~) gfx_mode::$45 $45 zp ZP_DWORD:10 4.0
|
||||
(dword~) gfx_mode::$45 $45 zp ZP_DWORD:9 4.0
|
||||
(word~) gfx_mode::$47 $47 zp ZP_WORD:3 4.0
|
||||
(byte~) gfx_mode::$48 reg byte a 4.0
|
||||
(word~) gfx_mode::$49 $49 zp ZP_WORD:3 4.0
|
||||
@ -1289,48 +1289,48 @@
|
||||
(byte*) gfx_mode::col#2 col zp ZP_WORD:5 1552.0
|
||||
(byte*) gfx_mode::col#3 col zp ZP_WORD:5 202.0
|
||||
(byte) gfx_mode::cx
|
||||
(byte) gfx_mode::cx#1 cx zp ZP_BYTE:7 1501.5
|
||||
(byte) gfx_mode::cx#2 cx zp ZP_BYTE:7 500.5
|
||||
(byte) gfx_mode::cx#1 reg byte x 1501.5
|
||||
(byte) gfx_mode::cx#2 reg byte x 500.5
|
||||
(byte) gfx_mode::cy
|
||||
(byte) gfx_mode::cy#1 cy zp ZP_BYTE:2 151.5
|
||||
(byte) gfx_mode::cy#4 cy zp ZP_BYTE:2 28.857142857142858
|
||||
(byte) gfx_mode::dtv_control
|
||||
(byte) gfx_mode::dtv_control#10 reg byte y 4.0
|
||||
(byte) gfx_mode::dtv_control#11 reg byte y 4.0
|
||||
(byte) gfx_mode::dtv_control#12 reg byte y 6.0
|
||||
(byte) gfx_mode::dtv_control#13 reg byte y 4.0
|
||||
(byte) gfx_mode::dtv_control#14 reg byte y 2.0
|
||||
(byte) gfx_mode::dtv_control#15 reg byte y 4.0
|
||||
(byte) gfx_mode::dtv_control#2 reg byte y 4.0
|
||||
(byte) gfx_mode::dtv_control#3 reg byte y 4.0
|
||||
(byte) gfx_mode::dtv_control#4 reg byte y 4.0
|
||||
(byte) gfx_mode::dtv_control#5 reg byte y 4.0
|
||||
(byte) gfx_mode::dtv_control#6 reg byte y 4.0
|
||||
(byte) gfx_mode::dtv_control#10 reg byte x 4.0
|
||||
(byte) gfx_mode::dtv_control#11 reg byte x 4.0
|
||||
(byte) gfx_mode::dtv_control#12 reg byte x 6.0
|
||||
(byte) gfx_mode::dtv_control#13 reg byte x 4.0
|
||||
(byte) gfx_mode::dtv_control#14 reg byte x 2.0
|
||||
(byte) gfx_mode::dtv_control#15 reg byte x 4.0
|
||||
(byte) gfx_mode::dtv_control#2 reg byte x 4.0
|
||||
(byte) gfx_mode::dtv_control#3 reg byte x 4.0
|
||||
(byte) gfx_mode::dtv_control#4 reg byte x 4.0
|
||||
(byte) gfx_mode::dtv_control#5 reg byte x 4.0
|
||||
(byte) gfx_mode::dtv_control#6 reg byte x 4.0
|
||||
(byte) gfx_mode::i
|
||||
(byte) gfx_mode::i#1 reg byte y 151.5
|
||||
(byte) gfx_mode::i#2 reg byte y 202.0
|
||||
(byte) gfx_mode::i#1 reg byte x 151.5
|
||||
(byte) gfx_mode::i#2 reg byte x 202.0
|
||||
(byte) gfx_mode::j
|
||||
(byte) gfx_mode::j#1 reg byte y 151.5
|
||||
(byte) gfx_mode::j#2 reg byte y 202.0
|
||||
(byte) gfx_mode::j#1 reg byte x 151.5
|
||||
(byte) gfx_mode::j#2 reg byte x 202.0
|
||||
(byte) gfx_mode::keyboard_event
|
||||
(byte) gfx_mode::keyboard_event#0 reg byte a 202.0
|
||||
(dword) gfx_mode::plane_a
|
||||
(dword) gfx_mode::plane_a#0 plane_a zp ZP_DWORD:10 1.1428571428571428
|
||||
(dword) gfx_mode::plane_a#0 plane_a zp ZP_DWORD:9 1.1428571428571428
|
||||
(byte) gfx_mode::plane_a_offs
|
||||
(byte) gfx_mode::plane_a_offs#0 reg byte y 0.8
|
||||
(byte) gfx_mode::plane_a_offs#0 reg byte x 0.8
|
||||
(dword) gfx_mode::plane_b
|
||||
(dword) gfx_mode::plane_b#0 plane_b zp ZP_DWORD:10 1.1428571428571428
|
||||
(dword) gfx_mode::plane_b#0 plane_b zp ZP_DWORD:9 1.1428571428571428
|
||||
(byte) gfx_mode::plane_b_offs
|
||||
(byte) gfx_mode::plane_b_offs#0 reg byte y 0.8
|
||||
(byte) gfx_mode::plane_b_offs#0 reg byte x 0.8
|
||||
(byte*) gfx_mode::vic_colors
|
||||
(byte*) gfx_mode::vic_colors#0 vic_colors zp ZP_WORD:3 4.0
|
||||
(byte*) gfx_mode::vic_colors#1 vic_colors zp ZP_WORD:3 420.59999999999997
|
||||
(byte*) gfx_mode::vic_colors#2 vic_colors zp ZP_WORD:3 1034.6666666666667
|
||||
(byte*) gfx_mode::vic_colors#3 vic_colors zp ZP_WORD:3 204.0
|
||||
(byte) gfx_mode::vic_control
|
||||
(byte) gfx_mode::vic_control#2 reg byte y 4.0
|
||||
(byte) gfx_mode::vic_control#4 reg byte y 6.0
|
||||
(byte) gfx_mode::vic_control#5 reg byte y 2.0
|
||||
(byte) gfx_mode::vic_control#2 reg byte x 4.0
|
||||
(byte) gfx_mode::vic_control#4 reg byte x 6.0
|
||||
(byte) gfx_mode::vic_control#5 reg byte x 2.0
|
||||
(byte) gfx_mode::vic_control2
|
||||
(byte) gfx_mode::vic_control2#2 reg byte a 2.0
|
||||
(byte[]) keyboard_char_keycodes
|
||||
@ -1347,7 +1347,7 @@
|
||||
(byte~) keyboard_event_pressed::$1 reg byte a 4.0
|
||||
(label) keyboard_event_pressed::@return
|
||||
(byte) keyboard_event_pressed::keycode
|
||||
(byte) keyboard_event_pressed::keycode#4 keycode zp ZP_BYTE:7 1.3333333333333333
|
||||
(byte) keyboard_event_pressed::keycode#4 keycode zp ZP_BYTE:2 1.3333333333333333
|
||||
(byte) keyboard_event_pressed::return
|
||||
(byte) keyboard_event_pressed::return#0 reg byte a 4.0
|
||||
(byte) keyboard_event_pressed::return#1 reg byte a 4.0
|
||||
@ -1355,7 +1355,7 @@
|
||||
(byte) keyboard_event_pressed::return#2 reg byte a 4.0
|
||||
(byte) keyboard_event_pressed::return#3 reg byte a 4.0
|
||||
(byte) keyboard_event_pressed::row_bits
|
||||
(byte) keyboard_event_pressed::row_bits#0 row_bits zp ZP_BYTE:8 2.0
|
||||
(byte) keyboard_event_pressed::row_bits#0 row_bits zp ZP_BYTE:7 2.0
|
||||
(void()) keyboard_event_scan()
|
||||
(byte/word/dword~) keyboard_event_scan::$11 reg byte a 200002.0
|
||||
(byte~) keyboard_event_scan::$14 reg byte a 4.0
|
||||
@ -1389,16 +1389,16 @@
|
||||
(label) keyboard_event_scan::@9
|
||||
(label) keyboard_event_scan::@return
|
||||
(byte) keyboard_event_scan::col
|
||||
(byte) keyboard_event_scan::col#1 col zp ZP_BYTE:7 150001.5
|
||||
(byte) keyboard_event_scan::col#2 col zp ZP_BYTE:7 28571.714285714286
|
||||
(byte) keyboard_event_scan::col#1 reg byte x 150001.5
|
||||
(byte) keyboard_event_scan::col#2 reg byte x 28571.714285714286
|
||||
(byte) keyboard_event_scan::event_type
|
||||
(byte) keyboard_event_scan::event_type#0 reg byte a 200002.0
|
||||
(byte) keyboard_event_scan::keycode
|
||||
(byte) keyboard_event_scan::keycode#1 keycode zp ZP_BYTE:8 20002.0
|
||||
(byte) keyboard_event_scan::keycode#10 keycode zp ZP_BYTE:8 31538.846153846156
|
||||
(byte) keyboard_event_scan::keycode#11 keycode zp ZP_BYTE:8 5000.5
|
||||
(byte) keyboard_event_scan::keycode#14 keycode zp ZP_BYTE:8 10001.0
|
||||
(byte) keyboard_event_scan::keycode#15 keycode zp ZP_BYTE:8 52500.75
|
||||
(byte) keyboard_event_scan::keycode#1 keycode zp ZP_BYTE:7 20002.0
|
||||
(byte) keyboard_event_scan::keycode#10 keycode zp ZP_BYTE:7 31538.846153846156
|
||||
(byte) keyboard_event_scan::keycode#11 keycode zp ZP_BYTE:7 5000.5
|
||||
(byte) keyboard_event_scan::keycode#14 keycode zp ZP_BYTE:7 10001.0
|
||||
(byte) keyboard_event_scan::keycode#15 keycode zp ZP_BYTE:7 52500.75
|
||||
(byte) keyboard_event_scan::row
|
||||
(byte) keyboard_event_scan::row#1 row zp ZP_BYTE:2 15001.5
|
||||
(byte) keyboard_event_scan::row#2 row zp ZP_BYTE:2 6000.24
|
||||
@ -1407,17 +1407,17 @@
|
||||
(byte[8]) keyboard_events
|
||||
(const byte[8]) keyboard_events#0 keyboard_events = { fill( 8, 0) }
|
||||
(byte) keyboard_events_size
|
||||
(byte) keyboard_events_size#1 keyboard_events_size zp ZP_BYTE:9 200002.0
|
||||
(byte) keyboard_events_size#100 keyboard_events_size zp ZP_BYTE:9 882.6176470588235
|
||||
(byte) keyboard_events_size#110 keyboard_events_size zp ZP_BYTE:9 105.0
|
||||
(byte) keyboard_events_size#118 keyboard_events_size zp ZP_BYTE:9 4286.428571428572
|
||||
(byte) keyboard_events_size#119 keyboard_events_size zp ZP_BYTE:9 102001.2
|
||||
(byte) keyboard_events_size#18 keyboard_events_size zp ZP_BYTE:9 81000.90000000001
|
||||
(byte) keyboard_events_size#2 keyboard_events_size zp ZP_BYTE:9 200002.0
|
||||
(byte) keyboard_events_size#24 keyboard_events_size zp ZP_BYTE:9 6.6923076923076925
|
||||
(byte) keyboard_events_size#27 keyboard_events_size zp ZP_BYTE:9 0.3333333333333333
|
||||
(byte) keyboard_events_size#4 keyboard_events_size zp ZP_BYTE:9 3.0
|
||||
(byte) keyboard_events_size#47 keyboard_events_size zp ZP_BYTE:9 65.05882352941177
|
||||
(byte) keyboard_events_size#1 keyboard_events_size zp ZP_BYTE:8 200002.0
|
||||
(byte) keyboard_events_size#100 keyboard_events_size zp ZP_BYTE:8 882.6176470588235
|
||||
(byte) keyboard_events_size#110 keyboard_events_size zp ZP_BYTE:8 105.0
|
||||
(byte) keyboard_events_size#118 keyboard_events_size zp ZP_BYTE:8 4286.428571428572
|
||||
(byte) keyboard_events_size#119 keyboard_events_size zp ZP_BYTE:8 102001.2
|
||||
(byte) keyboard_events_size#18 keyboard_events_size zp ZP_BYTE:8 81000.90000000001
|
||||
(byte) keyboard_events_size#2 keyboard_events_size zp ZP_BYTE:8 200002.0
|
||||
(byte) keyboard_events_size#24 keyboard_events_size zp ZP_BYTE:8 6.6923076923076925
|
||||
(byte) keyboard_events_size#27 keyboard_events_size zp ZP_BYTE:8 0.3333333333333333
|
||||
(byte) keyboard_events_size#4 keyboard_events_size zp ZP_BYTE:8 3.0
|
||||
(byte) keyboard_events_size#47 keyboard_events_size zp ZP_BYTE:8 65.05882352941177
|
||||
(void()) keyboard_init()
|
||||
(label) keyboard_init::@return
|
||||
(byte[8]) keyboard_matrix_col_bitmask
|
||||
@ -1429,17 +1429,17 @@
|
||||
(byte) keyboard_matrix_read::return#2 reg byte a 20002.0
|
||||
(byte) keyboard_matrix_read::row_pressed_bits
|
||||
(byte) keyboard_matrix_read::rowid
|
||||
(byte) keyboard_matrix_read::rowid#0 reg byte a 10003.0
|
||||
(byte) keyboard_matrix_read::rowid#0 reg byte x 10003.0
|
||||
(byte[8]) keyboard_matrix_row_bitmask
|
||||
(const byte[8]) keyboard_matrix_row_bitmask#0 keyboard_matrix_row_bitmask = { (byte/word/signed word/dword/signed dword) $fe, (byte/word/signed word/dword/signed dword) $fd, (byte/word/signed word/dword/signed dword) $fb, (byte/word/signed word/dword/signed dword) $f7, (byte/word/signed word/dword/signed dword) $ef, (byte/word/signed word/dword/signed dword) $df, (byte/word/signed word/dword/signed dword) $bf, (byte/signed byte/word/signed word/dword/signed dword) $7f }
|
||||
(byte) keyboard_modifiers
|
||||
(byte) keyboard_modifiers#18 keyboard_modifiers zp ZP_BYTE:2 0.8
|
||||
(byte) keyboard_modifiers#19 keyboard_modifiers zp ZP_BYTE:2 1.6
|
||||
(byte) keyboard_modifiers#20 keyboard_modifiers zp ZP_BYTE:2 1.6
|
||||
(byte) keyboard_modifiers#21 keyboard_modifiers zp ZP_BYTE:2 0.7272727272727273
|
||||
(byte) keyboard_modifiers#3 keyboard_modifiers zp ZP_BYTE:2 4.0
|
||||
(byte) keyboard_modifiers#4 keyboard_modifiers zp ZP_BYTE:2 4.0
|
||||
(byte) keyboard_modifiers#5 keyboard_modifiers zp ZP_BYTE:2 4.0
|
||||
(byte) keyboard_modifiers#18 reg byte x 0.8
|
||||
(byte) keyboard_modifiers#19 reg byte x 1.6
|
||||
(byte) keyboard_modifiers#20 reg byte x 1.6
|
||||
(byte) keyboard_modifiers#21 reg byte x 0.7272727272727273
|
||||
(byte) keyboard_modifiers#3 reg byte x 4.0
|
||||
(byte) keyboard_modifiers#4 reg byte x 4.0
|
||||
(byte) keyboard_modifiers#5 reg byte x 4.0
|
||||
(byte[8]) keyboard_scan_values
|
||||
(const byte[8]) keyboard_scan_values#0 keyboard_scan_values = { fill( 8, 0) }
|
||||
(void()) main()
|
||||
@ -1555,29 +1555,32 @@
|
||||
(const byte*) render_preset_name::name#8 name#8 = (string) "Chunky 8bpp @"
|
||||
(const byte*) render_preset_name::name#9 name#9 = (string) "Sixs Fred @"
|
||||
|
||||
reg byte y [ gfx_mode::dtv_control#12 gfx_mode::dtv_control#6 gfx_mode::dtv_control#13 gfx_mode::dtv_control#5 gfx_mode::dtv_control#11 gfx_mode::dtv_control#4 gfx_mode::dtv_control#10 gfx_mode::dtv_control#15 gfx_mode::dtv_control#14 gfx_mode::dtv_control#2 gfx_mode::dtv_control#3 ]
|
||||
reg byte y [ gfx_mode::vic_control#4 gfx_mode::vic_control#2 gfx_mode::vic_control#5 ]
|
||||
reg byte x [ gfx_mode::dtv_control#12 gfx_mode::dtv_control#6 gfx_mode::dtv_control#13 gfx_mode::dtv_control#5 gfx_mode::dtv_control#11 gfx_mode::dtv_control#4 gfx_mode::dtv_control#10 gfx_mode::dtv_control#15 gfx_mode::dtv_control#14 gfx_mode::dtv_control#2 gfx_mode::dtv_control#3 ]
|
||||
reg byte x [ gfx_mode::vic_control#4 gfx_mode::vic_control#2 gfx_mode::vic_control#5 ]
|
||||
reg byte a [ gfx_mode::vic_control2#2 ]
|
||||
zp ZP_BYTE:2 [ gfx_mode::cy#4 gfx_mode::cy#1 keyboard_event_scan::row#2 keyboard_event_scan::row#1 keyboard_modifiers#21 keyboard_modifiers#20 keyboard_modifiers#4 keyboard_modifiers#19 keyboard_modifiers#3 keyboard_modifiers#18 keyboard_modifiers#5 form_render_values::idx#2 form_render_values::idx#1 form_field_ptr::field_idx#2 form_field_ptr::field_idx#1 form_field_ptr::field_idx#0 gfx_init_plane_fill::fill#6 gfx_init_plane_horisontal2::ay#4 gfx_init_plane_horisontal2::ay#1 gfx_init_plane_vertical::by#4 gfx_init_plane_vertical::by#1 gfx_init_plane_horisontal::ay#4 gfx_init_plane_horisontal::ay#1 gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::ch#1 gfx_init_plane_8bppchunky::y#6 gfx_init_plane_8bppchunky::y#1 gfx_init_vic_bitmap::l#2 gfx_init_vic_bitmap::l#1 bitmap_clear::y#4 bitmap_clear::y#1 gfx_init_charset::c#4 gfx_init_charset::c#1 gfx_init_screen4::cy#4 gfx_init_screen4::cy#1 gfx_init_screen3::cy#4 gfx_init_screen3::cy#1 gfx_init_screen2::cy#4 gfx_init_screen2::cy#1 gfx_init_screen1::cy#4 gfx_init_screen1::cy#1 gfx_init_screen0::cy#4 gfx_init_screen0::cy#1 gfx_mode::$65 bitmap_init::$6 ]
|
||||
zp ZP_BYTE:2 [ gfx_mode::cy#4 gfx_mode::cy#1 keyboard_event_scan::row#2 keyboard_event_scan::row#1 keyboard_event_pressed::keycode#4 form_render_values::idx#2 form_render_values::idx#1 gfx_init_plane_fill::fill#6 gfx_init_plane_horisontal2::ay#4 gfx_init_plane_horisontal2::ay#1 gfx_init_plane_vertical::by#4 gfx_init_plane_vertical::by#1 gfx_init_plane_horisontal::ay#4 gfx_init_plane_horisontal::ay#1 gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::ch#1 gfx_init_plane_8bppchunky::y#6 gfx_init_plane_8bppchunky::y#1 gfx_init_vic_bitmap::l#2 gfx_init_vic_bitmap::l#1 bitmap_clear::y#4 bitmap_clear::y#1 gfx_init_charset::c#4 gfx_init_charset::c#1 gfx_init_screen4::cy#4 gfx_init_screen4::cy#1 gfx_init_screen3::cy#4 gfx_init_screen3::cy#1 gfx_init_screen2::cy#4 gfx_init_screen2::cy#1 gfx_init_screen1::cy#4 gfx_init_screen1::cy#1 gfx_init_screen0::cy#4 gfx_init_screen0::cy#1 gfx_mode::$65 bitmap_init::$6 ]
|
||||
zp ZP_WORD:3 [ gfx_mode::vic_colors#2 gfx_mode::vic_colors#3 gfx_mode::vic_colors#1 gfx_mode::vic_colors#0 get_vic_screen::return#11 get_vic_screen::return#5 get_vic_screen::return#10 gfx_mode::$61 gfx_mode::$63 gfx_mode::$64 get_vic_charset::return#2 get_vic_charset::return#4 gfx_mode::$66 gfx_mode::$68 render_preset_name::name#13 print_str_at::str#2 print_str_at::str#1 print_str_at::str#0 apply_preset::preset#14 form_set_screen::line#2 form_set_screen::line#1 print_str_lines::str#4 print_str_lines::str#3 print_str_lines::str#5 print_str_lines::str#0 print_cls::sc#2 print_cls::sc#0 print_cls::sc#1 gfx_init_plane_fill::gfxb#2 gfx_init_plane_fill::gfxb#3 gfx_init_plane_fill::gfxb#1 gfx_init_plane_fill::gfxb#6 gfx_init_plane_fill::$6 gfx_init_plane_fill::$4 gfx_init_plane_fill::$5 gfx_init_plane_horisontal2::gfxa#2 gfx_init_plane_horisontal2::gfxa#3 gfx_init_plane_horisontal2::gfxa#1 gfx_init_plane_vertical::gfxb#2 gfx_init_plane_vertical::gfxb#3 gfx_init_plane_vertical::gfxb#1 gfx_init_plane_horisontal::gfxa#3 gfx_init_plane_horisontal::gfxa#6 gfx_init_plane_horisontal::gfxa#7 gfx_init_plane_horisontal::gfxa#1 gfx_init_plane_horisontal::gfxa#2 gfx_init_plane_charset8::chargen#2 gfx_init_plane_charset8::chargen#3 gfx_init_plane_charset8::chargen#1 gfx_init_plane_8bppchunky::x#2 gfx_init_plane_8bppchunky::x#1 bitmap_clear::bitmap#2 bitmap_clear::bitmap#3 bitmap_clear::bitmap#5 bitmap_clear::bitmap#1 bitmap_clear::$3 bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 gfx_init_charset::chargen#2 gfx_init_charset::chargen#3 gfx_init_charset::chargen#1 gfx_init_screen4::ch#2 gfx_init_screen4::ch#3 gfx_init_screen4::ch#1 gfx_init_screen3::ch#2 gfx_init_screen3::ch#3 gfx_init_screen3::ch#1 gfx_init_screen2::ch#2 gfx_init_screen2::ch#3 gfx_init_screen2::ch#1 gfx_init_screen1::ch#2 gfx_init_screen1::ch#3 gfx_init_screen1::ch#1 gfx_init_screen0::ch#2 gfx_init_screen0::ch#3 gfx_init_screen0::ch#1 gfx_mode::$33 gfx_mode::$35 gfx_mode::$37 gfx_mode::$47 gfx_mode::$49 gfx_mode::$51 form_field_ptr::return#2 form_render_values::field#0 form_field_ptr::return#0 form_field_ptr::$2 form_field_ptr::return#3 form_control::field#0 gfx_init_plane_fill::$1 bitmap_plot::plotter_x#0 bitmap_plot::$0 ]
|
||||
zp ZP_WORD:5 [ gfx_mode::col#2 gfx_mode::col#3 gfx_mode::col#1 print_str_at::at#2 print_str_at::at#0 print_char_cursor#20 print_char_cursor#22 print_char_cursor#77 print_char_cursor#78 print_char_cursor#38 print_char_cursor#1 gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::gfxa#6 gfx_init_plane_charset8::gfxa#1 gfx_init_plane_8bppchunky::gfxb#4 gfx_init_plane_8bppchunky::gfxb#3 gfx_init_plane_8bppchunky::gfxb#5 gfx_init_plane_8bppchunky::gfxb#1 gfx_init_charset::charset#2 gfx_init_charset::charset#3 gfx_init_charset::charset#1 print_cls::$0 bitmap_plot::plotter_y#0 ]
|
||||
zp ZP_BYTE:7 [ gfx_mode::cx#2 gfx_mode::cx#1 keyboard_event_scan::col#2 keyboard_event_scan::col#1 keyboard_event_pressed::keycode#4 gfx_init_plane_fill::by#4 gfx_init_plane_fill::by#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::cr#1 bitmap_line_xdyi::yd#2 bitmap_line_xdyi::yd#1 bitmap_line_xdyi::yd#0 bitmap_line_ydxi::yd#5 bitmap_line_ydxi::yd#0 bitmap_line_ydxi::yd#1 bitmap_line_xdyd::yd#2 bitmap_line_xdyd::yd#1 bitmap_line_xdyd::yd#0 bitmap_line_ydxd::yd#5 bitmap_line_ydxd::yd#0 bitmap_line_ydxd::yd#1 gfx_init_screen3::$1 gfx_init_screen2::col2#0 gfx_init_screen0::$1 ]
|
||||
reg byte y [ gfx_mode::j#2 gfx_mode::j#1 ]
|
||||
reg byte y [ gfx_mode::i#2 gfx_mode::i#1 ]
|
||||
reg byte x [ gfx_mode::cx#2 gfx_mode::cx#1 ]
|
||||
reg byte x [ gfx_mode::j#2 gfx_mode::j#1 ]
|
||||
reg byte x [ gfx_mode::i#2 gfx_mode::i#1 ]
|
||||
reg byte a [ keyboard_event_get::return#2 keyboard_event_get::return#1 ]
|
||||
zp ZP_BYTE:8 [ keyboard_event_scan::keycode#10 keyboard_event_scan::keycode#11 keyboard_event_scan::keycode#14 keyboard_event_scan::keycode#1 keyboard_event_scan::keycode#15 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::bits#0 gfx_init_plane_charset8::bits#1 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::xd#1 bitmap_line_xdyi::xd#0 bitmap_line::xd#2 bitmap_line::xd#1 bitmap_line_ydxi::xd#2 bitmap_line_ydxi::xd#0 bitmap_line_ydxi::xd#1 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::xd#1 bitmap_line_xdyd::xd#0 bitmap_line_ydxd::xd#2 bitmap_line_ydxd::xd#0 bitmap_line_ydxd::xd#1 keyboard_event_pressed::row_bits#0 ]
|
||||
zp ZP_BYTE:9 [ keyboard_events_size#18 keyboard_events_size#118 keyboard_events_size#110 keyboard_events_size#47 keyboard_events_size#27 keyboard_events_size#24 keyboard_events_size#100 keyboard_events_size#4 keyboard_events_size#119 keyboard_events_size#2 keyboard_events_size#1 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::col#6 gfx_init_plane_charset8::col#1 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x1#1 bitmap_line_xdyi::x1#0 bitmap_line::x0#0 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::x1#1 bitmap_line_xdyd::x1#0 bitmap_line_ydxi::e#3 bitmap_line_ydxi::e#0 bitmap_line_ydxi::e#6 bitmap_line_ydxi::e#2 bitmap_line_ydxi::e#1 bitmap_line_ydxd::e#3 bitmap_line_ydxd::e#0 bitmap_line_ydxd::e#6 bitmap_line_ydxd::e#2 bitmap_line_ydxd::e#1 ]
|
||||
reg byte x [ keyboard_modifiers#21 keyboard_modifiers#20 keyboard_modifiers#4 keyboard_modifiers#19 keyboard_modifiers#3 keyboard_modifiers#18 keyboard_modifiers#5 ]
|
||||
reg byte x [ keyboard_event_scan::col#2 keyboard_event_scan::col#1 ]
|
||||
zp ZP_BYTE:7 [ keyboard_event_scan::keycode#10 keyboard_event_scan::keycode#11 keyboard_event_scan::keycode#14 keyboard_event_scan::keycode#1 keyboard_event_scan::keycode#15 gfx_init_plane_fill::by#4 gfx_init_plane_fill::by#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::cr#1 bitmap_line_xdyi::yd#2 bitmap_line_xdyi::yd#1 bitmap_line_xdyi::yd#0 bitmap_line_ydxi::yd#5 bitmap_line_ydxi::yd#0 bitmap_line_ydxi::yd#1 bitmap_line_xdyd::yd#2 bitmap_line_xdyd::yd#1 bitmap_line_xdyd::yd#0 bitmap_line_ydxd::yd#5 bitmap_line_ydxd::yd#0 bitmap_line_ydxd::yd#1 keyboard_event_pressed::row_bits#0 gfx_init_screen3::$1 gfx_init_screen2::col2#0 gfx_init_screen0::$1 ]
|
||||
zp ZP_BYTE:8 [ keyboard_events_size#18 keyboard_events_size#118 keyboard_events_size#110 keyboard_events_size#47 keyboard_events_size#27 keyboard_events_size#24 keyboard_events_size#100 keyboard_events_size#4 keyboard_events_size#119 keyboard_events_size#2 keyboard_events_size#1 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::bits#0 gfx_init_plane_charset8::bits#1 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::xd#1 bitmap_line_xdyi::xd#0 bitmap_line::xd#2 bitmap_line::xd#1 bitmap_line_ydxi::xd#2 bitmap_line_ydxi::xd#0 bitmap_line_ydxi::xd#1 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::xd#1 bitmap_line_xdyd::xd#0 bitmap_line_ydxd::xd#2 bitmap_line_ydxd::xd#0 bitmap_line_ydxd::xd#1 ]
|
||||
reg byte a [ get_vic_screen::idx#2 get_vic_screen::idx#0 get_vic_screen::idx#1 ]
|
||||
reg byte a [ get_plane::idx#10 get_plane::idx#1 get_plane::idx#0 ]
|
||||
zp ZP_DWORD:10 [ get_plane::return#14 get_plane::return#16 get_plane::return#17 gfx_mode::$31 gfx_mode::plane_a#0 gfx_mode::$45 gfx_mode::plane_b#0 gfx_init_plane_fill::plane_addr#3 ]
|
||||
reg byte y [ form_mode::i#2 form_mode::i#1 ]
|
||||
zp ZP_BYTE:14 [ form_cursor_count#21 form_cursor_count#1 form_cursor_count#16 form_cursor_count#15 form_cursor_count#5 bitmap_line_xdyi::x#3 bitmap_line_xdyi::x#6 bitmap_line_xdyi::x#1 bitmap_line_xdyi::x#0 bitmap_line_xdyi::x#2 bitmap_line_ydxi::y#3 bitmap_line_ydxi::y#6 bitmap_line_ydxi::y#0 bitmap_line_ydxi::y#1 bitmap_line_ydxi::y#2 bitmap_line_xdyd::x#3 bitmap_line_xdyd::x#6 bitmap_line_xdyd::x#1 bitmap_line_xdyd::x#0 bitmap_line_xdyd::x#2 bitmap_line_ydxd::y#2 bitmap_line_ydxd::y#7 bitmap_line_ydxd::y#0 bitmap_line_ydxd::y#1 bitmap_line_ydxd::y#3 ]
|
||||
reg byte x [ form_field_idx#28 form_field_idx#1 form_field_idx#18 form_field_idx#32 form_field_idx#44 form_field_idx#45 ]
|
||||
zp ZP_DWORD:9 [ get_plane::return#14 get_plane::return#16 get_plane::return#17 gfx_mode::$31 gfx_mode::plane_a#0 gfx_mode::$45 gfx_mode::plane_b#0 gfx_init_plane_fill::plane_addr#3 ]
|
||||
reg byte x [ form_mode::i#2 form_mode::i#1 ]
|
||||
zp ZP_BYTE:13 [ form_cursor_count#21 form_cursor_count#1 form_cursor_count#16 form_cursor_count#15 form_cursor_count#5 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::col#6 gfx_init_plane_charset8::col#1 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x1#1 bitmap_line_xdyi::x1#0 bitmap_line::x0#0 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::x1#1 bitmap_line_xdyd::x1#0 bitmap_line_ydxi::e#3 bitmap_line_ydxi::e#0 bitmap_line_ydxi::e#6 bitmap_line_ydxi::e#2 bitmap_line_ydxi::e#1 bitmap_line_ydxd::e#3 bitmap_line_ydxd::e#0 bitmap_line_ydxd::e#6 bitmap_line_ydxd::e#2 bitmap_line_ydxd::e#1 ]
|
||||
zp ZP_BYTE:14 [ form_field_idx#28 form_field_idx#1 form_field_idx#18 form_field_idx#32 form_field_idx#44 form_field_idx#45 bitmap_line_xdyi::x#3 bitmap_line_xdyi::x#6 bitmap_line_xdyi::x#1 bitmap_line_xdyi::x#0 bitmap_line_xdyi::x#2 bitmap_line_ydxi::y#3 bitmap_line_ydxi::y#6 bitmap_line_ydxi::y#0 bitmap_line_ydxi::y#1 bitmap_line_ydxi::y#2 bitmap_line_xdyd::x#3 bitmap_line_xdyd::x#6 bitmap_line_xdyd::x#1 bitmap_line_xdyd::x#0 bitmap_line_xdyd::x#2 bitmap_line_ydxd::y#2 bitmap_line_ydxd::y#7 bitmap_line_ydxd::y#0 bitmap_line_ydxd::y#1 bitmap_line_ydxd::y#3 ]
|
||||
zp ZP_BYTE:15 [ form_mode::preset_current#6 form_mode::preset_current#0 form_mode::preset_current#1 bitmap_line_xdyi::y#3 bitmap_line_xdyi::y#5 bitmap_line_xdyi::y#1 bitmap_line_xdyi::y#0 bitmap_line_xdyi::y#6 bitmap_line_xdyi::y#2 bitmap_line::y0#0 bitmap_line_xdyd::y#3 bitmap_line_xdyd::y#5 bitmap_line_xdyd::y#1 bitmap_line_xdyd::y#0 bitmap_line_xdyd::y#6 bitmap_line_xdyd::y#2 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::y1#0 bitmap_line_ydxd::y1#1 ]
|
||||
reg byte a [ render_preset_name::idx#10 render_preset_name::idx#0 render_preset_name::idx#1 ]
|
||||
reg byte y [ form_field_ptr::field_idx#2 form_field_ptr::field_idx#1 form_field_ptr::field_idx#0 ]
|
||||
reg byte y [ apply_preset::i#2 apply_preset::i#1 ]
|
||||
reg byte y [ form_control::return#2 ]
|
||||
reg byte y [ form_set_screen::y#2 form_set_screen::y#1 ]
|
||||
reg byte x [ form_control::return#2 ]
|
||||
reg byte x [ form_set_screen::y#2 form_set_screen::y#1 ]
|
||||
zp ZP_WORD:16 [ print_line_cursor#21 print_line_cursor#2 print_set_screen::screen#2 print_line_cursor#22 gfx_init_plane_8bppchunky::$6 ]
|
||||
reg byte x [ gfx_init_plane_fill::bx#2 gfx_init_plane_fill::bx#1 ]
|
||||
reg byte a [ dtvSetCpuBankSegment1::cpuBankIdx#13 dtvSetCpuBankSegment1::cpuBankIdx#1 dtvSetCpuBankSegment1::cpuBankIdx#11 ]
|
||||
@ -1603,7 +1606,7 @@ reg byte x [ gfx_init_screen2::cx#2 gfx_init_screen2::cx#1 ]
|
||||
reg byte x [ gfx_init_screen1::cx#2 gfx_init_screen1::cx#1 ]
|
||||
reg byte x [ gfx_init_screen0::cx#2 gfx_init_screen0::cx#1 ]
|
||||
reg byte a [ gfx_mode::$29 ]
|
||||
reg byte y [ gfx_mode::plane_a_offs#0 ]
|
||||
reg byte x [ gfx_mode::plane_a_offs#0 ]
|
||||
reg byte a [ gfx_mode::$34 ]
|
||||
reg byte a [ gfx_mode::$36 ]
|
||||
reg byte a [ gfx_mode::$38 ]
|
||||
@ -1612,7 +1615,7 @@ reg byte a [ gfx_mode::$40 ]
|
||||
reg byte a [ gfx_mode::$41 ]
|
||||
reg byte a [ gfx_mode::$42 ]
|
||||
reg byte a [ gfx_mode::$43 ]
|
||||
reg byte y [ gfx_mode::plane_b_offs#0 ]
|
||||
reg byte x [ gfx_mode::plane_b_offs#0 ]
|
||||
reg byte a [ gfx_mode::$48 ]
|
||||
reg byte a [ gfx_mode::$50 ]
|
||||
reg byte a [ gfx_mode::$52 ]
|
||||
@ -1634,7 +1637,7 @@ reg byte a [ gfx_mode::$81 ]
|
||||
reg byte a [ gfx_mode::$82 ]
|
||||
reg byte a [ keyboard_event_get::return#3 ]
|
||||
reg byte a [ gfx_mode::keyboard_event#0 ]
|
||||
reg byte a [ keyboard_matrix_read::rowid#0 ]
|
||||
reg byte x [ keyboard_matrix_read::rowid#0 ]
|
||||
reg byte a [ keyboard_matrix_read::return#2 ]
|
||||
reg byte a [ keyboard_event_pressed::return#0 ]
|
||||
reg byte a [ keyboard_event_scan::$14 ]
|
||||
@ -1655,7 +1658,7 @@ reg byte a [ keyboard_matrix_read::return#0 ]
|
||||
reg byte a [ form_control::return#0 ]
|
||||
reg byte a [ form_mode::$36 ]
|
||||
reg byte a [ apply_preset::idx#0 ]
|
||||
reg byte a [ form_field_ptr::y#0 ]
|
||||
reg byte x [ form_field_ptr::y#0 ]
|
||||
reg byte a [ form_field_ptr::x#0 ]
|
||||
reg byte a [ form_control::$5 ]
|
||||
reg byte a [ keyboard_event_get::return#4 ]
|
||||
|
@ -20,21 +20,21 @@ main: {
|
||||
line: {
|
||||
.const x0 = 0
|
||||
.const x1 = $a
|
||||
ldx #x0
|
||||
ldy #x0
|
||||
b3:
|
||||
jsr plot
|
||||
inx
|
||||
cpx #x1
|
||||
iny
|
||||
cpy #x1
|
||||
bcc b3
|
||||
beq b3
|
||||
rts
|
||||
}
|
||||
// plot(byte register(X) x)
|
||||
// plot(byte register(Y) x)
|
||||
plot: {
|
||||
ldy plots,x
|
||||
lda SCREEN,y
|
||||
ldx plots,y
|
||||
lda SCREEN,x
|
||||
clc
|
||||
adc #1
|
||||
sta SCREEN,y
|
||||
sta SCREEN,x
|
||||
rts
|
||||
}
|
||||
|
@ -401,11 +401,10 @@ plot: {
|
||||
lda plots,y
|
||||
sta idx
|
||||
//SEG39 [20] (byte/signed word/word/dword/signed dword~) plot::$0 ← *((const byte*) SCREEN#0 + (byte) plot::idx#0) + (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuz1=pbuc1_derefidx_vbuz2_plus_1
|
||||
ldy idx
|
||||
lda SCREEN,y
|
||||
clc
|
||||
adc #1
|
||||
sta _0
|
||||
ldx idx
|
||||
ldy SCREEN,x
|
||||
iny
|
||||
sty _0
|
||||
//SEG40 [21] *((const byte*) SCREEN#0 + (byte) plot::idx#0) ← (byte/signed word/word/dword/signed dword~) plot::$0 -- pbuc1_derefidx_vbuz1=vbuz2
|
||||
lda _0
|
||||
ldy idx
|
||||
@ -420,16 +419,12 @@ plot: {
|
||||
REGISTER UPLIFT POTENTIAL REGISTERS
|
||||
Statement [7] *((const byte*) SCREEN#0 + (byte) main::i#2) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ main::i#2 ] ( main:2 [ main::i#2 ] ) always clobbers reg byte a
|
||||
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:2 [ main::i#2 main::i#1 ]
|
||||
Statement [20] (byte/signed word/word/dword/signed dword~) plot::$0 ← *((const byte*) SCREEN#0 + (byte) plot::idx#0) + (byte/signed byte/word/signed word/dword/signed dword) 1 [ plot::idx#0 plot::$0 ] ( main:2::line:11::plot:15 [ line::x#2 plot::idx#0 plot::$0 ] ) always clobbers reg byte a
|
||||
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:3 [ line::x#2 line::x#1 ]
|
||||
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:5 [ plot::idx#0 ]
|
||||
Statement [6] *((const byte*) plots#0 + (byte) main::i#2) ← (byte) main::i#2 [ main::i#2 ] ( main:2 [ main::i#2 ] ) always clobbers reg byte a
|
||||
Statement [7] *((const byte*) SCREEN#0 + (byte) main::i#2) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ main::i#2 ] ( main:2 [ main::i#2 ] ) always clobbers reg byte a
|
||||
Statement [20] (byte/signed word/word/dword/signed dword~) plot::$0 ← *((const byte*) SCREEN#0 + (byte) plot::idx#0) + (byte/signed byte/word/signed word/dword/signed dword) 1 [ plot::idx#0 plot::$0 ] ( main:2::line:11::plot:15 [ line::x#2 plot::idx#0 plot::$0 ] ) always clobbers reg byte a
|
||||
Potential registers zp ZP_BYTE:2 [ main::i#2 main::i#1 ] : zp ZP_BYTE:2 , reg byte x , reg byte y ,
|
||||
Potential registers zp ZP_BYTE:3 [ line::x#2 line::x#1 ] : zp ZP_BYTE:3 , reg byte x , reg byte y ,
|
||||
Potential registers zp ZP_BYTE:3 [ line::x#2 line::x#1 ] : zp ZP_BYTE:3 , reg byte a , reg byte x , reg byte y ,
|
||||
Potential registers zp ZP_BYTE:4 [ plot::x#1 ] : zp ZP_BYTE:4 , reg byte a , reg byte x , reg byte y ,
|
||||
Potential registers zp ZP_BYTE:5 [ plot::idx#0 ] : zp ZP_BYTE:5 , reg byte x , reg byte y ,
|
||||
Potential registers zp ZP_BYTE:5 [ plot::idx#0 ] : zp ZP_BYTE:5 , reg byte a , reg byte x , reg byte y ,
|
||||
Potential registers zp ZP_BYTE:6 [ plot::$0 ] : zp ZP_BYTE:6 , reg byte a , reg byte x , reg byte y ,
|
||||
|
||||
REGISTER UPLIFT SCOPES
|
||||
@ -438,10 +433,12 @@ Uplift Scope [plot] 103: zp ZP_BYTE:4 [ plot::x#1 ] 4: zp ZP_BYTE:6 [ plot::$0 ]
|
||||
Uplift Scope [main] 34.83: zp ZP_BYTE:2 [ main::i#2 main::i#1 ]
|
||||
Uplift Scope []
|
||||
|
||||
Uplifting [line] best 3736 combination reg byte x [ line::x#2 line::x#1 ]
|
||||
Uplifting [plot] best 3418 combination reg byte x [ plot::x#1 ] reg byte a [ plot::$0 ] reg byte y [ plot::idx#0 ]
|
||||
Uplifting [main] best 3268 combination reg byte x [ main::i#2 main::i#1 ]
|
||||
Uplifting [] best 3268 combination
|
||||
Uplifting [line] best 4684 combination zp ZP_BYTE:3 [ line::x#2 line::x#1 ]
|
||||
Uplifting [plot] best 4368 combination reg byte y [ plot::x#1 ] reg byte a [ plot::$0 ] reg byte x [ plot::idx#0 ]
|
||||
Uplifting [main] best 4218 combination reg byte x [ main::i#2 main::i#1 ]
|
||||
Uplifting [] best 4218 combination
|
||||
Attempting to uplift remaining variables inzp ZP_BYTE:3 [ line::x#2 line::x#1 ]
|
||||
Uplifting [line] best 3268 combination reg byte y [ line::x#2 line::x#1 ]
|
||||
|
||||
ASSEMBLER BEFORE OPTIMIZATION
|
||||
//SEG0 File Comments
|
||||
@ -510,8 +507,8 @@ line: {
|
||||
.const x1 = $a
|
||||
//SEG25 [13] phi from line to line::@3 [phi:line->line::@3]
|
||||
b3_from_line:
|
||||
//SEG26 [13] phi (byte) line::x#2 = (const byte) line::x0#0 [phi:line->line::@3#0] -- vbuxx=vbuc1
|
||||
ldx #x0
|
||||
//SEG26 [13] phi (byte) line::x#2 = (const byte) line::x0#0 [phi:line->line::@3#0] -- vbuyy=vbuc1
|
||||
ldy #x0
|
||||
jmp b3
|
||||
//SEG27 [13] phi from line::@8 to line::@3 [phi:line::@8->line::@3]
|
||||
b3_from_b8:
|
||||
@ -525,10 +522,10 @@ line: {
|
||||
jmp b8
|
||||
//SEG32 line::@8
|
||||
b8:
|
||||
//SEG33 [16] (byte) line::x#1 ← ++ (byte) line::x#2 -- vbuxx=_inc_vbuxx
|
||||
inx
|
||||
//SEG34 [17] if((byte) line::x#1<=(const byte) line::x1#0) goto line::@3 -- vbuxx_le_vbuc1_then_la1
|
||||
cpx #x1
|
||||
//SEG33 [16] (byte) line::x#1 ← ++ (byte) line::x#2 -- vbuyy=_inc_vbuyy
|
||||
iny
|
||||
//SEG34 [17] if((byte) line::x#1<=(const byte) line::x1#0) goto line::@3 -- vbuyy_le_vbuc1_then_la1
|
||||
cpy #x1
|
||||
bcc b3_from_b8
|
||||
beq b3_from_b8
|
||||
jmp breturn
|
||||
@ -538,16 +535,16 @@ line: {
|
||||
rts
|
||||
}
|
||||
//SEG37 plot
|
||||
// plot(byte register(X) x)
|
||||
// plot(byte register(Y) x)
|
||||
plot: {
|
||||
//SEG38 [19] (byte) plot::idx#0 ← *((const byte*) plots#0 + (byte) plot::x#1) -- vbuyy=pbuc1_derefidx_vbuxx
|
||||
ldy plots,x
|
||||
//SEG39 [20] (byte/signed word/word/dword/signed dword~) plot::$0 ← *((const byte*) SCREEN#0 + (byte) plot::idx#0) + (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuaa=pbuc1_derefidx_vbuyy_plus_1
|
||||
lda SCREEN,y
|
||||
//SEG38 [19] (byte) plot::idx#0 ← *((const byte*) plots#0 + (byte) plot::x#1) -- vbuxx=pbuc1_derefidx_vbuyy
|
||||
ldx plots,y
|
||||
//SEG39 [20] (byte/signed word/word/dword/signed dword~) plot::$0 ← *((const byte*) SCREEN#0 + (byte) plot::idx#0) + (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuaa=pbuc1_derefidx_vbuxx_plus_1
|
||||
lda SCREEN,x
|
||||
clc
|
||||
adc #1
|
||||
//SEG40 [21] *((const byte*) SCREEN#0 + (byte) plot::idx#0) ← (byte/signed word/word/dword/signed dword~) plot::$0 -- pbuc1_derefidx_vbuyy=vbuaa
|
||||
sta SCREEN,y
|
||||
//SEG40 [21] *((const byte*) SCREEN#0 + (byte) plot::idx#0) ← (byte/signed word/word/dword/signed dword~) plot::$0 -- pbuc1_derefidx_vbuxx=vbuaa
|
||||
sta SCREEN,x
|
||||
jmp breturn
|
||||
//SEG41 plot::@return
|
||||
breturn:
|
||||
@ -606,8 +603,8 @@ FINAL SYMBOL TABLE
|
||||
(label) line::@8
|
||||
(label) line::@return
|
||||
(byte) line::x
|
||||
(byte) line::x#1 reg byte x 151.5
|
||||
(byte) line::x#2 reg byte x 101.0
|
||||
(byte) line::x#1 reg byte y 151.5
|
||||
(byte) line::x#2 reg byte y 101.0
|
||||
(byte) line::x0
|
||||
(const byte) line::x0#0 x0 = (byte/signed byte/word/signed word/dword/signed dword) 0
|
||||
(byte) line::x1
|
||||
@ -622,16 +619,16 @@ FINAL SYMBOL TABLE
|
||||
(byte/signed word/word/dword/signed dword~) plot::$0 reg byte a 4.0
|
||||
(label) plot::@return
|
||||
(byte) plot::idx
|
||||
(byte) plot::idx#0 reg byte y 3.0
|
||||
(byte) plot::idx#0 reg byte x 3.0
|
||||
(byte) plot::x
|
||||
(byte) plot::x#1 reg byte x 103.0
|
||||
(byte) plot::x#1 reg byte y 103.0
|
||||
(byte*) plots
|
||||
(const byte*) plots#0 plots = ((byte*))(word/signed word/dword/signed dword) $1000
|
||||
|
||||
reg byte x [ main::i#2 main::i#1 ]
|
||||
reg byte x [ line::x#2 line::x#1 ]
|
||||
reg byte x [ plot::x#1 ]
|
||||
reg byte y [ plot::idx#0 ]
|
||||
reg byte y [ line::x#2 line::x#1 ]
|
||||
reg byte y [ plot::x#1 ]
|
||||
reg byte x [ plot::idx#0 ]
|
||||
reg byte a [ plot::$0 ]
|
||||
|
||||
|
||||
@ -686,8 +683,8 @@ line: {
|
||||
.const x0 = 0
|
||||
.const x1 = $a
|
||||
//SEG25 [13] phi from line to line::@3 [phi:line->line::@3]
|
||||
//SEG26 [13] phi (byte) line::x#2 = (const byte) line::x0#0 [phi:line->line::@3#0] -- vbuxx=vbuc1
|
||||
ldx #x0
|
||||
//SEG26 [13] phi (byte) line::x#2 = (const byte) line::x0#0 [phi:line->line::@3#0] -- vbuyy=vbuc1
|
||||
ldy #x0
|
||||
//SEG27 [13] phi from line::@8 to line::@3 [phi:line::@8->line::@3]
|
||||
//SEG28 [13] phi (byte) line::x#2 = (byte) line::x#1 [phi:line::@8->line::@3#0] -- register_copy
|
||||
//SEG29 line::@3
|
||||
@ -696,10 +693,10 @@ line: {
|
||||
//SEG31 [15] call plot
|
||||
jsr plot
|
||||
//SEG32 line::@8
|
||||
//SEG33 [16] (byte) line::x#1 ← ++ (byte) line::x#2 -- vbuxx=_inc_vbuxx
|
||||
inx
|
||||
//SEG34 [17] if((byte) line::x#1<=(const byte) line::x1#0) goto line::@3 -- vbuxx_le_vbuc1_then_la1
|
||||
cpx #x1
|
||||
//SEG33 [16] (byte) line::x#1 ← ++ (byte) line::x#2 -- vbuyy=_inc_vbuyy
|
||||
iny
|
||||
//SEG34 [17] if((byte) line::x#1<=(const byte) line::x1#0) goto line::@3 -- vbuyy_le_vbuc1_then_la1
|
||||
cpy #x1
|
||||
bcc b3
|
||||
beq b3
|
||||
//SEG35 line::@return
|
||||
@ -707,16 +704,16 @@ line: {
|
||||
rts
|
||||
}
|
||||
//SEG37 plot
|
||||
// plot(byte register(X) x)
|
||||
// plot(byte register(Y) x)
|
||||
plot: {
|
||||
//SEG38 [19] (byte) plot::idx#0 ← *((const byte*) plots#0 + (byte) plot::x#1) -- vbuyy=pbuc1_derefidx_vbuxx
|
||||
ldy plots,x
|
||||
//SEG39 [20] (byte/signed word/word/dword/signed dword~) plot::$0 ← *((const byte*) SCREEN#0 + (byte) plot::idx#0) + (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuaa=pbuc1_derefidx_vbuyy_plus_1
|
||||
lda SCREEN,y
|
||||
//SEG38 [19] (byte) plot::idx#0 ← *((const byte*) plots#0 + (byte) plot::x#1) -- vbuxx=pbuc1_derefidx_vbuyy
|
||||
ldx plots,y
|
||||
//SEG39 [20] (byte/signed word/word/dword/signed dword~) plot::$0 ← *((const byte*) SCREEN#0 + (byte) plot::idx#0) + (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuaa=pbuc1_derefidx_vbuxx_plus_1
|
||||
lda SCREEN,x
|
||||
clc
|
||||
adc #1
|
||||
//SEG40 [21] *((const byte*) SCREEN#0 + (byte) plot::idx#0) ← (byte/signed word/word/dword/signed dword~) plot::$0 -- pbuc1_derefidx_vbuyy=vbuaa
|
||||
sta SCREEN,y
|
||||
//SEG40 [21] *((const byte*) SCREEN#0 + (byte) plot::idx#0) ← (byte/signed word/word/dword/signed dword~) plot::$0 -- pbuc1_derefidx_vbuxx=vbuaa
|
||||
sta SCREEN,x
|
||||
//SEG41 plot::@return
|
||||
//SEG42 [22] return
|
||||
rts
|
||||
|
@ -8,8 +8,8 @@
|
||||
(label) line::@8
|
||||
(label) line::@return
|
||||
(byte) line::x
|
||||
(byte) line::x#1 reg byte x 151.5
|
||||
(byte) line::x#2 reg byte x 101.0
|
||||
(byte) line::x#1 reg byte y 151.5
|
||||
(byte) line::x#2 reg byte y 101.0
|
||||
(byte) line::x0
|
||||
(const byte) line::x0#0 x0 = (byte/signed byte/word/signed word/dword/signed dword) 0
|
||||
(byte) line::x1
|
||||
@ -24,14 +24,14 @@
|
||||
(byte/signed word/word/dword/signed dword~) plot::$0 reg byte a 4.0
|
||||
(label) plot::@return
|
||||
(byte) plot::idx
|
||||
(byte) plot::idx#0 reg byte y 3.0
|
||||
(byte) plot::idx#0 reg byte x 3.0
|
||||
(byte) plot::x
|
||||
(byte) plot::x#1 reg byte x 103.0
|
||||
(byte) plot::x#1 reg byte y 103.0
|
||||
(byte*) plots
|
||||
(const byte*) plots#0 plots = ((byte*))(word/signed word/dword/signed dword) $1000
|
||||
|
||||
reg byte x [ main::i#2 main::i#1 ]
|
||||
reg byte x [ line::x#2 line::x#1 ]
|
||||
reg byte x [ plot::x#1 ]
|
||||
reg byte y [ plot::idx#0 ]
|
||||
reg byte y [ line::x#2 line::x#1 ]
|
||||
reg byte y [ plot::x#1 ]
|
||||
reg byte x [ plot::idx#0 ]
|
||||
reg byte a [ plot::$0 ]
|
||||
|
@ -5,40 +5,35 @@
|
||||
.label SCREEN = $400
|
||||
.label COLS = $d800
|
||||
main: {
|
||||
ldx #0
|
||||
ldy #0
|
||||
b1:
|
||||
lda MAPDATA,x
|
||||
sta SCREEN,x
|
||||
lda MAPDATA,x
|
||||
tay
|
||||
lda COLORMAP1,y
|
||||
sta COLS,x
|
||||
lda MAPDATA+$c8,x
|
||||
sta SCREEN+$c8,x
|
||||
lda MAPDATA+$c8,x
|
||||
tay
|
||||
lda COLORMAP1,y
|
||||
sta COLS+$c8,x
|
||||
lda MAPDATA+$190,x
|
||||
sta SCREEN+$190,x
|
||||
lda MAPDATA+$190,x
|
||||
tay
|
||||
lda COLORMAP1,y
|
||||
sta COLS+$190,x
|
||||
lda MAPDATA+$258,x
|
||||
sta SCREEN+$258,x
|
||||
lda MAPDATA+$258,x
|
||||
tay
|
||||
lda COLORMAP2,y
|
||||
sta COLS+$258,x
|
||||
lda MAPDATA+$320,x
|
||||
sta SCREEN+$320,x
|
||||
lda MAPDATA+$320,x
|
||||
tay
|
||||
lda COLORMAP2,y
|
||||
sta COLS+$320,x
|
||||
inx
|
||||
cpx #$c9
|
||||
lda MAPDATA,y
|
||||
sta SCREEN,y
|
||||
ldx MAPDATA,y
|
||||
lda COLORMAP1,x
|
||||
sta COLS,y
|
||||
lda MAPDATA+$c8,y
|
||||
sta SCREEN+$c8,y
|
||||
ldx MAPDATA+$c8,y
|
||||
lda COLORMAP1,x
|
||||
sta COLS+$c8,y
|
||||
lda MAPDATA+$190,y
|
||||
sta SCREEN+$190,y
|
||||
ldx MAPDATA+$190,y
|
||||
lda COLORMAP1,x
|
||||
sta COLS+$190,y
|
||||
lda MAPDATA+$258,y
|
||||
sta SCREEN+$258,y
|
||||
ldx MAPDATA+$258,y
|
||||
lda COLORMAP2,x
|
||||
sta COLS+$258,y
|
||||
lda MAPDATA+$320,y
|
||||
sta SCREEN+$320,y
|
||||
ldx MAPDATA+$320,y
|
||||
lda COLORMAP2,x
|
||||
sta COLS+$320,y
|
||||
iny
|
||||
cpy #$c9
|
||||
bne b1
|
||||
rts
|
||||
}
|
||||
|
@ -99,10 +99,10 @@ SYMBOL TABLE SSA
|
||||
(word/signed word/dword/signed dword~) main::$9
|
||||
(label) main::@1
|
||||
(label) main::@return
|
||||
(byte) main::x
|
||||
(byte) main::x#0
|
||||
(byte) main::x#1
|
||||
(byte) main::x#2
|
||||
(byte) main::x !reg byte y
|
||||
(byte) main::x#0 !reg byte y
|
||||
(byte) main::x#1 !reg byte y
|
||||
(byte) main::x#2 !reg byte y
|
||||
|
||||
Culled Empty Block (label) @2
|
||||
Successful SSA optimization Pass2CullEmptyBlocks
|
||||
@ -223,15 +223,14 @@ VARIABLE REGISTER WEIGHTS
|
||||
(byte[$3e8]) MAPDATA
|
||||
(byte*) SCREEN
|
||||
(void()) main()
|
||||
(byte) main::x
|
||||
(byte) main::x#1 16.5
|
||||
(byte) main::x#2 22.0
|
||||
(byte) main::x !reg byte y
|
||||
(byte) main::x#1 !reg byte y 16.5
|
||||
(byte) main::x#2 !reg byte y 22.0
|
||||
|
||||
Initial phi equivalence classes
|
||||
[ main::x#2 main::x#1 ]
|
||||
Complete equivalence classes
|
||||
[ main::x#2 main::x#1 ]
|
||||
Allocated zp ZP_BYTE:2 [ main::x#2 main::x#1 ]
|
||||
|
||||
INITIAL ASM
|
||||
//SEG0 File Comments
|
||||
@ -261,12 +260,10 @@ bend_from_b1:
|
||||
bend:
|
||||
//SEG10 main
|
||||
main: {
|
||||
.label x = 2
|
||||
//SEG11 [5] phi from main to main::@1 [phi:main->main::@1]
|
||||
b1_from_main:
|
||||
//SEG12 [5] phi (byte) main::x#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main->main::@1#0] -- vbuz1=vbuc1
|
||||
lda #0
|
||||
sta x
|
||||
//SEG12 [5] phi (byte) main::x#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main->main::@1#0] -- vbuyy=vbuc1
|
||||
ldy #0
|
||||
jmp b1
|
||||
//SEG13 [5] phi from main::@1 to main::@1 [phi:main::@1->main::@1]
|
||||
b1_from_b1:
|
||||
@ -274,61 +271,45 @@ main: {
|
||||
jmp b1
|
||||
//SEG15 main::@1
|
||||
b1:
|
||||
//SEG16 [6] *((const byte*) SCREEN#0 + (byte) main::x#2) ← *((const byte[$3e8]) MAPDATA#0 + (byte) main::x#2) -- pbuc1_derefidx_vbuz1=pbuc2_derefidx_vbuz1
|
||||
ldy x
|
||||
//SEG16 [6] *((const byte*) SCREEN#0 + (byte) main::x#2) ← *((const byte[$3e8]) MAPDATA#0 + (byte) main::x#2) -- pbuc1_derefidx_vbuyy=pbuc2_derefidx_vbuyy
|
||||
lda MAPDATA,y
|
||||
sta SCREEN,y
|
||||
//SEG17 [7] *((const byte*) COLS#0 + (byte) main::x#2) ← *((const byte[$100]) COLORMAP1#0 + *((const byte[$3e8]) MAPDATA#0 + (byte) main::x#2)) -- pbuc1_derefidx_vbuz1=pbuc2_derefidx_pbuc3_derefidx_vbuz1
|
||||
ldx x
|
||||
lda MAPDATA,x
|
||||
tay
|
||||
lda COLORMAP1,y
|
||||
sta COLS,x
|
||||
//SEG18 [8] *((const byte*) SCREEN#0+(byte/word/signed word/dword/signed dword) $c8 + (byte) main::x#2) ← *((const byte[$3e8]) MAPDATA#0+(byte/word/signed word/dword/signed dword) $c8 + (byte) main::x#2) -- pbuc1_derefidx_vbuz1=pbuc2_derefidx_vbuz1
|
||||
ldy x
|
||||
//SEG17 [7] *((const byte*) COLS#0 + (byte) main::x#2) ← *((const byte[$100]) COLORMAP1#0 + *((const byte[$3e8]) MAPDATA#0 + (byte) main::x#2)) -- pbuc1_derefidx_vbuyy=pbuc2_derefidx_pbuc3_derefidx_vbuyy
|
||||
ldx MAPDATA,y
|
||||
lda COLORMAP1,x
|
||||
sta COLS,y
|
||||
//SEG18 [8] *((const byte*) SCREEN#0+(byte/word/signed word/dword/signed dword) $c8 + (byte) main::x#2) ← *((const byte[$3e8]) MAPDATA#0+(byte/word/signed word/dword/signed dword) $c8 + (byte) main::x#2) -- pbuc1_derefidx_vbuyy=pbuc2_derefidx_vbuyy
|
||||
lda MAPDATA+$c8,y
|
||||
sta SCREEN+$c8,y
|
||||
//SEG19 [9] *((const byte*) COLS#0+(byte/word/signed word/dword/signed dword) $c8 + (byte) main::x#2) ← *((const byte[$100]) COLORMAP1#0 + *((const byte[$3e8]) MAPDATA#0+(byte/word/signed word/dword/signed dword) $c8 + (byte) main::x#2)) -- pbuc1_derefidx_vbuz1=pbuc2_derefidx_pbuc3_derefidx_vbuz1
|
||||
ldx x
|
||||
lda MAPDATA+$c8,x
|
||||
tay
|
||||
lda COLORMAP1,y
|
||||
sta COLS+$c8,x
|
||||
//SEG20 [10] *((const byte*) SCREEN#0+(word/signed word/dword/signed dword) $190 + (byte) main::x#2) ← *((const byte[$3e8]) MAPDATA#0+(word/signed word/dword/signed dword) $190 + (byte) main::x#2) -- pbuc1_derefidx_vbuz1=pbuc2_derefidx_vbuz1
|
||||
ldy x
|
||||
//SEG19 [9] *((const byte*) COLS#0+(byte/word/signed word/dword/signed dword) $c8 + (byte) main::x#2) ← *((const byte[$100]) COLORMAP1#0 + *((const byte[$3e8]) MAPDATA#0+(byte/word/signed word/dword/signed dword) $c8 + (byte) main::x#2)) -- pbuc1_derefidx_vbuyy=pbuc2_derefidx_pbuc3_derefidx_vbuyy
|
||||
ldx MAPDATA+$c8,y
|
||||
lda COLORMAP1,x
|
||||
sta COLS+$c8,y
|
||||
//SEG20 [10] *((const byte*) SCREEN#0+(word/signed word/dword/signed dword) $190 + (byte) main::x#2) ← *((const byte[$3e8]) MAPDATA#0+(word/signed word/dword/signed dword) $190 + (byte) main::x#2) -- pbuc1_derefidx_vbuyy=pbuc2_derefidx_vbuyy
|
||||
lda MAPDATA+$190,y
|
||||
sta SCREEN+$190,y
|
||||
//SEG21 [11] *((const byte*) COLS#0+(word/signed word/dword/signed dword) $190 + (byte) main::x#2) ← *((const byte[$100]) COLORMAP1#0 + *((const byte[$3e8]) MAPDATA#0+(word/signed word/dword/signed dword) $190 + (byte) main::x#2)) -- pbuc1_derefidx_vbuz1=pbuc2_derefidx_pbuc3_derefidx_vbuz1
|
||||
ldx x
|
||||
lda MAPDATA+$190,x
|
||||
tay
|
||||
lda COLORMAP1,y
|
||||
sta COLS+$190,x
|
||||
//SEG22 [12] *((const byte*) SCREEN#0+(word/signed word/dword/signed dword) $258 + (byte) main::x#2) ← *((const byte[$3e8]) MAPDATA#0+(word/signed word/dword/signed dword) $258 + (byte) main::x#2) -- pbuc1_derefidx_vbuz1=pbuc2_derefidx_vbuz1
|
||||
ldy x
|
||||
//SEG21 [11] *((const byte*) COLS#0+(word/signed word/dword/signed dword) $190 + (byte) main::x#2) ← *((const byte[$100]) COLORMAP1#0 + *((const byte[$3e8]) MAPDATA#0+(word/signed word/dword/signed dword) $190 + (byte) main::x#2)) -- pbuc1_derefidx_vbuyy=pbuc2_derefidx_pbuc3_derefidx_vbuyy
|
||||
ldx MAPDATA+$190,y
|
||||
lda COLORMAP1,x
|
||||
sta COLS+$190,y
|
||||
//SEG22 [12] *((const byte*) SCREEN#0+(word/signed word/dword/signed dword) $258 + (byte) main::x#2) ← *((const byte[$3e8]) MAPDATA#0+(word/signed word/dword/signed dword) $258 + (byte) main::x#2) -- pbuc1_derefidx_vbuyy=pbuc2_derefidx_vbuyy
|
||||
lda MAPDATA+$258,y
|
||||
sta SCREEN+$258,y
|
||||
//SEG23 [13] *((const byte*) COLS#0+(word/signed word/dword/signed dword) $258 + (byte) main::x#2) ← *((const byte[$100]) COLORMAP2#0 + *((const byte[$3e8]) MAPDATA#0+(word/signed word/dword/signed dword) $258 + (byte) main::x#2)) -- pbuc1_derefidx_vbuz1=pbuc2_derefidx_pbuc3_derefidx_vbuz1
|
||||
ldx x
|
||||
lda MAPDATA+$258,x
|
||||
tay
|
||||
lda COLORMAP2,y
|
||||
sta COLS+$258,x
|
||||
//SEG24 [14] *((const byte*) SCREEN#0+(word/signed word/dword/signed dword) $320 + (byte) main::x#2) ← *((const byte[$3e8]) MAPDATA#0+(word/signed word/dword/signed dword) $320 + (byte) main::x#2) -- pbuc1_derefidx_vbuz1=pbuc2_derefidx_vbuz1
|
||||
ldy x
|
||||
//SEG23 [13] *((const byte*) COLS#0+(word/signed word/dword/signed dword) $258 + (byte) main::x#2) ← *((const byte[$100]) COLORMAP2#0 + *((const byte[$3e8]) MAPDATA#0+(word/signed word/dword/signed dword) $258 + (byte) main::x#2)) -- pbuc1_derefidx_vbuyy=pbuc2_derefidx_pbuc3_derefidx_vbuyy
|
||||
ldx MAPDATA+$258,y
|
||||
lda COLORMAP2,x
|
||||
sta COLS+$258,y
|
||||
//SEG24 [14] *((const byte*) SCREEN#0+(word/signed word/dword/signed dword) $320 + (byte) main::x#2) ← *((const byte[$3e8]) MAPDATA#0+(word/signed word/dword/signed dword) $320 + (byte) main::x#2) -- pbuc1_derefidx_vbuyy=pbuc2_derefidx_vbuyy
|
||||
lda MAPDATA+$320,y
|
||||
sta SCREEN+$320,y
|
||||
//SEG25 [15] *((const byte*) COLS#0+(word/signed word/dword/signed dword) $320 + (byte) main::x#2) ← *((const byte[$100]) COLORMAP2#0 + *((const byte[$3e8]) MAPDATA#0+(word/signed word/dword/signed dword) $320 + (byte) main::x#2)) -- pbuc1_derefidx_vbuz1=pbuc2_derefidx_pbuc3_derefidx_vbuz1
|
||||
ldx x
|
||||
lda MAPDATA+$320,x
|
||||
tay
|
||||
lda COLORMAP2,y
|
||||
sta COLS+$320,x
|
||||
//SEG26 [16] (byte) main::x#1 ← ++ (byte) main::x#2 -- vbuz1=_inc_vbuz1
|
||||
inc x
|
||||
//SEG27 [17] if((byte) main::x#1!=(byte/word/signed word/dword/signed dword) $c9) goto main::@1 -- vbuz1_neq_vbuc1_then_la1
|
||||
lda x
|
||||
cmp #$c9
|
||||
//SEG25 [15] *((const byte*) COLS#0+(word/signed word/dword/signed dword) $320 + (byte) main::x#2) ← *((const byte[$100]) COLORMAP2#0 + *((const byte[$3e8]) MAPDATA#0+(word/signed word/dword/signed dword) $320 + (byte) main::x#2)) -- pbuc1_derefidx_vbuyy=pbuc2_derefidx_pbuc3_derefidx_vbuyy
|
||||
ldx MAPDATA+$320,y
|
||||
lda COLORMAP2,x
|
||||
sta COLS+$320,y
|
||||
//SEG26 [16] (byte) main::x#1 ← ++ (byte) main::x#2 -- vbuyy=_inc_vbuyy
|
||||
iny
|
||||
//SEG27 [17] if((byte) main::x#1!=(byte/word/signed word/dword/signed dword) $c9) goto main::@1 -- vbuyy_neq_vbuc1_then_la1
|
||||
cpy #$c9
|
||||
bne b1_from_b1
|
||||
jmp breturn
|
||||
//SEG28 main::@return
|
||||
@ -342,34 +323,24 @@ main: {
|
||||
|
||||
REGISTER UPLIFT POTENTIAL REGISTERS
|
||||
Statement [6] *((const byte*) SCREEN#0 + (byte) main::x#2) ← *((const byte[$3e8]) MAPDATA#0 + (byte) main::x#2) [ main::x#2 ] ( main:2 [ main::x#2 ] ) always clobbers reg byte a
|
||||
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:2 [ main::x#2 main::x#1 ]
|
||||
Statement [7] *((const byte*) COLS#0 + (byte) main::x#2) ← *((const byte[$100]) COLORMAP1#0 + *((const byte[$3e8]) MAPDATA#0 + (byte) main::x#2)) [ main::x#2 ] ( main:2 [ main::x#2 ] ) always clobbers reg byte a
|
||||
Statement [7] *((const byte*) COLS#0 + (byte) main::x#2) ← *((const byte[$100]) COLORMAP1#0 + *((const byte[$3e8]) MAPDATA#0 + (byte) main::x#2)) [ main::x#2 ] ( main:2 [ main::x#2 ] ) always clobbers reg byte a reg byte x
|
||||
Statement [8] *((const byte*) SCREEN#0+(byte/word/signed word/dword/signed dword) $c8 + (byte) main::x#2) ← *((const byte[$3e8]) MAPDATA#0+(byte/word/signed word/dword/signed dword) $c8 + (byte) main::x#2) [ main::x#2 ] ( main:2 [ main::x#2 ] ) always clobbers reg byte a
|
||||
Statement [9] *((const byte*) COLS#0+(byte/word/signed word/dword/signed dword) $c8 + (byte) main::x#2) ← *((const byte[$100]) COLORMAP1#0 + *((const byte[$3e8]) MAPDATA#0+(byte/word/signed word/dword/signed dword) $c8 + (byte) main::x#2)) [ main::x#2 ] ( main:2 [ main::x#2 ] ) always clobbers reg byte a
|
||||
Statement [9] *((const byte*) COLS#0+(byte/word/signed word/dword/signed dword) $c8 + (byte) main::x#2) ← *((const byte[$100]) COLORMAP1#0 + *((const byte[$3e8]) MAPDATA#0+(byte/word/signed word/dword/signed dword) $c8 + (byte) main::x#2)) [ main::x#2 ] ( main:2 [ main::x#2 ] ) always clobbers reg byte a reg byte x
|
||||
Statement [10] *((const byte*) SCREEN#0+(word/signed word/dword/signed dword) $190 + (byte) main::x#2) ← *((const byte[$3e8]) MAPDATA#0+(word/signed word/dword/signed dword) $190 + (byte) main::x#2) [ main::x#2 ] ( main:2 [ main::x#2 ] ) always clobbers reg byte a
|
||||
Statement [11] *((const byte*) COLS#0+(word/signed word/dword/signed dword) $190 + (byte) main::x#2) ← *((const byte[$100]) COLORMAP1#0 + *((const byte[$3e8]) MAPDATA#0+(word/signed word/dword/signed dword) $190 + (byte) main::x#2)) [ main::x#2 ] ( main:2 [ main::x#2 ] ) always clobbers reg byte a
|
||||
Statement [11] *((const byte*) COLS#0+(word/signed word/dword/signed dword) $190 + (byte) main::x#2) ← *((const byte[$100]) COLORMAP1#0 + *((const byte[$3e8]) MAPDATA#0+(word/signed word/dword/signed dword) $190 + (byte) main::x#2)) [ main::x#2 ] ( main:2 [ main::x#2 ] ) always clobbers reg byte a reg byte x
|
||||
Statement [12] *((const byte*) SCREEN#0+(word/signed word/dword/signed dword) $258 + (byte) main::x#2) ← *((const byte[$3e8]) MAPDATA#0+(word/signed word/dword/signed dword) $258 + (byte) main::x#2) [ main::x#2 ] ( main:2 [ main::x#2 ] ) always clobbers reg byte a
|
||||
Statement [13] *((const byte*) COLS#0+(word/signed word/dword/signed dword) $258 + (byte) main::x#2) ← *((const byte[$100]) COLORMAP2#0 + *((const byte[$3e8]) MAPDATA#0+(word/signed word/dword/signed dword) $258 + (byte) main::x#2)) [ main::x#2 ] ( main:2 [ main::x#2 ] ) always clobbers reg byte a
|
||||
Statement [13] *((const byte*) COLS#0+(word/signed word/dword/signed dword) $258 + (byte) main::x#2) ← *((const byte[$100]) COLORMAP2#0 + *((const byte[$3e8]) MAPDATA#0+(word/signed word/dword/signed dword) $258 + (byte) main::x#2)) [ main::x#2 ] ( main:2 [ main::x#2 ] ) always clobbers reg byte a reg byte x
|
||||
Statement [14] *((const byte*) SCREEN#0+(word/signed word/dword/signed dword) $320 + (byte) main::x#2) ← *((const byte[$3e8]) MAPDATA#0+(word/signed word/dword/signed dword) $320 + (byte) main::x#2) [ main::x#2 ] ( main:2 [ main::x#2 ] ) always clobbers reg byte a
|
||||
Statement [15] *((const byte*) COLS#0+(word/signed word/dword/signed dword) $320 + (byte) main::x#2) ← *((const byte[$100]) COLORMAP2#0 + *((const byte[$3e8]) MAPDATA#0+(word/signed word/dword/signed dword) $320 + (byte) main::x#2)) [ main::x#2 ] ( main:2 [ main::x#2 ] ) always clobbers reg byte a
|
||||
Statement [6] *((const byte*) SCREEN#0 + (byte) main::x#2) ← *((const byte[$3e8]) MAPDATA#0 + (byte) main::x#2) [ main::x#2 ] ( main:2 [ main::x#2 ] ) always clobbers reg byte a
|
||||
Statement [7] *((const byte*) COLS#0 + (byte) main::x#2) ← *((const byte[$100]) COLORMAP1#0 + *((const byte[$3e8]) MAPDATA#0 + (byte) main::x#2)) [ main::x#2 ] ( main:2 [ main::x#2 ] ) always clobbers reg byte a
|
||||
Statement [8] *((const byte*) SCREEN#0+(byte/word/signed word/dword/signed dword) $c8 + (byte) main::x#2) ← *((const byte[$3e8]) MAPDATA#0+(byte/word/signed word/dword/signed dword) $c8 + (byte) main::x#2) [ main::x#2 ] ( main:2 [ main::x#2 ] ) always clobbers reg byte a
|
||||
Statement [9] *((const byte*) COLS#0+(byte/word/signed word/dword/signed dword) $c8 + (byte) main::x#2) ← *((const byte[$100]) COLORMAP1#0 + *((const byte[$3e8]) MAPDATA#0+(byte/word/signed word/dword/signed dword) $c8 + (byte) main::x#2)) [ main::x#2 ] ( main:2 [ main::x#2 ] ) always clobbers reg byte a
|
||||
Statement [10] *((const byte*) SCREEN#0+(word/signed word/dword/signed dword) $190 + (byte) main::x#2) ← *((const byte[$3e8]) MAPDATA#0+(word/signed word/dword/signed dword) $190 + (byte) main::x#2) [ main::x#2 ] ( main:2 [ main::x#2 ] ) always clobbers reg byte a
|
||||
Statement [11] *((const byte*) COLS#0+(word/signed word/dword/signed dword) $190 + (byte) main::x#2) ← *((const byte[$100]) COLORMAP1#0 + *((const byte[$3e8]) MAPDATA#0+(word/signed word/dword/signed dword) $190 + (byte) main::x#2)) [ main::x#2 ] ( main:2 [ main::x#2 ] ) always clobbers reg byte a
|
||||
Statement [12] *((const byte*) SCREEN#0+(word/signed word/dword/signed dword) $258 + (byte) main::x#2) ← *((const byte[$3e8]) MAPDATA#0+(word/signed word/dword/signed dword) $258 + (byte) main::x#2) [ main::x#2 ] ( main:2 [ main::x#2 ] ) always clobbers reg byte a
|
||||
Statement [13] *((const byte*) COLS#0+(word/signed word/dword/signed dword) $258 + (byte) main::x#2) ← *((const byte[$100]) COLORMAP2#0 + *((const byte[$3e8]) MAPDATA#0+(word/signed word/dword/signed dword) $258 + (byte) main::x#2)) [ main::x#2 ] ( main:2 [ main::x#2 ] ) always clobbers reg byte a
|
||||
Statement [14] *((const byte*) SCREEN#0+(word/signed word/dword/signed dword) $320 + (byte) main::x#2) ← *((const byte[$3e8]) MAPDATA#0+(word/signed word/dword/signed dword) $320 + (byte) main::x#2) [ main::x#2 ] ( main:2 [ main::x#2 ] ) always clobbers reg byte a
|
||||
Statement [15] *((const byte*) COLS#0+(word/signed word/dword/signed dword) $320 + (byte) main::x#2) ← *((const byte[$100]) COLORMAP2#0 + *((const byte[$3e8]) MAPDATA#0+(word/signed word/dword/signed dword) $320 + (byte) main::x#2)) [ main::x#2 ] ( main:2 [ main::x#2 ] ) always clobbers reg byte a
|
||||
Potential registers zp ZP_BYTE:2 [ main::x#2 main::x#1 ] : zp ZP_BYTE:2 , reg byte x , reg byte y ,
|
||||
Statement [15] *((const byte*) COLS#0+(word/signed word/dword/signed dword) $320 + (byte) main::x#2) ← *((const byte[$100]) COLORMAP2#0 + *((const byte[$3e8]) MAPDATA#0+(word/signed word/dword/signed dword) $320 + (byte) main::x#2)) [ main::x#2 ] ( main:2 [ main::x#2 ] ) always clobbers reg byte a reg byte x
|
||||
Statement [16] (byte) main::x#1 ← ++ (byte) main::x#2 [ main::x#1 ] ( main:2 [ main::x#1 ] ) always clobbers reg byte y
|
||||
Potential registers reg byte y [ main::x#2 main::x#1 ] : reg byte y ,
|
||||
|
||||
REGISTER UPLIFT SCOPES
|
||||
Uplift Scope [main] 38.5: zp ZP_BYTE:2 [ main::x#2 main::x#1 ]
|
||||
Uplift Scope [main] 38.5: reg byte y [ main::x#2 main::x#1 ]
|
||||
Uplift Scope []
|
||||
|
||||
Uplifting [main] best 1468 combination reg byte x [ main::x#2 main::x#1 ]
|
||||
Uplifting [] best 1468 combination
|
||||
Uplifting [main] best 1368 combination reg byte y [ main::x#2 main::x#1 ]
|
||||
Uplifting [] best 1368 combination
|
||||
|
||||
ASSEMBLER BEFORE OPTIMIZATION
|
||||
//SEG0 File Comments
|
||||
@ -401,8 +372,8 @@ bend:
|
||||
main: {
|
||||
//SEG11 [5] phi from main to main::@1 [phi:main->main::@1]
|
||||
b1_from_main:
|
||||
//SEG12 [5] phi (byte) main::x#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main->main::@1#0] -- vbuxx=vbuc1
|
||||
ldx #0
|
||||
//SEG12 [5] phi (byte) main::x#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main->main::@1#0] -- vbuyy=vbuc1
|
||||
ldy #0
|
||||
jmp b1
|
||||
//SEG13 [5] phi from main::@1 to main::@1 [phi:main::@1->main::@1]
|
||||
b1_from_b1:
|
||||
@ -410,50 +381,45 @@ main: {
|
||||
jmp b1
|
||||
//SEG15 main::@1
|
||||
b1:
|
||||
//SEG16 [6] *((const byte*) SCREEN#0 + (byte) main::x#2) ← *((const byte[$3e8]) MAPDATA#0 + (byte) main::x#2) -- pbuc1_derefidx_vbuxx=pbuc2_derefidx_vbuxx
|
||||
lda MAPDATA,x
|
||||
sta SCREEN,x
|
||||
//SEG17 [7] *((const byte*) COLS#0 + (byte) main::x#2) ← *((const byte[$100]) COLORMAP1#0 + *((const byte[$3e8]) MAPDATA#0 + (byte) main::x#2)) -- pbuc1_derefidx_vbuxx=pbuc2_derefidx_pbuc3_derefidx_vbuxx
|
||||
lda MAPDATA,x
|
||||
tay
|
||||
lda COLORMAP1,y
|
||||
sta COLS,x
|
||||
//SEG18 [8] *((const byte*) SCREEN#0+(byte/word/signed word/dword/signed dword) $c8 + (byte) main::x#2) ← *((const byte[$3e8]) MAPDATA#0+(byte/word/signed word/dword/signed dword) $c8 + (byte) main::x#2) -- pbuc1_derefidx_vbuxx=pbuc2_derefidx_vbuxx
|
||||
lda MAPDATA+$c8,x
|
||||
sta SCREEN+$c8,x
|
||||
//SEG19 [9] *((const byte*) COLS#0+(byte/word/signed word/dword/signed dword) $c8 + (byte) main::x#2) ← *((const byte[$100]) COLORMAP1#0 + *((const byte[$3e8]) MAPDATA#0+(byte/word/signed word/dword/signed dword) $c8 + (byte) main::x#2)) -- pbuc1_derefidx_vbuxx=pbuc2_derefidx_pbuc3_derefidx_vbuxx
|
||||
lda MAPDATA+$c8,x
|
||||
tay
|
||||
lda COLORMAP1,y
|
||||
sta COLS+$c8,x
|
||||
//SEG20 [10] *((const byte*) SCREEN#0+(word/signed word/dword/signed dword) $190 + (byte) main::x#2) ← *((const byte[$3e8]) MAPDATA#0+(word/signed word/dword/signed dword) $190 + (byte) main::x#2) -- pbuc1_derefidx_vbuxx=pbuc2_derefidx_vbuxx
|
||||
lda MAPDATA+$190,x
|
||||
sta SCREEN+$190,x
|
||||
//SEG21 [11] *((const byte*) COLS#0+(word/signed word/dword/signed dword) $190 + (byte) main::x#2) ← *((const byte[$100]) COLORMAP1#0 + *((const byte[$3e8]) MAPDATA#0+(word/signed word/dword/signed dword) $190 + (byte) main::x#2)) -- pbuc1_derefidx_vbuxx=pbuc2_derefidx_pbuc3_derefidx_vbuxx
|
||||
lda MAPDATA+$190,x
|
||||
tay
|
||||
lda COLORMAP1,y
|
||||
sta COLS+$190,x
|
||||
//SEG22 [12] *((const byte*) SCREEN#0+(word/signed word/dword/signed dword) $258 + (byte) main::x#2) ← *((const byte[$3e8]) MAPDATA#0+(word/signed word/dword/signed dword) $258 + (byte) main::x#2) -- pbuc1_derefidx_vbuxx=pbuc2_derefidx_vbuxx
|
||||
lda MAPDATA+$258,x
|
||||
sta SCREEN+$258,x
|
||||
//SEG23 [13] *((const byte*) COLS#0+(word/signed word/dword/signed dword) $258 + (byte) main::x#2) ← *((const byte[$100]) COLORMAP2#0 + *((const byte[$3e8]) MAPDATA#0+(word/signed word/dword/signed dword) $258 + (byte) main::x#2)) -- pbuc1_derefidx_vbuxx=pbuc2_derefidx_pbuc3_derefidx_vbuxx
|
||||
lda MAPDATA+$258,x
|
||||
tay
|
||||
lda COLORMAP2,y
|
||||
sta COLS+$258,x
|
||||
//SEG24 [14] *((const byte*) SCREEN#0+(word/signed word/dword/signed dword) $320 + (byte) main::x#2) ← *((const byte[$3e8]) MAPDATA#0+(word/signed word/dword/signed dword) $320 + (byte) main::x#2) -- pbuc1_derefidx_vbuxx=pbuc2_derefidx_vbuxx
|
||||
lda MAPDATA+$320,x
|
||||
sta SCREEN+$320,x
|
||||
//SEG25 [15] *((const byte*) COLS#0+(word/signed word/dword/signed dword) $320 + (byte) main::x#2) ← *((const byte[$100]) COLORMAP2#0 + *((const byte[$3e8]) MAPDATA#0+(word/signed word/dword/signed dword) $320 + (byte) main::x#2)) -- pbuc1_derefidx_vbuxx=pbuc2_derefidx_pbuc3_derefidx_vbuxx
|
||||
lda MAPDATA+$320,x
|
||||
tay
|
||||
lda COLORMAP2,y
|
||||
sta COLS+$320,x
|
||||
//SEG26 [16] (byte) main::x#1 ← ++ (byte) main::x#2 -- vbuxx=_inc_vbuxx
|
||||
inx
|
||||
//SEG27 [17] if((byte) main::x#1!=(byte/word/signed word/dword/signed dword) $c9) goto main::@1 -- vbuxx_neq_vbuc1_then_la1
|
||||
cpx #$c9
|
||||
//SEG16 [6] *((const byte*) SCREEN#0 + (byte) main::x#2) ← *((const byte[$3e8]) MAPDATA#0 + (byte) main::x#2) -- pbuc1_derefidx_vbuyy=pbuc2_derefidx_vbuyy
|
||||
lda MAPDATA,y
|
||||
sta SCREEN,y
|
||||
//SEG17 [7] *((const byte*) COLS#0 + (byte) main::x#2) ← *((const byte[$100]) COLORMAP1#0 + *((const byte[$3e8]) MAPDATA#0 + (byte) main::x#2)) -- pbuc1_derefidx_vbuyy=pbuc2_derefidx_pbuc3_derefidx_vbuyy
|
||||
ldx MAPDATA,y
|
||||
lda COLORMAP1,x
|
||||
sta COLS,y
|
||||
//SEG18 [8] *((const byte*) SCREEN#0+(byte/word/signed word/dword/signed dword) $c8 + (byte) main::x#2) ← *((const byte[$3e8]) MAPDATA#0+(byte/word/signed word/dword/signed dword) $c8 + (byte) main::x#2) -- pbuc1_derefidx_vbuyy=pbuc2_derefidx_vbuyy
|
||||
lda MAPDATA+$c8,y
|
||||
sta SCREEN+$c8,y
|
||||
//SEG19 [9] *((const byte*) COLS#0+(byte/word/signed word/dword/signed dword) $c8 + (byte) main::x#2) ← *((const byte[$100]) COLORMAP1#0 + *((const byte[$3e8]) MAPDATA#0+(byte/word/signed word/dword/signed dword) $c8 + (byte) main::x#2)) -- pbuc1_derefidx_vbuyy=pbuc2_derefidx_pbuc3_derefidx_vbuyy
|
||||
ldx MAPDATA+$c8,y
|
||||
lda COLORMAP1,x
|
||||
sta COLS+$c8,y
|
||||
//SEG20 [10] *((const byte*) SCREEN#0+(word/signed word/dword/signed dword) $190 + (byte) main::x#2) ← *((const byte[$3e8]) MAPDATA#0+(word/signed word/dword/signed dword) $190 + (byte) main::x#2) -- pbuc1_derefidx_vbuyy=pbuc2_derefidx_vbuyy
|
||||
lda MAPDATA+$190,y
|
||||
sta SCREEN+$190,y
|
||||
//SEG21 [11] *((const byte*) COLS#0+(word/signed word/dword/signed dword) $190 + (byte) main::x#2) ← *((const byte[$100]) COLORMAP1#0 + *((const byte[$3e8]) MAPDATA#0+(word/signed word/dword/signed dword) $190 + (byte) main::x#2)) -- pbuc1_derefidx_vbuyy=pbuc2_derefidx_pbuc3_derefidx_vbuyy
|
||||
ldx MAPDATA+$190,y
|
||||
lda COLORMAP1,x
|
||||
sta COLS+$190,y
|
||||
//SEG22 [12] *((const byte*) SCREEN#0+(word/signed word/dword/signed dword) $258 + (byte) main::x#2) ← *((const byte[$3e8]) MAPDATA#0+(word/signed word/dword/signed dword) $258 + (byte) main::x#2) -- pbuc1_derefidx_vbuyy=pbuc2_derefidx_vbuyy
|
||||
lda MAPDATA+$258,y
|
||||
sta SCREEN+$258,y
|
||||
//SEG23 [13] *((const byte*) COLS#0+(word/signed word/dword/signed dword) $258 + (byte) main::x#2) ← *((const byte[$100]) COLORMAP2#0 + *((const byte[$3e8]) MAPDATA#0+(word/signed word/dword/signed dword) $258 + (byte) main::x#2)) -- pbuc1_derefidx_vbuyy=pbuc2_derefidx_pbuc3_derefidx_vbuyy
|
||||
ldx MAPDATA+$258,y
|
||||
lda COLORMAP2,x
|
||||
sta COLS+$258,y
|
||||
//SEG24 [14] *((const byte*) SCREEN#0+(word/signed word/dword/signed dword) $320 + (byte) main::x#2) ← *((const byte[$3e8]) MAPDATA#0+(word/signed word/dword/signed dword) $320 + (byte) main::x#2) -- pbuc1_derefidx_vbuyy=pbuc2_derefidx_vbuyy
|
||||
lda MAPDATA+$320,y
|
||||
sta SCREEN+$320,y
|
||||
//SEG25 [15] *((const byte*) COLS#0+(word/signed word/dword/signed dword) $320 + (byte) main::x#2) ← *((const byte[$100]) COLORMAP2#0 + *((const byte[$3e8]) MAPDATA#0+(word/signed word/dword/signed dword) $320 + (byte) main::x#2)) -- pbuc1_derefidx_vbuyy=pbuc2_derefidx_pbuc3_derefidx_vbuyy
|
||||
ldx MAPDATA+$320,y
|
||||
lda COLORMAP2,x
|
||||
sta COLS+$320,y
|
||||
//SEG26 [16] (byte) main::x#1 ← ++ (byte) main::x#2 -- vbuyy=_inc_vbuyy
|
||||
iny
|
||||
//SEG27 [17] if((byte) main::x#1!=(byte/word/signed word/dword/signed dword) $c9) goto main::@1 -- vbuyy_neq_vbuc1_then_la1
|
||||
cpy #$c9
|
||||
bne b1_from_b1
|
||||
jmp breturn
|
||||
//SEG28 main::@return
|
||||
@ -507,15 +473,15 @@ FINAL SYMBOL TABLE
|
||||
(void()) main()
|
||||
(label) main::@1
|
||||
(label) main::@return
|
||||
(byte) main::x
|
||||
(byte) main::x#1 reg byte x 16.5
|
||||
(byte) main::x#2 reg byte x 22.0
|
||||
(byte) main::x !reg byte y
|
||||
(byte) main::x#1 !reg byte y 16.5
|
||||
(byte) main::x#2 !reg byte y 22.0
|
||||
|
||||
reg byte x [ main::x#2 main::x#1 ]
|
||||
reg byte y [ main::x#2 main::x#1 ]
|
||||
|
||||
|
||||
FINAL ASSEMBLER
|
||||
Score: 1366
|
||||
Score: 1266
|
||||
|
||||
//SEG0 File Comments
|
||||
// Tests that constant offset indexing into arrays is handled correctly
|
||||
@ -536,56 +502,51 @@ Score: 1366
|
||||
//SEG10 main
|
||||
main: {
|
||||
//SEG11 [5] phi from main to main::@1 [phi:main->main::@1]
|
||||
//SEG12 [5] phi (byte) main::x#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main->main::@1#0] -- vbuxx=vbuc1
|
||||
ldx #0
|
||||
//SEG12 [5] phi (byte) main::x#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main->main::@1#0] -- vbuyy=vbuc1
|
||||
ldy #0
|
||||
//SEG13 [5] phi from main::@1 to main::@1 [phi:main::@1->main::@1]
|
||||
//SEG14 [5] phi (byte) main::x#2 = (byte) main::x#1 [phi:main::@1->main::@1#0] -- register_copy
|
||||
//SEG15 main::@1
|
||||
b1:
|
||||
//SEG16 [6] *((const byte*) SCREEN#0 + (byte) main::x#2) ← *((const byte[$3e8]) MAPDATA#0 + (byte) main::x#2) -- pbuc1_derefidx_vbuxx=pbuc2_derefidx_vbuxx
|
||||
lda MAPDATA,x
|
||||
sta SCREEN,x
|
||||
//SEG17 [7] *((const byte*) COLS#0 + (byte) main::x#2) ← *((const byte[$100]) COLORMAP1#0 + *((const byte[$3e8]) MAPDATA#0 + (byte) main::x#2)) -- pbuc1_derefidx_vbuxx=pbuc2_derefidx_pbuc3_derefidx_vbuxx
|
||||
lda MAPDATA,x
|
||||
tay
|
||||
lda COLORMAP1,y
|
||||
sta COLS,x
|
||||
//SEG18 [8] *((const byte*) SCREEN#0+(byte/word/signed word/dword/signed dword) $c8 + (byte) main::x#2) ← *((const byte[$3e8]) MAPDATA#0+(byte/word/signed word/dword/signed dword) $c8 + (byte) main::x#2) -- pbuc1_derefidx_vbuxx=pbuc2_derefidx_vbuxx
|
||||
lda MAPDATA+$c8,x
|
||||
sta SCREEN+$c8,x
|
||||
//SEG19 [9] *((const byte*) COLS#0+(byte/word/signed word/dword/signed dword) $c8 + (byte) main::x#2) ← *((const byte[$100]) COLORMAP1#0 + *((const byte[$3e8]) MAPDATA#0+(byte/word/signed word/dword/signed dword) $c8 + (byte) main::x#2)) -- pbuc1_derefidx_vbuxx=pbuc2_derefidx_pbuc3_derefidx_vbuxx
|
||||
lda MAPDATA+$c8,x
|
||||
tay
|
||||
lda COLORMAP1,y
|
||||
sta COLS+$c8,x
|
||||
//SEG20 [10] *((const byte*) SCREEN#0+(word/signed word/dword/signed dword) $190 + (byte) main::x#2) ← *((const byte[$3e8]) MAPDATA#0+(word/signed word/dword/signed dword) $190 + (byte) main::x#2) -- pbuc1_derefidx_vbuxx=pbuc2_derefidx_vbuxx
|
||||
lda MAPDATA+$190,x
|
||||
sta SCREEN+$190,x
|
||||
//SEG21 [11] *((const byte*) COLS#0+(word/signed word/dword/signed dword) $190 + (byte) main::x#2) ← *((const byte[$100]) COLORMAP1#0 + *((const byte[$3e8]) MAPDATA#0+(word/signed word/dword/signed dword) $190 + (byte) main::x#2)) -- pbuc1_derefidx_vbuxx=pbuc2_derefidx_pbuc3_derefidx_vbuxx
|
||||
lda MAPDATA+$190,x
|
||||
tay
|
||||
lda COLORMAP1,y
|
||||
sta COLS+$190,x
|
||||
//SEG22 [12] *((const byte*) SCREEN#0+(word/signed word/dword/signed dword) $258 + (byte) main::x#2) ← *((const byte[$3e8]) MAPDATA#0+(word/signed word/dword/signed dword) $258 + (byte) main::x#2) -- pbuc1_derefidx_vbuxx=pbuc2_derefidx_vbuxx
|
||||
lda MAPDATA+$258,x
|
||||
sta SCREEN+$258,x
|
||||
//SEG23 [13] *((const byte*) COLS#0+(word/signed word/dword/signed dword) $258 + (byte) main::x#2) ← *((const byte[$100]) COLORMAP2#0 + *((const byte[$3e8]) MAPDATA#0+(word/signed word/dword/signed dword) $258 + (byte) main::x#2)) -- pbuc1_derefidx_vbuxx=pbuc2_derefidx_pbuc3_derefidx_vbuxx
|
||||
lda MAPDATA+$258,x
|
||||
tay
|
||||
lda COLORMAP2,y
|
||||
sta COLS+$258,x
|
||||
//SEG24 [14] *((const byte*) SCREEN#0+(word/signed word/dword/signed dword) $320 + (byte) main::x#2) ← *((const byte[$3e8]) MAPDATA#0+(word/signed word/dword/signed dword) $320 + (byte) main::x#2) -- pbuc1_derefidx_vbuxx=pbuc2_derefidx_vbuxx
|
||||
lda MAPDATA+$320,x
|
||||
sta SCREEN+$320,x
|
||||
//SEG25 [15] *((const byte*) COLS#0+(word/signed word/dword/signed dword) $320 + (byte) main::x#2) ← *((const byte[$100]) COLORMAP2#0 + *((const byte[$3e8]) MAPDATA#0+(word/signed word/dword/signed dword) $320 + (byte) main::x#2)) -- pbuc1_derefidx_vbuxx=pbuc2_derefidx_pbuc3_derefidx_vbuxx
|
||||
lda MAPDATA+$320,x
|
||||
tay
|
||||
lda COLORMAP2,y
|
||||
sta COLS+$320,x
|
||||
//SEG26 [16] (byte) main::x#1 ← ++ (byte) main::x#2 -- vbuxx=_inc_vbuxx
|
||||
inx
|
||||
//SEG27 [17] if((byte) main::x#1!=(byte/word/signed word/dword/signed dword) $c9) goto main::@1 -- vbuxx_neq_vbuc1_then_la1
|
||||
cpx #$c9
|
||||
//SEG16 [6] *((const byte*) SCREEN#0 + (byte) main::x#2) ← *((const byte[$3e8]) MAPDATA#0 + (byte) main::x#2) -- pbuc1_derefidx_vbuyy=pbuc2_derefidx_vbuyy
|
||||
lda MAPDATA,y
|
||||
sta SCREEN,y
|
||||
//SEG17 [7] *((const byte*) COLS#0 + (byte) main::x#2) ← *((const byte[$100]) COLORMAP1#0 + *((const byte[$3e8]) MAPDATA#0 + (byte) main::x#2)) -- pbuc1_derefidx_vbuyy=pbuc2_derefidx_pbuc3_derefidx_vbuyy
|
||||
ldx MAPDATA,y
|
||||
lda COLORMAP1,x
|
||||
sta COLS,y
|
||||
//SEG18 [8] *((const byte*) SCREEN#0+(byte/word/signed word/dword/signed dword) $c8 + (byte) main::x#2) ← *((const byte[$3e8]) MAPDATA#0+(byte/word/signed word/dword/signed dword) $c8 + (byte) main::x#2) -- pbuc1_derefidx_vbuyy=pbuc2_derefidx_vbuyy
|
||||
lda MAPDATA+$c8,y
|
||||
sta SCREEN+$c8,y
|
||||
//SEG19 [9] *((const byte*) COLS#0+(byte/word/signed word/dword/signed dword) $c8 + (byte) main::x#2) ← *((const byte[$100]) COLORMAP1#0 + *((const byte[$3e8]) MAPDATA#0+(byte/word/signed word/dword/signed dword) $c8 + (byte) main::x#2)) -- pbuc1_derefidx_vbuyy=pbuc2_derefidx_pbuc3_derefidx_vbuyy
|
||||
ldx MAPDATA+$c8,y
|
||||
lda COLORMAP1,x
|
||||
sta COLS+$c8,y
|
||||
//SEG20 [10] *((const byte*) SCREEN#0+(word/signed word/dword/signed dword) $190 + (byte) main::x#2) ← *((const byte[$3e8]) MAPDATA#0+(word/signed word/dword/signed dword) $190 + (byte) main::x#2) -- pbuc1_derefidx_vbuyy=pbuc2_derefidx_vbuyy
|
||||
lda MAPDATA+$190,y
|
||||
sta SCREEN+$190,y
|
||||
//SEG21 [11] *((const byte*) COLS#0+(word/signed word/dword/signed dword) $190 + (byte) main::x#2) ← *((const byte[$100]) COLORMAP1#0 + *((const byte[$3e8]) MAPDATA#0+(word/signed word/dword/signed dword) $190 + (byte) main::x#2)) -- pbuc1_derefidx_vbuyy=pbuc2_derefidx_pbuc3_derefidx_vbuyy
|
||||
ldx MAPDATA+$190,y
|
||||
lda COLORMAP1,x
|
||||
sta COLS+$190,y
|
||||
//SEG22 [12] *((const byte*) SCREEN#0+(word/signed word/dword/signed dword) $258 + (byte) main::x#2) ← *((const byte[$3e8]) MAPDATA#0+(word/signed word/dword/signed dword) $258 + (byte) main::x#2) -- pbuc1_derefidx_vbuyy=pbuc2_derefidx_vbuyy
|
||||
lda MAPDATA+$258,y
|
||||
sta SCREEN+$258,y
|
||||
//SEG23 [13] *((const byte*) COLS#0+(word/signed word/dword/signed dword) $258 + (byte) main::x#2) ← *((const byte[$100]) COLORMAP2#0 + *((const byte[$3e8]) MAPDATA#0+(word/signed word/dword/signed dword) $258 + (byte) main::x#2)) -- pbuc1_derefidx_vbuyy=pbuc2_derefidx_pbuc3_derefidx_vbuyy
|
||||
ldx MAPDATA+$258,y
|
||||
lda COLORMAP2,x
|
||||
sta COLS+$258,y
|
||||
//SEG24 [14] *((const byte*) SCREEN#0+(word/signed word/dword/signed dword) $320 + (byte) main::x#2) ← *((const byte[$3e8]) MAPDATA#0+(word/signed word/dword/signed dword) $320 + (byte) main::x#2) -- pbuc1_derefidx_vbuyy=pbuc2_derefidx_vbuyy
|
||||
lda MAPDATA+$320,y
|
||||
sta SCREEN+$320,y
|
||||
//SEG25 [15] *((const byte*) COLS#0+(word/signed word/dword/signed dword) $320 + (byte) main::x#2) ← *((const byte[$100]) COLORMAP2#0 + *((const byte[$3e8]) MAPDATA#0+(word/signed word/dword/signed dword) $320 + (byte) main::x#2)) -- pbuc1_derefidx_vbuyy=pbuc2_derefidx_pbuc3_derefidx_vbuyy
|
||||
ldx MAPDATA+$320,y
|
||||
lda COLORMAP2,x
|
||||
sta COLS+$320,y
|
||||
//SEG26 [16] (byte) main::x#1 ← ++ (byte) main::x#2 -- vbuyy=_inc_vbuyy
|
||||
iny
|
||||
//SEG27 [17] if((byte) main::x#1!=(byte/word/signed word/dword/signed dword) $c9) goto main::@1 -- vbuyy_neq_vbuc1_then_la1
|
||||
cpy #$c9
|
||||
bne b1
|
||||
//SEG28 main::@return
|
||||
//SEG29 [18] return
|
||||
|
@ -14,8 +14,8 @@
|
||||
(void()) main()
|
||||
(label) main::@1
|
||||
(label) main::@return
|
||||
(byte) main::x
|
||||
(byte) main::x#1 reg byte x 16.5
|
||||
(byte) main::x#2 reg byte x 22.0
|
||||
(byte) main::x !reg byte y
|
||||
(byte) main::x#1 !reg byte y 16.5
|
||||
(byte) main::x#2 !reg byte y 22.0
|
||||
|
||||
reg byte x [ main::x#2 main::x#1 ]
|
||||
reg byte y [ main::x#2 main::x#1 ]
|
||||
|
@ -24,8 +24,9 @@
|
||||
.label YSIN = $2100
|
||||
.label PLEX_SCREEN_PTR = SCREEN+$3f8
|
||||
.label plex_free_next = 3
|
||||
.label plex_show_idx = 4
|
||||
.label plex_sprite_msb = 5
|
||||
.label plex_sprite_idx = 4
|
||||
.label plex_show_idx = 5
|
||||
.label plex_sprite_msb = 6
|
||||
main: {
|
||||
sei
|
||||
jsr init
|
||||
@ -35,8 +36,8 @@ main: {
|
||||
// The raster loop
|
||||
loop: {
|
||||
.label sin_idx = 2
|
||||
.label plexFreeNextYpos1_return = 9
|
||||
.label ss = 6
|
||||
.label plexFreeNextYpos1_return = $a
|
||||
.label ss = 7
|
||||
lda #0
|
||||
sta sin_idx
|
||||
b4:
|
||||
@ -72,7 +73,7 @@ loop: {
|
||||
sta plex_sprite_msb
|
||||
lda #0
|
||||
sta plex_show_idx
|
||||
tax
|
||||
sta plex_sprite_idx
|
||||
sta plex_free_next
|
||||
// Show the sprites
|
||||
b11:
|
||||
@ -98,14 +99,12 @@ loop: {
|
||||
// Show the next sprite.
|
||||
// plexSort() prepares showing the sprites
|
||||
plexShowSprite: {
|
||||
.label plex_sprite_idx2 = 9
|
||||
.label xpos_idx = $a
|
||||
txa
|
||||
.label plex_sprite_idx2 = $a
|
||||
lda plex_sprite_idx
|
||||
asl
|
||||
sta plex_sprite_idx2
|
||||
ldy plex_show_idx
|
||||
lda PLEX_SORTED_IDX,y
|
||||
tay
|
||||
ldx plex_show_idx
|
||||
ldy PLEX_SORTED_IDX,x
|
||||
lda PLEX_YPOS,y
|
||||
ldy plex_sprite_idx2
|
||||
sta SPRITES_YPOS,y
|
||||
@ -118,21 +117,18 @@ plexShowSprite: {
|
||||
adc #1
|
||||
and #7
|
||||
sta plex_free_next
|
||||
ldy plex_show_idx
|
||||
lda PLEX_SORTED_IDX,y
|
||||
tay
|
||||
ldy PLEX_SORTED_IDX,x
|
||||
lda PLEX_PTR,y
|
||||
ldx plex_sprite_idx
|
||||
sta PLEX_SCREEN_PTR,x
|
||||
ldy plex_show_idx
|
||||
lda PLEX_SORTED_IDX,y
|
||||
ldx plex_show_idx
|
||||
lda PLEX_SORTED_IDX,x
|
||||
asl
|
||||
sta xpos_idx
|
||||
tay
|
||||
lda PLEX_XPOS,y
|
||||
tax
|
||||
lda PLEX_XPOS,x
|
||||
ldy plex_sprite_idx2
|
||||
sta SPRITES_XPOS,y
|
||||
ldy xpos_idx
|
||||
lda PLEX_XPOS+1,y
|
||||
lda PLEX_XPOS+1,x
|
||||
cmp #0
|
||||
bne b1
|
||||
lda plex_sprite_msb
|
||||
@ -140,10 +136,11 @@ plexShowSprite: {
|
||||
and SPRITES_XMSB
|
||||
sta SPRITES_XMSB
|
||||
b2:
|
||||
inx
|
||||
txa
|
||||
lda plex_sprite_idx
|
||||
clc
|
||||
adc #1
|
||||
and #7
|
||||
tax
|
||||
sta plex_sprite_idx
|
||||
inc plex_show_idx
|
||||
asl plex_sprite_msb
|
||||
lda plex_sprite_msb
|
||||
@ -217,7 +214,7 @@ plexSort: {
|
||||
}
|
||||
// Initialize the program
|
||||
init: {
|
||||
.label xp = 7
|
||||
.label xp = 8
|
||||
lda #VIC_DEN|VIC_RSEL|3
|
||||
sta D011
|
||||
jsr plexInit
|
||||
|
@ -2705,11 +2705,10 @@ plexShowSprite: {
|
||||
asl
|
||||
sta plex_sprite_idx2
|
||||
//SEG81 [37] (byte) plexShowSprite::plexFreeAdd1_ypos#0 ← *((const byte[PLEX_COUNT#0]) PLEX_YPOS#0 + *((const byte[PLEX_COUNT#0]) PLEX_SORTED_IDX#0 + (byte) plex_show_idx#44)) -- vbuz1=pbuc1_derefidx_pbuc2_derefidx_vbuz2
|
||||
ldy plex_show_idx
|
||||
lda PLEX_SORTED_IDX,y
|
||||
tay
|
||||
lda PLEX_YPOS,y
|
||||
sta plexFreeAdd1_ypos
|
||||
ldx plex_show_idx
|
||||
ldy PLEX_SORTED_IDX,x
|
||||
ldx PLEX_YPOS,y
|
||||
stx plexFreeAdd1_ypos
|
||||
//SEG82 [38] *((const byte*) SPRITES_YPOS#0 + (byte) plexShowSprite::plex_sprite_idx2#0) ← (byte) plexShowSprite::plexFreeAdd1_ypos#0 -- pbuc1_derefidx_vbuz1=vbuz2
|
||||
lda plexFreeAdd1_ypos
|
||||
ldy plex_sprite_idx2
|
||||
@ -2739,9 +2738,8 @@ plexShowSprite: {
|
||||
b7:
|
||||
//SEG89 [43] *((const byte*) PLEX_SCREEN_PTR#1 + (byte) plex_sprite_idx#44) ← *((const byte[PLEX_COUNT#0]) PLEX_PTR#0 + *((const byte[PLEX_COUNT#0]) PLEX_SORTED_IDX#0 + (byte) plex_show_idx#44)) -- pbuc1_derefidx_vbuz1=pbuc2_derefidx_pbuc3_derefidx_vbuz2
|
||||
ldx plex_show_idx
|
||||
lda PLEX_SORTED_IDX,x
|
||||
tax
|
||||
lda PLEX_PTR,x
|
||||
ldy PLEX_SORTED_IDX,x
|
||||
lda PLEX_PTR,y
|
||||
ldx plex_sprite_idx
|
||||
sta PLEX_SCREEN_PTR,x
|
||||
//SEG90 [44] (byte) plexShowSprite::xpos_idx#0 ← *((const byte[PLEX_COUNT#0]) PLEX_SORTED_IDX#0 + (byte) plex_show_idx#44) << (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuz1=pbuc1_derefidx_vbuz2_rol_1
|
||||
@ -3123,16 +3121,8 @@ Removing always clobbered register reg byte a as potential for zp ZP_BYTE:8 [ pl
|
||||
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:9 [ loop::ss#6 loop::ss#1 ]
|
||||
Statement [35] *((const byte*) BORDERCOL#0) ← (const byte) BLACK#0 [ loop::sin_idx#1 ] ( main:4::loop:9 [ loop::sin_idx#1 ] ) always clobbers reg byte a
|
||||
Statement [36] (byte) plexShowSprite::plex_sprite_idx2#0 ← (byte) plex_sprite_idx#44 << (byte/signed byte/word/signed word/dword/signed dword) 1 [ plex_free_next#17 plex_sprite_idx#44 plex_show_idx#44 plex_sprite_msb#44 plexShowSprite::plex_sprite_idx2#0 ] ( main:4::loop:9::plexShowSprite:32 [ loop::sin_idx#1 loop::ss#6 plex_free_next#17 plex_sprite_idx#44 plex_show_idx#44 plex_sprite_msb#44 plexShowSprite::plex_sprite_idx2#0 ] ) always clobbers reg byte a
|
||||
Statement [37] (byte) plexShowSprite::plexFreeAdd1_ypos#0 ← *((const byte[PLEX_COUNT#0]) PLEX_YPOS#0 + *((const byte[PLEX_COUNT#0]) PLEX_SORTED_IDX#0 + (byte) plex_show_idx#44)) [ plex_free_next#17 plex_sprite_idx#44 plex_show_idx#44 plex_sprite_msb#44 plexShowSprite::plex_sprite_idx2#0 plexShowSprite::plexFreeAdd1_ypos#0 ] ( main:4::loop:9::plexShowSprite:32 [ loop::sin_idx#1 loop::ss#6 plex_free_next#17 plex_sprite_idx#44 plex_show_idx#44 plex_sprite_msb#44 plexShowSprite::plex_sprite_idx2#0 plexShowSprite::plexFreeAdd1_ypos#0 ] ) always clobbers reg byte a reg byte y
|
||||
Removing always clobbered register reg byte y as potential for zp ZP_BYTE:2 [ loop::sin_idx#6 loop::sin_idx#1 ]
|
||||
Removing always clobbered register reg byte y as potential for zp ZP_BYTE:9 [ loop::ss#6 loop::ss#1 ]
|
||||
Removing always clobbered register reg byte y as potential for zp ZP_BYTE:5 [ plex_free_next#17 plex_free_next#13 ]
|
||||
Removing always clobbered register reg byte y as potential for zp ZP_BYTE:6 [ plex_sprite_idx#44 plex_sprite_idx#15 ]
|
||||
Removing always clobbered register reg byte y as potential for zp ZP_BYTE:7 [ plex_show_idx#44 plex_show_idx#15 ]
|
||||
Removing always clobbered register reg byte y as potential for zp ZP_BYTE:8 [ plex_sprite_msb#44 plex_sprite_msb#16 plex_sprite_msb#25 ]
|
||||
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:20 [ plexShowSprite::plex_sprite_idx2#0 ]
|
||||
Removing always clobbered register reg byte y as potential for zp ZP_BYTE:20 [ plexShowSprite::plex_sprite_idx2#0 ]
|
||||
Statement [39] (byte/signed word/word/dword/signed dword) plexShowSprite::plexFreeAdd1_$0#0 ← (byte) plexShowSprite::plexFreeAdd1_ypos#0 + (byte/signed byte/word/signed word/dword/signed dword) $15 [ plex_free_next#17 plex_sprite_idx#44 plex_show_idx#44 plex_sprite_msb#44 plexShowSprite::plex_sprite_idx2#0 plexShowSprite::plexFreeAdd1_$0#0 ] ( main:4::loop:9::plexShowSprite:32 [ loop::sin_idx#1 loop::ss#6 plex_free_next#17 plex_sprite_idx#44 plex_show_idx#44 plex_sprite_msb#44 plexShowSprite::plex_sprite_idx2#0 plexShowSprite::plexFreeAdd1_$0#0 ] ) always clobbers reg byte a
|
||||
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:20 [ plexShowSprite::plex_sprite_idx2#0 ]
|
||||
Statement [42] (byte) plex_free_next#13 ← (byte/signed word/word/dword/signed dword) plexShowSprite::plexFreeAdd1_$1#0 & (byte/signed byte/word/signed word/dword/signed dword) 7 [ plex_sprite_idx#44 plex_show_idx#44 plex_sprite_msb#44 plex_free_next#13 plexShowSprite::plex_sprite_idx2#0 ] ( main:4::loop:9::plexShowSprite:32 [ loop::sin_idx#1 loop::ss#6 plex_sprite_idx#44 plex_show_idx#44 plex_sprite_msb#44 plex_free_next#13 plexShowSprite::plex_sprite_idx2#0 ] ) always clobbers reg byte a
|
||||
Statement [43] *((const byte*) PLEX_SCREEN_PTR#1 + (byte) plex_sprite_idx#44) ← *((const byte[PLEX_COUNT#0]) PLEX_PTR#0 + *((const byte[PLEX_COUNT#0]) PLEX_SORTED_IDX#0 + (byte) plex_show_idx#44)) [ plex_sprite_idx#44 plex_show_idx#44 plex_sprite_msb#44 plex_free_next#13 plexShowSprite::plex_sprite_idx2#0 ] ( main:4::loop:9::plexShowSprite:32 [ loop::sin_idx#1 loop::ss#6 plex_sprite_idx#44 plex_show_idx#44 plex_sprite_msb#44 plex_free_next#13 plexShowSprite::plex_sprite_idx2#0 ] ) always clobbers reg byte a
|
||||
Statement [44] (byte) plexShowSprite::xpos_idx#0 ← *((const byte[PLEX_COUNT#0]) PLEX_SORTED_IDX#0 + (byte) plex_show_idx#44) << (byte/signed byte/word/signed word/dword/signed dword) 1 [ plex_sprite_idx#44 plex_show_idx#44 plex_sprite_msb#44 plex_free_next#13 plexShowSprite::plex_sprite_idx2#0 plexShowSprite::xpos_idx#0 ] ( main:4::loop:9::plexShowSprite:32 [ loop::sin_idx#1 loop::ss#6 plex_sprite_idx#44 plex_show_idx#44 plex_sprite_msb#44 plex_free_next#13 plexShowSprite::plex_sprite_idx2#0 plexShowSprite::xpos_idx#0 ] ) always clobbers reg byte a
|
||||
@ -3169,7 +3159,6 @@ Statement [25] (byte~) loop::$4 ← *((const byte*) D011#0) & (const byte) VIC_R
|
||||
Statement [28] *((const byte*) BORDERCOL#0) ← (const byte) BLACK#0 [ loop::sin_idx#1 plex_free_next#17 plex_sprite_idx#44 plex_show_idx#44 plex_sprite_msb#44 loop::ss#6 ] ( main:4::loop:9 [ loop::sin_idx#1 plex_free_next#17 plex_sprite_idx#44 plex_show_idx#44 plex_sprite_msb#44 loop::ss#6 ] ) always clobbers reg byte a
|
||||
Statement [35] *((const byte*) BORDERCOL#0) ← (const byte) BLACK#0 [ loop::sin_idx#1 ] ( main:4::loop:9 [ loop::sin_idx#1 ] ) always clobbers reg byte a
|
||||
Statement [36] (byte) plexShowSprite::plex_sprite_idx2#0 ← (byte) plex_sprite_idx#44 << (byte/signed byte/word/signed word/dword/signed dword) 1 [ plex_free_next#17 plex_sprite_idx#44 plex_show_idx#44 plex_sprite_msb#44 plexShowSprite::plex_sprite_idx2#0 ] ( main:4::loop:9::plexShowSprite:32 [ loop::sin_idx#1 loop::ss#6 plex_free_next#17 plex_sprite_idx#44 plex_show_idx#44 plex_sprite_msb#44 plexShowSprite::plex_sprite_idx2#0 ] ) always clobbers reg byte a
|
||||
Statement [37] (byte) plexShowSprite::plexFreeAdd1_ypos#0 ← *((const byte[PLEX_COUNT#0]) PLEX_YPOS#0 + *((const byte[PLEX_COUNT#0]) PLEX_SORTED_IDX#0 + (byte) plex_show_idx#44)) [ plex_free_next#17 plex_sprite_idx#44 plex_show_idx#44 plex_sprite_msb#44 plexShowSprite::plex_sprite_idx2#0 plexShowSprite::plexFreeAdd1_ypos#0 ] ( main:4::loop:9::plexShowSprite:32 [ loop::sin_idx#1 loop::ss#6 plex_free_next#17 plex_sprite_idx#44 plex_show_idx#44 plex_sprite_msb#44 plexShowSprite::plex_sprite_idx2#0 plexShowSprite::plexFreeAdd1_ypos#0 ] ) always clobbers reg byte a reg byte y
|
||||
Statement [39] (byte/signed word/word/dword/signed dword) plexShowSprite::plexFreeAdd1_$0#0 ← (byte) plexShowSprite::plexFreeAdd1_ypos#0 + (byte/signed byte/word/signed word/dword/signed dword) $15 [ plex_free_next#17 plex_sprite_idx#44 plex_show_idx#44 plex_sprite_msb#44 plexShowSprite::plex_sprite_idx2#0 plexShowSprite::plexFreeAdd1_$0#0 ] ( main:4::loop:9::plexShowSprite:32 [ loop::sin_idx#1 loop::ss#6 plex_free_next#17 plex_sprite_idx#44 plex_show_idx#44 plex_sprite_msb#44 plexShowSprite::plex_sprite_idx2#0 plexShowSprite::plexFreeAdd1_$0#0 ] ) always clobbers reg byte a
|
||||
Statement [42] (byte) plex_free_next#13 ← (byte/signed word/word/dword/signed dword) plexShowSprite::plexFreeAdd1_$1#0 & (byte/signed byte/word/signed word/dword/signed dword) 7 [ plex_sprite_idx#44 plex_show_idx#44 plex_sprite_msb#44 plex_free_next#13 plexShowSprite::plex_sprite_idx2#0 ] ( main:4::loop:9::plexShowSprite:32 [ loop::sin_idx#1 loop::ss#6 plex_sprite_idx#44 plex_show_idx#44 plex_sprite_msb#44 plex_free_next#13 plexShowSprite::plex_sprite_idx2#0 ] ) always clobbers reg byte a
|
||||
Statement [43] *((const byte*) PLEX_SCREEN_PTR#1 + (byte) plex_sprite_idx#44) ← *((const byte[PLEX_COUNT#0]) PLEX_PTR#0 + *((const byte[PLEX_COUNT#0]) PLEX_SORTED_IDX#0 + (byte) plex_show_idx#44)) [ plex_sprite_idx#44 plex_show_idx#44 plex_sprite_msb#44 plex_free_next#13 plexShowSprite::plex_sprite_idx2#0 ] ( main:4::loop:9::plexShowSprite:32 [ loop::sin_idx#1 loop::ss#6 plex_sprite_idx#44 plex_show_idx#44 plex_sprite_msb#44 plex_free_next#13 plexShowSprite::plex_sprite_idx2#0 ] ) always clobbers reg byte a
|
||||
@ -3192,14 +3181,14 @@ Statement [86] *((const word[PLEX_COUNT#0]) PLEX_XPOS#0 + (byte~) init::$6) ←
|
||||
Statement [87] (word) init::xp#1 ← (word) init::xp#2 + (byte/signed byte/word/signed word/dword/signed dword) 9 [ init::sx#2 init::xp#1 ] ( main:4::init:7 [ init::sx#2 init::xp#1 ] ) always clobbers reg byte a
|
||||
Statement [90] *((const byte*) SPRITES_ENABLE#0) ← (byte/word/signed word/dword/signed dword) $ff [ ] ( main:4::init:7 [ ] ) always clobbers reg byte a
|
||||
Statement [92] *((const byte*) SPRITES_COLS#0 + (byte) init::ss#2) ← (const byte) GREEN#0 [ init::ss#2 ] ( main:4::init:7 [ init::ss#2 ] ) always clobbers reg byte a
|
||||
Potential registers zp ZP_BYTE:2 [ loop::sin_idx#6 loop::sin_idx#1 ] : zp ZP_BYTE:2 , reg byte x ,
|
||||
Potential registers zp ZP_BYTE:2 [ loop::sin_idx#6 loop::sin_idx#1 ] : zp ZP_BYTE:2 , reg byte x , reg byte y ,
|
||||
Potential registers zp ZP_BYTE:3 [ loop::y_idx#2 loop::y_idx#3 loop::y_idx#1 ] : zp ZP_BYTE:3 , reg byte x , reg byte y ,
|
||||
Potential registers zp ZP_BYTE:4 [ loop::sy#2 loop::sy#1 ] : zp ZP_BYTE:4 , reg byte x , reg byte y ,
|
||||
Potential registers zp ZP_BYTE:5 [ plex_free_next#17 plex_free_next#13 ] : zp ZP_BYTE:5 , reg byte x ,
|
||||
Potential registers zp ZP_BYTE:6 [ plex_sprite_idx#44 plex_sprite_idx#15 ] : zp ZP_BYTE:6 , reg byte x ,
|
||||
Potential registers zp ZP_BYTE:7 [ plex_show_idx#44 plex_show_idx#15 ] : zp ZP_BYTE:7 , reg byte x ,
|
||||
Potential registers zp ZP_BYTE:8 [ plex_sprite_msb#44 plex_sprite_msb#16 plex_sprite_msb#25 ] : zp ZP_BYTE:8 , reg byte x ,
|
||||
Potential registers zp ZP_BYTE:9 [ loop::ss#6 loop::ss#1 ] : zp ZP_BYTE:9 , reg byte x ,
|
||||
Potential registers zp ZP_BYTE:5 [ plex_free_next#17 plex_free_next#13 ] : zp ZP_BYTE:5 , reg byte x , reg byte y ,
|
||||
Potential registers zp ZP_BYTE:6 [ plex_sprite_idx#44 plex_sprite_idx#15 ] : zp ZP_BYTE:6 , reg byte x , reg byte y ,
|
||||
Potential registers zp ZP_BYTE:7 [ plex_show_idx#44 plex_show_idx#15 ] : zp ZP_BYTE:7 , reg byte x , reg byte y ,
|
||||
Potential registers zp ZP_BYTE:8 [ plex_sprite_msb#44 plex_sprite_msb#16 plex_sprite_msb#25 ] : zp ZP_BYTE:8 , reg byte x , reg byte y ,
|
||||
Potential registers zp ZP_BYTE:9 [ loop::ss#6 loop::ss#1 ] : zp ZP_BYTE:9 , reg byte x , reg byte y ,
|
||||
Potential registers zp ZP_BYTE:10 [ plexSort::m#2 plexSort::m#1 ] : zp ZP_BYTE:10 , reg byte x , reg byte y ,
|
||||
Potential registers zp ZP_BYTE:11 [ plexSort::s#3 plexSort::s#1 plexSort::s#6 ] : zp ZP_BYTE:11 , reg byte x , reg byte y ,
|
||||
Potential registers zp ZP_BYTE:12 [ plexSort::plexFreePrepare1_s#2 plexSort::plexFreePrepare1_s#1 ] : zp ZP_BYTE:12 , reg byte x , reg byte y ,
|
||||
@ -3209,7 +3198,7 @@ Potential registers zp ZP_BYTE:16 [ init::ss#2 init::ss#1 ] : zp ZP_BYTE:16 , re
|
||||
Potential registers zp ZP_BYTE:17 [ plexInit::i#2 plexInit::i#1 ] : zp ZP_BYTE:17 , reg byte a , reg byte x , reg byte y ,
|
||||
Potential registers zp ZP_BYTE:18 [ loop::$4 ] : zp ZP_BYTE:18 , reg byte a , reg byte x , reg byte y ,
|
||||
Potential registers zp ZP_BYTE:19 [ loop::plexFreeNextYpos1_return#0 ] : zp ZP_BYTE:19 , reg byte a , reg byte x , reg byte y ,
|
||||
Potential registers zp ZP_BYTE:20 [ plexShowSprite::plex_sprite_idx2#0 ] : zp ZP_BYTE:20 , reg byte x ,
|
||||
Potential registers zp ZP_BYTE:20 [ plexShowSprite::plex_sprite_idx2#0 ] : zp ZP_BYTE:20 , reg byte x , reg byte y ,
|
||||
Potential registers zp ZP_BYTE:21 [ plexShowSprite::plexFreeAdd1_ypos#0 ] : zp ZP_BYTE:21 , reg byte a , reg byte x , reg byte y ,
|
||||
Potential registers zp ZP_BYTE:22 [ plexShowSprite::plexFreeAdd1_$0#0 ] : zp ZP_BYTE:22 , reg byte a , reg byte x , reg byte y ,
|
||||
Potential registers zp ZP_BYTE:23 [ plexShowSprite::plexFreeAdd1_$1#0 ] : zp ZP_BYTE:23 , reg byte a , reg byte x , reg byte y ,
|
||||
@ -3232,69 +3221,71 @@ Uplift Scope [plexInit] 38.5: zp ZP_BYTE:17 [ plexInit::i#2 plexInit::i#1 ]
|
||||
Uplift Scope [plexShowSprite] 4: zp ZP_BYTE:22 [ plexShowSprite::plexFreeAdd1_$0#0 ] 4: zp ZP_BYTE:23 [ plexShowSprite::plexFreeAdd1_$1#0 ] 4: zp ZP_BYTE:25 [ plexShowSprite::$3 ] 4: zp ZP_BYTE:26 [ plexShowSprite::$4 ] 4: zp ZP_BYTE:27 [ plexShowSprite::$6 ] 4: zp ZP_BYTE:28 [ plexShowSprite::$7 ] 3: zp ZP_BYTE:21 [ plexShowSprite::plexFreeAdd1_ypos#0 ] 2: zp ZP_BYTE:24 [ plexShowSprite::xpos_idx#0 ] 0.6: zp ZP_BYTE:20 [ plexShowSprite::plex_sprite_idx2#0 ]
|
||||
Uplift Scope [main]
|
||||
|
||||
Uplifting [plexSort] best 82584 combination reg byte x [ plexSort::s#3 plexSort::s#1 plexSort::s#6 ] reg byte x [ plexSort::plexFreePrepare1_s#2 plexSort::plexFreePrepare1_s#1 ] zp ZP_BYTE:31 [ plexSort::s#2 ] zp ZP_BYTE:10 [ plexSort::m#2 plexSort::m#1 ] zp ZP_BYTE:30 [ plexSort::nxt_y#0 ] zp ZP_BYTE:29 [ plexSort::nxt_idx#0 ]
|
||||
Uplifting [plexSort] best 82580 combination reg byte x [ plexSort::s#3 plexSort::s#1 plexSort::s#6 ] reg byte x [ plexSort::plexFreePrepare1_s#2 plexSort::plexFreePrepare1_s#1 ] zp ZP_BYTE:31 [ plexSort::s#2 ] zp ZP_BYTE:10 [ plexSort::m#2 plexSort::m#1 ] zp ZP_BYTE:30 [ plexSort::nxt_y#0 ] zp ZP_BYTE:29 [ plexSort::nxt_idx#0 ]
|
||||
Limited combination testing to 10 combinations of 972 possible.
|
||||
Uplifting [loop] best 81384 combination zp ZP_BYTE:19 [ loop::plexFreeNextYpos1_return#0 ] reg byte x [ loop::sy#2 loop::sy#1 ] zp ZP_BYTE:3 [ loop::y_idx#2 loop::y_idx#3 loop::y_idx#1 ] zp ZP_BYTE:18 [ loop::$4 ] zp ZP_BYTE:9 [ loop::ss#6 loop::ss#1 ] zp ZP_BYTE:2 [ loop::sin_idx#6 loop::sin_idx#1 ]
|
||||
Limited combination testing to 10 combinations of 576 possible.
|
||||
Uplifting [init] best 81134 combination reg byte x [ init::ss#2 init::ss#1 ] reg byte x [ init::sx#2 init::sx#1 ] zp ZP_BYTE:32 [ init::$6 ] zp ZP_WORD:14 [ init::xp#2 init::xp#1 ]
|
||||
Uplifting [loop] best 81380 combination zp ZP_BYTE:19 [ loop::plexFreeNextYpos1_return#0 ] reg byte x [ loop::sy#2 loop::sy#1 ] zp ZP_BYTE:3 [ loop::y_idx#2 loop::y_idx#3 loop::y_idx#1 ] zp ZP_BYTE:18 [ loop::$4 ] zp ZP_BYTE:9 [ loop::ss#6 loop::ss#1 ] zp ZP_BYTE:2 [ loop::sin_idx#6 loop::sin_idx#1 ]
|
||||
Limited combination testing to 10 combinations of 1296 possible.
|
||||
Uplifting [init] best 81130 combination reg byte x [ init::ss#2 init::ss#1 ] reg byte x [ init::sx#2 init::sx#1 ] zp ZP_BYTE:32 [ init::$6 ] zp ZP_WORD:14 [ init::xp#2 init::xp#1 ]
|
||||
Limited combination testing to 10 combinations of 36 possible.
|
||||
Uplifting [] best 80826 combination zp ZP_BYTE:8 [ plex_sprite_msb#44 plex_sprite_msb#16 plex_sprite_msb#25 ] zp ZP_BYTE:5 [ plex_free_next#17 plex_free_next#13 ] zp ZP_BYTE:7 [ plex_show_idx#44 plex_show_idx#15 ] reg byte x [ plex_sprite_idx#44 plex_sprite_idx#15 ]
|
||||
Limited combination testing to 10 combinations of 16 possible.
|
||||
Uplifting [plexInit] best 80706 combination reg byte x [ plexInit::i#2 plexInit::i#1 ]
|
||||
Uplifting [plexShowSprite] best 80696 combination reg byte a [ plexShowSprite::plexFreeAdd1_$0#0 ] reg byte a [ plexShowSprite::plexFreeAdd1_$1#0 ] zp ZP_BYTE:25 [ plexShowSprite::$3 ] zp ZP_BYTE:26 [ plexShowSprite::$4 ] zp ZP_BYTE:27 [ plexShowSprite::$6 ] zp ZP_BYTE:28 [ plexShowSprite::$7 ] zp ZP_BYTE:21 [ plexShowSprite::plexFreeAdd1_ypos#0 ] zp ZP_BYTE:24 [ plexShowSprite::xpos_idx#0 ] zp ZP_BYTE:20 [ plexShowSprite::plex_sprite_idx2#0 ]
|
||||
Limited combination testing to 10 combinations of 98304 possible.
|
||||
Uplifting [main] best 80696 combination
|
||||
Uplifting [] best 81130 combination zp ZP_BYTE:8 [ plex_sprite_msb#44 plex_sprite_msb#16 plex_sprite_msb#25 ] zp ZP_BYTE:5 [ plex_free_next#17 plex_free_next#13 ] zp ZP_BYTE:7 [ plex_show_idx#44 plex_show_idx#15 ] zp ZP_BYTE:6 [ plex_sprite_idx#44 plex_sprite_idx#15 ]
|
||||
Limited combination testing to 10 combinations of 81 possible.
|
||||
Uplifting [plexInit] best 81010 combination reg byte x [ plexInit::i#2 plexInit::i#1 ]
|
||||
Uplifting [plexShowSprite] best 81000 combination reg byte a [ plexShowSprite::plexFreeAdd1_$0#0 ] reg byte a [ plexShowSprite::plexFreeAdd1_$1#0 ] zp ZP_BYTE:25 [ plexShowSprite::$3 ] zp ZP_BYTE:26 [ plexShowSprite::$4 ] zp ZP_BYTE:27 [ plexShowSprite::$6 ] zp ZP_BYTE:28 [ plexShowSprite::$7 ] zp ZP_BYTE:21 [ plexShowSprite::plexFreeAdd1_ypos#0 ] zp ZP_BYTE:24 [ plexShowSprite::xpos_idx#0 ] zp ZP_BYTE:20 [ plexShowSprite::plex_sprite_idx2#0 ]
|
||||
Limited combination testing to 10 combinations of 147456 possible.
|
||||
Uplifting [main] best 81000 combination
|
||||
Attempting to uplift remaining variables inzp ZP_BYTE:19 [ loop::plexFreeNextYpos1_return#0 ]
|
||||
Uplifting [loop] best 80696 combination zp ZP_BYTE:19 [ loop::plexFreeNextYpos1_return#0 ]
|
||||
Uplifting [loop] best 81000 combination zp ZP_BYTE:19 [ loop::plexFreeNextYpos1_return#0 ]
|
||||
Attempting to uplift remaining variables inzp ZP_BYTE:3 [ loop::y_idx#2 loop::y_idx#3 loop::y_idx#1 ]
|
||||
Uplifting [loop] best 80166 combination reg byte y [ loop::y_idx#2 loop::y_idx#3 loop::y_idx#1 ]
|
||||
Uplifting [loop] best 80470 combination reg byte y [ loop::y_idx#2 loop::y_idx#3 loop::y_idx#1 ]
|
||||
Attempting to uplift remaining variables inzp ZP_BYTE:18 [ loop::$4 ]
|
||||
Uplifting [loop] best 79566 combination reg byte a [ loop::$4 ]
|
||||
Uplifting [loop] best 79870 combination reg byte a [ loop::$4 ]
|
||||
Attempting to uplift remaining variables inzp ZP_BYTE:31 [ plexSort::s#2 ]
|
||||
Uplifting [plexSort] best 78966 combination reg byte x [ plexSort::s#2 ]
|
||||
Uplifting [plexSort] best 79270 combination reg byte x [ plexSort::s#2 ]
|
||||
Attempting to uplift remaining variables inzp ZP_BYTE:10 [ plexSort::m#2 plexSort::m#1 ]
|
||||
Uplifting [plexSort] best 78966 combination zp ZP_BYTE:10 [ plexSort::m#2 plexSort::m#1 ]
|
||||
Uplifting [plexSort] best 79270 combination zp ZP_BYTE:10 [ plexSort::m#2 plexSort::m#1 ]
|
||||
Attempting to uplift remaining variables inzp ZP_BYTE:9 [ loop::ss#6 loop::ss#1 ]
|
||||
Uplifting [loop] best 78966 combination zp ZP_BYTE:9 [ loop::ss#6 loop::ss#1 ]
|
||||
Uplifting [loop] best 79270 combination zp ZP_BYTE:9 [ loop::ss#6 loop::ss#1 ]
|
||||
Attempting to uplift remaining variables inzp ZP_BYTE:30 [ plexSort::nxt_y#0 ]
|
||||
Uplifting [plexSort] best 78966 combination zp ZP_BYTE:30 [ plexSort::nxt_y#0 ]
|
||||
Uplifting [plexSort] best 79270 combination zp ZP_BYTE:30 [ plexSort::nxt_y#0 ]
|
||||
Attempting to uplift remaining variables inzp ZP_BYTE:29 [ plexSort::nxt_idx#0 ]
|
||||
Uplifting [plexSort] best 78966 combination zp ZP_BYTE:29 [ plexSort::nxt_idx#0 ]
|
||||
Uplifting [plexSort] best 79270 combination zp ZP_BYTE:29 [ plexSort::nxt_idx#0 ]
|
||||
Attempting to uplift remaining variables inzp ZP_BYTE:8 [ plex_sprite_msb#44 plex_sprite_msb#16 plex_sprite_msb#25 ]
|
||||
Uplifting [] best 78966 combination zp ZP_BYTE:8 [ plex_sprite_msb#44 plex_sprite_msb#16 plex_sprite_msb#25 ]
|
||||
Uplifting [] best 79270 combination zp ZP_BYTE:8 [ plex_sprite_msb#44 plex_sprite_msb#16 plex_sprite_msb#25 ]
|
||||
Attempting to uplift remaining variables inzp ZP_BYTE:5 [ plex_free_next#17 plex_free_next#13 ]
|
||||
Uplifting [] best 78966 combination zp ZP_BYTE:5 [ plex_free_next#17 plex_free_next#13 ]
|
||||
Uplifting [] best 79270 combination zp ZP_BYTE:5 [ plex_free_next#17 plex_free_next#13 ]
|
||||
Attempting to uplift remaining variables inzp ZP_BYTE:32 [ init::$6 ]
|
||||
Uplifting [init] best 78926 combination reg byte a [ init::$6 ]
|
||||
Uplifting [init] best 79230 combination reg byte a [ init::$6 ]
|
||||
Attempting to uplift remaining variables inzp ZP_BYTE:7 [ plex_show_idx#44 plex_show_idx#15 ]
|
||||
Uplifting [] best 78926 combination zp ZP_BYTE:7 [ plex_show_idx#44 plex_show_idx#15 ]
|
||||
Uplifting [] best 79230 combination zp ZP_BYTE:7 [ plex_show_idx#44 plex_show_idx#15 ]
|
||||
Attempting to uplift remaining variables inzp ZP_BYTE:6 [ plex_sprite_idx#44 plex_sprite_idx#15 ]
|
||||
Uplifting [] best 79230 combination zp ZP_BYTE:6 [ plex_sprite_idx#44 plex_sprite_idx#15 ]
|
||||
Attempting to uplift remaining variables inzp ZP_BYTE:2 [ loop::sin_idx#6 loop::sin_idx#1 ]
|
||||
Uplifting [loop] best 78926 combination zp ZP_BYTE:2 [ loop::sin_idx#6 loop::sin_idx#1 ]
|
||||
Uplifting [loop] best 79230 combination zp ZP_BYTE:2 [ loop::sin_idx#6 loop::sin_idx#1 ]
|
||||
Attempting to uplift remaining variables inzp ZP_BYTE:25 [ plexShowSprite::$3 ]
|
||||
Uplifting [plexShowSprite] best 78920 combination reg byte a [ plexShowSprite::$3 ]
|
||||
Uplifting [plexShowSprite] best 79224 combination reg byte a [ plexShowSprite::$3 ]
|
||||
Attempting to uplift remaining variables inzp ZP_BYTE:26 [ plexShowSprite::$4 ]
|
||||
Uplifting [plexShowSprite] best 78914 combination reg byte a [ plexShowSprite::$4 ]
|
||||
Uplifting [plexShowSprite] best 79218 combination reg byte a [ plexShowSprite::$4 ]
|
||||
Attempting to uplift remaining variables inzp ZP_BYTE:27 [ plexShowSprite::$6 ]
|
||||
Uplifting [plexShowSprite] best 78908 combination reg byte a [ plexShowSprite::$6 ]
|
||||
Uplifting [plexShowSprite] best 79212 combination reg byte a [ plexShowSprite::$6 ]
|
||||
Attempting to uplift remaining variables inzp ZP_BYTE:28 [ plexShowSprite::$7 ]
|
||||
Uplifting [plexShowSprite] best 78904 combination reg byte x [ plexShowSprite::$7 ]
|
||||
Uplifting [plexShowSprite] best 79208 combination reg byte a [ plexShowSprite::$7 ]
|
||||
Attempting to uplift remaining variables inzp ZP_BYTE:21 [ plexShowSprite::plexFreeAdd1_ypos#0 ]
|
||||
Uplifting [plexShowSprite] best 78895 combination reg byte a [ plexShowSprite::plexFreeAdd1_ypos#0 ]
|
||||
Uplifting [plexShowSprite] best 79199 combination reg byte a [ plexShowSprite::plexFreeAdd1_ypos#0 ]
|
||||
Attempting to uplift remaining variables inzp ZP_BYTE:24 [ plexShowSprite::xpos_idx#0 ]
|
||||
Uplifting [plexShowSprite] best 78895 combination zp ZP_BYTE:24 [ plexShowSprite::xpos_idx#0 ]
|
||||
Uplifting [plexShowSprite] best 79192 combination reg byte x [ plexShowSprite::xpos_idx#0 ]
|
||||
Attempting to uplift remaining variables inzp ZP_BYTE:20 [ plexShowSprite::plex_sprite_idx2#0 ]
|
||||
Uplifting [plexShowSprite] best 78895 combination zp ZP_BYTE:20 [ plexShowSprite::plex_sprite_idx2#0 ]
|
||||
Uplifting [plexShowSprite] best 79192 combination zp ZP_BYTE:20 [ plexShowSprite::plex_sprite_idx2#0 ]
|
||||
Coalescing zero page register [ zp ZP_BYTE:5 [ plex_free_next#17 plex_free_next#13 ] ] with [ zp ZP_BYTE:10 [ plexSort::m#2 plexSort::m#1 ] ]
|
||||
Coalescing zero page register [ zp ZP_BYTE:7 [ plex_show_idx#44 plex_show_idx#15 ] ] with [ zp ZP_BYTE:29 [ plexSort::nxt_idx#0 ] ]
|
||||
Coalescing zero page register [ zp ZP_BYTE:8 [ plex_sprite_msb#44 plex_sprite_msb#16 plex_sprite_msb#25 ] ] with [ zp ZP_BYTE:30 [ plexSort::nxt_y#0 ] ]
|
||||
Coalescing zero page register [ zp ZP_BYTE:6 [ plex_sprite_idx#44 plex_sprite_idx#15 ] ] with [ zp ZP_BYTE:29 [ plexSort::nxt_idx#0 ] ]
|
||||
Coalescing zero page register [ zp ZP_BYTE:7 [ plex_show_idx#44 plex_show_idx#15 ] ] with [ zp ZP_BYTE:30 [ plexSort::nxt_y#0 ] ]
|
||||
Coalescing zero page register [ zp ZP_BYTE:19 [ loop::plexFreeNextYpos1_return#0 ] ] with [ zp ZP_BYTE:20 [ plexShowSprite::plex_sprite_idx2#0 ] ]
|
||||
Allocated (was zp ZP_BYTE:5) zp ZP_BYTE:3 [ plex_free_next#17 plex_free_next#13 plexSort::m#2 plexSort::m#1 ]
|
||||
Allocated (was zp ZP_BYTE:7) zp ZP_BYTE:4 [ plex_show_idx#44 plex_show_idx#15 plexSort::nxt_idx#0 ]
|
||||
Allocated (was zp ZP_BYTE:8) zp ZP_BYTE:5 [ plex_sprite_msb#44 plex_sprite_msb#16 plex_sprite_msb#25 plexSort::nxt_y#0 ]
|
||||
Allocated (was zp ZP_BYTE:9) zp ZP_BYTE:6 [ loop::ss#6 loop::ss#1 ]
|
||||
Allocated (was zp ZP_WORD:14) zp ZP_WORD:7 [ init::xp#2 init::xp#1 ]
|
||||
Allocated (was zp ZP_BYTE:19) zp ZP_BYTE:9 [ loop::plexFreeNextYpos1_return#0 plexShowSprite::plex_sprite_idx2#0 ]
|
||||
Allocated (was zp ZP_BYTE:24) zp ZP_BYTE:10 [ plexShowSprite::xpos_idx#0 ]
|
||||
Allocated (was zp ZP_BYTE:6) zp ZP_BYTE:4 [ plex_sprite_idx#44 plex_sprite_idx#15 plexSort::nxt_idx#0 ]
|
||||
Allocated (was zp ZP_BYTE:7) zp ZP_BYTE:5 [ plex_show_idx#44 plex_show_idx#15 plexSort::nxt_y#0 ]
|
||||
Allocated (was zp ZP_BYTE:8) zp ZP_BYTE:6 [ plex_sprite_msb#44 plex_sprite_msb#16 plex_sprite_msb#25 ]
|
||||
Allocated (was zp ZP_BYTE:9) zp ZP_BYTE:7 [ loop::ss#6 loop::ss#1 ]
|
||||
Allocated (was zp ZP_WORD:14) zp ZP_WORD:8 [ init::xp#2 init::xp#1 ]
|
||||
Allocated (was zp ZP_BYTE:19) zp ZP_BYTE:10 [ loop::plexFreeNextYpos1_return#0 plexShowSprite::plex_sprite_idx2#0 ]
|
||||
|
||||
ASSEMBLER BEFORE OPTIMIZATION
|
||||
//SEG0 File Comments
|
||||
@ -3326,8 +3317,9 @@ ASSEMBLER BEFORE OPTIMIZATION
|
||||
.label YSIN = $2100
|
||||
.label PLEX_SCREEN_PTR = SCREEN+$3f8
|
||||
.label plex_free_next = 3
|
||||
.label plex_show_idx = 4
|
||||
.label plex_sprite_msb = 5
|
||||
.label plex_sprite_idx = 4
|
||||
.label plex_show_idx = 5
|
||||
.label plex_sprite_msb = 6
|
||||
//SEG3 @begin
|
||||
bbegin:
|
||||
jmp b12
|
||||
@ -3372,8 +3364,8 @@ main: {
|
||||
// The raster loop
|
||||
loop: {
|
||||
.label sin_idx = 2
|
||||
.label plexFreeNextYpos1_return = 9
|
||||
.label ss = 6
|
||||
.label plexFreeNextYpos1_return = $a
|
||||
.label ss = 7
|
||||
//SEG22 [12] phi from loop to loop::@1 [phi:loop->loop::@1]
|
||||
b1_from_loop:
|
||||
//SEG23 [12] phi (byte) loop::sin_idx#6 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:loop->loop::@1#0] -- vbuz1=vbuc1
|
||||
@ -3459,8 +3451,9 @@ loop: {
|
||||
//SEG54 [27] phi (byte) plex_show_idx#44 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:loop::@8->loop::@11#2] -- vbuz1=vbuc1
|
||||
lda #0
|
||||
sta plex_show_idx
|
||||
//SEG55 [27] phi (byte) plex_sprite_idx#44 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:loop::@8->loop::@11#3] -- vbuxx=vbuc1
|
||||
ldx #0
|
||||
//SEG55 [27] phi (byte) plex_sprite_idx#44 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:loop::@8->loop::@11#3] -- vbuz1=vbuc1
|
||||
lda #0
|
||||
sta plex_sprite_idx
|
||||
//SEG56 [27] phi (byte) plex_free_next#17 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:loop::@8->loop::@11#4] -- vbuz1=vbuc1
|
||||
lda #0
|
||||
sta plex_free_next
|
||||
@ -3524,16 +3517,14 @@ loop: {
|
||||
// Show the next sprite.
|
||||
// plexSort() prepares showing the sprites
|
||||
plexShowSprite: {
|
||||
.label plex_sprite_idx2 = 9
|
||||
.label xpos_idx = $a
|
||||
//SEG80 [36] (byte) plexShowSprite::plex_sprite_idx2#0 ← (byte) plex_sprite_idx#44 << (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuz1=vbuxx_rol_1
|
||||
txa
|
||||
.label plex_sprite_idx2 = $a
|
||||
//SEG80 [36] (byte) plexShowSprite::plex_sprite_idx2#0 ← (byte) plex_sprite_idx#44 << (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuz1=vbuz2_rol_1
|
||||
lda plex_sprite_idx
|
||||
asl
|
||||
sta plex_sprite_idx2
|
||||
//SEG81 [37] (byte) plexShowSprite::plexFreeAdd1_ypos#0 ← *((const byte[PLEX_COUNT#0]) PLEX_YPOS#0 + *((const byte[PLEX_COUNT#0]) PLEX_SORTED_IDX#0 + (byte) plex_show_idx#44)) -- vbuaa=pbuc1_derefidx_pbuc2_derefidx_vbuz1
|
||||
ldy plex_show_idx
|
||||
lda PLEX_SORTED_IDX,y
|
||||
tay
|
||||
ldx plex_show_idx
|
||||
ldy PLEX_SORTED_IDX,x
|
||||
lda PLEX_YPOS,y
|
||||
//SEG82 [38] *((const byte*) SPRITES_YPOS#0 + (byte) plexShowSprite::plex_sprite_idx2#0) ← (byte) plexShowSprite::plexFreeAdd1_ypos#0 -- pbuc1_derefidx_vbuz1=vbuaa
|
||||
ldy plex_sprite_idx2
|
||||
@ -3557,26 +3548,24 @@ plexShowSprite: {
|
||||
jmp b7
|
||||
//SEG88 plexShowSprite::@7
|
||||
b7:
|
||||
//SEG89 [43] *((const byte*) PLEX_SCREEN_PTR#1 + (byte) plex_sprite_idx#44) ← *((const byte[PLEX_COUNT#0]) PLEX_PTR#0 + *((const byte[PLEX_COUNT#0]) PLEX_SORTED_IDX#0 + (byte) plex_show_idx#44)) -- pbuc1_derefidx_vbuxx=pbuc2_derefidx_pbuc3_derefidx_vbuz1
|
||||
ldy plex_show_idx
|
||||
lda PLEX_SORTED_IDX,y
|
||||
tay
|
||||
//SEG89 [43] *((const byte*) PLEX_SCREEN_PTR#1 + (byte) plex_sprite_idx#44) ← *((const byte[PLEX_COUNT#0]) PLEX_PTR#0 + *((const byte[PLEX_COUNT#0]) PLEX_SORTED_IDX#0 + (byte) plex_show_idx#44)) -- pbuc1_derefidx_vbuz1=pbuc2_derefidx_pbuc3_derefidx_vbuz2
|
||||
ldx plex_show_idx
|
||||
ldy PLEX_SORTED_IDX,x
|
||||
lda PLEX_PTR,y
|
||||
ldx plex_sprite_idx
|
||||
sta PLEX_SCREEN_PTR,x
|
||||
//SEG90 [44] (byte) plexShowSprite::xpos_idx#0 ← *((const byte[PLEX_COUNT#0]) PLEX_SORTED_IDX#0 + (byte) plex_show_idx#44) << (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuz1=pbuc1_derefidx_vbuz2_rol_1
|
||||
ldy plex_show_idx
|
||||
lda PLEX_SORTED_IDX,y
|
||||
//SEG90 [44] (byte) plexShowSprite::xpos_idx#0 ← *((const byte[PLEX_COUNT#0]) PLEX_SORTED_IDX#0 + (byte) plex_show_idx#44) << (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuxx=pbuc1_derefidx_vbuz1_rol_1
|
||||
ldx plex_show_idx
|
||||
lda PLEX_SORTED_IDX,x
|
||||
asl
|
||||
sta xpos_idx
|
||||
//SEG91 [45] (byte~) plexShowSprite::$3 ← < *((const word[PLEX_COUNT#0]) PLEX_XPOS#0 + (byte) plexShowSprite::xpos_idx#0) -- vbuaa=_lo_pwuc1_derefidx_vbuz1
|
||||
ldy xpos_idx
|
||||
lda PLEX_XPOS,y
|
||||
tax
|
||||
//SEG91 [45] (byte~) plexShowSprite::$3 ← < *((const word[PLEX_COUNT#0]) PLEX_XPOS#0 + (byte) plexShowSprite::xpos_idx#0) -- vbuaa=_lo_pwuc1_derefidx_vbuxx
|
||||
lda PLEX_XPOS,x
|
||||
//SEG92 [46] *((const byte*) SPRITES_XPOS#0 + (byte) plexShowSprite::plex_sprite_idx2#0) ← (byte~) plexShowSprite::$3 -- pbuc1_derefidx_vbuz1=vbuaa
|
||||
ldy plex_sprite_idx2
|
||||
sta SPRITES_XPOS,y
|
||||
//SEG93 [47] (byte~) plexShowSprite::$4 ← > *((const word[PLEX_COUNT#0]) PLEX_XPOS#0 + (byte) plexShowSprite::xpos_idx#0) -- vbuaa=_hi_pwuc1_derefidx_vbuz1
|
||||
ldy xpos_idx
|
||||
lda PLEX_XPOS+1,y
|
||||
//SEG93 [47] (byte~) plexShowSprite::$4 ← > *((const word[PLEX_COUNT#0]) PLEX_XPOS#0 + (byte) plexShowSprite::xpos_idx#0) -- vbuaa=_hi_pwuc1_derefidx_vbuxx
|
||||
lda PLEX_XPOS+1,x
|
||||
//SEG94 [48] if((byte~) plexShowSprite::$4!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto plexShowSprite::@1 -- vbuaa_neq_0_then_la1
|
||||
cmp #0
|
||||
bne b1
|
||||
@ -3592,12 +3581,13 @@ plexShowSprite: {
|
||||
jmp b2
|
||||
//SEG98 plexShowSprite::@2
|
||||
b2:
|
||||
//SEG99 [51] (byte/signed word/word/dword/signed dword~) plexShowSprite::$7 ← (byte) plex_sprite_idx#44 + (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuxx=vbuxx_plus_1
|
||||
inx
|
||||
//SEG100 [52] (byte) plex_sprite_idx#15 ← (byte/signed word/word/dword/signed dword~) plexShowSprite::$7 & (byte/signed byte/word/signed word/dword/signed dword) 7 -- vbuxx=vbuxx_band_vbuc1
|
||||
txa
|
||||
//SEG99 [51] (byte/signed word/word/dword/signed dword~) plexShowSprite::$7 ← (byte) plex_sprite_idx#44 + (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuaa=vbuz1_plus_1
|
||||
lda plex_sprite_idx
|
||||
clc
|
||||
adc #1
|
||||
//SEG100 [52] (byte) plex_sprite_idx#15 ← (byte/signed word/word/dword/signed dword~) plexShowSprite::$7 & (byte/signed byte/word/signed word/dword/signed dword) 7 -- vbuz1=vbuaa_band_vbuc1
|
||||
and #7
|
||||
tax
|
||||
sta plex_sprite_idx
|
||||
//SEG101 [53] (byte) plex_show_idx#15 ← ++ (byte) plex_show_idx#44 -- vbuz1=_inc_vbuz1
|
||||
inc plex_show_idx
|
||||
//SEG102 [54] (byte) plex_sprite_msb#25 ← (byte) plex_sprite_msb#44 << (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuz1=vbuz1_rol_1
|
||||
@ -3751,7 +3741,7 @@ plexSort: {
|
||||
//SEG151 init
|
||||
// Initialize the program
|
||||
init: {
|
||||
.label xp = 7
|
||||
.label xp = 8
|
||||
//SEG152 [81] *((const byte*) D011#0) ← (const byte) VIC_DEN#0|(const byte) VIC_RSEL#0|(byte/signed byte/word/signed word/dword/signed dword) 3 -- _deref_pbuc1=vbuc2
|
||||
lda #VIC_DEN|VIC_RSEL|3
|
||||
sta D011
|
||||
@ -3931,10 +3921,9 @@ Removing instruction jmp plexSetScreen1
|
||||
Removing instruction jmp b1
|
||||
Removing instruction jmp breturn
|
||||
Succesful ASM optimization Pass5NextJumpElimination
|
||||
Replacing instruction ldx #0 with TAX
|
||||
Removing instruction lda #0
|
||||
Removing instruction lda #0
|
||||
Replacing instruction lda plex_free_next with TYA
|
||||
Replacing instruction ldy xpos_idx with TAY
|
||||
Replacing instruction ldy nxt_idx with TAY
|
||||
Removing instruction lda nxt_y
|
||||
Replacing instruction ldx #0 with TAX
|
||||
@ -4016,6 +4005,7 @@ Removing instruction jmp b1
|
||||
Removing instruction jmp b2
|
||||
Removing instruction jmp b1
|
||||
Succesful ASM optimization Pass5NextJumpElimination
|
||||
Removing instruction ldx plex_show_idx
|
||||
Removing instruction ldx m
|
||||
Succesful ASM optimization Pass5UnnecesaryLoadElimination
|
||||
Removing instruction bbegin:
|
||||
@ -4154,8 +4144,8 @@ FINAL SYMBOL TABLE
|
||||
(byte) init::sx#1 reg byte x 16.5
|
||||
(byte) init::sx#2 reg byte x 8.8
|
||||
(word) init::xp
|
||||
(word) init::xp#1 xp zp ZP_WORD:7 7.333333333333333
|
||||
(word) init::xp#2 xp zp ZP_WORD:7 8.25
|
||||
(word) init::xp#1 xp zp ZP_WORD:8 7.333333333333333
|
||||
(word) init::xp#2 xp zp ZP_WORD:8 8.25
|
||||
(void()) loop()
|
||||
(byte~) loop::$4 reg byte a 202.0
|
||||
(label) loop::@1
|
||||
@ -4172,14 +4162,14 @@ FINAL SYMBOL TABLE
|
||||
(label) loop::@8
|
||||
(label) loop::plexFreeNextYpos1
|
||||
(byte) loop::plexFreeNextYpos1_return
|
||||
(byte) loop::plexFreeNextYpos1_return#0 plexFreeNextYpos1_return zp ZP_BYTE:9 551.0
|
||||
(byte) loop::plexFreeNextYpos1_return#0 plexFreeNextYpos1_return zp ZP_BYTE:10 551.0
|
||||
(byte) loop::rasterY
|
||||
(byte) loop::sin_idx
|
||||
(byte) loop::sin_idx#1 sin_idx zp ZP_BYTE:2 1.4666666666666666
|
||||
(byte) loop::sin_idx#6 sin_idx zp ZP_BYTE:2 3.666666666666667
|
||||
(byte) loop::ss
|
||||
(byte) loop::ss#1 ss zp ZP_BYTE:6 151.5
|
||||
(byte) loop::ss#6 ss zp ZP_BYTE:6 33.666666666666664
|
||||
(byte) loop::ss#1 ss zp ZP_BYTE:7 151.5
|
||||
(byte) loop::ss#6 ss zp ZP_BYTE:7 33.666666666666664
|
||||
(byte) loop::sy
|
||||
(byte) loop::sy#1 reg byte x 151.5
|
||||
(byte) loop::sy#2 reg byte x 101.0
|
||||
@ -4204,7 +4194,7 @@ FINAL SYMBOL TABLE
|
||||
(byte~) plexShowSprite::$3 reg byte a 4.0
|
||||
(byte~) plexShowSprite::$4 reg byte a 4.0
|
||||
(byte/word/dword~) plexShowSprite::$6 reg byte a 4.0
|
||||
(byte/signed word/word/dword/signed dword~) plexShowSprite::$7 reg byte x 4.0
|
||||
(byte/signed word/word/dword/signed dword~) plexShowSprite::$7 reg byte a 4.0
|
||||
(label) plexShowSprite::@1
|
||||
(label) plexShowSprite::@2
|
||||
(label) plexShowSprite::@4
|
||||
@ -4220,9 +4210,9 @@ FINAL SYMBOL TABLE
|
||||
(byte) plexShowSprite::plexFreeAdd1_ypos
|
||||
(byte) plexShowSprite::plexFreeAdd1_ypos#0 reg byte a 3.0
|
||||
(byte) plexShowSprite::plex_sprite_idx2
|
||||
(byte) plexShowSprite::plex_sprite_idx2#0 plex_sprite_idx2 zp ZP_BYTE:9 0.6000000000000001
|
||||
(byte) plexShowSprite::plex_sprite_idx2#0 plex_sprite_idx2 zp ZP_BYTE:10 0.6000000000000001
|
||||
(byte) plexShowSprite::xpos_idx
|
||||
(byte) plexShowSprite::xpos_idx#0 xpos_idx zp ZP_BYTE:10 2.0
|
||||
(byte) plexShowSprite::xpos_idx#0 reg byte x 2.0
|
||||
(byte) plexShowSprite::ypos
|
||||
(void()) plexSort()
|
||||
(label) plexSort::@1
|
||||
@ -4254,46 +4244,46 @@ FINAL SYMBOL TABLE
|
||||
(byte) plex_free_next#13 plex_free_next zp ZP_BYTE:3 4.904761904761904
|
||||
(byte) plex_free_next#17 plex_free_next zp ZP_BYTE:3 20.599999999999998
|
||||
(byte) plex_show_idx
|
||||
(byte) plex_show_idx#15 plex_show_idx zp ZP_BYTE:4 11.444444444444443
|
||||
(byte) plex_show_idx#44 plex_show_idx zp ZP_BYTE:4 4.73913043478261
|
||||
(byte) plex_show_idx#15 plex_show_idx zp ZP_BYTE:5 11.444444444444443
|
||||
(byte) plex_show_idx#44 plex_show_idx zp ZP_BYTE:5 4.73913043478261
|
||||
(byte) plex_sprite_idx
|
||||
(byte) plex_sprite_idx#15 reg byte x 10.299999999999999
|
||||
(byte) plex_sprite_idx#44 reg byte x 5.095238095238094
|
||||
(byte) plex_sprite_idx#15 plex_sprite_idx zp ZP_BYTE:4 10.299999999999999
|
||||
(byte) plex_sprite_idx#44 plex_sprite_idx zp ZP_BYTE:4 5.095238095238094
|
||||
(byte) plex_sprite_msb
|
||||
(byte) plex_sprite_msb#16 plex_sprite_msb zp ZP_BYTE:5 20.599999999999998
|
||||
(byte) plex_sprite_msb#25 plex_sprite_msb zp ZP_BYTE:5 2.0
|
||||
(byte) plex_sprite_msb#44 plex_sprite_msb zp ZP_BYTE:5 4.458333333333332
|
||||
(byte) plex_sprite_msb#16 plex_sprite_msb zp ZP_BYTE:6 20.599999999999998
|
||||
(byte) plex_sprite_msb#25 plex_sprite_msb zp ZP_BYTE:6 2.0
|
||||
(byte) plex_sprite_msb#44 plex_sprite_msb zp ZP_BYTE:6 4.458333333333332
|
||||
|
||||
zp ZP_BYTE:2 [ loop::sin_idx#6 loop::sin_idx#1 ]
|
||||
reg byte y [ loop::y_idx#2 loop::y_idx#3 loop::y_idx#1 ]
|
||||
reg byte x [ loop::sy#2 loop::sy#1 ]
|
||||
zp ZP_BYTE:3 [ plex_free_next#17 plex_free_next#13 plexSort::m#2 plexSort::m#1 ]
|
||||
reg byte x [ plex_sprite_idx#44 plex_sprite_idx#15 ]
|
||||
zp ZP_BYTE:4 [ plex_show_idx#44 plex_show_idx#15 plexSort::nxt_idx#0 ]
|
||||
zp ZP_BYTE:5 [ plex_sprite_msb#44 plex_sprite_msb#16 plex_sprite_msb#25 plexSort::nxt_y#0 ]
|
||||
zp ZP_BYTE:6 [ loop::ss#6 loop::ss#1 ]
|
||||
zp ZP_BYTE:4 [ plex_sprite_idx#44 plex_sprite_idx#15 plexSort::nxt_idx#0 ]
|
||||
zp ZP_BYTE:5 [ plex_show_idx#44 plex_show_idx#15 plexSort::nxt_y#0 ]
|
||||
zp ZP_BYTE:6 [ plex_sprite_msb#44 plex_sprite_msb#16 plex_sprite_msb#25 ]
|
||||
zp ZP_BYTE:7 [ loop::ss#6 loop::ss#1 ]
|
||||
reg byte x [ plexSort::s#3 plexSort::s#1 plexSort::s#6 ]
|
||||
reg byte x [ plexSort::plexFreePrepare1_s#2 plexSort::plexFreePrepare1_s#1 ]
|
||||
reg byte x [ init::sx#2 init::sx#1 ]
|
||||
zp ZP_WORD:7 [ init::xp#2 init::xp#1 ]
|
||||
zp ZP_WORD:8 [ init::xp#2 init::xp#1 ]
|
||||
reg byte x [ init::ss#2 init::ss#1 ]
|
||||
reg byte x [ plexInit::i#2 plexInit::i#1 ]
|
||||
reg byte a [ loop::$4 ]
|
||||
zp ZP_BYTE:9 [ loop::plexFreeNextYpos1_return#0 plexShowSprite::plex_sprite_idx2#0 ]
|
||||
zp ZP_BYTE:10 [ loop::plexFreeNextYpos1_return#0 plexShowSprite::plex_sprite_idx2#0 ]
|
||||
reg byte a [ plexShowSprite::plexFreeAdd1_ypos#0 ]
|
||||
reg byte a [ plexShowSprite::plexFreeAdd1_$0#0 ]
|
||||
reg byte a [ plexShowSprite::plexFreeAdd1_$1#0 ]
|
||||
zp ZP_BYTE:10 [ plexShowSprite::xpos_idx#0 ]
|
||||
reg byte x [ plexShowSprite::xpos_idx#0 ]
|
||||
reg byte a [ plexShowSprite::$3 ]
|
||||
reg byte a [ plexShowSprite::$4 ]
|
||||
reg byte a [ plexShowSprite::$6 ]
|
||||
reg byte x [ plexShowSprite::$7 ]
|
||||
reg byte a [ plexShowSprite::$7 ]
|
||||
reg byte x [ plexSort::s#2 ]
|
||||
reg byte a [ init::$6 ]
|
||||
|
||||
|
||||
FINAL ASSEMBLER
|
||||
Score: 63455
|
||||
Score: 63550
|
||||
|
||||
//SEG0 File Comments
|
||||
// A simple usage of the flexible sprite multiplexer routine
|
||||
@ -4324,8 +4314,9 @@ Score: 63455
|
||||
.label YSIN = $2100
|
||||
.label PLEX_SCREEN_PTR = SCREEN+$3f8
|
||||
.label plex_free_next = 3
|
||||
.label plex_show_idx = 4
|
||||
.label plex_sprite_msb = 5
|
||||
.label plex_sprite_idx = 4
|
||||
.label plex_show_idx = 5
|
||||
.label plex_sprite_msb = 6
|
||||
//SEG3 @begin
|
||||
//SEG4 @12
|
||||
//SEG5 kickasm(location (const byte*) YSIN#0) {{ .var min = 50 .var max = 250-21 .var ampl = max-min; .for(var i=0;i<256;i++) .byte round(min+(ampl/2)+(ampl/2)*sin(toRadians(360*i/256))) }}
|
||||
@ -4354,8 +4345,8 @@ main: {
|
||||
// The raster loop
|
||||
loop: {
|
||||
.label sin_idx = 2
|
||||
.label plexFreeNextYpos1_return = 9
|
||||
.label ss = 6
|
||||
.label plexFreeNextYpos1_return = $a
|
||||
.label ss = 7
|
||||
//SEG22 [12] phi from loop to loop::@1 [phi:loop->loop::@1]
|
||||
//SEG23 [12] phi (byte) loop::sin_idx#6 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:loop->loop::@1#0] -- vbuz1=vbuc1
|
||||
lda #0
|
||||
@ -4424,8 +4415,8 @@ loop: {
|
||||
//SEG54 [27] phi (byte) plex_show_idx#44 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:loop::@8->loop::@11#2] -- vbuz1=vbuc1
|
||||
lda #0
|
||||
sta plex_show_idx
|
||||
//SEG55 [27] phi (byte) plex_sprite_idx#44 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:loop::@8->loop::@11#3] -- vbuxx=vbuc1
|
||||
tax
|
||||
//SEG55 [27] phi (byte) plex_sprite_idx#44 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:loop::@8->loop::@11#3] -- vbuz1=vbuc1
|
||||
sta plex_sprite_idx
|
||||
//SEG56 [27] phi (byte) plex_free_next#17 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:loop::@8->loop::@11#4] -- vbuz1=vbuc1
|
||||
sta plex_free_next
|
||||
// Show the sprites
|
||||
@ -4475,16 +4466,14 @@ loop: {
|
||||
// Show the next sprite.
|
||||
// plexSort() prepares showing the sprites
|
||||
plexShowSprite: {
|
||||
.label plex_sprite_idx2 = 9
|
||||
.label xpos_idx = $a
|
||||
//SEG80 [36] (byte) plexShowSprite::plex_sprite_idx2#0 ← (byte) plex_sprite_idx#44 << (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuz1=vbuxx_rol_1
|
||||
txa
|
||||
.label plex_sprite_idx2 = $a
|
||||
//SEG80 [36] (byte) plexShowSprite::plex_sprite_idx2#0 ← (byte) plex_sprite_idx#44 << (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuz1=vbuz2_rol_1
|
||||
lda plex_sprite_idx
|
||||
asl
|
||||
sta plex_sprite_idx2
|
||||
//SEG81 [37] (byte) plexShowSprite::plexFreeAdd1_ypos#0 ← *((const byte[PLEX_COUNT#0]) PLEX_YPOS#0 + *((const byte[PLEX_COUNT#0]) PLEX_SORTED_IDX#0 + (byte) plex_show_idx#44)) -- vbuaa=pbuc1_derefidx_pbuc2_derefidx_vbuz1
|
||||
ldy plex_show_idx
|
||||
lda PLEX_SORTED_IDX,y
|
||||
tay
|
||||
ldx plex_show_idx
|
||||
ldy PLEX_SORTED_IDX,x
|
||||
lda PLEX_YPOS,y
|
||||
//SEG82 [38] *((const byte*) SPRITES_YPOS#0 + (byte) plexShowSprite::plex_sprite_idx2#0) ← (byte) plexShowSprite::plexFreeAdd1_ypos#0 -- pbuc1_derefidx_vbuz1=vbuaa
|
||||
ldy plex_sprite_idx2
|
||||
@ -4504,26 +4493,23 @@ plexShowSprite: {
|
||||
and #7
|
||||
sta plex_free_next
|
||||
//SEG88 plexShowSprite::@7
|
||||
//SEG89 [43] *((const byte*) PLEX_SCREEN_PTR#1 + (byte) plex_sprite_idx#44) ← *((const byte[PLEX_COUNT#0]) PLEX_PTR#0 + *((const byte[PLEX_COUNT#0]) PLEX_SORTED_IDX#0 + (byte) plex_show_idx#44)) -- pbuc1_derefidx_vbuxx=pbuc2_derefidx_pbuc3_derefidx_vbuz1
|
||||
ldy plex_show_idx
|
||||
lda PLEX_SORTED_IDX,y
|
||||
tay
|
||||
//SEG89 [43] *((const byte*) PLEX_SCREEN_PTR#1 + (byte) plex_sprite_idx#44) ← *((const byte[PLEX_COUNT#0]) PLEX_PTR#0 + *((const byte[PLEX_COUNT#0]) PLEX_SORTED_IDX#0 + (byte) plex_show_idx#44)) -- pbuc1_derefidx_vbuz1=pbuc2_derefidx_pbuc3_derefidx_vbuz2
|
||||
ldy PLEX_SORTED_IDX,x
|
||||
lda PLEX_PTR,y
|
||||
ldx plex_sprite_idx
|
||||
sta PLEX_SCREEN_PTR,x
|
||||
//SEG90 [44] (byte) plexShowSprite::xpos_idx#0 ← *((const byte[PLEX_COUNT#0]) PLEX_SORTED_IDX#0 + (byte) plex_show_idx#44) << (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuz1=pbuc1_derefidx_vbuz2_rol_1
|
||||
ldy plex_show_idx
|
||||
lda PLEX_SORTED_IDX,y
|
||||
//SEG90 [44] (byte) plexShowSprite::xpos_idx#0 ← *((const byte[PLEX_COUNT#0]) PLEX_SORTED_IDX#0 + (byte) plex_show_idx#44) << (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuxx=pbuc1_derefidx_vbuz1_rol_1
|
||||
ldx plex_show_idx
|
||||
lda PLEX_SORTED_IDX,x
|
||||
asl
|
||||
sta xpos_idx
|
||||
//SEG91 [45] (byte~) plexShowSprite::$3 ← < *((const word[PLEX_COUNT#0]) PLEX_XPOS#0 + (byte) plexShowSprite::xpos_idx#0) -- vbuaa=_lo_pwuc1_derefidx_vbuz1
|
||||
tay
|
||||
lda PLEX_XPOS,y
|
||||
tax
|
||||
//SEG91 [45] (byte~) plexShowSprite::$3 ← < *((const word[PLEX_COUNT#0]) PLEX_XPOS#0 + (byte) plexShowSprite::xpos_idx#0) -- vbuaa=_lo_pwuc1_derefidx_vbuxx
|
||||
lda PLEX_XPOS,x
|
||||
//SEG92 [46] *((const byte*) SPRITES_XPOS#0 + (byte) plexShowSprite::plex_sprite_idx2#0) ← (byte~) plexShowSprite::$3 -- pbuc1_derefidx_vbuz1=vbuaa
|
||||
ldy plex_sprite_idx2
|
||||
sta SPRITES_XPOS,y
|
||||
//SEG93 [47] (byte~) plexShowSprite::$4 ← > *((const word[PLEX_COUNT#0]) PLEX_XPOS#0 + (byte) plexShowSprite::xpos_idx#0) -- vbuaa=_hi_pwuc1_derefidx_vbuz1
|
||||
ldy xpos_idx
|
||||
lda PLEX_XPOS+1,y
|
||||
//SEG93 [47] (byte~) plexShowSprite::$4 ← > *((const word[PLEX_COUNT#0]) PLEX_XPOS#0 + (byte) plexShowSprite::xpos_idx#0) -- vbuaa=_hi_pwuc1_derefidx_vbuxx
|
||||
lda PLEX_XPOS+1,x
|
||||
//SEG94 [48] if((byte~) plexShowSprite::$4!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto plexShowSprite::@1 -- vbuaa_neq_0_then_la1
|
||||
cmp #0
|
||||
bne b1
|
||||
@ -4536,12 +4522,13 @@ plexShowSprite: {
|
||||
sta SPRITES_XMSB
|
||||
//SEG98 plexShowSprite::@2
|
||||
b2:
|
||||
//SEG99 [51] (byte/signed word/word/dword/signed dword~) plexShowSprite::$7 ← (byte) plex_sprite_idx#44 + (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuxx=vbuxx_plus_1
|
||||
inx
|
||||
//SEG100 [52] (byte) plex_sprite_idx#15 ← (byte/signed word/word/dword/signed dword~) plexShowSprite::$7 & (byte/signed byte/word/signed word/dword/signed dword) 7 -- vbuxx=vbuxx_band_vbuc1
|
||||
txa
|
||||
//SEG99 [51] (byte/signed word/word/dword/signed dword~) plexShowSprite::$7 ← (byte) plex_sprite_idx#44 + (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuaa=vbuz1_plus_1
|
||||
lda plex_sprite_idx
|
||||
clc
|
||||
adc #1
|
||||
//SEG100 [52] (byte) plex_sprite_idx#15 ← (byte/signed word/word/dword/signed dword~) plexShowSprite::$7 & (byte/signed byte/word/signed word/dword/signed dword) 7 -- vbuz1=vbuaa_band_vbuc1
|
||||
and #7
|
||||
tax
|
||||
sta plex_sprite_idx
|
||||
//SEG101 [53] (byte) plex_show_idx#15 ← ++ (byte) plex_show_idx#44 -- vbuz1=_inc_vbuz1
|
||||
inc plex_show_idx
|
||||
//SEG102 [54] (byte) plex_sprite_msb#25 ← (byte) plex_sprite_msb#44 << (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuz1=vbuz1_rol_1
|
||||
@ -4666,7 +4653,7 @@ plexSort: {
|
||||
//SEG151 init
|
||||
// Initialize the program
|
||||
init: {
|
||||
.label xp = 7
|
||||
.label xp = 8
|
||||
//SEG152 [81] *((const byte*) D011#0) ← (const byte) VIC_DEN#0|(const byte) VIC_RSEL#0|(byte/signed byte/word/signed word/dword/signed dword) 3 -- _deref_pbuc1=vbuc2
|
||||
lda #VIC_DEN|VIC_RSEL|3
|
||||
sta D011
|
||||
|
@ -127,8 +127,8 @@
|
||||
(byte) init::sx#1 reg byte x 16.5
|
||||
(byte) init::sx#2 reg byte x 8.8
|
||||
(word) init::xp
|
||||
(word) init::xp#1 xp zp ZP_WORD:7 7.333333333333333
|
||||
(word) init::xp#2 xp zp ZP_WORD:7 8.25
|
||||
(word) init::xp#1 xp zp ZP_WORD:8 7.333333333333333
|
||||
(word) init::xp#2 xp zp ZP_WORD:8 8.25
|
||||
(void()) loop()
|
||||
(byte~) loop::$4 reg byte a 202.0
|
||||
(label) loop::@1
|
||||
@ -145,14 +145,14 @@
|
||||
(label) loop::@8
|
||||
(label) loop::plexFreeNextYpos1
|
||||
(byte) loop::plexFreeNextYpos1_return
|
||||
(byte) loop::plexFreeNextYpos1_return#0 plexFreeNextYpos1_return zp ZP_BYTE:9 551.0
|
||||
(byte) loop::plexFreeNextYpos1_return#0 plexFreeNextYpos1_return zp ZP_BYTE:10 551.0
|
||||
(byte) loop::rasterY
|
||||
(byte) loop::sin_idx
|
||||
(byte) loop::sin_idx#1 sin_idx zp ZP_BYTE:2 1.4666666666666666
|
||||
(byte) loop::sin_idx#6 sin_idx zp ZP_BYTE:2 3.666666666666667
|
||||
(byte) loop::ss
|
||||
(byte) loop::ss#1 ss zp ZP_BYTE:6 151.5
|
||||
(byte) loop::ss#6 ss zp ZP_BYTE:6 33.666666666666664
|
||||
(byte) loop::ss#1 ss zp ZP_BYTE:7 151.5
|
||||
(byte) loop::ss#6 ss zp ZP_BYTE:7 33.666666666666664
|
||||
(byte) loop::sy
|
||||
(byte) loop::sy#1 reg byte x 151.5
|
||||
(byte) loop::sy#2 reg byte x 101.0
|
||||
@ -177,7 +177,7 @@
|
||||
(byte~) plexShowSprite::$3 reg byte a 4.0
|
||||
(byte~) plexShowSprite::$4 reg byte a 4.0
|
||||
(byte/word/dword~) plexShowSprite::$6 reg byte a 4.0
|
||||
(byte/signed word/word/dword/signed dword~) plexShowSprite::$7 reg byte x 4.0
|
||||
(byte/signed word/word/dword/signed dword~) plexShowSprite::$7 reg byte a 4.0
|
||||
(label) plexShowSprite::@1
|
||||
(label) plexShowSprite::@2
|
||||
(label) plexShowSprite::@4
|
||||
@ -193,9 +193,9 @@
|
||||
(byte) plexShowSprite::plexFreeAdd1_ypos
|
||||
(byte) plexShowSprite::plexFreeAdd1_ypos#0 reg byte a 3.0
|
||||
(byte) plexShowSprite::plex_sprite_idx2
|
||||
(byte) plexShowSprite::plex_sprite_idx2#0 plex_sprite_idx2 zp ZP_BYTE:9 0.6000000000000001
|
||||
(byte) plexShowSprite::plex_sprite_idx2#0 plex_sprite_idx2 zp ZP_BYTE:10 0.6000000000000001
|
||||
(byte) plexShowSprite::xpos_idx
|
||||
(byte) plexShowSprite::xpos_idx#0 xpos_idx zp ZP_BYTE:10 2.0
|
||||
(byte) plexShowSprite::xpos_idx#0 reg byte x 2.0
|
||||
(byte) plexShowSprite::ypos
|
||||
(void()) plexSort()
|
||||
(label) plexSort::@1
|
||||
@ -227,39 +227,39 @@
|
||||
(byte) plex_free_next#13 plex_free_next zp ZP_BYTE:3 4.904761904761904
|
||||
(byte) plex_free_next#17 plex_free_next zp ZP_BYTE:3 20.599999999999998
|
||||
(byte) plex_show_idx
|
||||
(byte) plex_show_idx#15 plex_show_idx zp ZP_BYTE:4 11.444444444444443
|
||||
(byte) plex_show_idx#44 plex_show_idx zp ZP_BYTE:4 4.73913043478261
|
||||
(byte) plex_show_idx#15 plex_show_idx zp ZP_BYTE:5 11.444444444444443
|
||||
(byte) plex_show_idx#44 plex_show_idx zp ZP_BYTE:5 4.73913043478261
|
||||
(byte) plex_sprite_idx
|
||||
(byte) plex_sprite_idx#15 reg byte x 10.299999999999999
|
||||
(byte) plex_sprite_idx#44 reg byte x 5.095238095238094
|
||||
(byte) plex_sprite_idx#15 plex_sprite_idx zp ZP_BYTE:4 10.299999999999999
|
||||
(byte) plex_sprite_idx#44 plex_sprite_idx zp ZP_BYTE:4 5.095238095238094
|
||||
(byte) plex_sprite_msb
|
||||
(byte) plex_sprite_msb#16 plex_sprite_msb zp ZP_BYTE:5 20.599999999999998
|
||||
(byte) plex_sprite_msb#25 plex_sprite_msb zp ZP_BYTE:5 2.0
|
||||
(byte) plex_sprite_msb#44 plex_sprite_msb zp ZP_BYTE:5 4.458333333333332
|
||||
(byte) plex_sprite_msb#16 plex_sprite_msb zp ZP_BYTE:6 20.599999999999998
|
||||
(byte) plex_sprite_msb#25 plex_sprite_msb zp ZP_BYTE:6 2.0
|
||||
(byte) plex_sprite_msb#44 plex_sprite_msb zp ZP_BYTE:6 4.458333333333332
|
||||
|
||||
zp ZP_BYTE:2 [ loop::sin_idx#6 loop::sin_idx#1 ]
|
||||
reg byte y [ loop::y_idx#2 loop::y_idx#3 loop::y_idx#1 ]
|
||||
reg byte x [ loop::sy#2 loop::sy#1 ]
|
||||
zp ZP_BYTE:3 [ plex_free_next#17 plex_free_next#13 plexSort::m#2 plexSort::m#1 ]
|
||||
reg byte x [ plex_sprite_idx#44 plex_sprite_idx#15 ]
|
||||
zp ZP_BYTE:4 [ plex_show_idx#44 plex_show_idx#15 plexSort::nxt_idx#0 ]
|
||||
zp ZP_BYTE:5 [ plex_sprite_msb#44 plex_sprite_msb#16 plex_sprite_msb#25 plexSort::nxt_y#0 ]
|
||||
zp ZP_BYTE:6 [ loop::ss#6 loop::ss#1 ]
|
||||
zp ZP_BYTE:4 [ plex_sprite_idx#44 plex_sprite_idx#15 plexSort::nxt_idx#0 ]
|
||||
zp ZP_BYTE:5 [ plex_show_idx#44 plex_show_idx#15 plexSort::nxt_y#0 ]
|
||||
zp ZP_BYTE:6 [ plex_sprite_msb#44 plex_sprite_msb#16 plex_sprite_msb#25 ]
|
||||
zp ZP_BYTE:7 [ loop::ss#6 loop::ss#1 ]
|
||||
reg byte x [ plexSort::s#3 plexSort::s#1 plexSort::s#6 ]
|
||||
reg byte x [ plexSort::plexFreePrepare1_s#2 plexSort::plexFreePrepare1_s#1 ]
|
||||
reg byte x [ init::sx#2 init::sx#1 ]
|
||||
zp ZP_WORD:7 [ init::xp#2 init::xp#1 ]
|
||||
zp ZP_WORD:8 [ init::xp#2 init::xp#1 ]
|
||||
reg byte x [ init::ss#2 init::ss#1 ]
|
||||
reg byte x [ plexInit::i#2 plexInit::i#1 ]
|
||||
reg byte a [ loop::$4 ]
|
||||
zp ZP_BYTE:9 [ loop::plexFreeNextYpos1_return#0 plexShowSprite::plex_sprite_idx2#0 ]
|
||||
zp ZP_BYTE:10 [ loop::plexFreeNextYpos1_return#0 plexShowSprite::plex_sprite_idx2#0 ]
|
||||
reg byte a [ plexShowSprite::plexFreeAdd1_ypos#0 ]
|
||||
reg byte a [ plexShowSprite::plexFreeAdd1_$0#0 ]
|
||||
reg byte a [ plexShowSprite::plexFreeAdd1_$1#0 ]
|
||||
zp ZP_BYTE:10 [ plexShowSprite::xpos_idx#0 ]
|
||||
reg byte x [ plexShowSprite::xpos_idx#0 ]
|
||||
reg byte a [ plexShowSprite::$3 ]
|
||||
reg byte a [ plexShowSprite::$4 ]
|
||||
reg byte a [ plexShowSprite::$6 ]
|
||||
reg byte x [ plexShowSprite::$7 ]
|
||||
reg byte a [ plexShowSprite::$7 ]
|
||||
reg byte x [ plexSort::s#2 ]
|
||||
reg byte a [ init::$6 ]
|
||||
|
@ -6,7 +6,7 @@ export UPD_HOME=$1
|
||||
echo References ${REF_HOME}
|
||||
echo Updates ${UPD_HOME}
|
||||
rm ${UPD_HOME}/update.sh
|
||||
pushd ${UPD_HOME}
|
||||
pushd "${UPD_HOME}"
|
||||
for i in $(find . -type f | grep -v '/bin/'); do echo cp ${UPD_HOME}/${i} ${REF_HOME}/${i} >> update.sh; done
|
||||
popd
|
||||
source ${UPD_HOME}/update.sh
|
||||
|
Loading…
x
Reference in New Issue
Block a user