From a22e19a90232615bc72ea2be513563fd4e6afba6 Mon Sep 17 00:00:00 2001 From: Olli Savia Date: Thu, 21 Jun 2018 18:32:38 +0300 Subject: [PATCH 1/4] Added asminc/cbmkernal.inc --- asminc/cbmkernal.inc | 74 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 asminc/cbmkernal.inc diff --git a/asminc/cbmkernal.inc b/asminc/cbmkernal.inc new file mode 100644 index 000000000..eea49322e --- /dev/null +++ b/asminc/cbmkernal.inc @@ -0,0 +1,74 @@ +; +; Olli Savia +; +; Commodore kernal functions +; + +.if .def(__C64__) || .def(__C128__) || .def(__C16__) + CINT := $FF81 + IOINIT := $FF84 + RAMTAS := $FF87 +.elseif .def(__VIC20__) + CINT := $E518 ; No entries are in the kernal jump table of the Vic20 for these three (3) functions. + IOINIT := $FDF9 ; The entries for these functions have been set to point directly to the functions + RAMTAS := $FD8D ; in the kernal to maintain compatibility with the other Commodore platforms. +.elseif .def(__CBM510__) || .def(__CBM610__) + IOINIT := $FF7B + CINT := $FF7E + VECTOR := $FF84 + RESTOR := $FF87 +.endif + +.if .def(__VIC20__) || .def(__C64__) || .def(__C128__) || .def(__C16__) + RESTOR := $FF8A + VECTOR := $FF8D +.endif + +.if .def(__CBM510__) || .def(__CBM610__) || .def(__VIC20__) || .def(__C64__) || .def(__C128__) || .def(__C16__) + SETMSG := $FF90 + SECOND := $FF93 + TKSA := $FF96 + MEMTOP := $FF99 + MEMBOT := $FF9C + SCNKEY := $FF9F + SETTMO := $FFA2 + ACPTR := $FFA5 + CIOUT := $FFA8 + UNTLK := $FFAB + UNLSN := $FFAE + LISTEN := $FFB1 + TALK := $FFB4 + READST := $FFB7 + SETLFS := $FFBA + SETNAM := $FFBD + OPEN := $FFC0 + CLOSE := $FFC3 +.endif + +; Available on all platforms including PET +CHKIN := $FFC6 +CKOUT := $FFC9 +CLRCH := $FFCC +BASIN := $FFCF +CHRIN := $FFCF +BSOUT := $FFD2 +CHROUT := $FFD2 + +.if .def(__CBM510__) || .def(__CBM610__) || .def(__VIC20__) || .def(__C64__) || .def(__C128__) || .def(__C16__) + LOAD := $FFD5 + SAVE := $FFD8 + SETTIM := $FFDB + RDTIM := $FFDE +.endif + +; Available on all platforms including PET +STOP := $FFE1 +GETIN := $FFE4 +CLALL := $FFE7 +UDTIM := $FFEA + +.if .def(__CBM510__) || .def(__CBM610__) || .def(__VIC20__) || .def(__C64__) || .def(__C128__) || .def(__C16__) + SCREEN := $FFED + PLOT := $FFF0 + IOBASE := $FFF3 +.endif From accfc14fb1a82f639d2489e7dbc4361614aa9157 Mon Sep 17 00:00:00 2001 From: Olli Savia Date: Fri, 22 Jun 2018 11:21:00 +0300 Subject: [PATCH 2/4] RESTOR and VECTOR moved under own ifdef/endif block --- asminc/cbmkernal.inc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/asminc/cbmkernal.inc b/asminc/cbmkernal.inc index eea49322e..d5e7216c2 100644 --- a/asminc/cbmkernal.inc +++ b/asminc/cbmkernal.inc @@ -15,13 +15,14 @@ .elseif .def(__CBM510__) || .def(__CBM610__) IOINIT := $FF7B CINT := $FF7E - VECTOR := $FF84 - RESTOR := $FF87 .endif .if .def(__VIC20__) || .def(__C64__) || .def(__C128__) || .def(__C16__) - RESTOR := $FF8A - VECTOR := $FF8D + RESTOR := $FF8A + VECTOR := $FF8D +.elseif .def(__CBM510__) || .def(__CBM610__) + VECTOR := $FF84 + RESTOR := $FF87 .endif .if .def(__CBM510__) || .def(__CBM610__) || .def(__VIC20__) || .def(__C64__) || .def(__C128__) || .def(__C16__) From 8c4a0768cc4130971ed157c4538709e756bea6b9 Mon Sep 17 00:00:00 2001 From: Olli Savia Date: Fri, 22 Jun 2018 11:29:03 +0300 Subject: [PATCH 3/4] TAB to space conversion --- asminc/cbmkernal.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asminc/cbmkernal.inc b/asminc/cbmkernal.inc index d5e7216c2..44c721f6f 100644 --- a/asminc/cbmkernal.inc +++ b/asminc/cbmkernal.inc @@ -70,6 +70,6 @@ UDTIM := $FFEA .if .def(__CBM510__) || .def(__CBM610__) || .def(__VIC20__) || .def(__C64__) || .def(__C128__) || .def(__C16__) SCREEN := $FFED - PLOT := $FFF0 + PLOT := $FFF0 IOBASE := $FFF3 .endif From f185e28892e3589620f5540b51b1e999e58b5e10 Mon Sep 17 00:00:00 2001 From: Olli Savia Date: Fri, 29 Jun 2018 16:14:00 +0300 Subject: [PATCH 4/4] cbmkernal.inc -> cbm_kernal.inc --- asminc/{cbmkernal.inc => cbm_kernal.inc} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename asminc/{cbmkernal.inc => cbm_kernal.inc} (100%) diff --git a/asminc/cbmkernal.inc b/asminc/cbm_kernal.inc similarity index 100% rename from asminc/cbmkernal.inc rename to asminc/cbm_kernal.inc