Last active
August 3, 2019 21:42
-
-
Save nurpax/35e2b992ecfe959cdb9121a247a230eb to your computer and use it in GitHub Desktop.
6502 lines size optimization
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!include "c64.asm" | |
+c64::basic_start(entry) | |
entry: { | |
lda #0 | |
sta $d020 | |
sta $d021 | |
ldx #0 | |
lda #$20 | |
clrscr: | |
!for i in [0, $100, $200, $300] { | |
sta $0400 + i, x | |
} | |
inx | |
bne clrscr | |
lda #$a0 | |
!for i in range(0, 40) { | |
!let y0 = Math.floor(25/40*(i+0.5)) | |
sta $0400 + y0*40 + i | |
sta $0400 + (24-y0)*40 + i | |
; sta $0400 + 0*40 + i | |
; sta $0400 + 24*40 + i | |
; sta $0400 + i*40 + 0 | |
; sta $0400 + i*40 + 39 | |
} | |
inf: jmp inf | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment