The "hello world" discussion got me thinking... how short could it be in
Assembler... Here's an example in Pick assembler (aka reality/microdata, general
automation zebra, adds mentor, Ultimate, etc.)....
FRAME 504
SRA R14,MSG
LOOP WRITE R14
INC R14
BCU R14,X'FF',LOOP
HALT
MSG EQU *
TEXT C'HELLO WORLD',X'FF'
It's been YEARS since I worked with this instruction set, but I believe that the above
would turn into 11 words or 22 bytes total. In practice, HALT would be inconsiderate to
other users, I seem to recall the gracefull termination back to the TCL-I processor was
"ENT MD999" but that's not a primitive and takes more instructions ;) If
memory serves, none of the above are macros, they are all actual instructions. Of course,
if you're allowed to use system routines, then it can be done in significantly less
instructions (in userland at least) with
FRAME 504
BSL PRINT
MSG EQU *
TEXT C'HELLO WORLD',X'FF'
HALT
Of course, this example isn't indicative of the number of instructions executed
because it calls system services to do it's job (like dos's INT 21H I believe it
is).
Jay West
Show replies by date
The "hello world" discussion got me
thinking... how short could it be in
Assembler... Here's an example in Pick assembler
Kewl! Any description of Pick opcodes anywhere?
--
----------------------------- personal page:
http://www.armory.com/~spectre/ --
Cameron Kaiser, Point Loma Nazarene University * ckaiser(a)stockholm.ptloma.edu
-- Furious activity is no substitute for understanding. -- H. H. Williams -----