The copy section you mention looks like this: LDA #$05 STA $0A LDA #$8A STA $0B LDA #$00 STA $0C LDA #$60 STA $0D LDX #$00 I'm not familiar enough with 6502 assembly to know if that is right or not. Also, I understand your argument regarding the init code. Thanks, Paul Ullrich von Bassewitz wrote: > >Ok. If there is no code, it cannot be executed:-) So either there's no RAM, or >the copy operation fails for some reason. If you look at the startup code in >the crt0.s file, you will notice a block of code that starts with > > ; Copy the .data segment to RAM > >This is the code that copies that initialization data from the ROM into the >RAM. Please check if this code works (it probably won't). That means, if a >copied byte does actually appear at the target location. Unfortunately, I >don't have any ideas what might be wrong besides missing or non writable RAM >at $6000. > >The startup code is always needed, because it does things like initialize the >bss segment, setup the stack and so on. Without the startup code, the >translated C code won't work. Simpler code (like the one from my earlier mail) >will still have the startup code prepended, but almost no additional library >initialization code added. The library initialization code is what is called >from the initlib routine. Using explicit calls to init routines is a bad idea. >For one, it is difficult to oversee, which calls are needed, because this >depends on the target platform and which library routines are used. Second, a >special calling order has to be used. And third, the compiler would violate >the standard, because a simple > > #include <stdlib.h> > #include <stdio.h> > > int main (void) > { > printf ("hello world!\n"); > return EXIT_SUCCESS; > } > >would no longer work. > >Regards > > > Uz > > > > ---------------------------------------------------------------------- To unsubscribe from the list send mail to majordomo@musoftware.de with the string "unsubscribe cc65" in the body(!) of the mail.Received on Thu Nov 17 00:39:34 2005
This archive was generated by hypermail 2.1.8 : 2005-11-17 00:39:36 CET