EDATA SFR location in device modules

General discussion relating to the library modules supplied with the compiler

Moderators: David Barker, Jerry Messina

Post Reply
User avatar
JWinters
Posts: 106
Joined: Mon Feb 04, 2008 4:56 pm
Location: North Carolina, USA
Contact:

EDATA SFR location in device modules

Post by JWinters » Mon May 19, 2008 12:22 pm

In the device modules for 18FxxJxx family controllers having ethernet capabilities, I've noticed that the EDATA SFR is commented out in the 'public system' area and defined later in the code under the 'alias' section. The datasheets say that EDATA is located at $0F61 although the device module is setting it at $0F80. However, $0F80 is also the location of PORTA.

I'm not sure of the difference between a 'public dim' and a 'public system' declaration, but the register location doesn't seem right to me. Can someone tell me if this is a mistake in the device module?

tass
Posts: 19
Joined: Sat Jan 19, 2008 8:37 am
Location: France

Post by tass » Wed May 21, 2008 12:51 pm

i think it is a mistake i hope that DAVID will confim this

User avatar
David Barker
Swordfish Developer
Posts: 1214
Joined: Tue Oct 03, 2006 7:01 pm
Location: Saltburn by the Sea, UK
Contact:

Post by David Barker » Sat May 24, 2008 10:29 am

The address is a mistake, but moving from public system is not. It should be

// alias...
public dim
EDATA as byte absolute $0F61,
...

which should allow you to use in your BASIC program without it conflicting at the ASM level.

Post Reply