macros and definitions for the C64 for the dasm 6502 assembler.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

63 lines
1.1 KiB

; This file is CC0 (Public Domain)
; KERNAL functions
CHROUT = $FFD2
ACPTR = $FFA5
CHKIN = $FFC6
CHKOUT = $FFC9
CHRIN = $FFCF
CHROUT = $FFD2
CIOUT = $FFA8
CINT = $FF81
CLALL = $FFE7
CLOSE = $FFC3
CLRCHN = $FFCC
GETIN = $FFE4
IOBASE = $FFF3
IOINIT = $FF84
LISTEN = $FFB1
LOAD = $FFD5
MEMBOT = $FF9C
MEMTOP = $FF99
OPEN = $FFC0
PLOT = $FFF0
RAMTAS = $FF87
RDTIM = $FFDE
READST = $FFB7
RESTOR = $FF8A
SAVE = $FFD8
SCNKEY = $FF9F
SCREEN = $FFED
SECOND = $FF93
SETLFS = $FFBA
SETMSG = $FF90
SETNAM = $FFBD
SETTIM = $FFDB
SETTMO = $FFA2
STOP = $FFE1
TALK = $FFB4
TKSA = $FF96
UDTIM = $FFEA
UNLSN = $FFAE
UNTLK = $FFAB
VECTOR = $FF8D
; Macros
MAC BasicUpstart
; writes a C64 BASIC start script for the address provided as an argument.
; Usage:
; org $0801
; BasicUpstart init
; init:
; [your code here]
dc.w .nextline
dc.w 10 ; Line Number
dc.b $9e ; SYS
dc.b <((({1} / 1000) % 10) + $30)
dc.b <((({1} / 100 ) % 10) + $30)
dc.b <((({1} / 10 ) % 10) + $30)
dc.b <((({1} ) % 10) + $30) ; Address, converted to 4 PETSCII bytes
dc.b 0
.nextline:
dc.w 0
ENDM