|
Atari coding BBS
Re: VBCC strange 16bits/32bits val |
Posted by: mikro
|
Mar,01.2010-19:43
|
Hi,
first rule: never ever mix 16-bit and 32-bit stuff! Better always delete / move all your configuration and set it from scratch else you risk such problems. To your symptoms:
1. SCREEN_WIDTH: yes, 16-bit overflow occurs here. Are you sure you've compiled it with warnings enabled? For example, gcc prints a warning here. So yes, this is correct, since C standard says all constants are computed as ints (16-bit in our case) by default. If you want to fix it, you must #define it as 320L and 240L (L as longs) -- 'i' is declared correctly in your example.
2. Use tos.h for 32-bit and osbind.h for 16-bit. osbind.h assumes stack is aligned on 16-bit and hence it works on 16-bit compiler but not on 32-bit. My guess is you've used right #include file (tos.h) but wrong libvc (16-bit one). I hope you didn't rewrite all bindings, it was really not necessary :)
Hope it helps.
|
[All messages in this thread] [Start new thread]
What's the anti-troll code? That's your personal code to be able to add comments and messages on the dhs.nu site.
Don't have a code or forgot it? Fix it here.
|