1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-26 05:29:30 +00:00

CLOSE is actually the same as INSTALL/UNINSTALL

git-svn-id: svn://svn.cc65.org/cc65/trunk@3502 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz 2005-05-05 10:25:27 +00:00
parent a835641eb7
commit a170b50687
3 changed files with 20 additions and 69 deletions

View File

@ -125,10 +125,15 @@ ParityTable:
;
; UNINSTALL routine. Is called before the driver is removed from memory.
; Must return an SER_ERR_xx code in a/x.
; and:
;
; CLOSE: Close the port, disable interrupts and flush the buffer. Called
; without parameters. Must return an error code in a/x.
;
INSTALL:
UNINSTALL:
CLOSE:
; Deactivate DTR and disable 6551 interrupts
@ -216,28 +221,6 @@ InvBaud:
ldx #>SER_ERR_BAUD_UNAVAIL
rts
;----------------------------------------------------------------------------
; CLOSE: Close the port, disable interrupts and flush the buffer. Called
; without parameters. Must return an error code in a/x.
;
CLOSE:
; Stop interrupts, drop DTR
lda #%00001010
jsr write_cmd
; Initalize buffers.
jsr InitBuffers
; Return OK
lda #<SER_ERR_OK
tax ; A is zero
rts
;----------------------------------------------------------------------------
; 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

View File

@ -125,10 +125,16 @@ ParityTable:
;
; UNINSTALL routine. Is called before the driver is removed from memory.
; Must return an SER_ERR_xx code in a/x.
;
; and:
;
; CLOSE: Close the port, disable interrupts and flush the buffer. Called
; without parameters. Must return an error code in a/x.
;
INSTALL:
UNINSTALL:
CLOSE:
; Deactivate DTR and disable 6551 interrupts
@ -216,28 +222,6 @@ InvBaud:
ldx #>SER_ERR_BAUD_UNAVAIL
rts
;----------------------------------------------------------------------------
; CLOSE: Close the port, disable interrupts and flush the buffer. Called
; without parameters. Must return an error code in a/x.
;
CLOSE:
; Stop interrupts, drop DTR
lda #%00001010
jsr write_cmd
; Initalize buffers.
jsr InitBuffers
; Return OK
lda #<SER_ERR_OK
tax ; A is zero
rts
;----------------------------------------------------------------------------
; 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

View File

@ -133,10 +133,16 @@ ParityTable:
;
; UNINSTALL routine. Is called before the driver is removed from memory.
; Must return an SER_ERR_xx code in a/x.
;
; and:
;
; CLOSE: Close the port, disable interrupts and flush the buffer. Called
; without parameters. Must return an error code in a/x.
;
INSTALL:
UNINSTALL:
CLOSE:
; Deactivate DTR and disable 6551 interrupts
@ -223,28 +229,6 @@ InvBaud:
ldx #>SER_ERR_BAUD_UNAVAIL
rts
;----------------------------------------------------------------------------
; CLOSE: Close the port, disable interrupts and flush the buffer. Called
; without parameters. Must return an error code in a/x.
;
CLOSE:
; Stop interrupts, drop DTR
lda #%00001010
sta ACIA_CMD
; Initalize buffers.
jsr InitBuffers
; Return OK
lda #<SER_ERR_OK
tax ; A is zero
rts
;----------------------------------------------------------------------------
; 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