I didn't get any error messages... I found the __initrleblock in
crt0_rle.s. But right now that's not the problem.

I compiled with:

sdcc -c -I../../Firmware/include -mz80 --xram-loc 0x8000 banksw.c
sdcc -I../../Firmware/include -mz80 --xram-loc 0x8000 main.c banksw.o

Oh yeah, the current problem is when my program starts running.

heres the intel hex object file: (i'll explain after the file )
:03000000C3000139
:02000800ED4DBC
:02001000ED4DB4
:02001800ED4DAC
:02002000ED4DA4
:02002800ED4D9C
:02003000ED4D94
:02003800ED4D8C
:0C01000031FFFFCDE402CD3702C3040242
:0E0200003E02CFC93E00CF7618FDE1C5D54EB7
:0E020E002346235E23CB7BCA23027E230203FA
:0E021C001CC21A02C31102AFB3CA33027E2302
:0D022A0002031DC22802C31102D1C1E5C9A3
:0102E400C950
:0E023700DDE5DD210000DD3921FAFF39F92176
:0D0245000300394D44C5FDE1C5FDE5E1CDE7
:0E0252000A020355550300C1210000395D5416
:0E026000D5FDE1C5D5FDE5E1CD0A0203AAAA50
:0E026E000100D1C1C5D5C5CD8C02F1D1C1C5ED
:0E027C00D5D5CD8C02F1D1C1C37202DDF9DD02
:02028A00E1C9C8
:0E028C00DDE5DD210000DD39DD4E04DD460537
:0E029A000AD3045950131AD30503030AD306DE
:0E02A800DDE1C9DDE5DD210000DD39DD6E049C
:0E02B600DD6605E5CD8C02F1FD210120FD364F
:0E02C4000000DDE1C9DDE5DD210000DD39DDF2
:0E02D2006E04DD6605E5CD8C02F12100204EA4
:0402E00069DDE1C92A
:00000001FF

We can see the usual empty ISR from line 2 to 8 and at line one theres
the jp to init at address 0100. At address 0100 the sp gets
initialized with 0xFFFF (witch is perfect) and then calls a routine at
02E4 at address 02E4 there's a RET (69h) so the code jumps back at
address 0206. But when it does, the CPU actually executes a RET at
address 02E4 and directly after that it executes a RESET, witch sets
the PC back at 0000 ... instead of calling routine at address 0237
witch is my main()...

Thanks a lot for your time !


On 2/20/07, Philipp Klaus Krause <[EMAIL PROTECTED]> wrote:
> JF Tetu schrieb:
> >     Hello :),
> >
> >     I'm a student using sdcc as my Z80 C Compiler. I built a simple
> > Single Board Computer with an EEPROM at 0x0000 to 0x1FFF and an SRAM
> > at 0x8000. I think I should use the CRT provided with the compiler but
> > it seams to be lacking a __initrleblock routine. Do you have any ideas
> > what should go in there ? I thinks it's supposed to
> > allocate/initialize arrays in external RAM... i'm not sure.
> >
> >     Any advice, comments, pointers or explanations will be greatly 
> > appreciated.
> >
>
> How are you creating your program (sdcc commands with their options used
> for compiling, linking, etc)?
> Which errors messages do you get?
>
> Philipp
>
> -------------------------------------------------------------------------
> 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
>

-------------------------------------------------------------------------
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