====== Late January work ====== **2025-02-02** Some work on lMS-DOS and adding two new Extensions for lDebug, and minor work on the dm ELD. ===== Extensions for lDebug ===== * [[https://hg.pushbx.org/ecm/ldebug/rev/7a0ff360f529|Add dosstrat.eld]] to display DOS UMB link status and memory allocation strategy * Add dosstrat.eld [[https://hg.pushbx.org/ecm/ldebug/rev/07824fbdc74b|to the extlib.eld and the eld/mak.sh sccript]] * Add FORCE keyword [[https://hg.pushbx.org/ecm/ldebug/rev/1a06f8448935|to make dosstrat.eld call interrupt 21h]] even while InDOS mode is in effect (including when debugger is bootloaded) * In DM with SD sub-MCB support (ie, the ELD) [[https://hg.pushbx.org/ecm/ldebug/rev/2ce09c1ca908|end processing of sub-MCBs]] on encountering either a type 0 sub-MCB or one with size zero * Add new dhm ELD, [[https://hg.pushbx.org/ecm/ldebug/rev/fea901bd8eb0|for dumping the HMA MCB chain]]. First revision is a no-op * [[https://hg.pushbx.org/ecm/ldebug/rev/196b7ff7ef34|Update attribution year]] in dm source files * Add dhm.eld [[https://hg.pushbx.org/ecm/ldebug/rev/9c2c92819bdc|to extlib.eld and eld/mak.sh]] * [[https://hg.pushbx.org/ecm/ldebug/rev/896770cc03c2|Implement dhm ELD]]. This allows a FORCE command (like dosstrat.eld) to call 2F.4A04 even if InDOS, next a HEADER or TABLE keyword (like dm.eld), and finally a numeric expression to specify an explicit start offset (segment is assumed as FFFFh) * Note that this does not do anything to enable A20, it is assumed to be already on. If it isn't, most likely an invalid HMCB will be read, which ends the main loop of the DHM command. * [[https://hg.pushbx.org/ecm/ldebug/rev/884515e4754c|Document DOSSPACE and DHM ELDs]]. (DOSSTRAT still missing?) ===== lMS-DOS ===== * [[https://hg.pushbx.org/ecm/msdos4/rev/4cd65a53b678|Fix exec .COM loader]] so it checks the file size before allocation, avoiding the possibility of allocating a too small UMB. * [[https://hg.pushbx.org/ecm/msdos4/rev/571f2d12fbaa|Add kernel command line processing]], with the command names CONFIG, ALTCONFIG, and OLDCONFIG. (Only OLDCONFIG has a non-empty default yet.) Largely compatible to the FreeDOS kernel's command line handling, [[https://github.com/FDOS/kernel/pull/72|which I also contributed]]. * [[https://hg.pushbx.org/ecm/msdos4/rev/a5c19a56e38a|Support DOSCODE to HMA relocation]] * [[https://hg.pushbx.org/ecm/msdos4/rev/18b2af3c7ed0|Support 21.3306 version query with HMA indicator]], and ROM indicator for 21.3001 (always returned as zero) * In ms96tpi.nas [[https://hg.pushbx.org/ecm/msdos4/rev/a15a564f8340|adjust the INT13 handler to work with CS != BIOCODE]] (preparation) and thus [[https://hg.pushbx.org/ecm/msdos4/rev/aeead7444b4f|drop two variables]] * [[https://hg.pushbx.org/ecm/msdos4/rev/d7194668d556|Pass empty environment to the SHELL= program]], as FreeCOM needs this to find its own executable. (Prior to this only INSTALL= programs got an empty environment, whereas SHELL= got no environment as in a zero in the ''word [PSP:2Ch]''.) * FreeCOM allows to work around the empty environment by passing the path to command.com as the first parameter, or by entering the full pathname at an interactive prompt. * [[https://hg.pushbx.org/ecm/msdos4/rev/5f4193fad605|Fix NULDEV entrypoints]] to be in DOSDATA segment * [[https://hg.pushbx.org/ecm/msdos4/rev/42d03221f4ea|Implement MS-DOS v5 and v7 HMA access functions]]. * The v5 functions are 2F.4A01 and .4A02, the first one queries the free HMA size and the second allocates a part of the HMA. * MS-DOS v7 added .4A03 with three subfunctions: allocating low in the largest free block (superset of .4A02), allocating high in the largest free block, and freeing an allocation with merging of the prior and next block if they are free as well. It also added .4A04 to query the first HMCB address. * The interrupt list [[https://fd.lod.bz/rbil/interrup/dos_kernel/2f4a03.html#4862|incorrectly suggests that 2F.4A03.dl=01 is for resizing]] of an existing allocation, but I found that it allocates at the top of the largest free block. * [[https://hg.pushbx.org/ecm/msdos4/rev/e9fb087b560f|Initialise the HMCB name field]] of the DOSCODE segment to "DOSCODE" * [[https://hg.pushbx.org/ecm/msdos4/rev/dfbcbc401505|Add a missed dependency]] for version.inc * [[https://hg.pushbx.org/ecm/msdos4/rev/b637ea625469|Update lDOS version]] to 2025 January, and update from "lDOS fork of MS-DOS v4.01 (Month)" to "lDOS (Month) based on MS-DOS v4.01" * Use Local Enable A20 in DOSENTRY entrypoints, and on exec [[https://hg.pushbx.org/ecm/msdos4/rev/ff139b58d0cd|run both Local and Global Disable A20]] (I'm still not clear on the exact meaning of the difference. I [[https://www.bttr-software.de/forum/forum_entry.php?id=22295&page=0&order=last_answer&descasc=DESC&category=all|asked about it on the forum]].) * [[https://hg.pushbx.org/ecm/msdos4/rev/26a3845f0f89|Add function allocate_relocate_block]], accepting a byte size (in a word) and a data structure with the devmark (SD sub-MCB) letter, S MCB type, and HMCB name to use for the allocation. Zeroes the allocated memory. For now this always attempts to allocate an HMCB from the HMA first, then an S MCB from the UMA, and finally from the devmark allocation (SD MCB) in the LMA. * Use allocate_relocate_block [[https://hg.pushbx.org/ecm/msdos4/rev/89190c576ced|for SFTs and FCB SFTs]] * [[https://hg.pushbx.org/ecm/msdos4/rev/b712e2556186|Add allocate_relocate_block.large entry for dword byte size input]], allowing to allocate a block larger than 64 KiB. * Use the new function [[https://hg.pushbx.org/ecm/msdos4/rev/fcce794326e7|to allocate buffers]] (with an S MCB type that is called S_CCB for historical reasons, as S MCB types were first defined for lRxDOS) * [[https://hg.pushbx.org/ecm/msdos4/rev/5a1666a0b177|Allocate CDS]] with the new function * [[https://hg.pushbx.org/ecm/msdos4/rev/91ab8af76f1f|Allocate stacks segment]] with the new function. This requires the addition of a marker (byte value 255 in the first byte of the HMCB name) that the allocation cannot be done in the HMA. {{tag>ldebug eld lmsdos msdos msdos4}} ~~DISCUSSION~~