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
/
CPM
/
MODEMS
/
MODEM
/
SSTERM20.LBR
/
VT100OVL.AZM
/
VT100OVL.ASM
Wrap
Assembly Source File
|
2000-06-30
|
8KB
|
222 lines
;SSTERM VERSION 2.00 - SPLIT SCREEN TERMINAL PROGRAM (3/22/87)
;
;OVERLAY FOR USE WITH VT100 TERMINAL IN THE VT52 MODE ON THE CONKEY-64
; NOTE:SHOULD ALSO WORK WITH VT100 COMPATABLE TERMINALS
;
;TERMINAL PROGRAM FOR USE WITH REAL TIME CONFERANCE,C.B. LIVEWIRE OR ANY OTHER
;FULL DUPLEX APPLICATIONS WHERE YOU WISH TO KEEP YOUR KEYBOARD TEXT SEPERATE
;FROM THE TEXT RECEIVED FROM THE MODEM.
;
;PROGRAM WRITTEN BY W.MUNSON.... IF YOU FIND ANY BUGS IN THE PROGRAM OR IF YOU
;NEED ASSISTANCE IN CUSTOMIZING IT FOR YOUR USE, CONTACT ME BY E-MAIL ON GENIE
;OR ON THE HEATH/ZENITH BBS. (716) 424-2576.
;
;NOTE:THIS PROGRAM IS BEING RELEASED AS PUBLIC DOMAIN AND MAY BE DISTRIBUTED
;TO ALL WHO WISH TO USE IT.
;
;TO CUSTOMIZE THIS OVERLAY JUST CHANGE THE FOLLOWING SECTIONS TO REFLECT YOUR
;SYSTEM'S AND TERMINAL'S NEEDS. THEN ASSEMBLE THE OVERLAY AND LOAD THE
;OVERLAY ON TOP OF SSTERM.COM USING "MLOAD" OR ANOTHER PROGRAM.
;
;
;
;*****************************************************************************
;
;
;THIS SECTION CONTAINS ALL OF THE ADDRESSES AND CONTROL WORDS USED TO
;COMMAND THE UARTS... THESE ARE THE STANDARD COMMANDS USED WITH THE 8251A.
MDMPRT EQU 58H ;this is the address of the modem communication port
STAPRT EQU 59H ;this is the address of the modem status port
CONDAT EQU 40H ;this is the address of the console data port
CONSTA EQU 41H ;this is the address of the console status port
;
MODEMK EQU 4EH ;uart mode setup word
MODEGO EQU 37H ;default modem initialization word
DTROFF EQU 05H ;word to turn off dtr
MDMRST EQU 40H ;modem reset word
MDMATN EQU 00H ;gets the attention of the uart
URTRCV EQU 02H ;mask for char ready in usart
URTSND EQU 01H ;mask for usart ready for character
START EQU 1000H ;start of actual program (dont change this line)
;
;*****************************************************************************
;
YES EQU 0FFH
NO EQU 0H
CR EQU 13 ;ascii code for carrage return
LF EQU 10 ;ascii code for line feed
;
;
ORG 100H ;start assembly at beginning of the tpa
;THIS SECTION IS TO ALLOW YOU TO SET UP YOUR MODEM USART AND/OR TERMINAL USART.
;THIS IS ALSO THE SECTION TO SET UP YOUR TERMINAL (VT100 TO VT52 ETC.)
;ON THE CONKEY-64 THIS SETS UP THE MODEM USART. (TERM ALREADY SET UP).
;ROUTINE CANNOT BE LONGER THAN 40H BYTES
INIT: MVI A,MDMATN ;load word to get uart's attention
OUT STAPRT
OUT STAPRT
OUT STAPRT
MVI A,MDMRST ;load reset command
OUT STAPRT
MVI A,MODEMK ; mode mask
OUT STAPRT
MVI A,MODEGO ;enable transmitter and receiver
OUT STAPRT
;
;THIS SECTION SETS THE VT100 IN TO THE VT52 MODE
MVI C,9
LXI D,VT52
CALL 05H ;call bios print string routine
JMP START
;
VT52: DB 0,0,27,'[?21$' ;string to send to terminal for vt52 mode
;
;HERE IS THE SECTION WHICH DEFINES THE TERMINAL CONTROL COMMANDS.
;
;YOU MUST BE ABLE TO ADDRESS THE CURSOR OF YOUR TERMINAL.
;THE FORMAT OF THE STRING IS - FIRST BYTE IS THE NUMBER OF CHARACTERS IN
;THE STRING THEN THE REMAINING BYTES ARE THE STRING ITSELF.
;THERE IS NO PROVISION FOR SENDING A CHARACTER BETWEEN THE COL AND ROW
;DURING CURSOR ADDRESSING (NO VT100 MODE - USE VT52 MODE)
ORG 140H
CLRLNE: EQU $
DB 2
DB 27,'K' ;string sent to clear to end of the
;line. this can be 80 spaces if not
;supported by your terminal
;
ORG 200H
CURADR: EQU $
DB 2,27,'Y' ;string sent before cursor address information
;
ORG 210H
OFFSET: DB 32 ;value of the offset added to cursor addresses
;
COLROW: DB NO ;send coloum before row for cursor address?
;
NEEDLF: DB YES ;does your terminal need line feeds? if it
;does then set this bit to yes
;
ORG 220H
CLRSCN: EQU $
DB 4,27,'H',27,'J' ;string sent to clear screen-can be 24
;carrage returns
;
ORG 240H
ALTON: EQU $
DB 2,0,0 ;string to turn on the alternate video mode
;can be 1,0 if not supported by your terminal
ORG 250H
ALTOFF: EQU $
DB 2,0,0 ;string to turn off the alternate video mode
;can be 1,0 if not supported by your terminal
;
ORG 260H
SCRLUP: EQU $
DB 2,CR,LF ;scroll up string should cause one line to
;be inserted at the bottom of the screen
;when cursor is positioned at bottom of screen
;
ORG 270H
NAME: EQU $
DB 43 ;string to describe the operating system
DB 'for "CONKEY-64" with VT100 type terminal.',CR,LF
;
;
;****************************************************************************
;
;THIS SECTION CONTAINS THE CALLS USED BY THE PROGRAM TO SERVICE THE CONSOLE
;AND THE MODEM. DO NOT CHANGE THE STARTING ADDRESS OF THE CALLS.
;HERE IS A DEESCRIPTION OF THE PURPOSE OF EACH OF THE CALLS.
;
;INCDAT: - IS CALLED WHEN THE PROGRAM WANTS TO INPUT A CHARACTER FROM THE
; CONSOLE. THIS ROUTINE ACTUALLY GETS THE CHAR AND RETURNS IT IN THE 'A'
; REGISTER.
;
;OUTCDT: - IS CALLED WHEN THE PROGRAM WANTS TO SEND A CHARACTER TO THE CONSOLE.
; THIS ROUTINE TAKES A CHAR FROM THE 'A' REGISTER AND SENDS IT TO THE CONSOLE.
;
;INCSTA: - IS CALLED WHEN THE PROGRAM WANTS TO KNOW IF THERE WAS A
; CHARACTER TYPED AT THE CONSOLE KEYBOARD. THE CALL RETURNS A NON-ZERO RESULT
; IF THERE IS A CHARACTER READY.
;
;OTCSTA: - IS CALLED WHEN THE PROGRAM WANTS TO KNOW IF THE CONSOLE IS READY
; TO ACCEPT ANOTHER CHARACTER. THE CALL RETURNS A NON-ZERO RESULT IF THE
; CONSOLE IS READY FOR ANOTHER CHARACTER.
;
;INMDAT: - IS CALLED WHEN THE PROGRAM WANTS TO INPUT A CHARACTER FROM THE
; MODEM. THIS ROUTINE ACTUALLY GETS THE CHAR AND RETRUNS IT IN THE 'A'
; REGISTER.
;
;OUTMDT: - IS CALLED WHEN THE PROGRAM WANTS TO SEND A CHARACTER TO THE MODEM.
; THIS ROUTINE ACTUALLY TAKES THE CHAR FROM THE 'A' REGISTER AND SENDS IT TO
; THE MODEM.
;
;INMSTA: - IS CALLED WHEN THE PROGRAM WANTS TO KNOW IF THERE IS A CHARACTER
; READY TO BE INPUTED FROM THE MODEM. THE ROUTINE RETURNS WITH A NON-ZERO
; RESULT IF THERE IS A CHARACTER.
;
;OTMSTA: - IS CALLED WHEN THE PROGRAM WANTS TO KNOW IF IT CAN SEND A CHAR TO
; THE MODEM. THE ROUTINE RETURNS WITH A NON-ZERO RESULT IF THE MODEM IS READY.
;
;OUTMST: - IS CALLED WHEN THE PROGRAM WANTS TO SEND INFO TO THE MODEM
; COMMAND PORT. THE INFO IS IN THE 'A' REGISTER. THIS CALL IS USED TO SET
; UP THE MODEM USART.
;******************************************************************************
ORG 370H
INCDAT: IN CONDAT ;get char from console usart
RET
;
ORG 380H
OUTCDT: OUT CONDAT ;send char to console usart
RET
;
ORG 390H
INCSTA: IN CONSTA ;get status from console usart
ANI URTRCV ;mask to give non-zero result if uart has a
RET ;to char ready to be inputted
;
ORG 398H
OTCSTA: IN CONSTA ;get status from console uart
ANI URTSND ;mask to give non-zero result if console ready
RET ;to send character
; ;
ORG 3A0H
INMDAT: IN MDMPRT ;get char from modem usart
RET
;
ORG 3B0H
OUTMDT: OUT MDMPRT ;send char to modem usart
RET
;
ORG 3C0H
INMSTA: IN STAPRT ;get status from modem usart
ANI URTRCV ;mask for modem ready to input character
RET
;
ORG 3C8H
OTMSTA: IN STAPRT ;get status from modem usart
ANI URTSND ;mask for modem ready to send character
RET
;
ORG 3D0H
OUTMST: OUT STAPRT ;send command to modem status port
RET
;
;THIS ROUTINE IS HERE TO ALLOW YOU TO RESET YOUR TERMINAL TO IT'S NORMAL
;CONDITION BEFORE EXITING TO CP/M.
;THE ROUTINE SHOULD END WITH A JUMP TO THE WARM START ROUTINE (0000H)
;THE ROUTINE CANNOT BE MORE THAN 20H BYTES LONG
ORG 3E0H
RESET: MVI C,9 ;
LXI D,RSTNG ;
CALL 05H ;send string to reset terminal to vt100
JMP 0000H ;
;
RSTNG: DB 0,0,27,'<$' ;
;
ORG 1000H ;this is the start of the main program.
END