From: ben k. <bk...@oz...> - 2000-09-11 11:18:31
|
try using the volatile keyword. ie: volatile xdata unsigned char at 0x8000 PORTA_8255; writes to otherwise 'unused' memory locations may be optimized out. using the volatile keyword fixes this. you'd need to do this for most, if not all, of your mm io. also make sure you're initializing the 8255 - remember it's command word on reset is all ports input, so you won't get any output until it's inited. ben On 11 Sep, LOOK, Peter wrote: > Dear friends, > > I have 8255 installed in my 8051 board. I use "Memory Map IO" method (this > is Motorola's stuff). My 8255s are just like some memory address in my > memory map. It works fine using asm program. But when I use sdcc, doing the > similar thing, it doesn't work. > > I tried > > (1) xdata at 0x8000 unsigned char PORTA_8255 > PORTA_8255 = 0x12; /* e.g. */ > (2) unsigned char _generic *8255_porta_ptr; > > 8255_porta_ptr = 0x8000; > *8255_porta_ptr = 0x12; > > Any idea ? Please help. > > Best Regards, > Peter Look, > System & Technology Dept, > Reserve Bank of Australia. > 65 Martin Place, Sydney 2000 > Phone : 02-9551-9535 > Fax #: 02-9551-8008 > Email : lo...@rb... > > > ********************************************************************** > This e-mail message (along with any attachments) is intended only for > the named addressee and may contain information that is confidential > or privileged. If you are not the intended recipient you are hereby > notified that any dissemination, copying or use of any of the > information is prohibited. If you have received this e-mail message > in error, please notify us immediately by return e-mail and delete all > copies of the original message and attachments. > ********************************************************************** > > *** This E-Mail has been checked for viruses *** > > _______________________________________________ > Sdcc-user mailing list > Sdc...@li... > http://lists.sourceforge.net/mailman/listinfo/sdcc-user > |