Path: utzoo!attcan!uunet!lll-winken!lll-lcc!ames!umd5!uflorida!novavax!hcx1!hcx2!jgj From: jgj@hcx2.SSD.HARRIS.COM Newsgroups: comp.sys.atari.st Subject: Re: MWC & large arrays -- help! Message-ID: <46700008@hcx2> Date: 14 Jun 88 16:40:00 GMT References: <734@cacilj.UUCP> Lines: 16 Nf-ID: #R:cacilj.UUCP:734:hcx2:46700008:000:886 Nf-From: hcx2.SSD.HARRIS.COM!jgj Jun 14 12:40:00 1988 I have experienced this problem too. As far as I can tell, in 3.0, structures are limited to 32Kb. Also, elements of an array are limited to 32Kb. Thus the declaration char array[10][33000]; causes wrong code to be generated for references to array. The problem is, the compiler uses 16 bit quanitities to remember element sizes. The code that gets generated for cp=array[i]; is the base addresss of array plus i times the sign extended low order 16 bits of 33000! Very frustrating. I spent two hours of debugging before I put the pieces of the puzzle together. ============================================================================ Jeffrey Glen Jackson | Satan jeered, "You're dead meat Jesus, I'm gonna jgj@ssd.harris.com | bust you up tonight." x5120 | Jesus said, "Go ahead, make my day." | -- Carman, "The Champion"