initial commit
This commit is contained in:
commit
008f56a210
|
@ -0,0 +1,66 @@
|
|||
; c64.asm - Useful dasm macros and definitions for C64 programs
|
||||
; will likely grow as I do more with the C64.
|
||||
; you can INCLUDE this file or just copy the parts you want.
|
||||
; 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
|
|
@ -0,0 +1,8 @@
|
|||
# dasm-c64
|
||||
|
||||
macros and definitions for the c64 for the dasm 6502 assembler.
|
||||
|
||||
## Current contents
|
||||
|
||||
* Definitions for all the KERNAL routines so they can be used by name (see https://www.c64-wiki.com/wiki/Kernal)
|
||||
* BasicUpstart macro: Writes a BASIC start script for the address provided as an argument.
|
Loading…
Reference in New Issue