Skip to navigation


Screen buffer: DrawTrackView (Part 4 of 4)

Name: DrawTrackView (Part 4 of 4) [Show more] Type: Subroutine Category: Screen buffer Summary: Revert all the code modifications made by the DrawTrackView routine Deep dive: Drawing around the dashboard Drawing the track view
Context: See this subroutine in context in the source code References: No direct references to this subroutine in this source file
.view19 LDA view3+1 \ Modify the instruction at view20 to use the low byte STA view20+1 \ of the address from view3 \ \ In part 2 we modified the instruction at view3 to \ revert the specified instruction back to STA (P),Y, \ ready for a loop-back that never happened, so view20 \ will now revert this change instead LDA view8+1 \ Modify the instruction at view21 to use the low byte STA view21+1 \ of the address from view8 \ \ In part 3 we modified the instruction at view8 to \ revert the specified instruction back to STA (P),Y, \ ready for a loop-back that never happened, so view21 \ will now revert this change instead LDA view14+1 \ Modify the instruction at view22 to use the low byte STA view22+1 \ of the address from view14 \ \ In part 3 we modified the instruction at view14 to \ revert the specified instruction back to STA (P),Y, \ ready for a loop-back that never happened, so view22 \ will now revert this change instead LDA #&91 \ Set A to the opcode for the STA (P),Y instruction .view20 STA DrawTrackBytes+15 \ Revert the instruction that view3 would have reverted .view21 STA DrawTrackBytes+15 \ Revert the instruction that view8 would have reverted .view22 STA byte2+15 \ Revert the instruction that view14 would have reverted LDA #&E0 \ Set A to the opcode for the CPX #44 instruction STA byte3 \ Revert the instruction at byte3 to CPX #44 RTS \ Return from the subroutine