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

Re: About using tgi library in Apple II



In article 
<275d65f6-9c61-4db8-be4a-caaca283bbd9@p23g2000vbl.googlegroups.com>,
 bluebird <mildstorm@gmail.com> wrote:

> I used cc65 and AppleWin emulator.
> 
> I tried to run this interesting article on AppleWin. But failed T.T.
> => http://home.roadrunner.com/~jbmatthews/a2/cross.html#lst7
> 
> co65 --code-label _a2e_lo_install a2e.lo.tgi
> ca65 a2e.lo.s
> cl65 -O -t apple2enh hello.c --obj a2e.lo.o
> java -jar ac.jar -d cc65.po runme
> java -jar ac.jar -cc65 cc65.po runme bin < hello
> 
> I tried applecommander or a2tools to make runnable image but
> everything failed.
> 
> Can you help me?

The program hello.c doesn't need the lores TGI library, but I don't see 
where it would hurt to link it. The program rod.c might be a better 
choice for experimenting with the library.

In any case, I don't see where you're creating an output file named 
runme. The default name from using cl65 on hello.c would be hello. 
Alternatively, you can specify the output name using the -o option.

You can also see what's up using commands like these:

$java -jar ac.jar -l cc65.po
$java -jar ac.jar -g cc65.po runme | hexdump | head
0000000 a2 ff 9a 2c 81 c0 2c 81 c0 a9 3e a0 11 85 9b 84
0000010 9c a9 3e a0 11 85 96 84 97 a9 00 a0 d4 85 94 84
...

That's LDX #FF, TXS, BIT C081, BIT C081, LDA #3E, etc.

-- 
John B. Matthews
trashgod at gmail dot com
<http://sites.google.com/site/drjohnbmatthews>