home *** CD-ROM | disk | FTP | other *** search
- Hi. As promised, here are some notes on integrating XBIOS, the
- DateStamper BSX and NZCOM. This is still very much a work in progress,
- and I am intrested in hearing your comments and experiences.
-
- My system is a 6mhz SB180, with 2 to 4 48tpi floppy disk drives. It has
- a Dallas Semiconductor Smartwatch installed in the ROM socket. It is
- built into a Heath H19 terminal.
-
- My original XBIOS/NZCOM system was constucted several years ago. I made
- a minimum size XBIOS system by removing the XBIOS buffers for the IOP,
- RCP and FCP segments. I used the ZCPR30 command processor and ZRDOS17
- dos segment. This system immediately booted NZCOM, which was configured
- as a full featured system, with a 12 record IOP, 18 record FCP, and 5
- record FCP. Later I added ZDDOS, with an additional 3 record clock
- driver. The CCP in this system located at C300, giving me a 48.75K tpa.
- This was adequate for virtually all my needs, so I very seldom changed
- to other configurations.
-
- As you know, the Z-System is in constant change. About once a year it
- has been my custom to completely update my system, with current releases
- and replacement programs. During this years purge, I also took a good
- look at the underlying system, and made some useful changes.
-
- I had four rough ideas for improving the system. I wanted to boot up
- XBIOS with ZCPR34 and ZSDOS, make the DateStamper BSX work with NZCOM,
- allow the system to boot up with the RAM disk configured as A:, and
- reduce the memory required for the system.
-
- The latest version of the XBIOS SYSBLD utility can load .ZRL format
- segments. This did not appear to be true, but I finally realized that
- ZCPR34 needed an extended environment, and SYSBLD was not supplying one.
- I used the new program ENVSRC to create a assembler source file of a
- running NZCOM system, and then manually edited it to match the memory
- map I desired. The IOP, FCP, and RCP sizes and locations were made 0,
- and the other buffers were put in the locations defined by SYSBLD. You
- must pick a byte to locate the wheel byte, as this does not appear in
- the SYSBLD memory map display. I then assembled it to a .COM file. At
- the SYSBLD menu page Z-System Parameter Menu I input this prepared
- environment. I now had a functional system, with ZCPR34 and ZSDOS
- running. A full range of ZCPR features are included: 4 element shell
- stack, 14 entry named directory buffer, message buffers, command line,
- and external path, FCB, and stack. ZDDOS starts at E400, so a 57K tpa is
- possible.
-
- I then loaded the DateStamper BSX, and found that the datestamping
- features worked. Also, most of my system time aware programs, like
- ZFILER, ARUNZ, and ZXD read the clock fine. One program did not; ZCAL,
- the ZSDOS calender display utility, reported that no clock was installed.
- I also verified that DateStamping ceased to function if I loaded an
- NZCOM system, or if I even reloaded ZSDOS with JetLDR.
-
- I presumed that the BSX mechanism worked like the RSX mechanism, which
- redirects the jump vector to DOS at location 0005. The Purpose of a BSX
- is to alter standard DOS funtions or create new ones. Using the memory
- display function of SHOW, this is what I found. On my system, ZSDOS
- begins at E400, and XBIOS begins at F200.
-
- 0000 C3 06 E4 jp DOS+6 ; jump to DOS
-
- E406 C3 4E F2 jp XBIOS+4E ; fascinating, Jim. I
- wonder how it comes
- back?
-
- At this point I looked at the file XSYS.LIB, which lists XBIOS system
- equates. XBIOS+4E is defined in the BIOS jump table as "Banked system
- extension loader interface". I then used JetLDR to load in a virgin
- ZSDOS, to see where it would normally jump to.
-
- E406 C3 9B E4 jp DOS+9B ; Somewhere there is a
- return to this
- location
-
- I then tracked thru XBIOS.
-
- F2E4 C3 22 F4 jp XBIOS+222
-
- F422 32 AA F4 ld (F4AA),a ; save accumulator
- 3E 00 ld a,0 ; set a to 0
- 32 05 F3 ld (F305),a ; store 0 at F305
- 3A AF AF ld a,(F4AF) ; get a flag
- B7 or a ; set flags based on
- flag
- 3A AA F4 ld a,(F4AA) ; restore a to entry
- F431 20 06 jr nz,J1 ; jump based on flag
- E5 push hl ; add an entry to stack
- 2A A8 F4 ld hl,(F4A8) ; get word at F4A8
- E3 ex (sp),hl ; put that word on
- stack, get hl back
- C9 ret ; jump to (F4A8)
- J1 CD 6F F5 call F56F ; remap memory?
- CD 00 4E call 4E00 ; Banked memory?
-
- Checking the contents of F4A8 revealed 9B E4, the return location to DOS
- that I was expecting. Apparently SYSBLD patches the jump to XBIOS in the
- DOS segment, and the return to DOS in the XBIOS segment when it creates
- the XSYSTEM.MDL system file.
-
- I checked this by reloading ZSDOS with JetLDR, and then poking in the
- patches. Always poke the return into XBIOS first! Patching the jumps
- in the wrong order invokes a cosmic force that moves your index finger
- to the reset button! I then loaded a NZCOM system, manually located the
- jump targets and patched them. The DateStamper was now working under
- NZCOM.
-
- The strategy required is this: Read the word at DOS+7, and patch it
- into XBIOS+2A8, and then patch XBIOS+4E into DOS+7. I suspect the
- offsets into XBIOS are constant for different configurations of XBIOS,
- as all the XBIOS variations are derived from the same distribution .REL
- file, but this needs to confirmed.
-
- Next I wrote the following ARUNZ script to automate this process. Note 2
- points: The script requires that the XBIOS location be known explicitly,
- as ARUNZ cannot find offsets into the "real" bios, and you cannot apply
- this alias twice. ( You can, but the aforementioned cosmic force
- awaits).
-
- ;
- ; BSXON patches the BSX entry into DOS and the DOS return into XBIOS
- ; This script requires that the base of XBIOS be at F200h, and it must
- ; only be invoked on an unpatched system!
- ;
- BSXON poke f4a8 $@h+d0007 $@h+d0008;poke $+d0007 4e f2
- ;
-
- I then set about to write an overlay for NZCOM.COM to apply this patch that
- would be transparent and generalized. The overlay finds XBIOS directly,
- and also checks that XBIOS and ZSDOS are both present before making the
- patch. ( It has since occurred to me that I should check that the DOS
- segment is being changed before applying the patch, and not apply it to
- an unchanged segment. Next version. ) If you use another DOS variant,
- change the test string, or disable the test. Also, verify the offset to
- the XBIOS string in your configuration.