User Tools

Site Tools


base:variable_speedcode_runlength

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Last revisionBoth sides next revision
base:variable_speedcode_runlength [2016-04-16 11:42] – created bitbreakerbase:variable_speedcode_runlength [2016-04-16 12:00] bitbreaker
Line 1: Line 1:
 +====== Variable speedcode runlength ======
  
 After you entered a segment of speed code at a certain spot by making use of some method discussed in the Article "[[Dispatch on a byte]]" we now want to exit that code at a certain spot. After you entered a segment of speed code at a certain spot by making use of some method discussed in the Article "[[Dispatch on a byte]]" we now want to exit that code at a certain spot.
Line 6: Line 6:
  
 <code> <code>
 +                        ;<- enter here
         sta $0400         sta $0400
         sta $0401         sta $0401
Line 15: Line 16:
         sta $0407         sta $0407
         sta $0408         sta $0408
 +                        ;<- leave here
         sta $0409         sta $0409
         sta $040a         sta $040a
Line 36: Line 38:
           lda #$08           lda #$08
           sta $dd0e           sta $dd0e
 +          lda #$00
 +          sta $dd04
 +          sta $dd05
           lda $dd0d           lda $dd0d
           lda #$81           lda #$81
Line 49: Line 54:
           sta $dd04           sta $dd04
           ;this can even be ommitted if we do not run more than 255 cycles           ;this can even be ommitted if we do not run more than 255 cycles
-          lda runlength_hi,+          ;lda runlength_hi,
-          sta $dd05+          ;sta $dd05 
 + 
 +          tsx
                      
           lda #$09           lda #$09
Line 80: Line 87:
           !byte $00,$00,$00,$00,$00 ...           !byte $00,$00,$00,$00,$00 ...
 exit exit
-          tsx 
-          txa 
-          sbx #$03 
           txs           txs
           cli           cli
base/variable_speedcode_runlength.txt · Last modified: 2022-01-14 12:45 by bitbreaker