home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
World of A1200
/
World_Of_A1200.iso
/
programs
/
develop
/
as65
/
demo
/
d
/
acia_tty.d
next >
Wrap
Text File
|
1995-02-27
|
3KB
|
113 lines
;**************************************************************************
;
; Filename : ACIA_TTY.D
; ---------------------
;
; (c) 1990 by Thomas Lehmann
;
;
; Jackophone V5.00
;
;
; Definition der ACIA bzw. Protokoll
;
;
;**************************************************************************
; ==========================
; ACIA 6551 Register Offsets
; ==========================
ACIA_TXD equ 0 ; write, Transmit Data
ACIA_RXD equ 0 ; read, received Data
ACIA_RES equ 1 ; write, Reset
ACIA_STS equ 1 ; read, Status Register
ACIA_CMD equ 2 ; write/read, Command Register
ACIA_CTRL equ 3 ; write/read, Control Register
; ACIA Status Register, Interrupt Quellen
; ---------------------------------------
STS_PARITY equ %00000001 ; Parity Error
STS_FRAMING equ %00000010 ; Framing Error
STS_OVERRUN equ %00000100 ; Overrun Error
STS_RXD equ %00001000 ; Receiver Data Register full
STS_TXD equ %00010000 ; Transmitter Data Register empty
STS_DCD equ %00100000 ; Data Carrier Detect
STS_DSR equ %01000000 ; Data Set Ready
STS_IRQ equ %10000000 ; ACIA IRQ
STS_ERRMSK equ STS_PARITY|STS_FRAMING|STS_OVERRUN
; ACIA Control Register
; ---------------------
CTRL_SBR0 equ %00000001 ; Select Baud Rate
CTRL_SBR1 equ %00000010
CTRL_SBR2 equ %00000100
CTRL_SBR3 equ %00001000
CTRL_RCS equ %00010000 ; Receiver Clock Source
CTRL_WL0 equ %00100000 ; Word Length
CTRL_WL1 equ %01000000
CTRL_SBN equ %10000000 ; Stop BIT Number
; ACIA Command Register
; ---------------------
CMD_DTR equ %00000001 Data Terminal Ready, enable IRQ`s
CMD_IRD equ %00000010 Disable receiver IRQ
CMD_TIC0 equ %00000100 Transmitter IRQ Control
CMD_TIC1 equ %00001000
CMD_REM equ %00010000 Receiver Echo Mode
CMD_PME equ %00100000 Parity Mode Enable
CMD_PMC0 equ %01000000 Parity Mode Control
CMD_PMC1 equ %10000000
; Baud Raten
; ----------
BAUD_50 equ CTRL_SBR0
BAUD_150 equ CTRL_SBR0|CTRL_SBR2
BAUD_300 equ CTRL_SBR1|CTRL_SBR2
BAUD_600 equ CTRL_SBR0|CTRL_SBR1|CTRL_SBR2
BAUD_1200 equ CTRL_SBR3
BAUD_2400 equ CTRL_SBR1|CTRL_SBR3
BAUD_4800 equ CTRL_SBR2|CTRL_SBR3
BAUD_9600 equ CTRL_SBR1|CTRL_SBR2|CTRL_SBR3
BAUD_19200 equ CTRL_SBR0|CTRL_SBR1|CTRL_SBR2|CTRL_SBR3
BAUD equ BAUD_2400 ; <<-- ist das höchste der Gefühle für RXD
; =====================
; Character für Console
; =====================
CR equ $0d Code für Carrige Return
LF equ $0a Code für Line Feed
; ====================
; Protokoll Definition
; ====================
STX equ $f0 Start bzw. Sync-Zeichen
ETX equ $f1 Ende Zeichen
XON equ $f2 Übertragungs Freigabe
XOFF equ $f3 Übertragungs Stop
ESC equ $f4 Sonderzeichen folgt
ACK equ $f5 positive Quittung
NACK equ $f6 negative Quittung