| ??? 04/08/09 10:43 Read: times Msg Score: +1 +1 Informative |
#164488 - SFRX(...,. ..) worked Responding to: ???'s previous message |
Hi all,
The following works well and I found it quite simple. I agree with Andy Neil that it is not important whether it is 8255 or anything else. It was a matter of accessing specific external data memory locations. Thats why in my original question was: How to access memory mapped 8255 with SDCC?
#include <compiler.h>
SFRX( CONTROL_8255, 0x280b );
void main()
{
CONTROL_8255 = 0x80;
}
compiles to: _main: ; 8255.c:7: CONTROL_8255 = 0x80; mov dptr,#_CONTROL_8255 mov a,#0x80 movx @dptr,a Thanks to all for a good discussion.. |
| Topic | Author | Date |
| How to access memory mapped 8255 with SDCC? | 01/01/70 00:00 | |
| also asked here: | 01/01/70 00:00 | |
| 8255 with SDCC | 01/01/70 00:00 | |
| Wrong question? | 01/01/70 00:00 | |
| It's C | 01/01/70 00:00 | |
| not on the 8051 | 01/01/70 00:00 | |
| Oh yes it is! | 01/01/70 00:00 | |
| Use XBYTE macro | 01/01/70 00:00 | |
| Isn't there a problem with that? | 01/01/70 00:00 | |
| Oops. I used a wrong example | 01/01/70 00:00 | |
| Portability | 01/01/70 00:00 | |
| like this... | 01/01/70 00:00 | |
| How about a macro in ASM, callable from 'C'? | 01/01/70 00:00 | |
| This is HOW I will Prefer | 01/01/70 00:00 | |
| LST output of my previously posted code | 01/01/70 00:00 | |
| Try the comparison | 01/01/70 00:00 | |
| Unnecessarily complicated! | 01/01/70 00:00 | |
| NOT UNNECESSARILY | 01/01/70 00:00 | |
| You are mistaken | 01/01/70 00:00 | |
| Array or pointer similar | 01/01/70 00:00 | |
| That should not be necessary | 01/01/70 00:00 | |
| SFRX(...,. ..) worked | 01/01/70 00:00 | |
| SFRX - presumably, that's an SDCC extension? | 01/01/70 00:00 | |
| Found it! | 01/01/70 00:00 | |
RE: Found it! | 01/01/70 00:00 |



