Amiga Computing - Commodore Is Awesome
Amiga Computing - Commodore Is Awesome
Amiga Computing - Commodore Is Awesome
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
yet, a symbolic debugger, which<br />
means that it won't use any labels you<br />
stored in the executable program at<br />
linkage time.<br />
A symbolic debugger is really a<br />
necessity for large programs, unless<br />
calculating a lot of hexadecimal offsets<br />
makes you happy. But everyone writes<br />
their code in small, easily-tested<br />
subroutines, so it's not a problem.<br />
Whaddaya mean you don't use<br />
small, easily-tested subroutines ? Pah<br />
— a plague of soft-boiled Minogue CDs<br />
to rain down on you.<br />
Like all machine code monitors,<br />
Mon allows you to set breakpoints,<br />
and assign values to registers, before<br />
executing your code. The monitor<br />
stops at a breakpoint and displays all<br />
the registers and the next instruction.<br />
If you're really not sure of your<br />
program you can walk (single-step)<br />
through every instruction. It would be<br />
tedious to walk through a ROM<br />
routine — they tend to be large and<br />
fairly incomprehensible — so Mon can<br />
execute a library routine and then stop<br />
with the results immediately<br />
afterwards,<br />
You can guarantee that if your<br />
program decides to run off into the<br />
sunset, you've made a mistake in a<br />
conditional instruction somewhere.<br />
Mon is able to execute code at full<br />
speed then stand on its nose as soon<br />
as it hits a conditional instruction.<br />
This makes debugging almost<br />
enjoyable.<br />
If you find a rogue instruction in<br />
your code you don't need to edit the<br />
hex to replace it. Mon contains a line<br />
assembler, which will assemble single<br />
instructions entered at the prompt.<br />
HERE are a few little utility<br />
routines to make your day more<br />
pleasant. Apart from the usual<br />
memory allocation ones, there is a<br />
play (chip) memory command to<br />
check any samples. Disk blocks can be<br />
read, written and checksummed, so<br />
it's possible to write custom<br />
bootblocks directly from Mon.<br />
I will state now that no<br />
representative of Finland has ever<br />
paid me to say very complimentary<br />
things about Finnish software. Though<br />
if they want to start, I'm not going to<br />
complain. Mon is a Finnish product,<br />
94 AMIGA COMPUTING November 1990<br />
and it really is deeply satisfying to<br />
use. But then, you'd expect that from a<br />
country which had the intelligence to<br />
invent the greatest invention since the<br />
wheel, the sauna.<br />
Right — those are the basic tools<br />
you'll need. To get into programming<br />
the <strong>Amiga</strong>, you'll also need one or two<br />
books, and a linker library file. Can't<br />
help you with the first field (techie<br />
books ain't PD, y'know) hut the<br />
second is a little easier.<br />
The proper Include files belong to<br />
<strong>Commodore</strong>, and they still believe in<br />
keeping <strong>Amiga</strong> programming out of<br />
the hands of the masses. We'll have to<br />
make do with a library that just<br />
defines where all the system routines<br />
live in each library.<br />
<strong>Commodore</strong> supply Function<br />
Definition files with on the Extras<br />
Oops -<br />
6B<br />
I'm going to rabbit on about<br />
Object E Orientated Programming, I'm<br />
not. Heck, my idea of structured<br />
programming is putting a REM<br />
statement full of asterisks above all<br />
R<br />
the GOTOs.<br />
Nope, the tone here is of deep<br />
apology. Remember a while back I<br />
otold<br />
the world at large that NorthC<br />
u was the best thing, toasters<br />
notwithstanding, since sliced bread?<br />
Well, there's a better C compiler out<br />
there that I missed, but this one's not<br />
a<br />
without itk drawbacks either.<br />
ZC on Fish Disk 314 is a very<br />
nearly complete C compiler system. It<br />
thas<br />
a Unix-style "cc" front end, a<br />
Make utility, an optimiser. an<br />
assembler and a linker. As it stands,<br />
nyou<br />
can compile and run programs<br />
k<br />
which use simple CLI I/O. with no<br />
1F<br />
O<br />
1<br />
E<br />
y<br />
;clu<br />
s<br />
t<br />
ar<br />
t<br />
l<br />
h<br />
i<br />
rmM<br />
floating point.<br />
i<br />
n<br />
NorthC could do that too, but its<br />
printf() routine was so slow you<br />
g could see the characters appearing<br />
like an ancient 300 baud modem.<br />
NorthC could work with floating<br />
apoint<br />
numbers, but couldn't output<br />
t<br />
them. The much swifter ZC is quite<br />
happy outputting floating point<br />
numbers, but doesn't have the<br />
support files to work with them.<br />
The ZC documentation cheerily<br />
: t<br />
h<br />
disk, which actually contain enough<br />
information to build such a linker<br />
library. There isn't the space here to<br />
describe how to do it.<br />
Alternatively, if you look in the<br />
Sozobon ZC archive on Fish Disk 314,<br />
not only will you find A68k and Blink<br />
— complete with documentation — but<br />
you'll also find Ami.lib. This file is a<br />
linker library containing, among other<br />
things, all the library routines'<br />
positions.<br />
So Fish Disks 310 and 314 contain<br />
all the tools you really need for the<br />
Build Your Own Assembly Language<br />
Development Kit. If you have an<br />
unexpended machine, you may need<br />
to find someone with more memory to<br />
unpack the big archive on Disk 314.<br />
Once unpacked, the programs work<br />
just fine with 512k.<br />
tells everyone to send $20 to<br />
<strong>Commodore</strong> in the US, who'll send<br />
the 1.3 Developer Upgrade pack by<br />
return of post. This wonderful<br />
package contains everything you need<br />
to flip the helpless ZC tortoise back<br />
on to its feet.<br />
There's just one sandfly in the<br />
Savlon, though: <strong>Commodore</strong> UK do<br />
not sell the 1.3 Developer Upgrade<br />
pack to non-developers. It costs at<br />
least E75 to become the lowest form<br />
of developer, and you'll probably<br />
have bought an expensive compiler<br />
before considering that move.<br />
<strong>Commodore</strong> do not allow the<br />
distribution of their Include files —<br />
the things that compilers and<br />
assemblers need — unless it's by a<br />
Commercial Developer. It's a case of<br />
the old greedhead "Need money to<br />
make money" vicious circle that 1. for<br />
one, want no part of. Copying Include<br />
files off your mates is theft, another<br />
thing I'm not into.<br />
I guess I'd better give my Tirade<br />
Launcher a rest now, lest I start to<br />
sound like some lowlife student<br />
politico. But I have met registered<br />
developers whose opinion of the<br />
technical support available in the UK<br />
is on a par with the sensation of<br />
finding damp chewing gum under a<br />
desk. Worse still, it's still warm.