From: Olli Savia Date: Sun, 25 Nov 2018 08:46:05 +0000 (+0200) Subject: Updated to use cbm_kernal.inc. Whitespace cleanups X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=aeff90ca90b45162afe151cba2c64c217822a9d3;p=cc65 Updated to use cbm_kernal.inc. Whitespace cleanups --- diff --git a/libsrc/c128/cgetc.s b/libsrc/c128/cgetc.s index bc9d8da7f..7cf7fcc3e 100644 --- a/libsrc/c128/cgetc.s +++ b/libsrc/c128/cgetc.s @@ -10,6 +10,7 @@ .import cursor + .include "cbm_kernal.inc" .include "c128.inc" ;-------------------------------------------------------------------------- @@ -17,8 +18,8 @@ _cgetc: lda KEY_COUNT ; Get number of characters bne L2 ; Jump if there are already chars waiting -; Switch on the cursor if needed. We MUST always switch the cursor on, -; before switching it off, because switching it off will restore the +; Switch on the cursor if needed. We MUST always switch the cursor on, +; before switching it off, because switching it off will restore the ; character attribute remembered when it was switched on. So just switching ; it off will restore the wrong character attribute. diff --git a/libsrc/c128/clrscr.s b/libsrc/c128/clrscr.s index 2213be0cd..a3c519cb1 100644 --- a/libsrc/c128/clrscr.s +++ b/libsrc/c128/clrscr.s @@ -6,9 +6,6 @@ .export _clrscr - .include "c128.inc" + .include "cbm_kernal.inc" _clrscr = CLRSCR - - - diff --git a/libsrc/c128/cputc.s b/libsrc/c128/cputc.s index 9d269a47e..667260843 100644 --- a/libsrc/c128/cputc.s +++ b/libsrc/c128/cputc.s @@ -9,8 +9,8 @@ .export _cputcxy, _cputc, cputdirect, putchar .export newline, plot .import gotoxy - .import PLOT + .include "cbm_kernal.inc" .include "c128.inc" newline = NEWLINE @@ -85,4 +85,3 @@ plot: ldy CURS_X ; position in Y putchar = $CC2F - diff --git a/libsrc/c128/mainargs.s b/libsrc/c128/mainargs.s index f53ceafa0..dcf590024 100644 --- a/libsrc/c128/mainargs.s +++ b/libsrc/c128/mainargs.s @@ -25,6 +25,7 @@ .constructor initmainargs, 24 .import __argc, __argv + .include "cbm_kernal.inc" .include "c128.inc" diff --git a/libsrc/c16/cgetc.s b/libsrc/c16/cgetc.s index a61373ac7..52d985caf 100644 --- a/libsrc/c16/cgetc.s +++ b/libsrc/c16/cgetc.s @@ -7,6 +7,7 @@ .export _cgetc .import cursor + .include "cbm_kernal.inc" .include "plus4.inc" diff --git a/libsrc/c16/clrscr.s b/libsrc/c16/clrscr.s index 56fe0c62c..a3c519cb1 100644 --- a/libsrc/c16/clrscr.s +++ b/libsrc/c16/clrscr.s @@ -6,10 +6,6 @@ .export _clrscr - .include "plus4.inc" + .include "cbm_kernal.inc" _clrscr = CLRSCR - - - - diff --git a/libsrc/c64/cgetc.s b/libsrc/c64/cgetc.s index 042f99fd3..58008990b 100644 --- a/libsrc/c64/cgetc.s +++ b/libsrc/c64/cgetc.s @@ -7,6 +7,7 @@ .export _cgetc .import cursor + .include "cbm_kernal.inc" .include "c64.inc" _cgetc: lda KEY_COUNT ; Get number of characters diff --git a/libsrc/c64/clrscr.s b/libsrc/c64/clrscr.s index 396828847..a3c519cb1 100644 --- a/libsrc/c64/clrscr.s +++ b/libsrc/c64/clrscr.s @@ -6,9 +6,6 @@ .export _clrscr - .include "c64.inc" + .include "cbm_kernal.inc" _clrscr = CLRSCR - - - diff --git a/libsrc/c64/ser/c64-swlink.s b/libsrc/c64/ser/c64-swlink.s index 813067239..87b8e2f09 100644 --- a/libsrc/c64/ser/c64-swlink.s +++ b/libsrc/c64/ser/c64-swlink.s @@ -24,6 +24,7 @@ .include "zeropage.inc" .include "ser-kernel.inc" .include "ser-error.inc" + .include "cbm_kernal.inc" .include "c64.inc" .macpack module @@ -45,15 +46,15 @@ ; Jump table - .word INSTALL - .word UNINSTALL - .word OPEN - .word CLOSE - .word GET - .word PUT - .word STATUS - .word IOCTL - .word IRQ + .word SWL_INSTALL + .word SWL_UNINSTALL + .word SWL_OPEN + .word SWL_CLOSE + .word SWL_GET + .word SWL_PUT + .word SWL_STATUS + .word SWL_IOCTL + .word SWL_IRQ ;---------------------------------------------------------------------------- ; I/O definitions @@ -136,11 +137,11 @@ ParityTable: .code ;---------------------------------------------------------------------------- -; INSTALL routine. Is called after the driver is loaded into memory. If +; SWL_INSTALL routine. Is called after the driver is loaded into memory. If ; possible, check if the hardware is present. ; Must return an SER_ERR_xx code in a/x. -INSTALL: +SWL_INSTALL: ; Deactivate DTR and disable 6551 interrupts @@ -165,10 +166,10 @@ SetNMI: sta NMIVec rts ;---------------------------------------------------------------------------- -; UNINSTALL routine. Is called before the driver is removed from memory. +; SWL_UNINSTALL routine. Is called before the driver is removed from memory. ; Must return an SER_ERR_xx code in a/x. -UNINSTALL: +SWL_UNINSTALL: ; Stop interrupts, drop DTR @@ -185,7 +186,7 @@ UNINSTALL: ; PARAMS routine. A pointer to a ser_params structure is passed in ptr1. ; Must return an SER_ERR_xx code in a/x. -OPEN: +SWL_OPEN: ; Check if the handshake setting is valid @@ -256,11 +257,11 @@ InvBaud: rts ;---------------------------------------------------------------------------- -; CLOSE: Close the port, disable interrupts and flush the buffer. Called +; SWL_CLOSE: Close the port, disable interrupts and flush the buffer. Called ; without parameters. Must return an error code in a/x. ; -CLOSE: +SWL_CLOSE: ; Stop interrupts, drop DTR @@ -278,12 +279,13 @@ CLOSE: rts ;---------------------------------------------------------------------------- -; GET: Will fetch a character from the receive buffer and store it into the +; SWL_GET: Will fetch a character from the receive buffer and store it into the ; variable pointer to by ptr1. If no data is available, SER_ERR_NO_DATA is ; return. ; -GET: ldx SendFreeCnt ; Send data if necessary +SWL_GET: + ldx SendFreeCnt ; Send data if necessary inx ; X == $FF? beq @L1 lda #$00 @@ -322,11 +324,11 @@ GET: ldx SendFreeCnt ; Send data if necessary rts ;---------------------------------------------------------------------------- -; PUT: Output character in A. +; SWL_PUT: Output character in A. ; Must return an error code in a/x. ; -PUT: +SWL_PUT: ; Try to send @@ -356,31 +358,33 @@ PUT: rts ;---------------------------------------------------------------------------- -; STATUS: Return the status in the variable pointed to by ptr1. +; SWL_STATUS: Return the status in the variable pointed to by ptr1. ; Must return an error code in a/x. ; -STATUS: lda ACIA_STATUS +SWL_STATUS: + lda ACIA_STATUS ldx #0 sta (ptr1,x) txa ; SER_ERR_OK rts ;---------------------------------------------------------------------------- -; IOCTL: Driver defined entry point. The wrapper will pass a pointer to ioctl +; SWL_IOCTL: Driver defined entry point. The wrapper will pass a pointer to ioctl ; specific data in ptr1, and the ioctl code in A. ; Must return an error code in a/x. ; -IOCTL: lda #SER_ERR_INV_IOCTL - rts + rts ;---------------------------------------------------------------------------- -; IRQ: Not used on the C64 +; SWL_IRQ: Not used on the C64 ; -IRQ = $0000 +SWL_IRQ = $0000 ;---------------------------------------------------------------------------- ; @@ -476,4 +480,3 @@ InitBuffers: stx RecvFreeCnt stx SendFreeCnt rts - diff --git a/libsrc/c64/soft80_cgetc.s b/libsrc/c64/soft80_cgetc.s index ae0e23857..05e9e5b47 100644 --- a/libsrc/c64/soft80_cgetc.s +++ b/libsrc/c64/soft80_cgetc.s @@ -11,6 +11,7 @@ .import cursor .importzp tmp1 + .include "cbm_kernal.inc" .include "c64.inc" .include "soft80.inc" diff --git a/libsrc/c64/soft80mono_cgetc.s b/libsrc/c64/soft80mono_cgetc.s index d99dc7775..8d8dc940d 100644 --- a/libsrc/c64/soft80mono_cgetc.s +++ b/libsrc/c64/soft80mono_cgetc.s @@ -12,6 +12,7 @@ .import cursor .importzp tmp1 + .include "cbm_kernal.inc" .include "c64.inc" .include "soft80.inc" diff --git a/libsrc/plus4/cgetc.s b/libsrc/plus4/cgetc.s index fcbc66064..62863c06e 100644 --- a/libsrc/plus4/cgetc.s +++ b/libsrc/plus4/cgetc.s @@ -7,6 +7,7 @@ .export _cgetc .import cursor + .include "cbm_kernal.inc" .include "plus4.inc" ; -------------------------------------------------------------------------- diff --git a/libsrc/plus4/clrscr.s b/libsrc/plus4/clrscr.s index 720a5e6e4..a67016255 100644 --- a/libsrc/plus4/clrscr.s +++ b/libsrc/plus4/clrscr.s @@ -6,6 +6,7 @@ .export _clrscr + .include "cbm_kernal.inc" .include "plus4.inc" .segment "LOWCODE" ; Must go into low memory @@ -16,9 +17,3 @@ sta ENABLE_RAM ; Switch back to RAM rts ; Return to caller .endproc - - - - - - diff --git a/libsrc/vic20/cgetc.s b/libsrc/vic20/cgetc.s index d5af9a9f6..1a5c8d5a2 100644 --- a/libsrc/vic20/cgetc.s +++ b/libsrc/vic20/cgetc.s @@ -7,6 +7,7 @@ .export _cgetc .import cursor + .include "cbm_kernal.inc" .include "vic20.inc" _cgetc: lda KEY_COUNT ; Get number of characters diff --git a/libsrc/vic20/clrscr.s b/libsrc/vic20/clrscr.s index 8d4994eac..a3c519cb1 100644 --- a/libsrc/vic20/clrscr.s +++ b/libsrc/vic20/clrscr.s @@ -6,9 +6,6 @@ .export _clrscr - .include "vic20.inc" + .include "cbm_kernal.inc" _clrscr = CLRSCR - - -