Table of Contents
April to early May update
2025-05-11
In April I was sick for several weeks. I didn't get much done during that time, and little since. However, a few things did get done.
While creating the file for this blog post the HP 95LX complained about the file system being read only. This was quickly resoled by flipping the switch at the outer side of the memory card.
The MS-DOS v3.40 blog post
In this blog post and the subsequent three comments I wrote about how the non-multitasking MS-DOS v4.00, which is the base of lMS-DOS since the 2024 April release, was originally called MS-DOS v3.40 while in development.
The first comment is a reference to two such statements on the OS/2 Museum blog. The second and third comment are in other languages, including a Google Translate translation into English. The second comment is from a site called BetaWorld, in Chinese. It led to the third comment which quotes a Serbian computer magazine from 1988 September.
lDebug
Fix a DR-DOS boot load protocol comment. Loading a full 29 KiB file requires a sector size of 1 KiB or smaller.
lDOS boot
- Allow building kernpl.asm in FreeDOS mode.
- Allow building kernpl.asm in Enhanced DR-DOS mode.
- Make the three original kernel payload source files use kernpl.asm rather than using redundant code.
- Optimise iniload clust_next to not preserve ES. (The boot32 variant of this code already did this.)
- In iniload comment on finish_relocation more than before.
- Update manual and iniload comment with lDOS signature used for recent lMS-DOS, note that lDMS is for older lMS-DOS.
- In iniload comment more on init_memory code.
ident86
Only minor changes:
- Detect
$M_IDdirectives (MASM style istruc) as word data directives. - Keep track of last line size in one of the .tls size directive detection loops. This may be useless.
- Fix to use the liner variable in two debugging output spots.
fixmem
- Recognise Set_Data_Segment mmacro as implying assume directives for DS and ES. This is used by lMS-DOS format.exe sources.
- Fix to not push a new section for an "already ends" commented section directive, fixing reruns on already processed sources.
- Add more debugging output for pushing a new active section.
- Use the $newsection variable as allcaps section name.
- Add switch --exact-section to avoid allcapsing section names.
- Add switch --drop-seg to drop SEG keyword on section names used as parameters. NASM uses its SEG keyword to get the section of a non-section label, and requires it be omitted to get the segment of a section.
- Create port equates for parameter of MESSAGE mmacro.
- Create port equates for content parameter to a
%definedirective, if the content is a single label name. - Fix linebreak handling of prior changeset, need to match whitespace non-greedily so the linebreaks are matched as expected.
- Update equates for port labels and labels for port equates.
- Handle port equates and port labels read from prior passes using the same code.
- Add switch --hide-no-section to hide messages about accesses to "sectionless labels".
- Replace multiple dotted labels in the same line by looping. Avoids the need to rerun the script on the same files.
- Allow question marks in label and equate names. Used a few times by lMS-DOS format.exe sources.
lDOS
- Add lba_doverify after write, if write with verify requested.
- Call CHECKIO in diskio_lba_error
- Fix crash on unknown block device IOCTL calls due to wrong stack adjustment.
- Improve IOCTL dispatch to not use
and al, 9Fh - Move around the fail generic IOCTL code.
- Add block device function 19h (query generic IOCTL support).
- Fix assume directive in prior changeset.
- Support DOS system calls 4410h and 4411h (query generic IOCTL support).
- For DOS generic IOCTL system calls return zero on success, to match the Interrupt List documentation.
lMS-DOS format.exe port
This port went much like prior ports, particularly the one of the sharer. The scriptlets were adjusted to work with the assembly language source files in src/CMD/FORMAT/ rather than the sharer's subdirectory.
Not all changesets are interesting, so I won't list all of them.
- Do not delete format.exe intermediate file.
- Run fixupp on object files.
- Create format.exe using WarpLink.
- Add script to generate format.tls trace listing file.
- Port formacro.mac macros manually.
- Port formsg.mac macros manually, and replace = equals sign equates by
%definedirectives. - Replace 0 zero initialisers in some structures by ? question marks.
- Copy inc/parse.nas to a local copy of the same filename.
- Replace double dollar prefixed labels using a perl scriptlet. (Likely generated by the SALUT assembly language preprocessor.)
- Replace non-zero initialisers in some structures by ? question marks.
- Drop doubled PUBLIC directives. (Likely caused problems because of different caps of the various directives?)
- Initialise a non-zero structure member in istruc.
- Fix an immediate operand with segment override, it seems that MASM just ignores the override when OFFSET keyword is present.
- In formsg.mac delete a dash accidentally introduced by an earlier change.
- Add format.exe message files to the repo and delete them from the makefile.
- In sysmsg.mac MSG_SERVICES work around a problem with format.ctl being included twice. Because of the handling of the EQU in this file as a define, this is not allowed. The define name would be expanded before passing it to the EQU mmacro as
%00. - Rerun fixmem.pl on display.nas with macro.tmp file from formsg.mac
- Drop a Control-O (U+000F) comment in formsg.mac
- Rerun fixmem.pl on display.nas with msgserv.nas in the temporary file.
- Add formsg.mac aliases for symbols exceeding 41 bytes, so WarpLink will find these truncated globals when used as externs by MASM-generated object files.
- Drop more segment overrides on OFFSET immediate operands. It turns out this is an error to NASM only if the other operand is a memory operand. If the other operand is a register, NASM will convert the operand in error to a memory operand despite the lack of square brackets. This was detected by ident86 as a mismatch.
- Replace switch equates by
%ixdefineas needed in one of the parser source files. - In parse.nas undo an identicalise NOP from an earlier ident86 run (on msbio module).
- Fix makefile to use the local copy of parse.nas
- Change the Procedure mmacro in formacro.mac to .nolist to help ident86
- Copy BOOT.INC, BOOTFORM.INC, and BOOT11.INC to macro filenames.
- In msfor.nas explicitly initialise Media_ID structure members to all-blanks, removed from the structure definition earlier.
- Replace ORG directives in PSP pseudo-segment by ABSOLUTE directives.
- Reserve some space in PSP pseudo-segment to match MASM build.
- Convert local format makefile into extension of the repo root makefile for GNU make.
- Replace accidental U+0167 codepoint in memory.asm unused code branch.
These last two changes allow using msbio.tls in TracList without converting it to UTF-8 first.
