Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

I made my own DOS implementation (Announce)

posted by tom Homepage, Germany (West), 22.03.2024, 10:58

> the error is on line 92.
*(short far*)MK_FP(allocSeg-1, 1) = allocSeg;   /* makes it selfreferencing */
 _fmemcpy(MK_FP(allocSeg-1, 8), MY_MEMORY_SIGNATURE, 8);   /* mark our name */


> It seems to be a different version of the program, but it also
> modifies the internal memory allocation structure of DOS.

the MCB structure (while never documented by MS) has been documented since MSDOS 2.0. And been implemented this way by any selfrespecting DOS clone.

this is indeed problematic if you decide to run your own structure

struct mcb
{
  unsigned next_mcb_seg;
  unsigned prev_mcb_seg;
  unsigned paragraph_count;
  unsigned owner_psp;
  // 0: normal memory block
  // 1: dta struct
  // 2: disk cache
  // 3: filesystem
  // 4: handle
  // 5: system
  unsigned char type;
  unsigned char __far *usercache_freedptr;
};


also, all MEM like memory diagnostic tools will fail on your "operating system that is mostly compatible with the documented DOS API."

Time to move on...

 

Complete thread:

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