]> cloudbase.mooo.com Git - z180-stamp-cpm3.git/commitdiff
WIP
authorLeo C <erbl259-lmu@yahoo.de>
Sat, 23 Apr 2016 15:21:35 +0000 (17:21 +0200)
committerLeo C <erbl259-lmu@yahoo.de>
Mon, 13 Jun 2016 16:21:20 +0000 (18:21 +0200)
cbios/Makefile
cbios/ascii.180
cbios/bioskrnl.180
cbios/boot.180
cbios/stampf.180 [new file with mode: 0644]
cbios/tcflags-sorted.txt [new file with mode: 0644]
cbios/termios.inc [new file with mode: 0644]

index 6d01deca8736433149ccbd48e7b0e518530aba15..53fa5891d1cffe7d65a375a49cdc07bc352ae5d0 100644 (file)
@@ -1,6 +1,6 @@
 
 
-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
index 2581bf539b714103d89b1fd961b6e88412aa9a5b..0ee942d5a2bd9478130f84d8011565026cc22325 100644 (file)
@@ -1,4 +1,3 @@
-       page    200\r
 \r
 ; Interrupt drivers for ASCI0 and ASCI1\r
 \r
index 0bb3ecc499b494712790f5781ca45934a090a4b4..834a2fa18d988e119dc9a54b046bde81cf5ebea7 100644 (file)
@@ -64,6 +64,7 @@ ccp   equ     0100h           ; Console Command Processor gets loaded
 \r
        extrn ?time                     ; signal time operation\r
 \r
+       extrn stampf\r
        extrn ijphl                     ; vectored call\r
 \r
        maclib modebaud.inc             ; define mode bits\r
@@ -122,7 +123,8 @@ ccp equ     0100h           ; Console Command Processor gets loaded
 ?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
index 766277ff005f9bdc95bcde597ff8ab3889e64f07..8e41728b90e26eb3ff8bd45f129ad6126fe9ed9b 100644 (file)
@@ -3,7 +3,7 @@
 \r
 \r
        public  hwinit,?init,?ldccp,?rlccp\r
-\r
+       public  signon\r
        public  f_cpu\r
 \r
        extrn   boot,?conin\r
@@ -13,9 +13,9 @@
        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
@@ -78,6 +78,7 @@ hwini_skip:
        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
diff --git a/cbios/stampf.180 b/cbios/stampf.180
new file mode 100644 (file)
index 0000000..25a891a
--- /dev/null
@@ -0,0 +1,29 @@
+\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
diff --git a/cbios/tcflags-sorted.txt b/cbios/tcflags-sorted.txt
new file mode 100644 (file)
index 0000000..fdc8f61
--- /dev/null
@@ -0,0 +1,117 @@
+
+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.
diff --git a/cbios/termios.inc b/cbios/termios.inc
new file mode 100644 (file)
index 0000000..12b1d3a
--- /dev/null
@@ -0,0 +1,64 @@
+;    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