I've created a newbie puzzle for myself. 

I'm working with a Cypress FX2LP. I'm trying to put a ljmp at address 0x0000 
that jumps to
my startup code like the GnuRadio folks do in their firmware. I have a vect.a51 
file
with the two lines


__reset_vector::
        ljmp    foo


I also have a main.c, of course.

The thing is this. I compile everything separately without error, then use a 
linker line like

  sdcc -o main.ihx vect.rel main.rel

which links without error. The problem is, I never defined "foo", the target 
for the
ljmp! When I look at the generated code, there is a ljmp 0 at address 0. How did
"foo" get to be zero. Why didn't the linker flag an error? I don't really want 
foo, of
course, I want the address of my startup code, which the GnuRadio folks nab 
with 

        ljmp    s_GSINIT

If I use that, I still get no error and a ljmp to zero. 

I'm using a SDCC 2.6.0 binary on WinXP. Is this a compiler/linker/asm bug? Or 
am I just
being a dunce?

--
C

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Sdcc-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to