home *** CD-ROM | disk | FTP | other *** search
- ;
- ZSLIB.COM
-
- Size (recs) CRC Version Author/Latest Issue Disk
- ZSLIBS.REL 27k (211) B72C 3.4 Gene Pizzetta 10/91 Z3LIB3
- ZSLIBM.REL 29k (228) 1C4E 3.4 Gene Pizzetta 10/91 Z3LIB3
-
- 1- Introduction 2- Notes
-
- ZSLIB is a package of assembly language routines to assist programmers in
- handling datestamp maintenance under ZSDOS, Z3PLUS, and CP/M Plus.
-
- Two versions of ZSLIB are included: ZSLIBM.REL in Microsoft format, and
- ZSLIBS.REL in SLR format. Also included is ZSLIBDEM, a program to demonstrate
- the date and time output routines.
-
- Comprehensive help on ZSLIB routines can be accessed from Z3HELP-Y.LBR.
- :1
- Introduction
-
- One of the most attractive features of ZSDOS from a programming point of
- view is built-in file datestamping. For the first time, a standard set of
- functions has been implemented which make file datestamp maintenance fast,
- transparent, and secure. ZSLIB provides assembly language programs with the
- low-level tools to handle most routine datestamp tasks under ZSDOS. Several
- parallel routines for CP/M Plus have also been added in the interest of
- maintaining program compatibility with that system. For a demonstration of
- the ZSLIB routines under ZSDOS or CP/M Plus, run the ZSLIBDEM program included
- in ZSLIB10.LBR by typing "ZSLIBDEM" or "ZSLIBDEM <filename>".
-
- ZSLIB is distributed in two library formats: the standard Microsoft
- library format and the newer and faster SLR format. ZSLIBS is the SLR format
- and ZSLIBM is the Microsoft format version. ZSLIB is designed to work along
- with SYSLIB to provide standard assembly language interfaces and maximize
- efficiency by removing redundant code. Therefore, several of ZSLIB's
- routines, like those of Z3LIB and VLIB, reference SYSLIB routines, requiring
- that SYSLIB be linked to the program after ZSLIB.
-
- Calling any of the routines in a module as an external automatically adds
- all other routines in the module to the program's code.
- :2
- ZSLIB Notes - 1/9
-
- a. Vs. 3.4 updates (10/09/91, Gene Pizzetta):
- - A new S-series of routines, compatible with the S-series in SYSLIB,
- with switchable console and/or printer output (or no output for quiet
- mode) are included. The new series includes date, time, day of week,
- and numeric output. All S-series date and time routines are dual
- format (American or European date, civilian or military time): SDATSx,
- STIMSx, STIMXx, and SWDAYx. The new S-series numeric routines are:
- SAFHC, SAHC, SHL2DC, SHL3DC, and SHL4DC.
- - The LHL5DC, MHL5DC, and PHL5DC modules have been renamed to LHL4DC,
- MHL4DC, and PHL4DC.
- - The entries for five-character decimal output have been eliminated
- because they are duplicated in SYSLIB. Benefits include ending any
- confusion over the routines existing in both libraries and much
- smaller size for the modules. The eliminated entries are: LHL5DC,
- MHL5DC, PHL5DC, LHLDC, MHLDC, and PHLDC.
- - SPARSDS, PARSDS, PARSDT -- lingering bugs have been eliminated and the
- size of the modules has been dramatically reduced.
- ZSLIB Notes - 2/9
-
- - Four tables used by several date and day of week routines have been
- moved to separate modules to cut the size of the REL libraries and a
- temporary routine (ZOUT) was added to compensate for a bug in SYSLIB's
- SOUT switchable output routine. Do not call ZOUT from your programs
- because it will be eliminated from ZSLIB as soon as a bug-free SOUT is
- available.
-
- c. Vs. 3.3 updates (09/29/91, Gene Pizzetta):
- - HVPSTR -- Not just the standout and standend strings were being sent,
- but so were the ^A and ^B. Not only that, non-printing characters
- were being added to the tab expansion column counter (a strange char-
- acteristic of the SYSLIB and VLIB routines). While fixing it, a few
- bytes were saved.
- - HIVID -- Saved an unnecessary byte.
- - ZSLIBZLB.ZEX -- This script, which creates a Microsoft REL version of
- ZSLIB using Al Hawley's ZMLIB, has been changed to use "GO" after its
- initial call to ZMLIB, which speeds it up a little.
- ZSLIB Notes - 3/9
-
- d. Vs. 3.2 updates (09/08/91, Gene Pizzetta):
- - A new set of "HV" routines allows simple video highlighting using the
- TCAP standout strings and are much smaller than similar modules in
- VLIB4. Z3INIT from Z3LIB must be called before using these routines,
- but the huge Z3VINIT is unnecessary. If any other VLIB routines are
- used in your program, the size advantage offered by these new routines
- will be lost. In theory HV calls are somewhat slower than their VLIB4
- counterparts, but I don't think anybody will notice. The new routines
- are:
- HVON and HVOFF -- turn video highlighting on and off.
- HVTINIT and HVDINIT -- initialize and de-initialize the terminal.
- HVPRINT and HVPSTR -- print strings with video highlighting controlled
- by embedded ^A and ^B characters. Unlike VLIB's VPRINT and VPSTR, the
- HV routines also expand tabs and allow use of strings terminated by
- either a null character or by a character with its high bit set.
- - PARGET -- A RET instruction (thankfully, little used) would return to
- nowhere because the stack had been PUSH'd. This bug that had existed
- since the module appeared in PARMLIB.
- - PARSDT -- A DB instruction which should have been a DS was causing
- part of the data segment to be included in the COM file.
- ZSLIB Notes - 4/9
-
- - WDAY0 -- It was suggested that this routine call the new SYSLIB SDIV
- routine instead of MULHD and DIVHD, for a considerable savings in code
- size. WDAY0 is called by the xWDAYn routines, so they are also
- affected.
- - xTIMFn and xTIMXn -- These time routines are one byte smaller because
- of a code change suggested by Bruce Morgen.
-
- d. Vs. 3.1 updates (08/18/91, Gene Pizzetta):
- - Versions of ZSLIB prior to 3.0 were incompatible with DSLIB because of
- conflicting public symbols. This has been corrected, but the result
- is that earlier programs that called ZSLIB's DOSTYP routine will have
- to be modified. That routine is now called BDOSTYP and it's related
- global variable DOSVER has been renamed BDOSVER. References to DOSTYP
- and DOSVER in earlier programs will have to be changed to BDOSTYP and
- BDOSVER. No other changes should be necessary. Several date output
- routines have been renamed, but the old entries have been retained, so
- no changes in earlier programs are necessary.
- ZSLIB Notes - 5/9
-
- - Several new routines allow dual output in either American (mm/dd/yy)
- or European (dd.mm.yy) date order. The routines have been renamed to
- make them easier to remember. All routine names are in the following
- format:
- oDATfn - The "o" is the output type: "L" for list (printer), "M" for
- memory, and "P" for printing on the console. The "f" is the date
- format type: "A" for American date order, "E" for European date order,
- and "S" for dual (switchable) American or European date order. The
- final element of the name ("n") is a number: "1" for the long form
- with the month spelled out, "2" for the intermediate form with the
- month abbreviated to three letters, "3" for the short numeric form of
- the date, and "4" for the very short numeric form with the month and
- day truncated to a single digit when appropriate.
- - A large number of new routines are included, including some that are
- dual military and civilian format and some that output seconds. All
- routine names are in the following format:
- ZSLIB Notes - 6/9
-
- oTIMfn - The "o" is the output type ("L", "M", and "P") like the date
- routines discussed above. The "f" is the format type: "C" for the
- short civilian type with an "a" or "p" immediate following the time,
- "M" for military time, "F" for the long civilian type with a full "am"
- or "pm" following the time, "S" for dual (switchable) short civilian
- (C) and military format, and "X" for dual (switchable) long civilian
- (F) and military format. The final element of the name ("n") is a
- number: "1" and "4" always output two-digit numbers, "2" and "5" pad
- single-digit hours with a space where appropriate, and "3" and "6"
- produce the shortest possible output with unpadded single-digit hours
- when appropriate. Routines numbered 1-3 output only hours and
- minutes, while 4-6 also output seconds.
- - Several new or modified routines make command line parsing less
- painful, including PARCHR, PARCNT, and PARGET modified from Carson
- Wilson's PARMLIB. The EATSPC and EATNSPC routines can serve the same
- purpose and the SKSP and SKNSP routines in SYSLIB, but they are
- smaller because they are only concerned with spaces and tabs, and they
- are easier to use because they return with the zero flag set if the
- end of the string is reached. Flexible command line entry of date and
- time specifications is provided by the SPARSDS and PARSDT parsing
- routines in American or European date order.
- ZSLIB Notes - 7/9
-
- - HPRINT and HPSTR are the beginnings of a set of routines that outputs
- strings terminated by a character with its high bit set. These
- routines also terminate when a null byte is encountered, so they can
- in most cases serve as complete replacements for PRINT, EPRINT, PSTR,
- and EPSTR. There is also a small routine for outputting a counted
- string to the printer (the first byte of the string is expected to be
- its length). In addition, UNCAPS is included as a mirror of SYSLIB's
- CAPS routine. TCOUT and TCOUT7 are character output routines similar
- to COUT and COUT7, but they expand tabs. The small line input editor,
- TLINE, offers simplicity and complete security.
- - Other new routines include: GCOMNAM, which gets a program's disk name
- from the external file control block and stores it for later printing;
- GETDMA and PUTDMA, which save and restore the current DMA address
- under ZSDOS and ZRDOS; REGDUMP, a debugging module; REVCAS, which
- reverses the case of a character.
- ZSLIB Notes - 8/9
-
- b. Vs. 2.1 updates (02/02/90, Carson Wilson):
- - PRDATx and MDATx routines no longer check for a valid datestamp.
- Instead, they assume that the caller has already verified the BCD
- stamp with a call to ISBCDD. This not only saves code, it is also
- more intuitive and allows the routines to use fewer registers.
- Several other routines have also been reduced in size.
- - Empty module ZSLIBVER added as a means of identifying which version of
- ZSLIB a .REL library contains. The version is the last two digits of
- the public symbol "VERSxx" which is contained in the ZSLIBVER module.
- - Fix to SMHL5DC+, which resulted in faulty time storage for relative
- ("+nnnn") times.
- ZSLIB Notes - 9/9
-
- c. Vs. 2.0 updates (01/21/90, Carson Wilson):
- - SMHL5DC+ - Parallel to SPHL5DC+, stores ASCII number to memory.
- - ZSISBCDD - Checks BCD time/date at HL for validity.
- - ZSMAFHC - Parallel to PAFHC routine, stores result to memory.
- - ZSMAHC - Parallel to PAHC routine, stores result to memory.
- - ZSMDAT1 - Parallel to PRDATx routines, stores result to memory.
- - ZSMDAT2 - "
- - ZSMDAT3 - "
- - ZSMOUT - Parallel to SYSLIB COUT routine, stores result to memory.
- - ZSMSTR - Parallel to SYSLIB PSTR routine, stores result to memory.
- - ZSMTIMC1 - Parallel to PTIM??? routines, store results to memory.
- - ZSMTIMC2 - "
- - ZSMTIMC3 - "
- - ZSMTIMM1 - "
- - ZSMTIMM2 - "
- - ZSMTIMM3 - "
- - ZSPARSDS - ASCII datespec to BCD buffer parser. Very powerful.
- - ZSSSTPCP - Set CP/M Plus or Z3PLUS datestamp.