home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   alt.os.development      Operating system development chatter      4,255 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 3,870 of 4,255   
   s_dubrovich@yahoo.com to Robert Pengelly   
   Re: Are paragraphs and pages the same in   
   30 Oct 23 10:11:31   
   
   On Sunday, October 29, 2023 at 8:54:46 PM UTC-5, Robert Pengelly wrote:   
   > Some MZ executables have maxalloc set to 0xFFFF and documentation says it's   
   "The number of paragraphs requested by the program" so does that mean that   
   1048560 (0xFFFF * 16) bytes are allocated or does it mean that 65536 (0xFFFF /   
   16 + 1) bytes are    
   allocated?   
      
   ~~~~~~~   
   No, a 'page' is 0100h bytes since the Intel 8-bit days, (16 bit addresses.)   
   where the low order byte of the 16 bit address is 00h.   
   So valid pages are {0000h, 0100h, 0200h, ...}.   
   Incrementing the high order byte of an address is 'stepping' through memory a   
   'page' at a time.   
      
   Considering Intel x86, 'paragraph' is a sub unit, 16 bytes, where the low   
   order nibble is zero.   
   Incrementing a Segment Register value is akin to  'stepping' through memory a   
   'paragraph' at a time.   
      
   So, 'paragraphs' and 'pages' are not the same in terms of memory.   
      
   ~~~~~~~   
   As to MZ & Dos malloc treatment across various x86's, I don't know.   
   I seem to recall that value of FFFFh is treated as a flag to allocate as much   
   memory as freely available.   
   You will need to get into the dos documentation on its compiler to figure your   
   question out.   
      
   hth   
   Steve   
   ~~~~~~~   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca