Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/5/84; site kitty.UUCP
Path: utzoo!linus!philabs!cmcl2!seismo!rochester!rocksanne!sunybcs!kitty!peter
From: peter@kitty.UUCP (Peter DaSilva)
Newsgroups: net.micro
Subject: Re: Re: Small, Medium and Large Models
Message-ID: <248@kitty.UUCP>
Date: Mon, 5-Aug-85 17:24:29 EDT
Article-I.D.: kitty.248
Posted: Mon Aug  5 17:24:29 1985
Date-Received: Wed, 7-Aug-85 02:46:41 EDT
References: <736@dataio.UUCP>
Organization: Recognition Research Corp., Clarence, NY
Lines: 41

> In article <411@kontron.UUCP> cramer@kontron.UUCP (Clayton Cramer) writes:
> >Small           all code in one 64K segment
> >                all data in one 64K segment (including stack)
		(in Lattice & Microsoft C: all code & data in 1 64K seg)
> >                
> >Medium          code can occupy several segments, none more than 64K long
> >                all data in one 64K segment (including stack)
		(in Lattice & Microsoft: code in 64K, data in large
		 address space)
> >
> >Large           code can occupy several segments, none more than 64K long
> >                data can occupy several segments, none more than 64K long
> 		 Also, address calculations are done on the offset portion
> 		 of the address only, thus limiting arrays and dynamically
> 		 allocated memory to chunks smaller than 64k. Pointers
> 		 cannot be subtracted if their segment values are different.
		(in Lattice & Microsoft C: address calculations are done on
		 the entire pointer. You can disable this with the -s flag for
		 speed)
> >                
> >There are reputed to be other models supported by other compiler writers,
> >with names like Tiny and Huge, but in what way they differ from the
> >"official" models, I'm not sure.  (Maybe there's room for more models, with
> >names like Federal.)
> 
> Tiny		Code plus statically allocated data fits in 64k. This is
> 		so a .COM file can be created.
		(Lattice small model)
> 
> Huge		Address calculations are done on both the segment and
> 		offset. Statically allocated arrays still must be less
> 		than 64k.
		(Lattice large model, but static arrays can be larger than 64K)
> 
> Large Data	Data can be > 64k, but code must be < 64k.

( Large Prog	Prog can be >64K, but data must be <64K)
> 
> Under any model, the stack size is limited to 64k.

Translation: nobody has a coherent description for memory models yet.