Et voici le code *=$C000 SEI LDA #$7f STA $dc0d STA $dd0d LDA #$35 ; deactivate KERNAL+BASIC STA $01 DEFAULT ; DEFAULT VALUES LDX #0 ; color code for black LDY #06 ; color code for blue LDA #51 ; starting ligne number 51 for rasterbar ; ou 256+51=307 START BIT $D011 ; must wait raster beam's position be BPL *-3 ; on $D012=0 and bit7 $D011=0 BIT $D011 BMI *-3 CMP $D012 BNE *-3 STX $D020 ;STX $D020 STX $D021 ;CLC ; Carry set if branch not taken ; (if A=Memory) ADC #5 ; add 6 actually CMP $D012 BNE *-3 STY $D020 ;STY $D020 STY $D021 ;COMPUTE NEW_RASTER_LINE ;SEC Carry is set as branch not taken ;(A=Memory) SBC #5 ; subtracts 5 actually CMP #246 BCC @no_default ; A equals 246 or less ;LOAD_DEFAULT_VALUE LDA #51 @no_default JMP START
Great video. Thank you.
💯👍👏
Et voici le code
*=$C000
SEI
LDA #$7f
STA $dc0d
STA $dd0d
LDA #$35 ; deactivate KERNAL+BASIC
STA $01
DEFAULT ; DEFAULT VALUES
LDX #0 ; color code for black
LDY #06 ; color code for blue
LDA #51 ; starting ligne number 51 for rasterbar
; ou 256+51=307
START
BIT $D011 ; must wait raster beam's position be
BPL *-3 ; on $D012=0 and bit7 $D011=0
BIT $D011
BMI *-3
CMP $D012
BNE *-3
STX $D020 ;STX $D020
STX $D021
;CLC ; Carry set if branch not taken
; (if A=Memory)
ADC #5 ; add 6 actually
CMP $D012
BNE *-3
STY $D020 ;STY $D020
STY $D021
;COMPUTE NEW_RASTER_LINE
;SEC Carry is set as branch not taken
;(A=Memory)
SBC #5 ; subtracts 5 actually
CMP #246
BCC @no_default ; A equals 246 or less
;LOAD_DEFAULT_VALUE
LDA #51
@no_default
JMP START