1 ;****************************************************************************
5 ;* Serial communication API *
9 ;*(C) 2003 Ullrich von Bassewitz *
11 ;* D-70794 Filderstadt *
12 ;*EMail: uz@cc65.org *
15 ;*This software is provided 'as-is', without any expressed or implied *
16 ;*warranty. In no event will the authors be held liable for any damages *
17 ;*arising from the use of this software. *
19 ;*Permission is granted to anyone to use this software for any purpose, *
20 ;*including commercial applications, and to alter it and redistribute it *
21 ;*freely, subject to the following restrictions: *
23 ;*1. The origin of this software must not be misrepresented; you must not *
24 ;* claim that you wrote the original software. If you use this software *
25 ;* in a product, an acknowledgment in the product documentation would be *
26 ;* appreciated but is not required. *
27 ;*2. Altered source versions must be plainly marked as such, and must not *
28 ;* be misrepresented as being the original software. *
29 ;*3. This notice may not be removed or altered from any source *
32 ;****************************************************************************
36 ;------------------------------------------------------------------------------
37 ; Offsets into the driver header
39 SER_HDR_ID = 0 ; Contains 0x73, 0x65, 0x72 ("ser")
40 SER_HDR_VERSION = 3 ; Interface version
43 SER_HDR_INSTALL = SER_HDR_JUMPTAB+0 ; INSTALL routine
44 SER_HDR_UNINSTALL = SER_HDR_JUMPTAB+2 ; UNINSTALL routine
45 SER_HDR_PARAMS = SER_HDR_JUMPTAB+4 ; PARAMS routine
46 SER_HDR_GET = SER_HDR_JUMPTAB+6 ; GET routine
47 SER_HDR_PUT = SER_HDR_JUMPTAB+8 ; PUT routine
48 SER_HDR_PAUSE = SER_HDR_JUMPTAB+10 ; PAUSE routine
49 SER_HDR_UNPAUSE = SER_HDR_JUMPTAB+12 ; UNPAUSE routine
50 SER_HDR_STATUS = SER_HDR_JUMPTAB+14 ; STATUS routine
51 SER_HDR_IOCTL = SER_HDR_JUMPTAB+16 ; IOCTL routine
53 SER_HDR_JUMPCOUNT = 9 ; Number of jump vectors
55 ;------------------------------------------------------------------------------
56 ; Offsets into the struct passed to ser_params
58 SER_PARAMS_BAUDRATE = 0 ; Baudrate
59 SER_PARAMS_DATABITS = 1 ; Number of data bits
60 SER_PARAMS_STOPBITS = 2 ; Number of stop bits
61 SER_PARAMS_PARITY = 3 ; Parity setting
62 SER_PARAMS_HANDSHAKE = 4 ; Type of handshake to use
64 ;------------------------------------------------------------------------------
105 SER_HS_NONE = $00 ; No handshake
106 SER_HS_HW = $01 ; Hardware (RTS/CTS) handshake
107 SER_HS_SW = $02 ; Software handshake
109 ; Bit masks to mask out things from the status returned by rs232_status
110 SER_STATUS_PE = $01 ; Parity error
111 SER_STATUS_FE = $02 ; Framing error
112 SER_STATUS_OE = $04 ; Overrun error
113 SER_STATUS_DCD = $20 ; NOT data carrier detect
114 SER_STATUS_DSR = $40 ; NOT data set ready
116 ;------------------------------------------------------------------------------
119 .global _ser_drv ; Pointer to driver
121 ;------------------------------------------------------------------------------
122 ; Driver entry points
125 .global ser_uninstall
135 ;------------------------------------------------------------------------------
140 .global _ser_uninstall