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
/
MBUG
/
MBUG123.ARC
/
BOOK1.LBR
/
BOOKS.PQG
/
BOOKS.PRG
Wrap
Text File
|
1979-12-31
|
9KB
|
237 lines
* DATE 04/01/85 17:23
* BOOKS.PRG
* NOTE - this program is written for dBASEII version 2.4. You can adjust
* it for 2.3 by taking out the "TEXT" commands and making them "@ nn,nn SAY"
* and/or eliminating them.
*
* It will run under CP/M 80, CP/M 86 and MSDOS. Just change the
* name of manage.prg to manage.cmd to run under CP/M 80.
*
* The program is self initializing and documented throughout with help menus.
*
* Program formatting and syntax checking was done using CHECK, from HILCO
* Software, 305 N. 17th St., Mt. Vernon, WA 98273 (206) 428-0475.
*
* This is a highly complicated program and your help in both clearing
* up the bugs and making suggestions will be appreciated. If you find a
* bug or a requirement for the program, please let us know.
*
* Please contact:
* Stephen M. Leon
* 200 Winston Drive
* Cliffside Park, NJ 07010
* (201) 886-1658
* or
* Department of Law
* 2 World Trade Center
* New York, NY 10047
* (212) 488-7677
*******************************************************************************
* *
* N O T I C E *
* *
* Copyright 1985 by STEPHEN M.LEON. Non-commercial use or distribution *
* of the program is authorized only if this notice is retained together with *
* the text relating to acceptance of the terms of this notice, and the person *
* or persons using the program or benefiting therefrom assume all direct or *
* indirect risks of such use and agree to indemnify the author and the not- *
* for-profit computer clubs distributing this program, from any direct or *
* or indirect expenses incurred by them as a result of their use thereof. *
* Expenses shall include reasonable counsel fees including reasonable fees *
* of the author in his capacity as an attorney for services on a reasonable *
* billing time basis rendered to himself in his capacity as the holder of *
* the copyright. Any use of this program constitutes an agreement to the *
* conditions of this license. Any other use or distribution is unauthorized *
* and prohibited without the express written consent of the author. *
* *
* This program is distributed free (for a nominal media charge) by SIG/M *
* Special Interest Group/Microcomputers, Box 97, Iselin, NJ 08830. *
* SIG/M is a not-for-profit undertaking of the Amateur Computer Group of New *
* Jersey and the New York Amateur Computer Club. This program is also made *
* available for PC users via PC/BLUE SOFTWARE, also a not-for profit under- *
* taking of the New Jersey and New York clubs. Permission is granted to any *
* other not-for-profit group to include this program in their library so long *
* as this notice is retained and the conditions set forth herein are complied *
* with.
*******************************************************************************
ERAS
SET TALK OFF
IF .NOT. file ("BOOKS.DAT")
DO INIT.BK
ENDI .NOT. file
REST from books.dat additive
IF escap = 'N'
SET ESCAPE OFF
ENDI excap = 'Y'
IF bells = 'N'
SET BELL OFF
ENDI bells
IF bright = 'I'
SET INTENSITY OFF
ENDI brght = 'I'
TEXT
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
* *
* SIG/M - SPECIAL INTEREST GROUP FOR MICROCOMPUTERS *
* AMATEUR COMPUTER GROUP OF NEW JERSEY *
* *
* *
* *
* *
* *
* *
* *
* *
* *
* *
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
ENDT
@ 6,23 SAY "L I B R A R Y M A N A G E R"
STOR 53 TO length
STOR 23 TO times
DO WHIL times < length
@ 7,times SAY '_'
STOR times + 1 TO times
LOOP
ENDD
TEXT
* *
* A dBASEII DATA MANAGEMENT PROGRAM *
* FOR BIBLIOGRAPHIC DATA *
* by Stephen M. Leon *
* *
* Vers 1.0 Mar 1985 (c) 1985 *
* *
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
ENDT
RELE times, length
IF C = 'Y'
STOR 41984 TO adr
*in cp/m 80 there is a jmp at location 0 & 5
IF (PEEK(0)=195 .AND. PEEK(5)=195)
*use 8080 code
POKE adr ,35,17,37,164,14,6,6,2,26,19,198,16,211,90,254,21,219,91,194,23,164,214,8,198,48,119,35,5,194,8,164,35,13,194,6,164,201,10,9,8,7,12,11,5,4,3,2,1,0
ELSE
*use 8086 code
POKE adr ,67,190,38,164,177,6,181,2,138,4,70,4,16,230,90,60,21,228,91,117,2,44,8,4,48,136,7,67,254,205,117,232,67,254,201,117,225,195,10,9,8,7,12,11,5,4,3,2,1,0
ENDI (PEEK)
SET CALL TO adr
STOR ' / / , : : ' TO mem:var
CALL mem:var
STOR $(mem:var,1,8) TO mdate
STOR $(mem:var,10,8) TO mtime
SET DATE TO &mdate
@ 17,10 SAY 'Today is ' + mdate
@ 17,32 SAY '....and the time is ' + mtime
@ 19,22 SAY 'Hit any key to start the program'
SET CONSOLE OFF
WAIT
SET CONSOLE ON
* Regular date program
ENDI C='Y'
IF I = 'N'
STOR ' ' TO BLNKS
IF DATE() = '00/00/00'
STOR F TO OK
ELSE
STOR T TO OK
STOR 0 TO MM
ENDI
DO WHIL .NOT. OK
STOR $(BLNKS,1,8) TO DATE:VAR
STOR $(BLNKS,1,42) TO ERRX
@ 18,15 SAY 'Enter Date as MM/DD/YY '
@ 18,43 GET DATE:VAR picture '##/##/##'
READ
STOR val($(DATE:VAR,1,2)) TO MM
STOR val($(DATE:VAR,4,2)) TO DD
STOR val($(DATE:VAR,7,2)) TO YY
DO CASE
CASE MM<1 .or. MM>12 .or. DD<1 .or. DD>31 .or. YY<80
STOR ' Invalid Date - Reenter' to ERRX
CASE MM=4 .or. MM=6 .or. MM=9 .or. MM=11
IF DD>30
STOR 'Thirty Days hath September, etc. - Reenter' to ERRX
ELSE
STOR T TO OK
ENDI dd
CASE MM=2 .and. DD>28 .and. ((1900 + YY)/4)<>int(((1900 + YY)/4))
STOR ' Not a leap year - Try Again' TO ERRX
CASE MM=2 .and. DD>29
STOR 'February has a Maximum of 29 Days - Reenter' TO ERRX
OTHE
@ 20,00
STOR T TO OK
LOOP
ENDC
@ 20,00
@ 20,15 SAY ERRX
ENDD (.not. OK)
IF MM>0
RELE ERRX, OK, MM, DD, YY
SET date TO &DATE:VAR
CLEA GETS
ENDI mm
ENDI I = 'N'
* poke drive letter into memory 039 hex
POKE 063,(64+@(dr,'ABCDEFGHIJKLMNOPQRSTUVWXYZ'))
* select database
RELE ALL
STOR CHR(PEEK(063)) TO dr
ERAS
IF .NOT. FILE ("BDATA.MEM")
STOR ' ' TO base
ELSE
REST from bdata additive
DO WHIL LEN(base) < 8
STOR ' ' TO add
STOR base + add TO base
ENDD
STOR base + '.DBF' TO base
ENDI
@ 02,00 SAY "You can use different databases for different kinds of books if each"
@ 03,00 SAY "database starts with the letters 'BK'. You can then select any of them."
@ 05,05 SAY 'The following databases are available for use by this program:'
@ 06,05 SAY ' '
DISP FILES ON &dr LIKE BK??????.DBF
@ 15,15 SAY 'Which data base shall we use ? '
@ 15,50 GET base PICTURE '!!!!!!!!.DBF'
READ
DO WHIL .NOT. FILE (base)
@ 15,50 GET base PICTURE '!!!!!!!!.DBF'
READ
ENDD
STOR 'T' +TRIM($(base,1,7)) TO tindex
STOR 'A' +TRIM($(base,1,7)) TO aindex
STOR TRIM($(base,1,8)) TO base
SAVE TO bdata
STOR '.NDX' TO nd
IF .NOT. FILE ("&dr.:&tindex&nd") .OR. (.NOT. FILE ("&dr.:&aindex&nd"))
ERAS
@ 10,10 SAY 'The file you selected is not properly indexed, I will do that now.'
@ 11,10 SAY 'Please be patient for a few minutes.'
@ 12,10 SAY ' '
SET TALK ON
SET ECHO ON
USE &base
INDE ON !(title) TO &dr.:&tindex
INDE ON !(auth1) TO &dr.:&aindex
SET TALK OFF
SET ECHO OFF
SET INDEX TO &dr.:&tindex
ENDI
RELE ALL
DO main.bk