Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #import "helpers.asm"
- :BasicUpstart2(main)
- //----------------------------------------------------------
- // Code for creating the breakpoint file sent to Vice/C64Debugger
- //----------------------------------------------------------
- .var _useBinFolderForBreakpoints = cmdLineVars.get("usebin") == "true"
- .var _createDebugFiles = cmdLineVars.get("afo") == "true"
- .print "File creation " + [_createDebugFiles
- ? "enabled (creating breakpoint file)"
- : "disabled (no breakpoint file created)"]
- .var brkFile
- .if(_createDebugFiles) {
- .if(_useBinFolderForBreakpoints)
- .eval brkFile = createFile("bin/breakpoints.txt")
- else
- .eval brkFile = createFile("breakpoints.txt")
- }
- .macro break() {
- .if(_createDebugFiles) {
- .eval brkFile.writeln("break " + toHexString(*))
- }
- }
- // For C64Debugger v0.54 (2016/09/03)
- .macro setbkg(color) {
- .if(_createDebugFiles) {
- .eval brkFile.writeln("setbkg " + toHexString(*) + " " + color)
- }
- }
- //Because Kick Assembler has to be run with the -afo switch to be able to write breakpoints to a file, we can use this to enable "debugger" specific code when build with Shift-F7 or Shift-F5, ie:
- .const debug = cmdLineVars.get("afo") == "true"
- .if (debug) {
- inc $d020
- }
- main:
- lda screen_contror_register
- ora #%00100000
- sta screen_contror_register
- lda #DARK_GRAY
- sta border_color
- :choose_screen_memory(3)
- :choose_bitmap_memory(1)
- begin:
- lda #$ff
- ldx #$00
- ldy #$ff
- //*=$0d00
- poczatek:
- :delay(200,40)
- //:break()
- sta $2000+4*(8*40)+18*8,x
- cpx #$07
- beq !end+
- inx
- bne !fakejmp+
- !fakejmp:
- jmp poczatek
- !end:
- //:break()
- clc
- rol $2000+4*(8*40)+18*8
- clc
- :delay(200,40)
- rol $2000+4*(8*40)+18*8
- :delay(200,40)
- clc
- :delay(200,40)
- rol $2000+4*(8*40)+18*8
- :delay(200,40)
- clc
- :delay(200,40)
- rol $2000+4*(8*40)+18*8+1
- :delay(200,40)
- clc
- :delay(200,40)
- rol $2000+4*(8*40)+18*8+1
- :delay(200,40)
- clc
- :delay(200,40)
- rol $2000+4*(8*40)+18*8+2
- clc
- //rol $2000+4*(8*40)+18*8+3
- //clc
- //rol $2000+4*(8*40)+18*8+4
- //clc
- :delay(200,40)
- rol $2000+4*(8*40)+18*8+5
- :delay(200,40)
- clc
- :delay(200,40)
- rol $2000+4*(8*40)+18*8+6
- :delay(200,40)
- clc
- :delay(200,40)
- rol $2000+4*(8*40)+18*8+6
- :delay(200,40)
- clc
- :delay(200,40)
- rol $2000+4*(8*40)+18*8+7
- :delay(200,40)
- clc
- :delay(200,40)
- rol $2000+4*(8*40)+18*8+7
- :delay(200,40)
- clc
- :delay(200,40)
- rol $2000+4*(8*40)+18*8+7
- //rol $2000+4*(8*40)+18*8
- //:break()
- prawo:
- lda $2000+4*(8*40)+18*8
- ora #$04
- sta $2000+4*(8*40)+18*8
- :delay(200,40)
- //:break()
- ora #$06
- sta $2000+4*(8*40)+18*8
- :delay(200,40)
- //:break()
- ora #$07
- sta $2000+4*(8*40)+18*8
- jmp begin
- * = screen_memory(3) "cos"
- .fill 1000, GRAY << 1 | LIGHT_GRAY
- * = bitmap_memory(1) "Wypelnij mape bitowa"
- .fill 8192, 0
- /*.for (var y = 0; y < 25; y++) {
- .for (var x = 0; x < 40; x++) {
- .var number = 25*y + x
- .for (var i = 7; i >= 0; i--) {
- .byte number >> i
- }
- }
- }
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement