Structure of MCB

Can someone tell me the structure of an MCB, or where

I can find this info





Comments

  • A MCB (Memory Control Block) is "introducing" a DOS memory block.

    It consist of 16 bytes (1 paragraph) situated at offset 00h-0Fh of a

    segment. The first byte is describing if there's another

    MCB following (offset 00h='M') or if it's the last one (offset 00h='Z').

    The word value at offset 03h describes the length of the following memory

    block in paragraphs, so the MCB describes a memory block at

    (MCBsegment+1):0000h

    and the next (if any) MCB starts at

    (MCBsegment+1+MEMORYBLOCKSize):0000h

    The segment of the very first MCB is saved at offset -02h in the "list of lists".

    You'll get the adress of the list in ES:BX using INT 21 function 52h

    The segment of the memory block (normally a PSP) which this memory block belongs to

    is saved at offset 01h. Other values may occure there such as

    0000h = free

    0008h = belongs to DOS

    At offset 08h to 0Fh the first eight chars of the executable file

    will be saved.




    MCB structure copied from Ralf Brown's Interrupt List:


    Format of DOS memory control block:

    Offset Size Description (Table 1314)

    00h BYTE block type: 5Ah if last block in chain, otherwise 4Dh

    01h WORD PSP segment of owner or special flag value

    03h WORD size of memory block in paragraphs

    05h 3 BYTEs unused by MS-DOS (386MAX) if locked-out block, region start/prev region end

    08h 8 BYTEs DOS v4.0+ ASCII program name if PSP memory block

    or DR DOS UMB, else garbage

    null-terminated if less than 8 characters




    for further informations get Ralf Brown's Interrupt List!




    blackbird




Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories