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
/
CPM
/
BDOS
/
NOVADOSI.LBR
/
NDOSHDR.LZB
/
NDOSHDR.LIB
Wrap
Text File
|
2000-06-30
|
17KB
|
385 lines
;
; NOVADOS Disk Operating System Header
;
; The current version/release designation of NovaDOS is:
;
version macro
defb 'I ' ; Current version/release
; |.....| ; MUST be 5 bytes long
endm
;
; ASSEMBLY INSTRUCTIONS:
; ======================
;
; This code is written to assemble with either the SLR assembler Z80ASM or
; with Microsoft's M80. The former assembler is highly recommended for
; speed and versatility.
;
; All user equates are contained in this file which is 'included' in
; NOVADOS.Z80. If assembling a relocatable file for NZCOM, the file
; Z34CMN.LIB must be available in the current directory. If assembling
; absolute code, the code addresses may be set either in the header file or
; taken from the file Z3BASE.LIB.
; ASSEMBLY OPTIONS AND ADDRESSES:
; ===============================
;
; If you set z33adr or intadr true, you will want to instruct your assembler
; to produce a binary (COM) or HEX file with its absolute origin at 100h.
; The code will be .phased to operate at the appropriate address and can be
; loaded into PUTSYS, written directly to system tracks or handled in any
; manner consistent with this format. If cmnadr is set true, then you must
; instruct your assembler to produce a REL file. This file can be loaded
; directly into memory using Alpha Systems' NZCOM or JetLDR. If you are
; using the latter option, the filename extension should be changed to ZRL.
; Set one of the following four equates true:
;
intadr defl false ; True if setting BIOS base address here
z33adr defl false ; True if using Z3BASE.LIB for system address
cmnadr defl true ; True if assembling zrl file for NZCOM
reladr defl false ; True if generating REL file for SPR/PRL
;
; If intadr is true, then the next three equates must be correctly set.
;
idosloc equ 8000h ; Run time start of bdos
ip2bios equ 0de00h ; Run time start of BIOS
ramlow equ 00000h ; Start address of memory
;
;
; If either intadr or z33adr are true, you may assemble to a HEX file to
; load into PUTSYS with MLOAD, ZSID or DDT. Set hexgen true to enable the
; creation of a HEX file with it's origin at PUTSDOS.
;
hexgen equ false ; True to include PUTSYS DOS origin
;
putsdos equ 1180h ; Location of DOS image in PUTSYS.
; This is fairly universal
; FEATURE OPTIONS
; ===============
;
; Not all of the options below can be implemented at one time. The size of
; the CP/M DOS is limited by many conventions to 3.5K, although this may
; change in the near future as Z system implementations become more
; flexible. Image size statistics are printed on the screen following a
; successful assembly and you may adjust the options below accordingly.
; Reset Disk System Call
; ----------------------
;
; Some systems, like the Kaypro 10, only recognize changes between single
; and double sided disks when the system is warm booted; BDOS function 13
; (reset disk) will not work. There are two solutions to this situation
; which we shall call "The AXE" and "The SCALPEL". Both are effective, but
; the latter is preferable for it's intelligence. Note that if you are
; using Advent Products' TurboROM you do not need to use EITHER of these
; methods. Disk format determination is done automatically with each disk
; reset if the disk has been changed. If you are using the TurboROM, set
; resdsk FALSE.
;
;
; *** The AXE:
;
; By adding a "hook" to the BIOS of machines supporting multiple floppy
; formats and setting resdsk true and resflag false BDOS function 13 will
; allow changes between single and double sided disks. Very handy for disk
; housekeeping utilities such as nswp, nulu, and cataloging programs.
;
; The "hook" is added as follows: obtain the source to your computer's BIOS.
; examine the code for warm boot. Somewhere, there should be a call to a
; routine which initializes the disk system after a warm boot, or which
; detects changes between single and double sided disks. Call this routine
; diskint for purposes of discussion. Modify your BIOS's cold boot routine
; to initialize 3 bytes at address setdsk as "jp diskint". The location of
; setdsk is arbitrary, it may be in your BIOS, or in a reserved spot in
; CP/M's page 0.
;
; *** The SCALPEL:
;
; On some systems which support more than one disk format, a single byte
; controls the resetting of the floppy format. This byte, which we shall
; call the resflag, when initialized by diskint (see "The AXE") tells the
; floppy drive support routines to invoke a subroutine to determine the
; floppy disk format. If you know the location and appropriate value for
; the resflag you may reset it directly from within NovaDOS. This method
; has the advantage that it does not generally result in unlogging the
; permanent media and so can be used in the NovaDOS disk login routine
; rather than in the disk reset (Function 13) routines, allowing the floppy
; format to be tested and reset more easily without the necessity of logging
; in all the drives anew each time resdsk is called.
;
; Finding the resflag generally requires that you have the source code for
; your ROM or do some sleuthing in the ROM scratch area. A good way of
; locating the resflag is to use a debugger to save the ROM scratch area to
; a file. Save one file with the floppy at SSDD, one with the floppy at
; DSDD and one after a warmboot with the floppy logged out. Use DI or COMP
; or any good binary file comparitor to locate the bytes which differ
; between these files. A little experimentation should lead you to the
; address which you can POKE with a value which will cause the floppy format
; to be reevaluated. Look in particular for bytes which change value between
; 0ffh and some low value such as 00, 01 or 02. If you have a system with
; more than one multiple format floppy you may have to modify the NovaDOS
; code to correctly handle your situation. The code, which is executed in
; NVDS-2.Z80, is included below as a macro for your convenience.
;
; Set resdsk true if using either the AXE or the SCALPEL. If your system
; doesn't support multiple floppy formats you may set resdsk false and save
; some code.
;
;
resdsk equ false ; Reset disk enabled. Set this
; true if using either the AXE or
; the SCALPEL
;
resflag equ true ; True if using the SCALPEL
; False if using the AXE
; If resflag is TRUE (i.e., using the SCALPEL) set resflag_loc the the
; address of the byte which tells the BIOS whether or not the floppy disk
; format has been determined. Set resflag_val to the value which will cause
; the BIOS to reevaluate the floppy disk format.
;
resflag_loc equ 0fd31h ; Address of format flag
;
resflag_val equ 0ffh ; Value of flag to reset format
; If resflag is FALSE (i.e., using the AXE) set setdsk to address of the
; routine (or address of a jump to the routine) in your BIOS which will
; initialize your disk hardware
;
setdsk equ 0050h
; This is the code which executes if resflag is true. Modify this code with
; care or not at all. All registers are available for use if necessary. If
; it works, DON'T fix it.
;
rflgmac macro
ld hl,resflag_loc ; Reset DSDD/SSDD flag in BIOS
ld (hl),resflag_val
endm
; DOS path
; --------
;
; NovaDOS implements a file search path similar to the ZCPR3 search path.
; NovaDOS will locate all system and public files along the path and is
; useful for locating overlays and other support files for non-ZCPR programs
; in either a ZCPR or CP/M environment. The initial address of the path is
; contained in a buffer near the start of NovaDOS and if pathcall is true,
; Function 42 is available to get and set the path address. If DE is 0 on
; call to Function 42 then the path address is returned in HL. Otherwise,
; the path address is set to the value of DE.
;
ispath equ true ; TRUE to incorporate path support
; code in NovaDOS. If you don't
; want path support you may save
; c.a. 110 bytes of code by setting
; ispath FALSE.
;
pathoff equ 0000h ; Location of path in memory
; Set this to 0 to disable the
; DOS path at run time.
;
pathcall equ true ; True to include Function 42
; to manipulate the path address
; Time and Date support
; ---------------------
;
; NovaDOS contains support for Time/Date stamping of files. If you have a
; clock/calendar and you wish to implement time and date stamping you may
; set this equate true to include the DOS routines in the assembly. Time
; and date information is additionally available via Function calls 200 and
; 201, as discussed in NOVADOS.DOC. The format for time and date
; information is also explained therein.
;
dotime equ false ; True if time-stamping is supported
;
timeoff equ 0000 ; Offset of time routine in BIOS
; Rewrite Console Buffer Line
; ---------------------------
;
; CP/M BDOS will rewrite the console buffer on the screen if ctrl-R is
; entered during buffer input. This is a very "old fashioned" facility and
; functions mainly to compensate for the nerdish behavior of the delete key.
; The improved delete key routine in NovaDOS allows this feature to be
; eliminated will little loss in versatility. Significant code space is
; saved. It is recommended that this equate be left false.
;
contron equ false ; False to eliminate Ctrl-R
; Reset unlogged disks
; --------------------
;
; A ZRDOS Function 13 call will not reset the Read Only vector. Similarly,
; a call to ZRDOS Function 37 will reset the Read Only status of only those
; drives specified in the bit map passed in de. A CP/M function 37 call
; will unprotect ALL drives not currently logged in. Setting this equate to
; false will make Function 37 emulate ZRDOS for programs which require it.
;
runlog equ false ; False to NOT reset the read only
; vector with Funcs. 13 and 37
; ZRDOS High Functions
; --------------------
;
; ZRDOS provides five additional DOS functions which are employed by a
; variety of Z system software. These functions are:
;
; Function 39: Return Permanent Media Bit Map
; Function 47: Return Current DMA Address
; Function 48: Return ZRDOS Version Number
; Function 50: Set Warm Boot Trap
; Function 51: Reset Warm Boot Trap
;
; These functions are included in NovaDOS if the following equate is set
; true.
;
hifuncs equ true ; True to include ZRDOS high
; Functions
; ZRDOS Version Number
; --------------------
;
; If hifuncs is true, NovaDOS will return a pseudo ZRDOS version number from
; a Function 48 call. ZRDOS compatible programs make this call to determine
; whether or not ZRDOS is running. ZRDOS versions emulated by NovaDOS range
; up to 1.9. The equate below probably will not have to be changed until
; and unless ZRDOS is upgraded and software is written which requires higher
; version numbers.
;
zrvers equ 0019h ; ZRDOS version number returned by
; Function 48
; Error Escaping
; --------------
;
; You may choose to ignore NovaDOS error messages relating to R/O files and
; disk write errors by hitting a key of your choice. If a file R/O message
; is ignored, the file will be treated as R/W. If a disk read error is
; ignored, another attempt will be made to read the disk. The key defined
; below will be your error ignore key. If you set this key to 0, the error
; ignore feature will be omitted from the assembly with a small savings in
; code.
;
erresc equ 1bh ; The escape key is a good one here.
; Some people prefer a CR (13h)
; High Bits Character Support
; ---------------------------
;
; NovaDOS can allow high bits characters to be entered into the console
; buffer if they are available through the user's conin routine. This
; feature is useful for a variety of software which is keyboard intensive
; and which allows user configurable control sequences. If your keyboard
; and BIOS do not make high bit characters available, set this equate false
; to save several bytes of code. If implemented, the acceptance of high bit
; characters is under the control of bit 2 of the flags byte.
;
; High bits, if present in the data stream, are normally output to the
; console during calls to functions 2, 6, 9 and 10. If hibiton is true then
; this feature will be under the control of flags bit 3. If the bit is off,
; high bit output will be suppressed and vice versa.
;
hibiton equ true ; True to allow control of high
; bit character I/O with flags
; byte
; Initial Flags Settings
; ----------------------
;
; The flags byte controls several functions as detailed below. It may be
; altered using function 41. P2DOS originally made all public attribute
; files R/O, however this can cause problems with utilities which attempt to
; copy them. Since public files do not ordinarily need protection from
; erasure, the small savings in safety gained by making them R/O is not
; worth the possible problems with copy programs and it is advised that this
; bit be left unset. Bit 5, if set, forces a search of drive A for a file-
; name starting with "$$". This takes time, and warm boots on hard disk
; or other permanent media systems can be speeded up considerably if bit
; 5 is reset. If you never use the submit facility (or the dBase II "quit
; to" operation) you may leave this bit reset and enjoy much faster disk
; system resets.
;
flagbyte equ 00100011b ; Initial flag byte setting
; ||||||||
; ||||||| \public files enabled if set
; |||||| \256 character delay if set (see doc file)
; ||||| \accept high bits in function 10 if set
; |||| \output high bits to screen if set
; ||| \make public attribute files R/O if set
; || \perform full disk resets on ALL media if set
; | \unused
; \unavailable
; External DOS stack
; ------------------
;
; If the options which you have enabled in this header file create a DOS
; which is larger than 3.5K the "BDOS TOO BIG" message will be displayed on
; assembly. If you have 36 bytes of memory available elsewhere in memory
; you may assign this block to the DOS stack by setting the exstack equate
; to the address of the TOP of this block. This will leave more space
; within NovaDOS for code. Setting exstack to 0 makes the NovaDOS stack
; internal.
;
exstack equ 0000h ; Address of TOP of external DOS
; stack, or 0 for internal stack
; If you are doing work on NovaDOS and need to do rapid sequential assemb-
; lies of the source, you may find it helpful to make use of the .accept
; feature of Z80SASM. Set the following equate TRUE to use .accept.
;
debug_flag equ false ; To accept information from the console
; Code Relocation Function
; ------------------------
;
; NovaDOS contains an optional experimental code relocation function (38)
; which will relocate executable code, adjusting address according to an
; SPR style bitmap. See the manual for details of using this function. The
; code cost for this function is substantial but it can be implemented if
; the DOS stack is made external and pathcall and hibiton are false.
;
relfunc equ false ; True to include code relocation function
; END OF USER DEFINED EQUATES ..............................
; -----------------------------------------------------------
; The following should not change unless you are debugging a new NovaDOS
;
if debug_flag
.accept 'Creating low-load version? ', bugval
if bugval
intadr defl true
cmnadr defl false
reladr defl false
endif
endif
;
; End of file
; -----------