Sean 'Captain Napalm' Conner skrev:
It was thus said that the Great Iggy Drougge once
stated:
>
> Sean 'Captain Napalm' Conner skrev:
>
> > Depends upon the environment. Under AmigaOS you have RawDoFmt(), which
> > is
> >part of Exec and available to Assembly language programmers (and it works
> >similar to C's printf()). Under MS-DOS you have INT 21h, funtion 9, which
> >prints a text string (ended by a `$'). But all you really need is a way
> >to print out characters, leaving printing of numeric values as a
> >programming exercise. In fact, writing a printf()-like routine (no
> >formatting, just stuff like `%d' and `%s') is fairly simple (6809 code):
>
> Now I'm glad I spent some time in PCDragon's debugger this evening! =)
Is the PCDragon a 6809 based computer? And if so,
did my routine work?
8-)
PCDragon is a PC emulator of the Dragon, which is basically a UK pendant to
the Tandy CoCo. It's got a very nice debugger and integrated assembly
development environment.
I didn't test your code, though, since the PC is situated several blocks away.
=)
[ 6809 printf()-esque routine deleted ]
> But you've just served to prove my thesis. A
PRINT statement like this will
> only scare the newbies away.
And that's bad how? If you can't hack
Assembly, then you probably
shouldn't consider a career in programming. I was 15 when I got my first
computer (Tandy Color Computer, 16K RAM, tape storage) and 16 when I finally
got an assembler for it (EDTASM) and started learning 6809 assembly.
It's not a matter of whether you can hack assembly or not, it's a matter of
whether you'll ever get into programming in the first place. Even my little
sister could grasp PRINT, but most people will eoither fall asleep or run away
scared if they see a piece of assembly the first time they're going to learn
programming.
> It was only a month or two ago, when a mate showed
me how to make a silly
> little raster flash effect on a C64 in a few lines of assembly that it
> finally dawned upon me that it might not be all about black magic. No
> matter how easy it might be to make a PRINT statement in 6809 assembly,
> it's still a whole lot of lines compared to PRINT"HELLO WORLD!".
If you want simple, then for a Color Computer, this
will work:
ORG $0500
FCC 'HELLO WORLD!'
END
And when loaded, you'll see ``HELLO
WORLD!'' about halfway down the
screen. I don't get no simpler than that! ``Look Ma! No instructions!''
I assume you're just calling BASIC routines now, and I'm not sure whether
that's fair play or not.
--
En ligne avec Thor 2.6a.
SCSI is *NOT* magic. There are *fundamental technical
reasons* why it is necessary to sacrifice a young goat
to your SCSI chain now and then. -- John Woods