Joined: 26 Oct 2003 Posts: 14 Location: Northern Ireland
#build generates wrong address
Posted: Sat May 15, 2004 8:45 am
The code below generates the machine code listed ... the #build address is 4k too low, I had expected the jump at 0xE000 to be at 0xF000.
Is there proper documentation for the #build command?
__
#include <18C801.h>
#build (RESET=0xF000)
#org 0xF020,0xF0FF default
#pragma use fast_io(A)
#pragma byte PORTA=0xF80
#pragma bit LED=PORTA.2
Joined: 26 Oct 2003 Posts: 14 Location: Northern Ireland
#build generates wrong address
Posted: Sat May 15, 2004 9:00 am
Just spotted that #build (RESET=0xF000)
will multiply that address by 2, it assumes the operand is a word address
I guess. Now 0xF000 * 2 is 0x1E000, a byte address
And again the #build is only holding a 64k number... <sigh>
a bug?
I am using PCH 3.120
regards
Ian _________________ Ian McCrum, email address held at
www.eej.ulst.ac.uk/~ian
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum