On at 2023-05-01 23:55 -0400, jer...@shidel.net wrote:
Hi All,
Yesterday, I released the new version of Logger. It has come a long way
since the first Alpha release and works great. I made some final
decisions on a couple aspects and it is now in the Beta stage. Other
than some probable byte squeezing, there is only one other possible
feature I might add before the final version 1.0 is released (see below).
https://fd.lod.bz/repos/current/pkg-html/logger.html
<https://fd.lod.bz/repos/current/pkg-html/logger.html>
Here is a summary of the major changes and final decisions I made since
the Alpha-7 release:
* Interface can export the log as HTML in full color.
* Driver supports VESA mode changes.
* Driver supports AMIS and IISP.
* Driver provides the ability to check status, enable/disable logging,
clear and append the log through an API.
* API is usable through AMIS or by direct far call to driver by other
programs.
* Driver and Interface will be released as a single dual-mode binary.
(popular request)
* Release includes very small and simple API examples. (For example, a
141 byte COM program with source to append the log.)
* Release includes UPX’d driver only version for usage on limited
capacity media like boot floppies when needed.
Adding AMIS, IISP and the API increased the memory resident footprint of
the driver by approximately 30%. But, that is still only a total memory
footprint of 1,472 bytes for the 0.1-BETA version. I think those
features are worth the couple hundred bytes required for their support.
There is no API documentation at present. Instead, I included simple
examples that include all the different API functions.
I reviewed your AMIS implementation [1]. Here's what I noted:
* You still use the jmp / jmp / retf structure for the IISP headers. The
simplest improvement is to put the "retf" before the header, which
already saves you two bytes per header.
* The %%PrivateEntry code could hardcode the bx response in an immediate
"mov bx, imm16" instruction, saving at least 2 bytes. Like the multiplex
number you could patch this instruction's data if it isn't a constant.
* The %%Uninstall response code 06h is commented by you as "cannot
remove, loaded in config.sys" but in the specification it says
"disabled, but can not be removed from memory because loaded from
CONFIG.SYS". The "disabled" indicates that you should have disabled your
resident program when you return this function code. (As I mentioned
before, the uninstall function return codes in the current AMIS leave
things to be desired.)
* In %%InterruptList you can share the "mov dx, cs" instruction
(followed by iret) with the %%Respond code if you re-order the
instructions in the latter.
* Your %%GetDriverInfo is wrong. ah should receive the "device-driver
flags". You should return the value 1 (program loaded from CONFIG.SYS).
And al should receive the "number of device driver headers supplied by
program". You set al = 0FFh currently. To set both ah and al at once,
you can use a "mov ax, imm16" instruction. That is, "mov ax, 0101h".
(This function is one of the few AMIS functions that modify ah. The
"return at dx:bx with ax destroyed" for uninstall is the other.)
I also briefly checked out your example programs [2].
* Unneeded cld in Driver_locate
* You handle all return codes in al except al == 0FFh by jumping to
.Next, so a single comparison and branch would suffice instead of two.
* "inc bh" already sets the Zero Flag if the multiplex number wrapped
around, so you don't need to run a "test bh, bh" afterwards.
* The PrintLoop "cmp si, 82h" instruction is confusing to me. Either it
is wrong, or I don't understand it. Seems like at least a comment would
be appropriate.
* It would be more efficient to write a zero terminator behind the
command line tail, then write the entire command line in one call to the
multiplexer. If you were willing to display them in the same colour you
could even add in the CR LF sequence after the text, to reduce the
number of calls to one instead of two.
[1]:
https://gitlab.com/DOSx86/logger/-/blob/38ff575223bc8739dbdfc3251a08b19b99299fac/source/logger/hookamis.inc#L116
[2]:
https://gitlab.com/DOSx86/logger/-/blob/38ff575223bc8739dbdfc3251a08b19b99299fac/doc/logger/devel/log-msg.asm
The addition of the API and inclusion of the UPX’ed driver only version
makes the size of the single dual-mode binary much less important for
usage on boot floppy diskettes. For example, if it were used with the
FreeDOS install media, only 2.6kb would be required for the driver. If
non-user visible debug messages are desired, the simple 141 byte demo
“add message” program could be used. This would consume about 3kb of
disk space instead of the roughly 10kb used buy the dual-mode binary. As
a bonus, having a batch execute the small demo program repeatedly would
be much faster than launching the bigger program to simply append the log.
The API only supports the functions mentioned earlier. It does not
support reading the log. I think that would be of very limited use and
most likely not worth the additional cost in memory to provide those
functions. However, those may be added in future versions if there is
enough demand for them.
I appreciate that you documented the API by way of examples, but it
would still be useful IMO to list all the interface functions in a
single list somewhere. For example, this is the list in my debugger's
amis.asm source file: [3].
[3]: https://hg.pushbx.org/ecm/ldebug/file/73873421b18d/source/amis.asm#l32
Regards,
ecm
_______________________________________________
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel