Re: [cc65] a question about the write function

From: Ullrich von Bassewitz <uz1musoftware.de>
Date: 2007-02-12 22:26:57
Hi!

On Mon, Feb 12, 2007 at 04:13:22PM -0500, Jac Ato wrote:
> Other programs work properly without printf or sprintf. Ive done peek
> and poke @ $6000 and my emulator has RAM at that location.

There seems to be a problem with intialized data, so the question is, if
programs that contain initialized data do work correctly.

> What is the code that is suppose to be at $6000? is it just a jump?

Yes. See the source code snippet from my last mail. When main() is entered,
$6000 should contain "jmp $0000" which is $20/$00/$00.

> Is it write() or outfunc() that I need to implement?

You need to implement write(). The type of outfunc is not important for you.

> This writes data to 0x30 memory locations starting at $6000 with $01.
> On entry in _main, the memory locations still contain 0x01.

This is wrong. $8AD5 (which is in ROM and copied to RAM) should contain $20 at
startup. Your problem seems to be related to generation and/or loading of the
output file, NOT by write() or any other function that is called at runtime.
Please lookup the address the linker assigns to the CallOutFunc label, then
check if the generated binary contains $20/$00/$00 at this location.

Regards


        Uz


-- 
Ullrich von Bassewitz                                  uz@musoftware.de
----------------------------------------------------------------------
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:27:13 2007

This archive was generated by hypermail 2.1.8 : 2007-02-12 22:27:16 CET