-SRC := bioskrnl.180 boot.180 chario.180 drvtbl.180
+SRC := bioskrnl.180 boot.180 stampf.180 chario.180 drvtbl.180
SRC += move.180 time.180 mm.180 misc.180 utils.180 fifo.180
SRC += msgbuf.180 conbuf.180 ascii.180 asci-cmn.180
SRC += sdio.180 cfio.180
- page 200\r
\r
; Interrupt drivers for ASCI0 and ASCI1\r
\r
\r
extrn ?time ; signal time operation\r
\r
+ extrn stampf\r
extrn ijphl ; vectored call\r
\r
maclib modebaud.inc ; define mode bits\r
?stbnk: jp setbnk ; select different bank for disk I/O DMA operations\r
?xmov: jp ?xmove ; set source and destination banks for one operation\r
\r
- jp 0 ; reserved for system implementor\r
+ jp stampf ; stamp system specific functions\r
+ ; reserved for system implementor\r
jp 0 ; reserved for future expansion\r
jp 0 ; reserved for future expansion\r
?ioctl jp ioctl ;\r
\r
\r
public hwinit,?init,?ldccp,?rlccp\r
-\r
+ public signon\r
public f_cpu\r
\r
extrn boot,?conin\r
extrn @civec,@covec,@aivec,@aovec,@lovec\r
extrn @cbnk,?move,?xmove\r
\r
- include version.inc\r
- include config.inc\r
- include z180reg.inc\r
+ maclib z180reg.inc\r
+ maclib config.inc\r
+ maclib version.inc\r
\r
\r
ccpsize equ 0c80h\r
ld (@cbnk),a ; right now in bank 0\r
\r
call pr.inln ; print signon message\r
+signon:\r
db 13,10,13,10,'CP/M Version 3.0, Z180-Stamp BIOS v'\r
defvers\r
db 13,10\r
--- /dev/null
+\r
+ public stampf\r
+\r
+ maclib z180reg.inc\r
+ maclib config.inc\r
+\r
+ cseg\r
+stampf:\r
+ dec c\r
+ jr nz,f2\r
+; c == 1: return bios version\r
+ ld hl,0<<8 + 7 ;h = major, l = minor\r
+ jr exit\r
+f2:\r
+ dec c\r
+ jr nz,f3\r
+; c == 2: return bios id string\r
+ ld hl,id\r
+ jr exit\r
+f3:\r
+ ld hl,0ffffh ; error\r
+exit:\r
+ ld a,l\r
+ ret\r
+\r
+id:\r
+ db "Stamp BIOS",0\r
+\r
+ end\r
--- /dev/null
+
+IGNBRK equ 00000001B ;Ignore BREAK condition on input.
+BRKINT equ 00000010B
+INPCK equ 00000100B ;Enable input parity checking.
+IGNPAR equ 00001000B ;Ignore framing errors and parity errors.
+PARMRK equ 00010000B ;Prefix a character with a parity error or framing error with FFH 00H.
+ISTRIP equ 00100000B ;Strip off eighth bit.
+PARODD equ 01000000B ;If set, then parity for input and output is odd.
+
+IXON equ 00000001B ;Enable XON/XOFF flow control on output.
+IXANY equ 00000010B ;Typing any character will restart stopped output.
+IXOFF equ 00000100B ;Enable XON/XOFF flow control on input.
+CRTS_IFLOW equ 00001000B ;RTS flow control of input.
+CCTS_OFLOW equ 00010000B ;CTS flow control of output.
+CLOCAL equ 00100000B ;Ignore modem control lines.
+CREAD equ 01000000B ;Enable receiver.
+
+CBAUD equ 0x1F ;Baud speed mask
+ B0 equ 0x00 ;hang up
+ B50 equ 0x11
+ B75 equ 0x12
+ B110 equ 0x13
+ B134 equ 0x14
+ B150 equ 0x05
+ B300 equ 0x06
+ B600 equ 0x07
+ B1200 equ 0x08
+ B1800 equ 0x09
+ B2400 equ 0x0A
+ B3600 equ 0x0B
+ B4800 equ 0x0C
+ B7200 equ 0x0D
+ B9600 equ 0x0E
+ B19200 equ 0x0F
+ B28800 equ 0x01
+ B38400 equ 0x02
+ B57600 equ 0x03
+ B115200 equ 0x04
+ B144000 equ 0x14
+ B192000 equ 0x16
+ B288000 equ 0x17
+
+CSIZE equ 0x20 ;Character size mask.
+ CS7 equ 0x00 ;
+ CS8 equ 0x20 ;
+CSTOPB equ 0x40 ;Set two stop bits, rather than one.
+PARENB equ 0x80 ;Enable parity generation on output and parity checking for input.
+
+
+
+checked on input isr:
+=====================
+IGNBRK equ 00000001B ;Ignore BREAK condition on input.
+BRKINT equ 00000010B
+INPCK equ 00000100B ;Enable input parity checking.
+IGNPAR equ 00001000B ;Ignore framing errors and parity errors.
+PARMRK equ 00010000B ;Prefix a character with a parity error or framing error with FFH 00H.
+
+IXON equ 00000001B ;Enable XON/XOFF flow control on output.
+IXANY equ 00000010B ;Typing any character will restart stopped output.
+IXOFF equ 00000100B ;Enable XON/XOFF flow control on input.
+CRTS_IFLOW equ 00001000B ;RTS flow control of input.
+
+
+checked on input:
+=================
+
+
+
+checked on output isr
+=====================
+
+
+
+checked on output
+=================
+ISTRIP equ 00100000B ;Strip off eighth bit.
+
+
+
+config (init)
+=============
+
+CBAUD equ 0x1F ;Baud speed mask
+ B0 equ 0x00 ;hang up
+ B50 equ 0x11
+ B75 equ 0x12
+ B110 equ 0x13
+ B134 equ 0x14
+ B150 equ 0x05
+ B300 equ 0x06
+ B600 equ 0x07
+ B1200 equ 0x08
+ B1800 equ 0x09
+ B2400 equ 0x0A
+ B3600 equ 0x0B
+ B4800 equ 0x0C
+ B7200 equ 0x0D
+ B9600 equ 0x0E
+ B19200 equ 0x0F
+ B28800 equ 0x01
+ B38400 equ 0x02
+ B57600 equ 0x03
+ B115200 equ 0x04
+ B144000 equ 0x14
+ B192000 equ 0x16
+ B288000 equ 0x17
+CSIZE equ 0x20 ;Character size mask.
+ CS7 equ 0x00 ;
+ CS8 equ 0x20 ;
+CSTOPB equ 0x40 ;Set two stop bits, rather than one.
+PARENB equ 0x80 ;Enable parity generation on output and parity checking for input.
+PARODD equ 01000000B ;If set, then parity for input and output is odd.
+
+CCTS_OFLOW equ 00010000B ;CTS flow control of output.
+CLOCAL equ 00100000B ;Ignore modem control lines.
+CREAD equ 01000000B ;Enable receiver.
--- /dev/null
+; tcflag_t c_iflag; /* input mode flags */
+IGNBRK equ 00000001B ;Ignore BREAK condition on input.
+BRKINT equ 00000010B
+IGNPAR equ 00000100B ;Ignore framing errors and parity errors.
+PARMRK equ 00001000B ;Prefix a character with a parity error or framing error with FFH 00H.
+INPCK equ 00010000B ;Enable input parity checking.
+ISTRIP equ 00100000B ;Strip off eighth bit.
+IXON equ 01000000B ;Enable XON/XOFF flow control on output.
+IXANY equ 10000000B ;Typing any character will restart stopped output.
+IXOFF equ 00000000B ;Enable XON/XOFF flow control on input.
+
+; tcflag_t c_cflag; /* control mode flags */
+CBAUD equ 0x1F ;Baud speed mask
+ B0 equ 0x00 ;hang up
+ B50 equ 0x11
+ B75 equ 0x12
+ B110 equ 0x13
+ B134 equ 0x14
+ B150 equ 0x05
+ B300 equ 0x06
+ B600 equ 0x07
+ B1200 equ 0x08
+ B1800 equ 0x09
+ B2400 equ 0x0A
+ B3600 equ 0x0B
+ B4800 equ 0x0C
+ B7200 equ 0x0D
+ B9600 equ 0x0E
+ B19200 equ 0x0F
+ B28800 equ 0x01
+ B38400 equ 0x02
+ B57600 equ 0x03
+ B115200 equ 0x04
+ B144000 equ 0x14
+ B192000 equ 0x16
+ B288000 equ 0x17
+CSIZE equ 00000000B ;Character size mask.
+ CS7 equ 00000000B ;
+ CS8 equ 00000000B ;
+CSTOPB equ 00000000B ;Set two stop bits, rather than one.
+CREAD equ 00000000B ;Enable receiver.
+PARENB equ 00000000B ;Enable parity generation on output and parity checking for input.
+PARODD equ 00000000B ;If set, then parity for input and output is odd.
+CLOCAL equ 00000000B ;Ignore modem control lines.
+CRTS_IFLOW equ 00000000B ;RTS flow control of input.
+CCTS_OFLOW equ 00000000B ;CTS flow control of output.
+
+; tcflag_t c_lflag; /* local mode flags */
+ECHO equ 00000001B
+
+
+; tcflow() and TCXONC use these */
+TCOOFF equ 0
+TCOON equ 1
+TCIOFF equ 2
+TCION equ 3
+; tcflush() and TCFLSH use these */
+TCIFLUSH equ 0
+TCOFLUSH equ 1
+TCIOFLUSH equ 2
+; tcsetattr uses these */
+TCSANOW equ 0
+TCSADRAIN equ 1
+TCSAFLUSH equ 2