Re: [cc65] cl65 -t apple2 works, but cl65 -C apple2.cfg doesn't

From: Scott Alfter <scott1alfter.us>
Date: 2007-09-10 01:13:45
Mario Fetka wrote:
> Am Sonntag, 9. September 2007 23:31:32 schrieb Scott Alfter:
>> 2.11.0 is the latest version, right?  I'm using it under Linux (built
>> manually, installed on Gentoo...saw a reference to an ebuild in the
>> mailing-list archive, but it's now 404).
> 
> the ebuild is up to date now

Is it at a different location than the one I tried a few hours ago?  The one I
found in the archive was http://mars.arge.at/svn/n4g/trunk/linamh/.

In other news, I think I figured out what I might've been doing wrong.  Instead
of doing the whole build process with one invocation of cl65, it looks like I
should instead build the program piece by piece.  This works with the config
file under /usr/share/doc/cc65, which I've copied to the project directory:

cc65 -O hello.c
ca65 hello.s
ca65 text.s
ld65 -C apple2.cfg *.o apple2enh.o apple2enh.lib

This produces a binary identical to what's produced by this:

cl65 -t apple2enh hello.c text.s

As with the latter, the former produces no errors or warnings.  I can edit the
config file to get rid of the header.  I can edit it to change the start
address (moving it to $2000 and resaving the binary with type SYS instead of
$00 creates a file that can be double-clicked from the Finder to launch, though
it crashes to the Monitor when it exits...there's probably a ProDOS MLI call or
something that can be hacked in at the end of main() to fix that).

I can also build and load tgidemo, but it runs into a problem when it tries to
load the TGI driver.  The driver apparently can't be linked into the binary,
either:

ld65: Error: File `a2e.hi.tgi' has unknown type

Since the documentation for the Apple II libraries says file I/O isn't working
yet, maybe this is to be expected.  Time to unpack the Apple II books so I can
figure out what I need to do.  I might try redoing my beer-fridge controller
software for the Apple II with cc65 first...it'd be an opportunity to get the
1-Wire code tested and known to work, and it'd almost have to be faster than my
current mix of BASIC and assembly (assembly for the 1-Wire primitives and a
reimplementation of 40-column text mode in Hi-Res (so I can mix text and
graphics), BASIC for the rest).

Scott Alfter
scott@alfter.us

----------------------------------------------------------------------
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 Sep 10 01:14:02 2007

This archive was generated by hypermail 2.1.8 : 2007-09-10 01:14:05 CEST