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-)
[ 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 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!''
-spc (Printing is trival compared to writing graphics primitives ... )