Hello World! on modern processors.

From: Jim Battle <frustum_at_pacbell.net>
Date: Wed Aug 22 00:16:01 2001

At 09:22 PM 8/21/01 -0700, Cameron Kaiser wrote:
> > > Yes, but per my earlier example.... are we shooting for less
> instructions in
> > > the program or less intructions executed in total for the program?
> (ie, your
> > > 23 byte example is calling dos system services, so.... lots of additional
> > > instructions there).
> >
> > Well, this all started when Iggy said there wasn't a PRINT language
> > element in Assembly, so I suppose it's the easiest way to get something
> > printed, which means using built in system support.
>
>Fine then -- Commodores can just STA directly to screen memory (exercise
>left for the reader). :-)


I can do better (if someone hasn't already) -- this is for the Sol:

         ORG 0000h
         JMP 0000h

         ORG 0CC00h
         DB 'Hello World!'

That is 15 bytes, and executes in 0 cycles.

The Sol's screen is memory mapped and begins at 0xCC00. Let the program
loader take care of it for you.


-----
Jim Battle == frustum_at_pacbell.net
Received on Wed Aug 22 2001 - 00:16:01 BST

This archive was generated by hypermail 2.3.0 : Fri Oct 10 2014 - 23:33:34 BST