mirror of
https://github.com/cc65/cc65.git
synced 2025-08-08 06:25:17 +00:00
Added SER_ prefix. Whitespace cleanup
This commit is contained in:
committed by
Oliver Schmidt
parent
4304f11549
commit
b9054ec9a7
@@ -46,15 +46,15 @@
|
|||||||
|
|
||||||
; Jump table
|
; Jump table
|
||||||
|
|
||||||
.word INSTALL
|
.word SER_INSTALL
|
||||||
.word UNINSTALL
|
.word SER_UNINSTALL
|
||||||
.word OPEN
|
.word SER_OPEN
|
||||||
.word CLOSE
|
.word SER_CLOSE
|
||||||
.word GET
|
.word SER_GET
|
||||||
.word PUT
|
.word SER_PUT
|
||||||
.word STATUS
|
.word SER_STATUS
|
||||||
.word IOCTL
|
.word SER_IOCTL
|
||||||
.word IRQ
|
.word SER_IRQ
|
||||||
|
|
||||||
;----------------------------------------------------------------------------
|
;----------------------------------------------------------------------------
|
||||||
;
|
;
|
||||||
@@ -122,25 +122,25 @@ ParityTable:
|
|||||||
.code
|
.code
|
||||||
|
|
||||||
;----------------------------------------------------------------------------
|
;----------------------------------------------------------------------------
|
||||||
; INSTALL routine. Is called after the driver is loaded into memory. If
|
; SER_INSTALL routine. Is called after the driver is loaded into memory. If
|
||||||
; possible, check if the hardware is present.
|
; possible, check if the hardware is present.
|
||||||
; Must return an SER_ERR_xx code in a/x.
|
; Must return an SER_ERR_xx code in a/x.
|
||||||
;
|
;
|
||||||
; Since we don't have to manage the IRQ vector on the Plus/4, this is actually
|
; Since we don't have to manage the IRQ vector on the Plus/4, this is actually
|
||||||
; the same as:
|
; the same as:
|
||||||
;
|
;
|
||||||
; UNINSTALL routine. Is called before the driver is removed from memory.
|
; SER_UNINSTALL routine. Is called before the driver is removed from memory.
|
||||||
; Must return an SER_ERR_xx code in a/x.
|
; Must return an SER_ERR_xx code in a/x.
|
||||||
;
|
;
|
||||||
; and:
|
; and:
|
||||||
;
|
;
|
||||||
; CLOSE: Close the port, disable interrupts and flush the buffer. Called
|
; SER_CLOSE: Close the port, disable interrupts and flush the buffer. Called
|
||||||
; without parameters. Must return an error code in a/x.
|
; without parameters. Must return an error code in a/x.
|
||||||
;
|
;
|
||||||
|
|
||||||
INSTALL:
|
SER_INSTALL:
|
||||||
UNINSTALL:
|
SER_UNINSTALL:
|
||||||
CLOSE:
|
SER_CLOSE:
|
||||||
|
|
||||||
; Deactivate DTR and disable 6551 interrupts
|
; Deactivate DTR and disable 6551 interrupts
|
||||||
|
|
||||||
@@ -157,7 +157,7 @@ CLOSE:
|
|||||||
; PARAMS routine. A pointer to a ser_params structure is passed in ptr1.
|
; PARAMS routine. A pointer to a ser_params structure is passed in ptr1.
|
||||||
; Must return an SER_ERR_xx code in a/x.
|
; Must return an SER_ERR_xx code in a/x.
|
||||||
|
|
||||||
OPEN:
|
SER_OPEN:
|
||||||
|
|
||||||
; Check if the handshake setting is valid
|
; Check if the handshake setting is valid
|
||||||
|
|
||||||
@@ -237,12 +237,13 @@ InvBaud:
|
|||||||
rts
|
rts
|
||||||
|
|
||||||
;----------------------------------------------------------------------------
|
;----------------------------------------------------------------------------
|
||||||
; GET: Will fetch a character from the receive buffer and store it into the
|
; SER_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
|
; variable pointer to by ptr1. If no data is available, SER_ERR_NO_DATA is
|
||||||
; return.
|
; return.
|
||||||
;
|
;
|
||||||
|
|
||||||
GET: ldx SendFreeCnt ; Send data if necessary
|
SER_GET:
|
||||||
|
ldx SendFreeCnt ; Send data if necessary
|
||||||
inx ; X == $FF?
|
inx ; X == $FF?
|
||||||
beq @L1
|
beq @L1
|
||||||
lda #$00
|
lda #$00
|
||||||
@@ -281,11 +282,11 @@ GET: ldx SendFreeCnt ; Send data if necessary
|
|||||||
rts
|
rts
|
||||||
|
|
||||||
;----------------------------------------------------------------------------
|
;----------------------------------------------------------------------------
|
||||||
; PUT: Output character in A.
|
; SER_PUT: Output character in A.
|
||||||
; Must return an error code in a/x.
|
; Must return an error code in a/x.
|
||||||
;
|
;
|
||||||
|
|
||||||
PUT:
|
SER_PUT:
|
||||||
|
|
||||||
; Try to send
|
; Try to send
|
||||||
|
|
||||||
@@ -315,11 +316,12 @@ PUT:
|
|||||||
rts
|
rts
|
||||||
|
|
||||||
;----------------------------------------------------------------------------
|
;----------------------------------------------------------------------------
|
||||||
; STATUS: Return the status in the variable pointed to by ptr1.
|
; SER_STATUS: Return the status in the variable pointed to by ptr1.
|
||||||
; Must return an error code in a/x.
|
; Must return an error code in a/x.
|
||||||
;
|
;
|
||||||
|
|
||||||
STATUS: lda #$0F
|
SER_STATUS:
|
||||||
|
lda #$0F
|
||||||
sta IndReg
|
sta IndReg
|
||||||
ldy #ACIA::STATUS
|
ldy #ACIA::STATUS
|
||||||
lda (acia),y
|
lda (acia),y
|
||||||
@@ -331,23 +333,25 @@ STATUS: lda #$0F
|
|||||||
rts
|
rts
|
||||||
|
|
||||||
;----------------------------------------------------------------------------
|
;----------------------------------------------------------------------------
|
||||||
; IOCTL: Driver defined entry point. The wrapper will pass a pointer to ioctl
|
; SER_IOCTL: Driver defined entry point. The wrapper will pass a pointer to ioctl
|
||||||
; specific data in ptr1, and the ioctl code in A.
|
; specific data in ptr1, and the ioctl code in A.
|
||||||
; Must return an error code in a/x.
|
; Must return an error code in a/x.
|
||||||
;
|
;
|
||||||
|
|
||||||
IOCTL: lda #<SER_ERR_INV_IOCTL ; We don't support ioclts for now
|
SER_IOCTL:
|
||||||
|
lda #<SER_ERR_INV_IOCTL ; We don't support ioclts for now
|
||||||
ldx #>SER_ERR_INV_IOCTL
|
ldx #>SER_ERR_INV_IOCTL
|
||||||
rts
|
rts
|
||||||
|
|
||||||
;----------------------------------------------------------------------------
|
;----------------------------------------------------------------------------
|
||||||
; IRQ: Called from the builtin runtime IRQ handler as a subroutine. All
|
; SER_IRQ: Called from the builtin runtime IRQ handler as a subroutine. All
|
||||||
; registers are already save, no parameters are passed, but the carry flag
|
; registers are already save, no parameters are passed, but the carry flag
|
||||||
; is clear on entry. The routine must return with carry set if the interrupt
|
; is clear on entry. The routine must return with carry set if the interrupt
|
||||||
; was handled, otherwise with carry clear.
|
; was handled, otherwise with carry clear.
|
||||||
;
|
;
|
||||||
|
|
||||||
IRQ: lda #$0F
|
SER_IRQ:
|
||||||
|
lda #$0F
|
||||||
sta IndReg ; Switch to the system bank
|
sta IndReg ; Switch to the system bank
|
||||||
ldy #ACIA::STATUS
|
ldy #ACIA::STATUS
|
||||||
lda (acia),y ; Check ACIA status for receive interrupt
|
lda (acia),y ; Check ACIA status for receive interrupt
|
||||||
@@ -436,4 +440,3 @@ write: pha
|
|||||||
lda ExecReg
|
lda ExecReg
|
||||||
sta IndReg
|
sta IndReg
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user