I haven't uploaded a copy of the new source anywhere yet - it'll probably
be in the next DOSLITE source batch along with my work on a few other DOS
commands, but I don't want to replace the copy I've already uploaded, and
DOSLITE isn't ready to go onto anything like github or gitlab yet.
As I said, I managed to move the CP437 table into the spot reserved for
the resident table (except for the first 3 bytes), which saved good
memory, and with C. Masloch's optimizations and by simplifying the version
check the file size and resident footprint went down even further. (In an
earlier incarnation, I had to jigger around 'jmp far 0', but it turns out
'jmp 0:0' as mentioned was the solution to that.)
The resident footprint went down 1 paragraph, from 1344 to 1328 - now only
128 bytes larger than the official version. (I wonder if any of the PSP
can be just up and deallocated?)
The new "new2F":
new2F: cmp ah, 0xB0 ; is it ours?
je .2
.1: jmp 0:0
.2: cmp al, 1
ja .1 ; >1 - chain
mov al, 0xFF ; needs set for both functions.
je .3 ; 1 - where are we?
iret ; 0 - are we here?
.3: mov word ds:[bx], entry
mov ds:[bx+2], cs
iret
old2F equ .1+1
...probably as codegolfed as it's going to get.
The original
xchg ah, al
cmp ax, 0x0200
has been replaced with "cmp al, 0x02" in a size optimization.
The code following the freeing of the environment has also been replaced
to close everything first and do things more efficiently.
So far, so good...
-uso.
_______________________________________________
Freedos-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freedos-devel