|
|
|
@@ -22216,7 +22216,6 @@ Removing instruction b6:
|
|
|
|
|
Removing instruction b7:
|
|
|
|
|
Removing instruction b11:
|
|
|
|
|
Succesful ASM optimization Pass5UnusedLabelElimination
|
|
|
|
|
<<<<<<< HEAD
|
|
|
|
|
Replacing jump to rts with rts in jmp breturn
|
|
|
|
|
Replacing jump to rts with rts in jmp breturn
|
|
|
|
|
Replacing jump to rts with rts in jmp breturn
|
|
|
|
@@ -22225,10 +22224,7 @@ Replacing jump to rts with rts in jmp breturn
|
|
|
|
|
Replacing jump to rts with rts in jmp breturn
|
|
|
|
|
Replacing jump to rts with rts in jmp breturn
|
|
|
|
|
Replacing jump to rts with rts in jmp breturn
|
|
|
|
|
Skipping double jump to b1 in bne b6
|
|
|
|
|
=======
|
|
|
|
|
Skipping double jump to b1 in bne b5
|
|
|
|
|
>>>>>>> c3849c78b072faa1f892a8cb9217f834d38e4138
|
|
|
|
|
Skipping double jump to b3 in bne b9
|
|
|
|
|
Replacing jump to rts with rts in jmp breturn
|
|
|
|
|
Skipping double jump to b9 in bne b9_from_b10
|
|
|
|
@@ -22267,16 +22263,12 @@ Removing instruction jmp b1
|
|
|
|
|
Removing instruction jmp b1
|
|
|
|
|
Removing instruction jmp b2
|
|
|
|
|
Succesful ASM optimization Pass5NextJumpElimination
|
|
|
|
|
<<<<<<< HEAD
|
|
|
|
|
Removing instruction breturn:
|
|
|
|
|
Removing instruction breturn:
|
|
|
|
|
Removing instruction breturn:
|
|
|
|
|
Removing instruction breturn:
|
|
|
|
|
Removing instruction breturn:
|
|
|
|
|
Removing instruction b6:
|
|
|
|
|
=======
|
|
|
|
|
Removing instruction b5:
|
|
|
|
|
>>>>>>> c3849c78b072faa1f892a8cb9217f834d38e4138
|
|
|
|
|
Removing instruction b9:
|
|
|
|
|
Removing instruction breturn:
|
|
|
|
|
Removing instruction b5:
|
|
|
|
@@ -23615,11 +23607,7 @@ reg byte a [ sprites_irq::ptr#2 ]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
FINAL ASSEMBLER
|
|
|
|
|
<<<<<<< HEAD
|
|
|
|
|
Score: 3350899
|
|
|
|
|
=======
|
|
|
|
|
Score: 3348864
|
|
|
|
|
>>>>>>> c3849c78b072faa1f892a8cb9217f834d38e4138
|
|
|
|
|
Score: 3348891
|
|
|
|
|
|
|
|
|
|
//SEG0 File Comments
|
|
|
|
|
// Tetris Game for the Commodore 64
|
|
|
|
@@ -24611,24 +24599,13 @@ play_movement: {
|
|
|
|
|
lda game_over
|
|
|
|
|
cmp #0
|
|
|
|
|
beq b1
|
|
|
|
|
<<<<<<< HEAD
|
|
|
|
|
//SEG402 [170] phi from play_movement::@2 play_movement::@4 to play_movement::@return [phi:play_movement::@2/play_movement::@4->play_movement::@return]
|
|
|
|
|
//SEG403 [170] phi (byte) current_xpos#19 = (byte) current_xpos#22 [phi:play_movement::@2/play_movement::@4->play_movement::@return#0] -- register_copy
|
|
|
|
|
//SEG404 [170] phi (byte*) current_piece_gfx#18 = (byte*) current_piece_gfx#20 [phi:play_movement::@2/play_movement::@4->play_movement::@return#1] -- register_copy
|
|
|
|
|
//SEG405 [170] phi (byte) current_orientation#17 = (byte) current_orientation#20 [phi:play_movement::@2/play_movement::@4->play_movement::@return#2] -- register_copy
|
|
|
|
|
//SEG406 [170] phi (byte) play_movement::return#2 = (byte) play_movement::render#1 [phi:play_movement::@2/play_movement::@4->play_movement::@return#3] -- register_copy
|
|
|
|
|
//SEG407 play_movement::@return
|
|
|
|
|
//SEG408 [171] return
|
|
|
|
|
=======
|
|
|
|
|
//SEG401 [169] phi from play_movement::@2 play_movement::@4 to play_movement::@return [phi:play_movement::@2/play_movement::@4->play_movement::@return]
|
|
|
|
|
//SEG402 [169] phi (byte) current_xpos#19 = (byte) current_xpos#22 [phi:play_movement::@2/play_movement::@4->play_movement::@return#0] -- register_copy
|
|
|
|
|
//SEG403 [169] phi (byte*) current_piece_gfx#18 = (byte*) current_piece_gfx#20 [phi:play_movement::@2/play_movement::@4->play_movement::@return#1] -- register_copy
|
|
|
|
|
//SEG404 [169] phi (byte) current_orientation#17 = (byte) current_orientation#20 [phi:play_movement::@2/play_movement::@4->play_movement::@return#2] -- register_copy
|
|
|
|
|
//SEG405 [169] phi (byte) play_movement::return#2 = (byte) play_movement::render#1 [phi:play_movement::@2/play_movement::@4->play_movement::@return#3] -- register_copy
|
|
|
|
|
//SEG406 play_movement::@return
|
|
|
|
|
breturn:
|
|
|
|
|
//SEG407 [170] return
|
|
|
|
|
>>>>>>> c3849c78b072faa1f892a8cb9217f834d38e4138
|
|
|
|
|
rts
|
|
|
|
|
//SEG408 play_movement::@1
|
|
|
|
|
b1:
|
|
|
|
@@ -24675,14 +24652,8 @@ play_move_rotate: {
|
|
|
|
|
//SEG427 [183] phi (byte) current_orientation#25 = (byte) current_orientation#20 [phi:play_move_rotate::@4/play_move_rotate::@6->play_move_rotate::@return#1] -- register_copy
|
|
|
|
|
//SEG428 [183] phi (byte) play_move_rotate::return#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:play_move_rotate::@4/play_move_rotate::@6->play_move_rotate::@return#2] -- vbuaa=vbuc1
|
|
|
|
|
lda #0
|
|
|
|
|
<<<<<<< HEAD
|
|
|
|
|
//SEG430 play_move_rotate::@return
|
|
|
|
|
//SEG431 [185] return
|
|
|
|
|
=======
|
|
|
|
|
//SEG429 play_move_rotate::@return
|
|
|
|
|
breturn:
|
|
|
|
|
//SEG430 [184] return
|
|
|
|
|
>>>>>>> c3849c78b072faa1f892a8cb9217f834d38e4138
|
|
|
|
|
rts
|
|
|
|
|
//SEG431 play_move_rotate::@2
|
|
|
|
|
b2:
|
|
|
|
@@ -24738,13 +24709,8 @@ play_move_rotate: {
|
|
|
|
|
//SEG456 [183] phi (byte) current_orientation#25 = (byte) current_orientation#7 [phi:play_move_rotate::@5->play_move_rotate::@return#1] -- register_copy
|
|
|
|
|
//SEG457 [183] phi (byte) play_move_rotate::return#2 = (byte/signed byte/word/signed word/dword/signed dword) 1 [phi:play_move_rotate::@5->play_move_rotate::@return#2] -- vbuaa=vbuc1
|
|
|
|
|
lda #1
|
|
|
|
|
<<<<<<< HEAD
|
|
|
|
|
rts
|
|
|
|
|
//SEG459 play_move_rotate::@1
|
|
|
|
|
=======
|
|
|
|
|
jmp breturn
|
|
|
|
|
//SEG458 play_move_rotate::@1
|
|
|
|
|
>>>>>>> c3849c78b072faa1f892a8cb9217f834d38e4138
|
|
|
|
|
b1:
|
|
|
|
|
//SEG459 [198] (byte/signed word/word/dword/signed dword~) play_move_rotate::$7 ← (byte) current_orientation#20 - (byte/signed byte/word/signed word/dword/signed dword) $10 -- vbuxx=vbuz1_minus_vbuc1
|
|
|
|
|
lax current_orientation
|
|
|
|
@@ -24823,14 +24789,8 @@ play_collision: {
|
|
|
|
|
//SEG480 [210] phi from play_collision::@7 to play_collision::@return [phi:play_collision::@7->play_collision::@return]
|
|
|
|
|
//SEG481 [210] phi (byte) play_collision::return#15 = (const byte) COLLISION_BOTTOM#0 [phi:play_collision::@7->play_collision::@return#0] -- vbuaa=vbuc1
|
|
|
|
|
lda #COLLISION_BOTTOM
|
|
|
|
|
<<<<<<< HEAD
|
|
|
|
|
//SEG483 play_collision::@return
|
|
|
|
|
//SEG484 [212] return
|
|
|
|
|
=======
|
|
|
|
|
//SEG482 play_collision::@return
|
|
|
|
|
breturn:
|
|
|
|
|
//SEG483 [211] return
|
|
|
|
|
>>>>>>> c3849c78b072faa1f892a8cb9217f834d38e4138
|
|
|
|
|
rts
|
|
|
|
|
//SEG484 play_collision::@4
|
|
|
|
|
b4:
|
|
|
|
@@ -24843,13 +24803,8 @@ play_collision: {
|
|
|
|
|
//SEG487 [210] phi from play_collision::@4 to play_collision::@return [phi:play_collision::@4->play_collision::@return]
|
|
|
|
|
//SEG488 [210] phi (byte) play_collision::return#15 = (const byte) COLLISION_LEFT#0 [phi:play_collision::@4->play_collision::@return#0] -- vbuaa=vbuc1
|
|
|
|
|
lda #COLLISION_LEFT
|
|
|
|
|
<<<<<<< HEAD
|
|
|
|
|
rts
|
|
|
|
|
//SEG490 play_collision::@5
|
|
|
|
|
=======
|
|
|
|
|
jmp breturn
|
|
|
|
|
//SEG489 play_collision::@5
|
|
|
|
|
>>>>>>> c3849c78b072faa1f892a8cb9217f834d38e4138
|
|
|
|
|
b5:
|
|
|
|
|
//SEG490 [214] if((byte) play_collision::col#2<(const byte) PLAYFIELD_COLS#0) goto play_collision::@6 -- vbuz1_lt_vbuc1_then_la1
|
|
|
|
|
lda col
|
|
|
|
@@ -24858,13 +24813,8 @@ play_collision: {
|
|
|
|
|
//SEG491 [210] phi from play_collision::@5 to play_collision::@return [phi:play_collision::@5->play_collision::@return]
|
|
|
|
|
//SEG492 [210] phi (byte) play_collision::return#15 = (const byte) COLLISION_RIGHT#0 [phi:play_collision::@5->play_collision::@return#0] -- vbuaa=vbuc1
|
|
|
|
|
lda #COLLISION_RIGHT
|
|
|
|
|
<<<<<<< HEAD
|
|
|
|
|
rts
|
|
|
|
|
//SEG494 play_collision::@6
|
|
|
|
|
=======
|
|
|
|
|
jmp breturn
|
|
|
|
|
//SEG493 play_collision::@6
|
|
|
|
|
>>>>>>> c3849c78b072faa1f892a8cb9217f834d38e4138
|
|
|
|
|
b6:
|
|
|
|
|
//SEG494 [215] if(*((byte*) play_collision::playfield_line#0 + (byte) play_collision::col#2)==(byte/signed byte/word/signed word/dword/signed dword) 0) goto play_collision::@3 -- pbuz1_derefidx_vbuz2_eq_0_then_la1
|
|
|
|
|
ldy col
|
|
|
|
@@ -24874,13 +24824,8 @@ play_collision: {
|
|
|
|
|
//SEG495 [210] phi from play_collision::@6 to play_collision::@return [phi:play_collision::@6->play_collision::@return]
|
|
|
|
|
//SEG496 [210] phi (byte) play_collision::return#15 = (const byte) COLLISION_PLAYFIELD#0 [phi:play_collision::@6->play_collision::@return#0] -- vbuaa=vbuc1
|
|
|
|
|
lda #COLLISION_PLAYFIELD
|
|
|
|
|
<<<<<<< HEAD
|
|
|
|
|
rts
|
|
|
|
|
//SEG498 play_collision::@3
|
|
|
|
|
=======
|
|
|
|
|
jmp breturn
|
|
|
|
|
//SEG497 play_collision::@3
|
|
|
|
|
>>>>>>> c3849c78b072faa1f892a8cb9217f834d38e4138
|
|
|
|
|
b3:
|
|
|
|
|
//SEG498 [216] (byte) play_collision::col#1 ← ++ (byte) play_collision::col#2 -- vbuz1=_inc_vbuz1
|
|
|
|
|
inc col
|
|
|
|
@@ -24904,13 +24849,8 @@ play_collision: {
|
|
|
|
|
//SEG505 [210] phi from play_collision::@8 to play_collision::@return [phi:play_collision::@8->play_collision::@return]
|
|
|
|
|
//SEG506 [210] phi (byte) play_collision::return#15 = (const byte) COLLISION_NONE#0 [phi:play_collision::@8->play_collision::@return#0] -- vbuaa=vbuc1
|
|
|
|
|
lda #COLLISION_NONE
|
|
|
|
|
<<<<<<< HEAD
|
|
|
|
|
rts
|
|
|
|
|
//SEG508 play_collision::@9
|
|
|
|
|
=======
|
|
|
|
|
jmp breturn
|
|
|
|
|
//SEG507 play_collision::@9
|
|
|
|
|
>>>>>>> c3849c78b072faa1f892a8cb9217f834d38e4138
|
|
|
|
|
b9:
|
|
|
|
|
//SEG508 [222] (byte~) play_collision::i#11 ← (byte) play_collision::i#1 -- vbuz1=vbuz2
|
|
|
|
|
lda i
|
|
|
|
@@ -24980,25 +24920,14 @@ play_move_leftright: {
|
|
|
|
|
//SEG541 [235] phi (byte) current_xpos#26 = (byte) current_xpos#6 [phi:play_move_leftright::@4/play_move_leftright::@5->play_move_leftright::@return#0] -- register_copy
|
|
|
|
|
//SEG542 [235] phi (byte) play_move_leftright::return#2 = (byte/signed byte/word/signed word/dword/signed dword) 1 [phi:play_move_leftright::@4/play_move_leftright::@5->play_move_leftright::@return#1] -- vbuaa=vbuc1
|
|
|
|
|
lda #1
|
|
|
|
|
<<<<<<< HEAD
|
|
|
|
|
rts
|
|
|
|
|
//SEG544 [236] phi from play_move_leftright::@2 play_move_leftright::@6 play_move_leftright::@7 to play_move_leftright::@return [phi:play_move_leftright::@2/play_move_leftright::@6/play_move_leftright::@7->play_move_leftright::@return]
|
|
|
|
|
=======
|
|
|
|
|
jmp breturn
|
|
|
|
|
//SEG543 [235] phi from play_move_leftright::@2 play_move_leftright::@6 play_move_leftright::@7 to play_move_leftright::@return [phi:play_move_leftright::@2/play_move_leftright::@6/play_move_leftright::@7->play_move_leftright::@return]
|
|
|
|
|
>>>>>>> c3849c78b072faa1f892a8cb9217f834d38e4138
|
|
|
|
|
b3:
|
|
|
|
|
//SEG544 [235] phi (byte) current_xpos#26 = (byte) current_xpos#22 [phi:play_move_leftright::@2/play_move_leftright::@6/play_move_leftright::@7->play_move_leftright::@return#0] -- register_copy
|
|
|
|
|
//SEG545 [235] phi (byte) play_move_leftright::return#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:play_move_leftright::@2/play_move_leftright::@6/play_move_leftright::@7->play_move_leftright::@return#1] -- vbuaa=vbuc1
|
|
|
|
|
lda #0
|
|
|
|
|
<<<<<<< HEAD
|
|
|
|
|
//SEG547 play_move_leftright::@return
|
|
|
|
|
//SEG548 [237] return
|
|
|
|
|
=======
|
|
|
|
|
//SEG546 play_move_leftright::@return
|
|
|
|
|
breturn:
|
|
|
|
|
//SEG547 [236] return
|
|
|
|
|
>>>>>>> c3849c78b072faa1f892a8cb9217f834d38e4138
|
|
|
|
|
rts
|
|
|
|
|
//SEG548 play_move_leftright::@1
|
|
|
|
|
b1:
|
|
|
|
@@ -25189,13 +25118,8 @@ play_move_down: {
|
|
|
|
|
sta current_movedown_counter
|
|
|
|
|
//SEG660 [281] phi (byte) play_move_down::return#3 = (byte/signed byte/word/signed word/dword/signed dword) 1 [phi:play_move_down::@11->play_move_down::@return#14] -- vbuxx=vbuc1
|
|
|
|
|
ldx #1
|
|
|
|
|
<<<<<<< HEAD
|
|
|
|
|
rts
|
|
|
|
|
//SEG662 [282] phi from play_move_down::@3 to play_move_down::@return [phi:play_move_down::@3->play_move_down::@return]
|
|
|
|
|
=======
|
|
|
|
|
jmp breturn
|
|
|
|
|
//SEG661 [281] phi from play_move_down::@3 to play_move_down::@return [phi:play_move_down::@3->play_move_down::@return]
|
|
|
|
|
>>>>>>> c3849c78b072faa1f892a8cb9217f834d38e4138
|
|
|
|
|
b5:
|
|
|
|
|
//SEG662 [281] phi (byte) next_piece_idx#16 = (byte) next_piece_idx#10 [phi:play_move_down::@3->play_move_down::@return#0] -- register_copy
|
|
|
|
|
//SEG663 [281] phi (byte) game_over#15 = (byte) game_over#10 [phi:play_move_down::@3->play_move_down::@return#1] -- register_copy
|
|
|
|
@@ -25213,14 +25137,8 @@ play_move_down: {
|
|
|
|
|
//SEG675 [281] phi (byte) current_movedown_counter#14 = (byte) current_movedown_counter#12 [phi:play_move_down::@3->play_move_down::@return#13] -- register_copy
|
|
|
|
|
//SEG676 [281] phi (byte) play_move_down::return#3 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:play_move_down::@3->play_move_down::@return#14] -- vbuxx=vbuc1
|
|
|
|
|
ldx #0
|
|
|
|
|
<<<<<<< HEAD
|
|
|
|
|
//SEG678 play_move_down::@return
|
|
|
|
|
//SEG679 [283] return
|
|
|
|
|
=======
|
|
|
|
|
//SEG677 play_move_down::@return
|
|
|
|
|
breturn:
|
|
|
|
|
//SEG678 [282] return
|
|
|
|
|
>>>>>>> c3849c78b072faa1f892a8cb9217f834d38e4138
|
|
|
|
|
rts
|
|
|
|
|
//SEG679 play_move_down::@10
|
|
|
|
|
b10:
|
|
|
|
@@ -25747,31 +25665,17 @@ keyboard_event_get: {
|
|
|
|
|
//SEG899 [386] (byte) keyboard_event_get::return#1 ← *((const byte[8]) keyboard_events#0 + (byte) keyboard_events_size#4) -- vbuxx=pbuc1_derefidx_vbuz1
|
|
|
|
|
ldy keyboard_events_size
|
|
|
|
|
ldx keyboard_events,y
|
|
|
|
|
<<<<<<< HEAD
|
|
|
|
|
//SEG908 [393] phi from keyboard_event_get::@1 to keyboard_event_get::@return [phi:keyboard_event_get::@1->keyboard_event_get::@return]
|
|
|
|
|
//SEG909 [393] phi (byte) keyboard_events_size#16 = (byte) keyboard_events_size#4 [phi:keyboard_event_get::@1->keyboard_event_get::@return#0] -- register_copy
|
|
|
|
|
//SEG910 [393] phi (byte) keyboard_event_get::return#2 = (byte) keyboard_event_get::return#1 [phi:keyboard_event_get::@1->keyboard_event_get::@return#1] -- register_copy
|
|
|
|
|
rts
|
|
|
|
|
//SEG911 [393] phi from keyboard_event_get to keyboard_event_get::@return [phi:keyboard_event_get->keyboard_event_get::@return]
|
|
|
|
|
=======
|
|
|
|
|
//SEG900 [387] phi from keyboard_event_get::@1 to keyboard_event_get::@return [phi:keyboard_event_get::@1->keyboard_event_get::@return]
|
|
|
|
|
//SEG901 [387] phi (byte) keyboard_events_size#16 = (byte) keyboard_events_size#4 [phi:keyboard_event_get::@1->keyboard_event_get::@return#0] -- register_copy
|
|
|
|
|
//SEG902 [387] phi (byte) keyboard_event_get::return#2 = (byte) keyboard_event_get::return#1 [phi:keyboard_event_get::@1->keyboard_event_get::@return#1] -- register_copy
|
|
|
|
|
jmp breturn
|
|
|
|
|
rts
|
|
|
|
|
//SEG903 [387] phi from keyboard_event_get to keyboard_event_get::@return [phi:keyboard_event_get->keyboard_event_get::@return]
|
|
|
|
|
>>>>>>> c3849c78b072faa1f892a8cb9217f834d38e4138
|
|
|
|
|
b1:
|
|
|
|
|
//SEG904 [387] phi (byte) keyboard_events_size#16 = (byte) keyboard_events_size#13 [phi:keyboard_event_get->keyboard_event_get::@return#0] -- register_copy
|
|
|
|
|
//SEG905 [387] phi (byte) keyboard_event_get::return#2 = (byte/word/signed word/dword/signed dword) $ff [phi:keyboard_event_get->keyboard_event_get::@return#1] -- vbuxx=vbuc1
|
|
|
|
|
ldx #$ff
|
|
|
|
|
<<<<<<< HEAD
|
|
|
|
|
//SEG914 keyboard_event_get::@return
|
|
|
|
|
//SEG915 [394] return
|
|
|
|
|
=======
|
|
|
|
|
//SEG906 keyboard_event_get::@return
|
|
|
|
|
breturn:
|
|
|
|
|
//SEG907 [388] return
|
|
|
|
|
>>>>>>> c3849c78b072faa1f892a8cb9217f834d38e4138
|
|
|
|
|
rts
|
|
|
|
|
}
|
|
|
|
|
//SEG908 keyboard_event_scan
|
|
|
|
|