home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.barnyard.co.uk
/
2015.02.ftp.barnyard.co.uk.tar
/
ftp.barnyard.co.uk
/
cpm
/
walnut-creek-CDROM
/
SIMTEL
/
CPMUG
/
CPMUG042.ARK
/
NBIOS.ASM
< prev
next >
Wrap
Assembly Source File
|
1984-04-29
|
7KB
|
208 lines
;THIS SOFTWARE APPLIES TO TEI COMPUTERS WITH TEI VERS. OF CP/M ONLY
;AND TEI 3P+3S I/O BOARD
;
;CLOCK PORTION ADDED BY HARRY KAEMMERER (201) 221-2297 12/28/1979
;CLOCK BOARD USED WAS COPU/TIME T-102A
;
;USE OF NBIOS REQUIRES A HARDWARE MODIFICATION FOR THE PRINTER PORT:
;
;1. CONNECT THE DB25 PIN NORMALLY FEEDING DATA TO THE COMPUTER TO IO BOARD
; J3-32
;2. CONNECT J3-34 TO J3-26. (THIS FEEDS THE TTL USART SERIAL INPUT TO THE
; USART'S DSR PIN ALSO).
;3. CONNECT J3-25 TO J3-30. (THIS GROUNDS THE CTS INPUT).
;
; THE INTERFACE WITH THE PRINTER MUST BRING ITS 'BUSY' SIGNAL TO THE DB-25
;PIN WHICH IS THE USART SERIAL INPUT AND DSR (WHERE NBIOS READS DSR FOR PRINTER
;BUSY). THIS WIRING WILL ALLOW THE USART TO BE USED AS A BI-DIRECTIONAL PORT
;AS WELL AS A PRINTER PORT (EVEN THOUGH CP/M WILL ONLY SUPPORT THE PRINTER
;FUNCTION).
;
;THIS MODIFICATION HAS BEEN TESTED WITH AN NEC PRINTER AND IT WORKS WELL.
;
;***************
;* *
;* CAUTION! *
;* *
;***************
;
;IF HARDWARE IS MODIFIED FOR NBIOS, NBIOS MUST BOOT ON ALL DISKS TO OPERATE
;THE PRINTER. IF CP/M DIFFERS IN SIZE, NEW NBIOS FILES MUST BE MADE FOR
;EACH DIFFERENT SIZE.
;
;**********************************************************************
;* *
;* NBIOS (NEW BIOS) PROGRAM *
;* *
;* CREATES A NEW BIOS FOR TERMINALS, PRINTERS, AND *
;* OTHER PERIPHERALS WITHOUT AFFECTING DISKS. *
;* *
;* THIS BIOS IMPLEMENTS CONIN/CONOUT AT PORTS 0,1 *
;* LIST AT PORTS 2,3 *
;* RDR/PUNCH AT PORTS 8,9 *
;* IO BYTE IS NOT IMPLEMENTED, AND DOES NOT HAVE TO *
;* BE PRESET. *
;* *
;* BOTH LIST(PRINTER) AND PUNCH HAVE A SAFETY RELEASE *
;* IF THEY AREN'T CONNECTED OR LOCK-UP THE SYSTEM *
;* FOR ANY REASON. ANY KEYSTROKE WILL RETURN TO *
;* OPERATING SYSTEM. *
;* *
;* HOW TO IMPLEMENT: *
;* *
;* 1. EDIT "SIZE" TO MATCH YOUR SYSTEM *
;* 2. ASSEMBLE THIS PROGRAM *
;* 3. PUT MOVCPM UNDER DDT *
;* 4. OVERLAY THIS PROGRAM *
;* A. -INBIOS.HEX *
;* -R<OFFSET> *
;* B. OFFSET=12100H-SIZE(HEX) *
;* EXAMPLES, 60K, OFFSET=3100H *
;* 56K, OFFSET=4100H *
;* 5. SAVE 35 MOVCPMX.COM *
;* 6. MOVCPMX * * *
;* 7. SYSGEN (USE RETURN FOR SYSTEM FROM MEMORY) *
;* *
;* VIDEO SPECIALTIES (714) 481-0073 *
;* DOES NOT RESTRICT THE USE OF THIS PROGRAM *
;* PREPARED NOVEMBER 16th 1979 *
;* *
;**********************************************************************
SIZE EQU 56 ; SYSTEM SIZE IN KILOBYTES
GOCPM EQU 0F003H
WBOOT EQU 0F006H
HOME EQU 0F009H
SELDSK EQU 0F00CH
SETTRK EQU 0F00FH
SETSEC EQU 0F012H
SETDMA EQU 0F015H
READ EQU 0F018H
WRITE EQU 0F01BH
MESS1 EQU 0F7EBH
CR EQU 0DH
LF EQU 0AH
;
ORG SIZE*1024-512
;
JMP GOCPM
JMP LABEL
JMP CONST
JMP CONIN
JMP CONOUT
JMP LIST
JMP PUNCH
JMP READER
JMP HOME
JMP SELDSK
JMP SETTRK
JMP SETSEC
JMP SETDMA
JMP READ
JMP WRITE
CONST IN 00H
ANI 01H
JNZ CT2
CMA
ORA A
RET
CT2 XRA A
RET
CONIN CALL CONST
JZ CONIN
IN 01H
ANI 7FH
RET
CONOUT IN 00H
ANI 80H
JNZ CONOUT
MOV A,C
OUT 01H
LDA 03H
ANI 03H
CPI 02H
RNZ
LIST IN 03H
ANI 84H
CPI 84H
JNZ TEST
MOV A,C
OUT 02H
RET
TEST CALL CONST
JZ LIST
RET
READER IN 08H
ANI 01H
JNZ TEST1
IN 09H
RET
TEST1 CALL CONST
JZ READER
RET
PUNCH IN 08H
ANI 80H
JNZ PUNCH
MOV A,C
OUT 09H
RET
;
LABEL LXI H,LABEL1+7 ;*** CLOCK STARTS HERE ***
MVI A,0
CALL GETDIG
MVI A,1
CALL GETDIG
INX H
MVI A,2
CALL GETDIG
MVI A,3
CALL GETDIG
INX H
MVI A,4
CALL GETDIG
MVI A,5
CALL GETDIG
LXI H,LABEL1+22
MVI A,8
OUT 0C0H
CALL DELAY
IN 0C0H
ANI 0FH
ADI 48
CPI 63
CZ SET1
MOV M,A
MVI A,9
CALL GETDIG
INX H
MVI A,10
CALL GETDIG
MVI A,11
CALL GETDIG
LXI H,LABEL1
CALL MESS1
JMP WBOOT
SET1 MVI A,20H
RET
GETDIG OUT 0C0H
CALL DELAY
IN 0C0H
ANI 0FH
ADI 48
INX H
MOV M,A
RET
DELAY PUSH D
LXI D,01FFH
WAIT1 DCR E
JNZ WAIT1
DCR D
JNZ WAIT1
POP D
RET
LABEL1 DB CR,LF,LF
DB 'TIME HH:MM:SS DATE MM/DD/1980'
DB CR,LF,LF
DB '56K CP/MX',CR,LF