Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- DEBUG - Norton Guide http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]

    Program Segment Prefix (PSP) Structure

               Length
    Offset     (bytes)  Description
    ------------------------------------------------------------------------

    00h        2        INT 20h instruction (CD20h).
    02h        2        Top of memory. Segment address of the top of the
                        current program's memory allocation block.
    04h        1        Reserved.
    05h        1        INT 21h instruction (CD21h).
    06h        2        Available memory - the number of bytes available
                        in the segment.
    08h        2        Reserved.
    0Ah        4        Terminate address (IP,CS). Address of the termina-
                        tion interrupt handler (INT 22h) inherited by the
                        current program. DOS uses this value to restore
                        the INT 22h vector when the program terminates.
    0Eh        4        Ctrl-Break address (IP,CS). Address of the Ctrl-
                        Break interrupt handler (INT 23h) inherited by the
                        current program. DOS uses this value to restore the
                        INT 23h vector when the program terminates.
    12h        4        Critical error address (IP,CS). Address of the
                        critical error interrupt handler (INT 24h) inheri-
                        ted by the current program. DOS uses this value to
                        restore the INT 24h vector when the program termi-
                        nates.
    16h       22 (16h)  Reserved.
    2Ch        2        Environment - the segment address of the DOS
                        environment.
    2Eh       46 (2Eh)  Reserved.
    5Ch       16 (10h)  Unopened standard FCB1, as parsed from the first
                        parameter in the command tail.
    6Ch       20 (14h)  Unopened standard FCB2, as parsed from the second
                        parameter in the command tail.
    80h        1        Parameter length - the length, in bytes, of the
                        command tail (trailing carriage return (0Dh) is not
                        included).
    81h      127 (7Fh)  Command tail. Also used as default DTA for FCB
                        functions.

    ------------------------------------------------------------------------

    Note:     The second FCB at 6Ch will be overwritten if the first FCB
              is used to open a file.  This happens because the only 16
              bytes are reserved for the first FCB, whereas an entire
              FCB is 37 bytes long.


    Memory Control Block (MCB) Structure (partial list)

               Length
    Offset     (bytes)  Description
    ------------------------------------------------------------------------

    00h        1        5Ah (Z) if last block in chain, otherwise 4Dh (M)
    01h        2        Owner's PSP segment (0000 if free, 0008 if DOS's)
    03h        2        Size of memory block in paragraphs
    [...]

See Also: EXE FCB

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson