[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CC65 problems



On 1 Sep 2003 10:12:09 -0700, aiiadict@hotmail.com (Rich J.) wrote:

>Hi,

(SNIP)

>This isn't the beginning of an executable program!  That is with the
>hello.O file.  The hello file with no extension that gets generated by
>compiling starts out with 00 08 (BRK, PHP). Once again, not the
>beginning of a machine language program as far as I've seen so far.

(SNIP)

No, actually the "HELLO" file *IS* the file you want.

You said it begins with "00 08", but that is correct.
CC65 will include the 4-byte binary header to the output.
The first two bytes are the LOAD ADDRESS (in this case $0800)
and the next two bytes are the LENGTH of the file.

Starting with BYTE 4 is your program.

Like I mentioned in my post before, get the A2TOOLS program and import
the file using that.  Be sure to include the "-r" (raw mode) switch,
so that A2TOOLS doesn't add another 4-byte header on top of the one
that's already there.  Then it should work fine.

// CHRIS