2020/c64/main.asm
2020-12-09 03:17:56 +01:00

74 lines
1 KiB
NASM

// vim: filetype=kickass
#import "math.inc"
BasicUpstart2(main)
* = $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
* = * "Day 01 Input"
day01_input:
.import text "../rust/inputs/day01"
.byte 0
* = * "Day 01 Input End"
//* = $8000 "Cartridge ROM"
//* = $a000 "Basic ROM"
* = $c000 "Main program"
.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
}
//
// main
//
main:
jsr clear_screen
// Swap out BASIC and kernal
sei
lda %00110000
sta $01
jsr generate_multiplication_tables
jsr day01
!loop:
jmp !loop-
buffer:
.fill $0400, 0
#import "day01.asm"
#import "screen.asm"
#import "math.asm"