Saying “Hello” with the Mindcraft Assembler

Following the model of Eric Shepherd’s “Some Assembly Required: Hello World” article on A2Central, I’d like to present the traditional “Hello World” program for 8-bit Apple II using the Mindcraft Assembler.

Slide the Assembler disk into your drive or run the BOOT.SYSTEM program.  Press “E” to enter the editor.  Press “enter” once to get a “!” insert mode prompt.  Type in the following program.  Case does matter, so watch the capitalization.

            ORG       $2000
COUT        EQU       $FDED         ;Apple II character out func.

            LDX       #0            ;Offset to first character
loop        LDA       msg,X         ;Get the next character
            BEQ       done          ;->Yes!
            JSR       COUT          ;Print it out
            INX                     ;Move on to the next character
            JMP       loop          ;And continue printing
done        RTS                     ;All finished!

msg         ASC       "Hello world."
            DSC       $8D
            DSC       $00

Press the “Escape” key and enter “Hello” for the “Save Pathname.”  Press “A” to assemble to program.  If you get errors, return to the editor and correct them.

Finally, press “!” to exit back to BASIC.  Change to the directory containing the HELLO program and type “BRUN HELLO”.