Table of Contents
Mid early March work
2025-03-16
Only some updates to the lDOS kernel, and supporting tools. One changeset from last week uploaded to the lDebug repo.
kernwrap
Add an option to disable building of the version.com utility. This is needed to include the COM loader into ldos.com, which requires building version.com before this point.
tractest
Continuing the good tradition of including the kitchen sink of tools in this repo, I added the provisionally named listvars.pl. It can list all code, proc, or data variables detected in a trace listing (.tls) file, including their section or group. It can also check that all immediate near or short branches seem to go into the same segment/group.
A second changeset fixes an error in the iscode function. Lacking the caret it could match instructions in the comment following a data directive, such as the comment on the MEDIA_SET_FOR_FORMAT variable that read "1 IF WE HAVE DONE AN INT 13 SET MEDIA" in which presumably "INT" was mismatched.
The plan is to re-introduce ASSUME directives into the lDOS kernel sources and use this script to check that the variable accesses agree with the assumptions.
lDOS kernel
- Fill the COMPAT=ALTAH memory block with a CCh byte pattern.
- Shrink the COMPAT=ALTAH block late in init to just the one needed paragraph. This re-uses msdos/msinit.nas's transfer_sysinitseg_to_doscode, and calls the memory.asm functions SplitMCB and ClearMCB, which incidentally do not need their SS to point to the DOSDATA segment.
- Change 16-byte reservation in msbio2.nas to alignment.
- Move transfer_real13 to before DISKSECTOR in DOSENTRY section.
- Shuffle some interrupt entries and re-use the odd mmacro for anti-aligning to an odd byte boundary.
- Add entry to allocate_relocate_block that only succeeds if an UMB could be allocated, returns error otherwise.
- Use lDOS extended allocation strategy rather than changing the UMB link status.
- Update relocate_dosdata to allow repeated call and entry that only relocates if an UMB is available. Also re-use allocate_relocate_block (both entries).
- Drop outdated comment on relocate_dosdata, it now preserves the memory allocation strategy.
- In DOSREINIT updaate the sysinit's dosinfo and SYSI_Country variables, needed for early DOSDATA relocation before the last uses of these.
- In sysinit1.nas disable the checksumming of SYSINIT after INSTALL= returns.
- Implement COMPAT=DOSDATAFIRST (immediately relocate after COMPAT=ALTAH allocation, before any further configuration processing and particularly before any DEVICE= directives), and COMPAT=DOSDATAEARLY (relocate to the UMA after any DEVICE= directive that makes available a sufficient UMB, if no UMB found then relocate after INSTALL= as before).
- In init.asm call the early relocate_dosdata after linking in new UMBs, so DOSDATA gets the very first UMB allocation rather than the second.
- Split the ENTRY_POINT variable from FINAL_DOS_LOCATION, and rename the latter to behind_dosentry_segment as it is now the position of the free MCB, not that of the DOS (data) segment.
- Relocate SFT owners before relocate_psp_late's process termination. Includes comments on the abort.nas "Scan" loop that differs in MS-DOS v5. This change fixes deallocation of the CON handles during the PSP relocation.
- Add makinst.sh from lDebug.
- Enable building instsect.com
- If mak.sh called from update dl script, call makinst.sh and itself.
- Rename second payload of ldos.com to payload2.com
- Build instsect first in mak.sh update dl script path.
- Add comload.asm from old lDOS repo.
- Adapt COM loader for use as second payload executable.
- In COM loader run VERSION command program if empty command line given (compatible to old ldos.com / edrdos.com).
- Do not display the COM loader header for VERSION command.
- Initial commit of the lDOS kernel manual.
- In msioctl.nas address the DISKSECTOR using DOSENTRY segment.
- In msbio/msdisk.nas bounce HMA access through the DOSENTRY disk sector.
- Make HMA bouncing configurable using COMPAT= options.
- Implement HMA bouncing auto detection on nonremovable DOS-internal drives. This requires use of a buffer in the HMA that exactly maps to the disk sector buffer in DOSENTRY if addressed with A20 off. To avoid allocating this buffer permanently, it is used directly after allocating the HMA from the XMS driver, before DOSCODE is installed into it.
- In exec.nas do not free the memory block at segment 8 on program memory block allocation failure. Further description and a test script in the changeset message.
- Shrink config block after ORGANIZE call.
- Relocate config block (two steps each) before INSTALL= and INSTALLLAST= directives are run.
- Extend parts covered by InDOS flag in i21 handler. This helps the debugger if run without its "Force InDOS" mode. This led to returning error 2 on exec rather than the expected error 8.
- Document auto bounce detection options.
- Avoid an empty TEXT section in msbio1.nas
- Add a group called DOSENTRYGROUP for the DOSENTRY section.
- Rename some functions to avoid clashes with functions in other files:
- Fix a typo in a label name in ctrlc.nas
- Update some assume directives to prepare for listvars.pl new functionality.
- msbio/msdisk.nas: Address some variables correctly using DOSDATA segment (not DOSENTRY).
- Update more assume directives.
- In read_sector access some more variables using DOSDATA segment, not DOSENTRY.
- Update yet more assume directives.
- Fix to not push ds before diskio_lba_retry. This is not needed because lba_packet_setup already sets up the DS register, and is wrong because the branch back to diskio_lba_retry didn't push DS the same way.
- In macro2.nas function TransFCB do not misalign the stack (round up 15-byte local buffer variable to 16 bytes instead).
- Fix in mscon.nas's CHRIN function to reset DS first.
