Path: utzoo!attcan!uunet!portal!cup.portal.com!doug-merritt From: doug-merritt@cup.portal.com Newsgroups: comp.sys.amiga Subject: Re: 80286- er, 68000 memory models Message-ID: <5880@cup.portal.com> Date: 24 May 88 18:07:26 GMT References: <2672@louie.udel.EDU> Organization: The Portal System (TM) Lines: 27 XPortal-User-Id: 1.1001.4407 David Gay writes a nice clear summary of what's going on with small and large models, etc. He also says: > 6) I repeat, all this only affects your C code, and in no way impedes > access to the ROM. Possibly some of the confusion stems from the fact that you must pass long ints to Amiga library routines, whereas in small model, by default ints are short and so if you forget to cast them, you may well get gurus. For example: Print(s) char *s; { Write(output, s, (long) strlen(s)); } Without the 'long' cast, this would guru in small model, because the small model C library strlen() returns a short, not a long. Hence casting 'int' arguments to library functions to 'long' is a more portable style regardless of which compiler or model you yourself work in. Doug -- Doug Merritt ucbvax!sun.com!cup.portal.com!doug-merritt or ucbvax!eris!doug (doug@eris.berkeley.edu) or ucbvax!unisoft!certes!doug