Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

EDR-DOS development (Announce)

posted by CandyMan, 16.08.2023, 12:54

> Interesting, thanks! I do have some comments:
>
> Can you describe fix-bio's use of virtual and load dword / store dword? I
> am not used to FASM specific directives. The load and store access and
> change data that is already assembled? file is like NASM incbin? virtual
> assembles into a space that is discarded afterwards, just for access with
> load?
>
> The registers don't all need to be preserved by fix-bio. es, di, si, bx,
> and cx are probably not used by the EDR-DOS load protocol. dl, ds, bp, ss,
> sp may be used.
>
> I don't like the use of the memory at 004F0h for saving the registers. It
> would be better to use the stack or at least 005F0h.
>
> The fix-bio expects the compressed file to be < 64 KiB. Fair enough.
>
> The mov word [cs:0], ax could be replaced by directly storing
> a 16-bit immediate to the memory, instead of going through AX. Hmm, may
> actually be the same length of instruction bytes.
>
> The retf in fix-bio can be replaced by a jmp far immediate because the
> kernel must be loaded at 70h:0 (currently).
>
> What are the first 8 bytes supposed to be in the upx-compressed drdos.com
> that are replaced by fix-dos? I think you could add load directives to
> check that those instructions match what you expect.
>
> In the batch file you use "vasm". Is that a typo for "fasm"?
>
> What versions of apack and upx do you use?

In fix-bio.asm I add a small procedure at the end of dosbio.sys.
In the virtual block, I set a new jump instruction for this procedure and then copy the previous compressed jump instruction to drbio.sys (4 bytes) to be able to recreate it and run the unpacking procedure to the address CS-10h:IP+100h
The "file" directive works exactly like the "incbin" in nasm, but you can also specify the start and size of the loaded file block.

The memory at address 4F0h (16-bytes) is for the user and I took advantage of that.

The first 8 bytes of compressed drdos.com should be:

CMP SP,constant
JA Above
INT 20h
Above:


"vasm" is my replacement for "fasm" run by the D3X dos extender.

I use aPACK v1.0 and UPX v3.96.

 

Complete thread:

Back to the forum
Board view  Mix view
21998 Postings in 2024 Threads, 395 registered users, 192 users online (0 registered, 192 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum