Re: A92: Line 1111 Emulator and 32k limit?


[Prev][Next][Index][Thread]

Re: A92: Line 1111 Emulator and 32k limit?




In a message dated 12/25/1999 2:53:00 PM Eastern Standard Time, 
cbiffle@safety.net writes:

> >l was getting an error as a result of 32768 bytes being between a library
>  >call and the end of a program (is this right?).
>  
>  Sounds like you've hit the nail on the head.  Relative jumps (i.e. jump 
>  back this far, jump forward that far) are limited in scope.  I didn't 
>  remember it being a 32K limit on the 68000, but this is definitely a 
>  possibility (I know MIPS machines are limited to 32K in either direction 
>  for indirect RAM references, so it's not unheard of).
>  You're coding in C, I believe, so you don't really have control over what 
>  jump instruction you're using (correct me if I'm wrong of course).  What 
>  I'd try is going into the assembler code (get GCC to just compile, not 
>  assemble or link) and changing it from a relative jump to an absolute 
jump, 
>  which takes an absolute 32-bit memory address and overcomes the 
limitations 
>  you're facing.
>  Unfortunately, I can't tell you off the top of my head what a 68K absolute 
>  jump mnemonic looks like.  *grin*

Thanks for your help.
To solve the problem l took all my sprite code and put it into an .asm file, 
and compiled them both so that the main C program will call the ASM file like 
a library to get its code.  Took a while, but l somehow shaved off 400 bytes 
when the two sizes are added together :)  The main C program is now about 24K


--TurboSoft

Visit the TURBOSOFT HOMEPAGE:  The most current Basic and C programs created 
by TurboSoft for the 89, and the most 89 web links.
<A HREF="http://turbosoft.ticalc.org/">http://turbosoft.ticalc.org/</A>


Follow-Ups: