From: Groepaz (groepaz_at_gmx.net)
Date: 2002-12-17 18:01:39
On Tuesday 17 December 2002 17:38, Shawn Jefferson wrote:
> >This is a problem with the new typecast code. As a workaround, use
> >
> > SDLSTL = (unsigned int) &map_dl[0]; // new dlist address
>
> It also appears to affect this code, but doesn't give any compiler warnings
> or errors. This code worked with 2.8.0.
>
> SAVMSC is a pointer to an integer.
>
> gen_dl[4] = (unsigned char) SAVMSC % 256;
> gen_dl[5] = (unsigned char) SAVMSC / 256;
its a general problem with typecasting and/or auto-convertion of ints vs
chars...
however, the above code looks like a potential problem regardless of that :o)
(why are you dividing a pointer ?) maybe it should be written as sth like
gen_dl[4] = (unsigned char) (*((int*)SAVMSC) % (int)256);
gen_dl[5] = (unsigned char) (*((int*)SAVMSC) / (int)256);
--
ps: replace all occurences of "MSC" in your program by "GCC" NOW! :o) hehe
___ ___ .___________________ .___________ _______.
c=64 / | \| \__ ___/ \ \_ _____/ \ \ [groepaz]
gb / ' \ | | | / \ / \ | __)_ / | \ gp32
cgb \ . / | | |/ ' \| \/ | \ psx
gba \___|_ /|___| |____|\____|__ /_______ /\____|__ / dc
-----\/-----'---------------\/--------\/---------\/
http://www.hitmen-console.org Hitmen WWW Headquarters
http://fly.to/hitmen-groepaz my personal playground
http://rr.c64.org/silversurfer home of the RR debugger
ftp.musoftware.de/pub/groepaz cc65 dump site
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo_at_musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
This archive was generated by hypermail 2.1.3 : 2002-12-17 18:03:27 CET