Dead Hackers Society
Other BBSes »
 
 
Demoscene   Coding   CT60   Buy/sell

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]

Topic Posted by  Date 
VBCC strange 16bits/32bits val Orion_ Mar,01.2010-16:42
  Re: VBCC strange 16bits/32bits val mikro Mar,01.2010-19:43
    Re: VBCC strange 16bits/32bits val Orion_ Mar,01.2010-21:12
      Re: VBCC strange 16bits/32bits val mikro Mar,02.2010-00:32
        Re: VBCC strange 16bits/32bits val Orion_ Mar,02.2010-09:56
          Re: VBCC strange 16bits/32bits val mikro Mar,02.2010-10:41
            Re: VBCC strange 16bits/32bits val Orion_ Mar,02.2010-14:57


Reply to this message
Name:
Topic:
Anti-troll code:

Message:

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.
© 1994-2025 Dead Hackers Society Contact: Anders Eriksson