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.D
< prev
next >
Wrap
Text File
|
1993-03-31
|
4KB
|
178 lines
; ZDB18.D, string and date module for ZDB18
; 01/29/92
; Joe Mortensen
;
; string and data storage
;
srtfnm: dc 'SORTED.$$$' ; temporary file name for sort file
bakfil: dc 'BACKUP.DTA' ; backup file name
ziptyp: db 'ZIP Code ' ; zip code index message
lntyp: db 'Last Name' ; last name index message
;
; Field title panel
;
panel: db 15 ; number of elements
db 01,01,1,'ZDB vers ',vers/10+ '0','.',vers mod 10 +'0'
db suffix
db 2,0
db 01,22,1
datafil:db ' ',2,0
inxmsg: db 03,15,'Index >',1
inxtyp: db 'Last Name ',2,0 ; default index is last name
dc 03,51,'Last modified >'
dc 06,10,'First Name >'
dc 07,11,'Last Name >'
dc 08,11,'Address 1 >'
dc 09,11,'Address 2 >'
dc 10,16,'City >'
dc 11,15,'State >'
dc 12,17,'Zip >'
dc 13,13,'Country >'
dc 15,15,'Phone >'
dc 17,10,'Comments 1 >'
dc 18,10,'Comments 2 >'
;
; cursor positions for record display fields
;
pospanel:
db 11 ; number of fields
db 06,22,fslen ; fstnm
db 07,22,lnlen ; lname
db 08,22,a1len ; addr1
db 09,22,a2len ; addr2
db 10,22,cilen ; city
db 11,22,stlen ; state
db 12,22,zilen ; zip
db 13,22,ctlen ; ctry
db 15,22,phlen ; phon
db 17,22,c1len ; cmnts1
db 18,22,c2len ; cmnts2
;
; addresses of record buffer fields
;
fieldpanel:
dw fstnm
dw lname
dw addr1
dw addr2
dw city
dw state
dw zip
dw ctry
dw phon
dw cmnts1
dw cmnts2
;
; Sort Specification Block for use with SORT
;
ssb:
first: dw 0 ; address of the first record
n: dw 0 ; number of records
size: dw 16 ; length of each record
comp: dw compv ; address of our compare routine
order: dw 0 ; address of the order table
point: db on ; on to use pointers
norec: db 0 ; on to only sort pointers
;
; cdf file type
;
cdftyp: db 'CDF'
wstyp: db 'WSF'
;
; uninitialized data area
;
dseg
;
; initialize the following data area at startup
;
data equ $ ; start of data area
;
; I/O Control Block for Datafile
;
ioctl: ds 1 ; use 16K buffer
ds 5 ; filled in by FXIO
work: ds 2 ; address of working buffer
iocfc: ds 1 ; filled in by FXIO to 0
ds 8 ; file name
iotyp: ds 3 ; file type
ds 24 ; filled in by FXIO
;
; record fields and field lengths
;
; each of these fields must be null-terminated so actual actual
; field length is one less
;
edblk: ; start of first record
edblk1 equ $+128 ; start of second record
fstnm: ds 21
fslen equ $-fstnm
lname: ds 21
lnlen equ $-lname
addr1: ds 24
a1len equ $-addr1
addr2: ds 24
a2len equ $-addr2
city: ds 18
cilen equ $-city
state: ds 3 ; only 2-letter codes allowed
stlen equ $-state
zip: ds 11
zilen equ $-zip
ctry: ds 14
ctlen equ $-ctry
phon: ds 39
phlen equ $-phon
cmnts1: ds 39
c1len equ $-cmnts1
cmnts2: ds 39
c2len equ $-cmnts2
;
datmod: ds 3 ; no need for null-terminator here
; stored as bcd
;
tcap: ds 2 ; address of arrow keys in tcap
cpos: ds 1 ; cursor position (column and line)
lpos: ds 1
;
xcopy: ds 4 ; input buffer for number of copies
copies: ds 1 ; copies to print
envflg: ds 1 ; envelope flag
prtflg: ds 1 ; print flag signals need for ff
eflag: ds 1 ; print flag for empty field
fflag: ds 1 ; WS/ASCII file flag
insflg: ds 1 ; ON for character insert mode
prkey: ds 2 ; address of key to search
fndflg: ds 1 ; found flag for selection key
keyflg: ds 1 ; flag for output by key
keylen: ds 2 ; length of search key for prdir & dfile
;
capflag:ds 1 ; edloop flag for state caps input
datbuf: ds 3 ; temporary date buffer
today: ds 6 ; current date and time (bcd)
wsdatbuf:
ds 19
;
recs: ds 2 ; number of records in file
fptr: ds 2 ; pointer to current record
xfptr: ds 2 ; last record read during indexing
newflg: ds 1 ; new flag (used with add/edit)
;
count: ds 2 ; counter for sort loop
xcount: ds 2 ; counter for express search, print loop
recptr: ds 2 ; record pointer for sorted file
xrecptr:ds 2 ; last record pointer for sorted file
srttyp: ds 1 ; 0=last/first names, nz=zip index
srtfcb: ds 36 ; sort file control block
sfdrv: ds 1 ; sort file drive
sfusr: ds 1 ; sort file user area
bakfcb: ds 36 ; backup file control block
fdrv: ds 1 ; file drive
fusr: ds 1 ; file user area
nambuf: ds 12 ; buffer for original file name
srch: ds 11 ; search string
inxptr: ds 2 ; index record pointer for qfind
datalen equ $-data
;
ds 80 ; stack space
stack: ds 2 ; old stack location