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
/
ENTERPRS
/
CPM
/
UTILS
/
S
/
ZDB18C.LBR
/
ZDB18SRC.LYR
/
ZDB18.B
< prev
next >
Wrap
Text File
|
1993-04-12
|
2KB
|
96 lines
;;; Mods per Al Hawley/Terry Hazen 02/05/92
;## Mod per JIM 04/12/92 to allow long enough delay to handle credit card
; strings
;
; ZDB18.B
; phone dialing module for use within ZDB
; 01/29/92
; Joe Mortensen
; adapted from a standalone program (DIALER.COM) by Bruce Morgen
;
; Dials phone number in phone field of ZDB record
;
dial: call clrmnu
dc 1,'Turn on Modem, Pick Up Phone, Press RET (^C to Abort)',2
call cin
cp 3 ; ^C aborts
jp z,menu
;
; check for valid phone number
;
ld hl,phon ; point to phone field
ld a,(hl)
cp ' ' ; is there a leading space?
jr z,done
or a ; is field empty?
jr z,done
push hl ; save phone field address
;
; initialize the modem
;
call mreset ;;; Send 'ATZ; to reset modem
ld hl,init ; send 'ATX0S7=0' string to modem
call pstr ; X0=dialtone and busy signal not recognized
; S7=0 = no wait for dialtone/busy signal
;
; send 'ATDT' string to modem
;
ld hl,tone ; send tone dial string 'ATDT'
tonelp:ld a,(hl)
or a
jr z,tonelp0
call pout ; send char to modem
inc hl
call waitp1s ; give modem time to handle it
jr tonelp
tonelp0:call clrmnu
dc 1,'Dialing....' ,2
;
; send phone number to modem
;
pop hl ; get back phone field address
diallp: ld a,(hl) ; send phone number to modem
cp ' ' ; is char a space?
jr z,tstr ; yes, end of string
or a
jr z,tstr ; yes, end of string
;
call cout ; print char on screen
call pout ; send char to modem
call waitp1s ; pause
inc hl ; increment to next digit
jr diallp ; repeat loop
;
tstr: ld a,cr
call pout
ld b,0 ; ## changed from 40 to allow long enough
; delay for long credit card call strings
; Hawley/Hazen mod below caused problem
call halflp
call mreset ;;;
done: jp menu
;
halfsec:ld b,5 ; delay loop to allow modem time to
halflp: call waitp1s ; handle strings
djnz halflp
ret
mreset: ld hl,dflt ;;; Reset modem
;
pstr: ld a,(hl) ; send string to modem
or a
jr nz,pstr0
ld a,cr
call pout
jr halfsec
pstr0: call pout
inc hl
jr pstr
dflt: db 'ATZ',0 ; Hayes reset to defaults command
init: db 'ATX0S7=0',0
tone: db 'ATDT',0