; ; PROGRAM: DU3 ; AUTHOR: RICHARD CONN ; DERIVATION: DUTIL is derived from DU Version 7.5 ; DU2 is derived from DUTIL Version 1.1 ; DU3 is derived from DU2 Version 1.1 ; ; version 1.4 1/1/88 ; - Map command now packs the directory, removing erased ; entries. This should allow larger disks to be mapped, and ; also should form the basis for the more powerful directory ; packing scheme suggested by Jay Sage in DU314.UPD. ; - Fixed max. user number bug. Unn command was giving ; error for ZCPR ENV max user of nn. ; - Added permanent macros to version 1.3CW. ; - Directory timestamps no longer recognized in Map command. ; - DJNZ macro reinstated because its removal was causing trouble. ; - Adapted DU313CW help screens for reverse video. ; - Now links with DSEG. ; ; - Carson Wilson ; Version: 1.3 ; Modified by Jay Sage to incorporate a set of permanent ; macros. These macros can be invoked by the command tail ; when DU is invoked. They are copied from a space of 128 ; bytes near the beginning of the code. The area is ; identified by a string of text to facilitate patching. ; The macros are listed one after another, separated by ; carriage return characters. Macros that are not to be ; defined must be present as carriage returns alone or the ; program will fail. The help screen code was pulled out into ; an include file and modified to give a reasonable appearance ; on a reverse-video screen. ; ; VERSION: 1.3CW 11 September 1987 ; ; Translate to Z80 opcodes and lower case, ; allow disks with directory time stamps with ; map command, add "," and "." for edit plus/minus ; block command, replace help completely, ; clean up various displays, remove djnz macro, so ; for Z80 cpu only. Removed embedded tabs from ; db opcodes. All changes marked . ; ; - Carson Wilson ; ; VERSION: 1.2 ; make G[nn] work properly- James Moore ; ; DATE: 20 Apr 86 ; PREVIOUS VERSIONS: 1.0 (20 June 84) , 1.1 (22 Oct 84), ; NOTE: DU3 must be assembled using M80 (or equiv) ; vers equ 14 ; z3env equ 0fc00h ; ; DU3 is derived from -- ; DU.ASM V7.5 Revised 1/23/81 ; DISK UTILITY - By Ward Christensen ; ; Principal Authors of DU V7.5 are -- ; WLC KBP RGF BRR ; ; Key comments from DU V7.5 and DU3 follow -- ; ;This version of DU is compatible with CP/M 2.x ;and does not require alteration for various hardware ;configurations. It adjusts itself automatically to ;the correct number of sectors, tracks, directory size, ;etc. It has been tested on 5-1/4" and 8" floppy, and ;10 megabyte hard disk systems. ; ;Because of the automatic adaption feature, no conditional ;assembly options are included. ; ;************************************************* ;* * ;* This program has been heavily modified * ;* to allow it to work without modification * ;* on all versions of CP/M 2.x. * ;* One known possible problem involves the * ;* system tracks on some systems, and results * ;* from the system sectors being skewed. There * ;* is NO way for a program executing under CP/M * ;* to know about this. This program assumes the * ;* standard convention of no skew being used on * ;: the system tracks. This usually isn't a prob- * ;* lem because the SYSGEN program can be used to * ;* get the system from the disk so that it can * ;* be modified. * ;* * ;* Ron Fowler * ;* * ;************************************************* ; ; ; SYSLIB and Z3LIB References ( Also VLIB - jgm ) ; ; Proper order of link: ; ; SLRNK du314/n/v,du314/p:100/d:2d37,vlib/s,z3lib/s,syslib/s,/e ; ext z3vinit,envptr,cls,at,tinit,dinit,stndout,stndend,gotoxy ext getspeed,getcrt,getmdisk,getmuser ext codend ; ;System equates ; base equ 0 ;SET TO 4200H FOR HEATH OR TRS-80 ALTCPM ; ;CP/M Key Areas ; fcb equ base+5ch ;CP/M FCB bdos equ base+5 ;CP/M BDOS ENTRY POINT tbuff equ base+80h ;CP/M TEMPORARY DISK I/O BUFFER tpa equ base+100h ;CP/M TRANSCIENT PROGRAM AREA ; ; Some Key Variables in DU3 ; eolch equ ',' ;Marks logical end of line sepch equ ' ' ;Argument Separator mulch equ '*' ;Multiplication Command dim equ 1 ;Enter DIM Mode for ILPRT bright equ 2 ;Enter BRIGHT Mode for ILPRT ; ;CP/M BDOS Function Codes ; print equ 9 gvers equ 12 resetdk equ 13 ;RESET SYSTEM seldk equ 14 ;SELECT DISK closef equ 16 ;CLOSE FILE srchf equ 17 ;SEARCH FIRST srchn equ 18 ;SEARCH NEXT delf equ 19 ;DELETE FILE writef equ 21 ;WRITE BLOCK TO FILE makef equ 22 ;CREATE FILE suser equ 32 ;SELECT USER getdsk equ 25 getdpb equ 31 ; ;CP/M 1.4 Offsets and Some Key Values ; trnoff equ 15 ;CP/M 1.4 OFFSET FROM BASE ;OF BDOS TO SECTRAN ROUTINE skwoff equ 1ah ;CP/M 1.4 OFFSET TO SKEW TABLE s2off equ 14 ;OFFSET INTO FCB FOR S2 BYTE dpboff equ 3ah ;CP/M 1.4 OFFSET TO DPB WITHIN BDOS s2mask equ 0fh ;MASK FOR EXTENDED RC BITS OF S2 dpblen equ 15 ;SIZE OF CP/M 2.x DISK PARM BLOCK ; ;Define ASCII characters ; cr equ 0dh ;CARRIAGE RETURN lf equ 0ah ;LINE FEED tab equ 09h ;TAB bs equ 08h ;BACKSPACE ; ; MACROS INCLUDE: ; ; DJNZ - DECREMENT B AND JUMP RELATIVE IF NO ZERO ; djnz macro ?n ;;DECREMENT B AND JUMP ON NO ZERO dec b jp nz,?n endm ; ; END OF MACROS ; include du314-01.z80 ; Source part one include du3map.z80 ; Map routine include du3help.z80 ; Help routine include du314-02.z80 ; Source part two end ; END DU314.Z80