====== Early mid October work ====== **2023-10-15** This week mostly involved updates to the Extension for lDebug system. ===== insref NOT fix ===== The instruction reference wrongly claimed that the NOT instruction changed the arithmetic status flags. This is not true. [[https://hg.pushbx.org/ecm/insref/rev/857a41795855|I fixed that]], and in the same section added that NEG behaves as if subtracting from zero. I heard that NOT not changing flags was on oversight during the design of the 8086.
The least obvious and most notable case is that NOT doesn't affect FLAGS, apparently [[https://stackoverflow.com/questions/74341777/why-does-bitwise-not-dont-affect-the-zf-bit|a design mistake by Stephen Morse]] when specifying the 8086 ISA. All the other standard ALU instructions that date back to 8086 affect at least some FLAGS, except for LEA which is sort of special.[[https://stackoverflow.com/questions/8305760/assembly-language-instructions-that-do-not-change-eflags#comment131244216_8363136|Peter Cordes]], in a comment 2022-11-07 04:10:36Z, License: CC BY-SA 4.0
One Boolean instruction, NOT, is missing from the list of Boolean instructions that affect the flags. NOT does not affect the flags. This was a result of an oversight (I goofed!) when the processor was being defined.Steve Morse, [[https://stevemorse.org/8086/|The 8086/8088 Primer]], page 98===== TracList & tractest ===== The documentation [[https://hg.pushbx.org/ecm/tractest/rev/23c609f98e7c|got an update to list]] that the TracList option ''-%%%%-local-offset'' disables the default offsets. This bit me as adding the switch manually for ELD debugging disabled tracing the debugger listing, which needs an offset of zero. The other changes concern [[https://hg.pushbx.org/ecm/tractest/rev/0c4fdcd2a079|passing along]] (and [[https://hg.pushbx.org/ecm/tractest/rev/ace6fe1c2242|handling as a "line"]]) and [[https://hg.pushbx.org/ecm/tractest/rev/230bf264f378|reading a hint]] called ''TracList-add-offset='' which can be used to add file-local (or global) offsets to a running TracList. This is to be used for debugging ELDs that may be loaded to any offset within the ELD code section. ===== symscr ===== One of the symbolic debugging scripts [[https://hg.pushbx.org/ecm/symscr/rev/5535eb245d2c|got updated to make it more usable]] for sending commands to a serial terminal connected to a debugger. ''sendser.pl'' now accepts a ''--bytesleep='' switch specifying how long to sleep before sending each byte. A value of "0.01" seconds (equivalent to 10 milliseconds) is used in some examples, allowing 100 Bytes per second. ===== lDebug ===== ==== Changes not specific to ELDs ==== * [[https://hg.pushbx.org/ecm/ldebug/rev/14dd989671ef|Document the variable set up]] parameter and result uses of CH register * [[https://hg.pushbx.org/ecm/ldebug/rev/27064487e67c|Fix build]] with _CATCHINT2D=0 * [[https://hg.pushbx.org/ecm/ldebug/rev/06dfce02cdd7|Fix build]] with _CATCHINT2D=0 _AREAS_HOOK_SERVER=1 (by disabling the areas server) * [[https://hg.pushbx.org/ecm/ldebug/rev/9b5b8457713f|Enable new NASM warnings]] (as errors) for section-crossing relative relocations, [[https://bugzilla.nasm.us/show_bug.cgi?id=3392571|as requested by me]] originally in 2019 * Add _DX option [[https://hg.pushbx.org/ecm/ldebug/rev/4de1259adbe1|to enable or disable DX command]] independently of _PM option ==== ELD infrastructure ==== * [[https://hg.pushbx.org/ecm/ldebug/rev/2614f031fd8b|Hook AMIS interface]], allowing to add AMIS functions in the 40h to 4Fh range (reserved for ELD extension functions) and monitor/change all AMIS functions * DOS input [[https://hg.pushbx.org/ecm/ldebug/rev/3e8067051a6a|is no longer required]] to load ELDs, only DOS being available (not InDOS) * [[https://hg.pushbx.org/ecm/ldebug/rev/a50aabb3ee91|Add function]] ''intcall_ext'' for use by ELDs * [[https://hg.pushbx.org/ecm/ldebug/rev/88f3df7ab9b7|Add links]] for ''amis_multiplex_number'', ''try_debugger_amis_multiplex_number'', [[https://hg.pushbx.org/ecm/ldebug/rev/d3d4ae3cffe8|and]] ''dd_store'' ==== ELD linker and architecture ==== * [[https://hg.pushbx.org/ecm/ldebug/log?rev=desc%28%22doc%3A%22%29+and+7a84c22%3A44a2961|Document ELD format and architecture]] more [[https://pushbx.org/ecm/doc/ldebug.htm#eld|in manual]] * Add ''source/eld/ovr.sh'' [[https://hg.pushbx.org/ecm/ldebug/rev/2682cfb45083|to hg ignored files]] * Display hint to another debugger using a new AMIS function [[https://hg.pushbx.org/ecm/ldebug/rev/eba0cf4f8d73|to announce the offset an ELD loads at]], with the listing filename used * [[https://hg.pushbx.org/ecm/ldebug/rev/20e82c933de7|Do not write]] to CS selector * [[https://hg.pushbx.org/ecm/ldebug/rev/fa909995aabb|Check name length limit]] of links * [[https://hg.pushbx.org/ecm/ldebug/rev/056ee3f6a847|Allow optional code links]] * [[https://hg.pushbx.org/ecm/ldebug/rev/5c30055245cb|Optimise away optional code links support]] in the linker and links tables if not used by an ELD * [[https://hg.pushbx.org/ecm/ldebug/rev/0818d8d7bbd3|Allow to change]] the ''relocateddata'' vstart, including setting it to zero [[https://hg.pushbx.org/ecm/ldebug/rev/df03c4ba46c4|to optimise the linker]] by one instruction * [[https://hg.pushbx.org/ecm/ldebug/rev/1a2ff0bf5471|Fix bugs found]] from new vstart change option * Add comments with [[https://hg.pushbx.org/ecm/ldebug/rev/46084a0129f1|test install]] and [[https://hg.pushbx.org/ecm/ldebug/rev/fae67d061195|test run]] commands, as well as scriptlets to write eldcomp commands based on them to a serial terminal (in the changeset messages) ==== Specific ELD changes ==== * amount: [[https://hg.pushbx.org/ecm/ldebug/rev/c730236d46cd|Fix DI return]] in variable set up * Add more bugs in ldmem and printf ([[https://hg.pushbx.org/ecm/ldebug/rev/6ef94e23ef9a|1]], [[https://hg.pushbx.org/ecm/ldebug/rev/850936bafd4b|2]], [[https://hg.pushbx.org/ecm/ldebug/rev/19b8f3abf2cf|3]], [[https://hg.pushbx.org/ecm/ldebug/rev/1e94727d7bed|4]], [[https://hg.pushbx.org/ecm/ldebug/rev/12b0535eb22f|5]]) * eldcomp: [[https://hg.pushbx.org/ecm/ldebug/rev/84f23e263315|Add additional pass]] with sufficiently sized buffers allocated to save the differing ELD sections, eventually running a C command to compare them * eldcomp: Install a ''puts'' handler [[https://hg.pushbx.org/ecm/ldebug/rev/3cd4d96fa758|to add ELD in-section offsets display]] to C command output * eldcomp: [[https://hg.pushbx.org/ecm/ldebug/rev/24623e21932c|Also observe]] ''NOFREEONESHOT'' DCO7 * testamis: [[https://hg.pushbx.org/ecm/ldebug/rev/f4babdfd6a21|Test ELD to hook AMIS interface]], with special handling to use an ID to differentiate multiple resident instances of the same ELD * amismsg: [[https://hg.pushbx.org/ecm/ldebug/rev/9ee28df3ccb9|ELD to receive a message on AMIS interface]] (function 40h) and display it to the debugger terminal using an inject handler. This is used to get the trace offset hint from an ELD linker to an outer debugger, which will display it for tractest to receive. * amismsg: New AMIS function 41h [[https://hg.pushbx.org/ecm/ldebug/rev/0bf973a82f65|to query whether there is still a message]] not yet displayed * dx: [[https://hg.pushbx.org/ecm/ldebug/rev/f0942245bd60|ELD to provide DX command]] * variable: [[https://hg.pushbx.org/ecm/ldebug/rev/8b6343299c1c|magic, fix pointer arithmetic]] * history: [[https://hg.pushbx.org/ecm/ldebug/rev/b1ae0f8f7b11|Fix missing]] ''NOFREEONESHOT'' DCO7 test * amismsg: [[https://hg.pushbx.org/ecm/ldebug/rev/b1ae0f8f7b11|Add AMISMSG DISPLAY command]] to repeat last message that is still buffered {{tag>ldebug eld amis traclist insref}} ~~DISCUSSION~~