Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

Is there a DOS memory documentation available? (Users)

posted by ecm Homepage E-mail, Düsseldorf, Germany, 12.01.2024, 18:00

> I've never messed with bootloaders, but what are NSYM & NDEB? I've never
> heard of those before.

They are simply what I chose to call the headers that bootable lDebug creates for itself. As depicted in the linked sources, NDEB has four letters as a signature, then two digits for a version number (always "00" so far), a checksum for the image identification, and a size. (The size must be given as an amount of paragraphs; the comments could be clearer on that.)


        align 16, db 0
        ; Image identification
        ; First dword: signature
        ; Next word: version, two ASCII digits
        ; Next word: checksum. adding up all words of the paragraph gives zero
        ; Next word: size of image (including this paragraph)
        ; Three words reserved, zero.
imageident:
        db "NDEB00"
.check: dw 0
.size:  dw 0
        times 3 dw 0


While NDEB covers the allocation of the bootloaded debugger instance / 'process' as such (not really a DOS application process of course), NSYM is used for an allocation of symbol tables when symbolic bootable lDebug is running. Other than the differing name, the definition of the NSYM block is similar to NDEB's.

The NSYM allocation will always be done using the int 12h / word 413h memory size mechanism as well. A single bootloaded debugger instance will only allocate exactly one NDEB and at most one NSYM. But the debugger can load another instance of the debugger, so there can be multiple NDEB for instance. This can be useful to debug the debugger itself, in which the inner debugger should be debuggable or conditionally debuggable.

The naming choice of NDEB stems from the internal, pre-release-0 times of when lDebug used to be called NDebug, inspired by the "Netwide Assembler". Unfortunately "NDEBUG" seems to be taken for a C-language-style preprocessor macro, which I seem to recall is one of the reasons I changed the name.

---
l

 

Complete thread:

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