2020/c64/main.asm

75 lines
1 KiB
NASM
Raw Normal View History

2020-12-06 17:07:35 +00:00
// vim: filetype=kickass
2020-12-06 17:07:35 +00:00
#import "math.inc"
BasicUpstart2(main)
2020-12-06 17:07:35 +00:00
2020-12-09 01:08:57 +00:00
* = $8000
.align $100
* = * "Square table"
square1_lo:
.fill 512, 0
square1_hi:
.fill 512, 0
square2_lo:
.fill 512, 0
square2_hi:
.fill 512, 0
2020-12-09 01:08:57 +00:00
* = * "Day 01 Input"
day01_input:
.import text "../rust/inputs/day01"
.byte 0
2020-12-09 01:08:57 +00:00
* = * "Day 01 Input End"
//* = $8000 "Cartridge ROM"
//* = $a000 "Basic ROM"
2020-12-06 17:07:35 +00:00
2020-12-09 01:08:57 +00:00
* = $c000 "Main program"
2020-12-06 17:07:35 +00:00
.const SCREEN_RAM = $0400
.const COLOR_RAM = $d800
.const kernal_scinit = $ff81
.const kernal_chrout = $ffd2
.const kernal_write_byte = $e716
.const zp_temp = $02
.const cursor_pointer_lo = $05
.const cursor_pointer_hi = $06
.macro move_16_imm(dst_lo, dst_hi, src) {
lda #<src
sta dst_lo
lda #>src
sta dst_hi
}
2020-12-06 17:07:35 +00:00
//
// main
//
main:
jsr clear_screen
// Swap out BASIC and kernal
sei
lda %00110000
sta $01
jsr generate_multiplication_tables
2020-12-09 01:08:57 +00:00
jsr day01
2020-12-06 17:07:35 +00:00
!loop:
jmp !loop-
buffer:
.fill $0400, 0
2020-12-06 17:07:35 +00:00
#import "day01.asm"
2020-12-06 17:07:35 +00:00
#import "screen.asm"
#import "math.asm"