Hello, On 2/12/07, Ullrich von Bassewitz <uz@musoftware.de> wrote: > What about other programs, do they work? CallOutFunc is just a jmp instruction > in the data segment (because it is modified at runtime). It looks like this: > Other programs work properly without printf or sprintf. Ive done peek and poke @ $6000 and my emulator has RAM at that location. My hardware works too, it has RAM installed at that location. What is the code that is suppose to be at $6000? is it just a jump? If it is, then to which location does it needs to go. Also, what is meant by this: /* Type of the function that is called to output data */ typedef void (*outfunc) (struct outdesc* desc, const char* buf, unsigned count); that's from __printf.h Is it write() or outfunc() that I need to implement? > ----------------------------------------------------------------------------- > .data > > ; Stuff from OutData. Is used as a vector and must be aligned > CallOutFunc: jmp $0000 > ----------------------------------------------------------------------------- > > Since the contents of CallOutFunc on your system seems to be $01/$00/$??, > while the source says it should be $20/$00/$00, the file is either not loaded > correctly, or the data gets corrupted at runtime. > Actually, some piece of code in STARTUP i believe does this: $8042:A0 00 LDY #$00 $8044:B1 0A LDA ($0A),Y @ $8AD5 = #$01 $8046:91 0C STA ($0C),Y @ $6000 = #$01 $8048:C8 INY $8049:C0 30 CPY #$30 $804B:D0 F7 BNE $8044 This writes data to 0x30 memory locations starting at $6000 with $01. On entry in _main, the memory locations still contain 0x01. My command line for ld65 is: --dbgfile debug.txt -t nes -m $(FileTitle)_map.txt -o $(FileTitle).nes nes.o $(FileTitle).o $(UserInput) uart.o timer.o nes.lib Thanks for the support. JA ---------------------------------------------------------------------- To unsubscribe from the list send mail to majordomo@musoftware.de with the string "unsubscribe cc65" in the body(!) of the mail.Received on Mon Feb 12 22:13:34 2007
This archive was generated by hypermail 2.1.8 : 2007-02-12 22:13:37 CET