Hi everybody, since some of us are starting with MSX-C I think that should be a good idea to centralice main questions in a common thread in order not to repeat the same questions. If this thread grows and contains a lot of useful information, it should be a good idea to update the wiki section of MSX-C in order to have all information ordered. Having said that, here goes the first question of the thread.
Question: I'm reading about data types on MSX, but I don't understand the following types: TINY, NAT and REGS. They has been explained by JaviLM in other thread (http://www.msx.org/forum/msx-talk/development/i-want-learn-msx-c-where-do-i-start) but I've started some experiments with first one (TINY) and the result is strange:
TINY x=0; TINY y=20; printf("%d,%d",x,y)
It returns "2560,2580" :-?. Why it's adding 2560 to the value of the var? I thought that TINY value was a 8 bit number (this is, 0-255). More info: if I insert any command before using TINY values, it works fine:
TINY x=0; TINY y=20; ...any command, even void operations as printf("");... printf("%d,%d",x,y)
It returns "0,20". It's as TINY values engine were correctly initiated in this second code. Really weird :-?
Thanks.