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
/
NODE104.LBR
/
NODE104.MZC
/
NODE2.MAC
Wrap
Text File
|
2000-06-30
|
27KB
|
928 lines
title 'NODE104 - TELENET node repeat dialer'
;=============================================================================
;
;
; This program will repeat-dial remote Telenet nodes until a connection is
; made using various CP/M+ function calls. It looks for the Telenet command
; prompt ("@") to determine that a non-connection condition has been deter-
; mined, and, upon detecting the remote node connection, calls the remote
; modem, and sets it to the more informative Racal-Vadic mode.
;
; At this point, the user's communication program is called, with provision
; for including the name of the remote node on the command line, i.e.,
; "MEX ORPOR <cr>".
;
; User also has the options of returning to his/her communication program,
; to the operating system or disconnection during the dialing cycle.
;
; You will need to select what assembler you are using (see "assembler
; selection;") and your operating system configuration.
;
; You will also need to insert the baudrate you wish to connect to at SPEED:,
; your Telenet identification string at label TNETID:, and your password at
; TNETPW. Place the name of the program you wish to chain to at PRGRM:.
; Each definable section is enclosed in ''++++++++'' boundaries.
;
; Use your favorite editor in non-document mode, and use the assembler you
; have selected below to assemble and link.
;
; My special thanks to Ben Grey for the extensive rewrite.
; Written April 28, 1988 Mike Heffernan
; Modified April 29, 1988 Ben Grey
; Extensively modified May 27, 1988 Mike Heffernan
; Corrected bug which prevented initial answer detect at any baud rate
; other than 1200; added "ASK" routine for use in conjunction with
; PCPCHAIN utility (included in new library)-May 30, 1988. --M.H.
;
; --V1.4:Added lookup table and related routine to allow
; NODE104 to access any Telenet remote node; eliminated ASK routine, added
; SELECT menu. Additional thanks to Ben Grey for extensive guidance with
; lookup table operation--June 13, 1988 --M.H.
;=============================================================================
; Should work on any CPM+ system which uses all the following calls.
; Assumes duplex and baudrate previously set.
no equ 0
yes equ not no
; Version and Revision
ver equ 01 ; Version
rev equ 04 ; Revision
; Version Date
vmth equ 05 ; Month
vday equ 30 ; Day
vyrs equ 88 ; Year
;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
; Assembler Definition
M80 equ yes ; Microsoft M80
SLR equ NO ; SLR Systems
ZAS equ NO ; Echelon
;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
; System Configuration
V1050 equ no ; Visual 1050
; If YOU have a Visual 1050
; contact me (see READ.ME)!
CPM22 equ NO ; Standard CP/M
; Uses function calls NOT
; available in versions 2.2 or less
CPM30 equ yes ; Standard CP/M+ (3.0)
ZCPR3 equ NO ; ZCPR3 is CCP
ZRDOS equ NO ; ZRDOS is OS
;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
base equ 0
bdosev equ base+0005h ; BDOS Entry Vector
dmabuf equ base+0080h ; Default DMA Buffer
tpa equ base+0100h ; Transient Program Area
; CPM Function Call Equates
CONINP equ 01H ; Console Input
CONOUT equ 02H ; Console Output
AUXINP equ 03H ; aux port input--modem port
AUXOUT equ 04H ; aux port output--modem port
AUXIST equ 07H ; aux input status
AUXOST equ 08H ; aux output status
PRTSTR equ 09H ; print string
CONST equ 0BH ; Console Status
CHAIN equ 47 ; Chain-to-program CPM function
CHNFLG equ 00H ; Default drive/user will be set
; Miscellaneous Equates
if v1050 ; Visual 1050
f1key equ 0d4h ; Function Key 1
f2key equ 0d8h ; Function Key 2
f3key equ 0dch ; Function Key 3
f4key equ 0e0h ; Function Key 4
f5key equ 0e4h ; Function Key 5
helpkey equ 0c0h ; Help key on Visual
cls equ 0ch ; Clear Screen
esc equ 1bh ; Escape
else
f1key equ 'R'-'@' ; Control-R
f2key equ 'W'-'@' ; Control-W
f3key equ 'X'-'@' ; Control-X
f4key equ 'D'-'@' ; Control-D
f5key equ 'A'-'@' ; Control-A
helpkey equ 'H'-'@' ; Control-H
cls equ 0ch ; Some use this to clear screen
esc equ 0 ; Not used
;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
; If your screen does NOT clear immediately upon calling NODE104,
; comment out the previous line and uncomment the following line.
; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
;cls equ 'Z'-'@' ; Many use ^Z to clear screen
endif ; V1050
nl equ 00h
count equ 06h ;length of each table entry
bell equ 07h
tab equ 09h
lf equ 0ah ; Line Feed
cr equ 0dh ; Carriage Return
page
if m80 ; If using M80
.z80 ; Use Z80 Opcodes
aseg ; Absolute Segment
org tpa ; Origin of Segment
endif ; M80
;======================================================================
; Start of Program
;======================================================================
jp start ; jump around headers
; program name
msg: db cr,lf,tab,tab,tab,' -={NODE104}=- '
db tab,tab,tab
db cr,lf,tab,tab,' Telenet auto-dialer for CP/M+ systems '
db tab,tab
db '$'
; dialing strings
kick: db cr ; Occasionally, PcP needs a nudge
open: db 'ATZ' ; Otherwise, just ATZ does it
db cr
db 0
fdial: db 'ATDT'
;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
db '######' ; Local Telenet indial phone number
; (the number you call to reach Telenet)
;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
db cr
db 0
bighang:db cr ; Routine to return to local modem
db '@' ; and disconnect
db cr
db 0
hang: db 'HANGUP'
db cr
db 0
; Telenet indial initialization
initl: db cr ; Telenet initialization
db 'D' ; For 1200 baud
db cr ; Operation
db 'D1'
db cr
db 0 ; Null terminated
racal: db 'E'-'@' ; send control-E
db cr
;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
; Name of Program to Chain
prgrm: db 'MEX ' ; Program command line
db 0 ; Null terminated
node: db 'xxxxxx' ; Do NOT change this line.
; MEX will read script files
; into its buffer if the name
; of the file is included on
; this command line. My scripts
; contain numbers of systems in
; each node, i.e. "ORPOR.MEX".
db 0
prgmnd equ $
; Dialing Strings
dial: db 'C D/' ; Telenet Dial
db 0 ; Null terminated
speed: db '/12,' ; Telenet Speed
;...or "'/3,'" for 300 baud...
; ==>> Insert your Identification and Password here <<==
tnetid: db 'XXXX####,' ; Telenet Identification
tnetpw: db '####XXXX' ; Telenet Password
db cr ;
db 0 ; Null terminated
;===========================================================================
; End of user definable section.
; Program starts here
;===========================================================================
; Save system stack, set up local stack
start: ld (stack),sp ;Save system stack
ld sp,stack ;Load local stack
; program signon
ld a,cls ;Clear screen
call bdos3
if v1050
call revon
ld de,msg ;Load opening message
ld c,prtstr ;Print it
call bdosev ;System call
call revoff
else
ld de,msg ;Load opening message
ld c,prtstr ;Print it
call bdosev ;System call
endif
signon: ld de,msg1 ;Load help message
ld c,prtstr ;Print it
call bdosev ;System call
askcon: ld de,menu ;Load SELECT menu
ld c,prtstr ;Print it
call bdosev ;System call
wait: call bdos11 ;Check console for input
jr z,wait ;If no input, check again
call bdos2 ;Read console character
; Character was at Console
cp f1key ; Was it function one?
call z,navail ; Yep, Redial
cp f2key ; Was it function two?
jp z,mex ; 1Yep, go to comm program
cp f3key ; Was it function three?
jp z,exit ; Yep, go to CP/M
cp f4key ; Was it function four?
jp z,hangup ; Yep, hangup
cp helpkey ; Was it the Help key?
call z,help ; Yep, print help message
;Character received, move to next line
push af ;save input character
ld e,lf ;line feed
ld c,conout ;console output
call bdosev ;system call
ld e,cr ;carriage return
ld c,conout ;console output
call bdosev ;system call
pop af ;restore character
;Check range of zvalues received from console
cp 'A' ;Compare to u/c A
jr c,wait ;less than u/c A, so ignore
cp 'Z'+1 ;Compare to u/c Z plus one
jr c,rzero ;less than u/c Z, make relative zero
;by checking carry bit
;Range might be lower case (a-w)
cp 'a'
jr c,wait ;less than l/c A, ignore entry
cp 'z'+1
jr nc,wait ;greater than l/c Z, ignore entry
;Lower case value is within range, put in upper case if not
and 5fh
;Make entered value relative zero
rzero: sub 41h
;Initialize for multiply
ld hl,0 ;clear product area
ld e,a ;move input relative 0 character into E
ld d,0 ;clear D of DE register
ld b,count ;table entry size
repeat: add hl,de
djnz repeat
ld de,tbladr ;table base address (where it starts!)
add hl,de ;calculate the table entry address
;move selected entry to NODE
ld de,node ;destination
ld bc,count ;table entry length
ldir ;move entry-equate to NODE
; output dialing string
open1: ld hl,open ; send ATZ
call bdos8
ld hl,string
ld (bufptr),hl ; save buffer pointer
; read modem response
read: call bdos7 ;system call
jr z,chkcon1 ;if nothing there, check console
ld hl,(bufptr) ;load buffer pointer
call bdos4 ;read aux character with echo
ld (hl),a ;store it
inc hl ;next buffer address
ld (hl),0 ;null terminate
ld (bufptr),hl ;so we mark the spot
cp 'O' ;if O look for K
jr z,read1 ;here
cp '?' ;whoops, we are already connected
jp z,loop ;so go to node dialing routine
jp read ;otherwise, look again
read1: call bdos7 ;system call
jr z,read1 ;if nothing there, look again
ld hl,(bufptr) ;pop hl
call bdos4 ;read aux character with echo
ld (hl),a ;push hl
cp 'K' ;modem ready?
jr z,dial1 ;yes, dial the phone
jr nz,read ; Nothing for us, so begin again
chkcon1:call bdos11 ;Check console for input
jr z,open1 ;If no input, check again
call bdos2 ;Read console character
; Character was at Console
cp f1key ; Was it function one?
jp z,open1 ; Yep, Redial
cp f2key ; Was it function two?
jp z,mex ; 1Yep, go to comm program
cp f3key ; Was it function three?
jp z,exit ; Yep, go to CP/M
cp f4key ; Was it function four?
jp z,hangup ; Yep, hangup
cp f5key ; Recall request?
jp z,recall ; Return to signon
cp helpkey ; Was it the Help key?
call z,help ; Yep, print help message
jr open1 ; Nothing for us, so resend string
dial1: ld hl,fdial ;indial number
call bdos8
ld hl,string ;our buffer
ld (bufptr),hl ;save it
; read modem response
nread: call bdos7 ;system call
jr z,chkcon2 ;if nothing there check console
ld hl,(bufptr) ;load buffer pointer
call bdos4 ;read aux character with echo
ld (hl),a ;store it
inc hl ;next buffer address
ld (hl),0 ;null terminate
ld (bufptr),hl ;so we mark the spot
cp '0' ;if 0 look for another 0
jr z,nread1 ;here
jr nz,nread ;otherwise, look again
nread1: call bdos7 ;system call
ld hl,(bufptr) ;load buffer pointer
call bdos4 ;read aux character with echo
ld (hl),a ;store it
inc hl ;next buffer address
ld (hl),0 ;null terminate
ld (bufptr),hl ;so we mark the spot
cp '0' ;if 0 look for next 0
jr z,nread2 ;here
jr nz,nread ;otherwise, look again
nread2: call bdos7 ;system call
ld hl,(bufptr) ;pop hl
call bdos4 ;show it
ld (hl),a ;push hl
inc hl
ld (hl),0 ;null terminate
ld (bufptr),hl ;save the pointer
cp cr ;CONNECT ?
jr z,init ;yes, send network logon
jp nread ;Anything else, retry call
chkcon2:call bdos11 ;Check console for input
jr z,nread ;If no input, check again
call bdos2 ;Read console character
; Character was at Console
cp f1key ; Was it function one?
jp z,dial1 ; Yep, Redial
cp f2key ; Was it function two?
jp z,mex ; 1Yep, go to comm program
cp f3key ; Was it function three?
jp z,exit ; Yep, go to CP/M
cp f4key ; Was it function four?
jp z,hangup ; Yep, hangup
cp f5key ; Recall request?
jp z,recall ; Return to signon
cp helpkey ; Was it the Help key?
call z,help ; Yep, print help message
jr nread ;nothing for us, so resend string
init: ld hl,initl ; Network logon
call bdos8 ; Send it
ld hl,string ; Buffer Address
ld (bufptr),hl ; Save Buffer Pointer
init1: call bdos7 ; system call
jr z,chkcon3 ; nothing there so check console
ld hl,(bufptr) ; Load Buffer Pointer
call bdos4 ; Read Auxiliary Character with Echo
ld (hl),a ; Store Character
inc hl ; Next Buffer Address
ld (hl),0 ; Null Terminate
ld (bufptr),hl ; Save Buffer Pointer
cp '@' ; Telenet ready?
jp z,loop ; Yes, go to node dialer routine
jr init1 ; If Z, Nuthin here
chkcon3:call bdos11 ;Check console for input
jr z,init1 ;If no input, check again
call bdos2 ;Read console character
; Character was at Console
cp f1key ; Was it function one?
jp z,init ; Yep, Redial
cp f2key ; Was it function two?
jp z,mex ; 1Yep, go to comm program
cp f3key ; Was it function three?
jp z,exit ; Yep, go to CP/M
cp f4key ; Was it function four?
jp z,hangup ; Yep, hangup
cp f5key ; Recall request?
jp z,recall ; Return to signon
cp helpkey ; Was it the Help key?
call z,help ; Yep, print help message
jr init ; Nothing for us, so resend string
; Dial remote node
loop: ld hl,dial ; Load Dialing prefix
call bdos8 ; Output Dialing Prefix
ld hl,node ; Load NODE into HL
call bdos8 ; Output Dialing String
ld hl,speed ; Load Dialing suffix
call bdos8 ; Output it
ld hl,string ; Buffer Address
ld (bufptr),hl ; Save Buffer Pointer
; Read Telenet Response
loop1: call bdos7 ;system call
jr z,chkcon4 ; If Z, Nuthin waitin, so check console
ld hl,(bufptr) ; Load Buffer Pointer
call bdos4 ; Read Auxiliary Character with Echo
ld (hl),a ; Store Character
inc hl ; Next Buffer Address
ld (hl),0 ; Null Terminate
ld (bufptr),hl ; Save Buffer Pointer
cp '@' ; Telenet Prompt?
jr z,loop ; yes, resend the string
cp 4eh ; is it an N?
jr z,test ; yes, look at next character
jr nz,loop1 ; no, continue receiving Telenet
test: call bdos7 ; System call
jr z,test ; Nothing there yet, look again
ld hl,(bufptr) ; Load Buffer Pointer
call bdos4 ; Read Auxiliary Character with Echo
ld (hl),a ; Store Character
inc hl ; Next Buffer Address
ld (hl),0 ; Null Terminate
ld (bufptr),hl ; Save Buffer Pointer
cp 4eh ; Is it the second N of CONNECT?
jr z,atz ; yes, two Ns means connected
jr nz,loop1 ; If Z, Nuthin here
chkcon4:call bdos11 ;Check console for input
jr z,loop1 ;If no input, check again
call bdos2 ;Read console character
; Character was at Console
cp f1key ; Was it function one?
jp z,loop ; Yep, Redial
cp f2key ; Was it function two?
jp z,mex ; 1Yep, go to comm program
cp f3key ; Was it function three?
jp z,exit ; Yep, go to CP/M
cp f4key ; Was it function four?
jp z,hangup ; Yep, hangup
cp f5key ; Recall request?
jp z,recall ; Return to signon
cp helpkey ; Was it the Help key?
call z,help ; Yep, print help message
jr loop1 ; Nothing for us, so resend string
;===========================================================================
;Request Hayes mode from remote node
;===========================================================================
atz: ld hl,cr ; send carraige return
call bdos8 ; system call
ld hl,string ; load pointer
ld (bufptr),hl ; save it
call bdos7 ;system call
jp nz,racalv ;if something there, go to RACAL request
ld hl,kick ; ATZ again...
call bdos8 ; system call
ld hl,string ; load ATZ pointer into HL
ld (bufptr),hl ; save buffer pointer
; read modem response
hread: call bdos7 ;system call
jr z,chkcon6 ;if nothing there, resend
ld hl,(bufptr) ;load buffer pointer
call bdos4 ;read aux character with echo
ld (hl),a ;store it
inc hl ;next buffer address
ld (hl),0 ;null terminate
ld (bufptr),hl ;so we mark the spot
cp '*' ;in case it is already in R-V
jp z,mex ;5Yep, go to comm program
cp 'M' ;Manual answer?
jp z,mex ;6Yep, go to comm program
cp 'K' ;if K then OK from remote
jp z,racalv ;so request R-V mode
jr hread ;Not any of these so send ATZ again
chkcon6:call bdos11 ; Check Console Status
jr z,hread ; If Z, nothing here
call bdos2 ; Read Console Character
; Character was at Console
cp f1key ; Was it function one?
jp z,atz ; Yep, Redial
cp f2key ; Was it function two?
jp z,mex ; 1Yep, go to comm program
cp f3key ; Was it function three?
jp z,exit ; Yep, go to CP/M
cp f4key ; Was it function four?
jp z,hangup ; Yep, hangup
cp f5key ; Recall request?
jp z,recall ; Return to signon
cp helpkey ; Was it the Help key?
call z,help ; Yep, print help message
jr hread ; Nothing for us, so begin again
;==========================================================================
recall: ld a,cls
call bdos3
ld de,menu
ld c,prtstr
call bdosev
jp wait
;===========================================================================
;Help menu
;===========================================================================
help: ld a,cls
call bdos3
ld de,msg2 ; Print help
ld c,prtstr
call bdosev
ret
;============================================================================
;Help not available message
;============================================================================
navail: call revon
ld de,msg3 ; Print not available message
ld c,prtstr
call bdosev
call revoff
ld de,menu2
ld c,prtstr
call bdosev
ret
;============================================================================
;Request Racal-Vadic mode
;============================================================================
racalv: ld hl,racal ; send Racal request
call bdos8
ld hl,string
ld (bufptr),hl ; save buffer pointer
; read modem response
racalv1:call bdos7
jr z,chkcon7 ;if nothing there, look again
ld hl,(bufptr) ;load buffer pointer
call bdos4 ;read aux character with echo
ld (hl),a ;store it
inc hl ;next buffer address
ld (hl),0 ;null terminate
ld (bufptr),hl ;so we mark the spot
cp 0 ;remote node asleep?
jr z,racalv ;yep, resend the string
cp '*' ;if * go to comm program
jr z,ring ;here
jp racalv1 ;otherwise, look again
chkcon7:call bdos11 ; Check Console Status
jr z,racalv1 ; If Z, Nuthin here
call bdos2 ; Read Console Character
; Character was at Console
cp f1key ; Was it function one?
jr z,racalv ; Yep, Redial
cp f2key ; Was it function two?
jp z,mex ; 5Yep, go to comm program
cp f3key ; Was it function three?
jp z,exit ; Yep, exit to system
cp f4key ; Was it function four?
jp z,hangup ; Yep, drop Telenet
cp f5key ; Recall request?
jp z,recall ; Return to signon
cp helpkey ; Was it the Help key?
call z,help ; Yep, print help message
jp racalv
;Sound bell
ring: ld a,bell ; set up the bell
call bdos3 ; ring it
;Function key 2
;mex: ld hl,dmabuf ; Command Tail Address = DMA Buffer
; ld a,(hl) ; Command Tail Length
; or a ; Set Status
; jp nz,mex1 ; If NZ, Command Tail Entered
; No command tail entered, so use our own
mex: ld hl,prgrm ; Move program command line
ld de,dmabuf ; Default DMA Buffer
ld bc,04h ; Length to move
ldir ; Move it
ld hl,node
ld de,dmabuf+04h
ld bc,count
ldir
mex1: ld e,chnflg ; Define default drive/user
ld c,chain ; Chain to it
call bdosev ; System call
ret ; We're done with our part
; Function Key 3
exit: ld a,cls ; Clear Screen
call bdos3 ; Output to Console
ld sp,(stack) ; Users Stack
ret ; Return to System
page
;======================================================================
; Read Console Character
;======================================================================
bdos2: ld c,coninp ; Read Console Byte
call bdosev ; System call
ret
;======================================================================
; Send Console Character
;======================================================================
bdos3: ld e,a ; Character to E
ld c,conout ; Console Output Function
call bdosev ; System call
ret
;======================================================================
; Read Auxiliary Character (Echo to Console)
;======================================================================
bdos4: push hl ; Save Pointer
ld c,auxinp ; Auxiliary Input
call bdosev ; System Call
ld e,a ; .. and put into E
push af ; Save Character
ld c,conout ; Console Output
call bdosev ; System call
pop af ; Load Character
pop hl ; Load Pointer
ret
;======================================================================
; Check Auxiliary Input Status
;======================================================================
bdos7: ld c,auxist ; Auxiliary Input Status
call bdosev ; System call
or a ; any data?
ret
;======================================================================
; Output Dialing String
;======================================================================
bdos8: push hl ; Save Pointer
bdos8a: ld c,auxost ; Auxiliary Output Status
call bdosev ; System call
or a ; Set Status
jr z,bdos8a ; If Z, Not ready
pop hl ; Load Pointer
ld a,(hl) ; Check for terminator
or a ; Set Status
ret z ; If Z, exit
ld e,a ; Character to output
ld c,auxout ; Auxiliary Output
push hl ; Save Pointer
call bdosev ; System call
pop hl ; Load Pointer
inc hl ; Next Character
jr bdos8 ; Continue
;======================================================================
; Check Console Status
;======================================================================
bdos11: ld c,const ; Direct Console I/O
call bdosev ; System call
or a ; If Z, then nothing is there
ret
page
;======================================================================
;Hangup routine
;======================================================================
hangup: call bdos7
jr z,chkcon8 ;nothing there, so check console
ld hl,(bufptr) ;push buffer pointer
call bdos4 ;read aux character with echo
ld (hl),a ;store it
inc hl ;next buffer address
ld (hl),0 ;null terminate
ld (bufptr),hl ;pop pointer
cp '@' ;Local node response?
jr z,ok ;Yes, send HANGUP to Telenet
jp hangup ;Nothing we want, so look again
ok: ld hl,hang ; send hangup string
call bdos8
ld hl,string ; load hl with contents of string
ld (bufptr),hl ; save buffer pointer
ok1: call bdos7
ld hl,(bufptr) ;push buffer pointer
call bdos4 ;read aux character with echo
ld (hl),a ;store it
inc hl ;next buffer address
ld (hl),0 ;null terminate
ld (bufptr),hl ;pop pointer
cp '?' ;Local node confused?
jr z,hangup ;Yes, send HANGUP again
jp exit ;Nope, exit to OS
chkcon8:call bdos11 ; Check Console Status
jr z,hangup ; If Z, Nuthin here
call bdos2 ; Read Console Character
; Character was at Console
cp f1key ; Was it function one?
jp z,hangup ; Yep, Redial
cp f2key ; Was it function two?
jp z,mex ; 4Yep, go to comm program
cp f3key ; Was it function three?
jp z,exit ; Yep, go to CP/M
jp hangup ; Nuthin we want, so try again
;===========================================================================
;Video reverse routine
;===========================================================================
revon: ld e,esc ;Signify escape sequence
ld c,conout ;Console out
call bdosev ;system call
ld e,5bh
ld c,conout
call bdosev
ld e,037h ;reverse video
ld c,conout
call bdosev ;system call
ld e,6dh
ld c,conout
call bdosev
ret
revoff: ld e,esc ;Signify escape sequence
ld c,conout ;Console out
call bdosev ;system call
ld e,5bh
ld c,conout
call bdosev
ld e,30h ;end reverse video
ld c,conout
call bdosev ;system call
ld e,6dh
ld c,conout
call bdosev
ret
;======================================================================
; Data Area
;======================================================================
bufptr: dw string ; Buffer Pointer
string: ds 128 ; Telenet Response Code
db 0 ; Null Terminator
msg1: db cr,lf,tab,tab,'This program will dial Telenet, initialize it'
db cr,lf,tab,tab,'for 1200 baud operation, and continuously attempt'
db cr,lf,tab,tab,'to connect with the selected node. MEX will be'
db cr,lf,tab,tab,'called when the remote node responds.'
db cr,lf
if v1050
msg2: db cr,lf,tab,tab,tab,'F1 = Resend current string'
db cr,lf,tab,tab,tab,'F2 = Cancel, return to MEX'
db cr,lf,tab,tab,tab,'F3 = Cancel, return to CPM'
db cr,lf,tab,tab,tab,'F4 = Disconnect from Telenet'
db cr,lf,tab,tab,tab,'F5 = Try another remote node'
db cr,lf,tab,tab,tab,' HELP= This menu'
db cr,lf,'$'
else
msg2: db cr,lf,tab,tab,tab,'^R = Resend current string'
db cr,lf,tab,tab,tab,'^W = Cancel, return to MEX'
db cr,lf,tab,tab,tab,'^X = Cancel, return to CPM'
db cr,lf,tab,tab,tab,'^D = Disconnect from Telenet'
db cr,lf,tab,tab,tab,'^A = Try another remote node'
db cr,lf,tab,tab,tab,' ^H= This menu'
db cr,lf,'$'
endif
menu: db cr,lf,tab,tab,'(A)AZPHO',tab,'(B)CAGLE',tab,'(C)CALAN'
db cr,lf,tab,tab,'(D)CASAD',tab,'(E)CASAN',tab,'(F)CASFA'
db cr,lf,tab,tab,'(G)CASJO',tab,'(H)CODEN',tab,'(I)DCWAS'
db cr,lf,tab,tab,'(J)FLMIA',tab,'(K)FLTAM',tab,'(L)GAATL'
db cr,lf,tab,tab,'(M)ILCHI',tab,'(N)MABOS',tab,'(O)MIDET'
db cr,lf,tab,tab,'(P)MNMIN',tab,'(Q)MOKAN',tab,'(R)NCRTP'
db cr,lf,tab,tab,'(S)NJNEW',tab,'(T)NYNYO',tab,'(U)ORPOR'
db cr,lf,tab,tab,'(V)PAPHI',tab,'(W)TXHOU',tab,'(X)UTSLC'
db cr,lf,tab,tab,tab,'(Y)WASEA',tab,'(Z)WIMIL'
menu2: db cr,lf,'==Select?>','$' ;terminator
msg3: db cr,lf,' =>Function not available!<= ',cr,lf,lf,'$'
tbladr:
db 'AZPHO',0 ; A = 0
db 'CAGLE',0 ; B = 1
db 'CALAN',0 ; C = 2
db 'CASAD',0 ; D = 3
db 'CASAN',0 ; E = 4
db 'CASFA',0 ; F = 5
db 'CASJO',0 ; G = 6
db 'CODEN',0 ; H = 7
db 'DCWAS',0 ; I = 8
db 'FLMIA',0 ; J = 9
db 'FLTAM',0 ; K = 10
db 'GAATL',0 ; L = 11
db 'ILCHI',0 ; M = 12
db 'MABOS',0 ; N = 13
db 'MIDET',0 ; O = 14
db 'MNMIN',0 ; P = 15
db 'MOKAN',0 ; Q = 16
db 'NCRTP',0 ; R = 17
db 'NJNEW',0 ; S = 18
db 'NYNYO',0 ; T = 19
db 'ORPOR',0 ; U = 20
db 'PAPHI',0 ; V = 21
db 'TXHOU',0 ; W = 22
db 'UTSLC',0 ; X = 23
db 'WASEA',0 ; Y = 24
db 'WIMIL',0 ; Z = 25
ds 64 ; Stack Area (32 levels)
stack: dw 0 ; Stack Pointer
end