Posts tagged ‘mindcraft’

Macrosoft at KansasFest 2010

I presented a tutorial introduction at KansasFest 2010 on the Mindcraft Macrosoft programming language, a macro assembler package that allows the programmer to achieve machine language speed with a high-level Applesoft BASIC-like syntax.  Macrosoft and its companion Assembler run on you favorite 8-bit Apple II.  The presentation was well received, and several people left motivated to try Macrosoft for themselves. Don’t miss the history of Macrosoft from the author, Alan Floeter, that’s part of the presentation slides (page 11).

Ken Gagne has kindly shared a recording of my presentation and posted the slides.  Watch the presentation, buy a copy of the Mindcraft Assembler & Macrosoft, and write the next blockbuster Apple II software.

USE MACROSOFT.3.1
UEN
MUL
BEGIN
PRINT "Macrosoft Rocks."
CLEANUP
END

There’s a working Macrosoft example in the presentation slides.  Also, check out my “hello world” program in Macrosoft and with the Assembler.  Finally, don’t forget my winning KansasFest 2009 HackFest entry written with Macrosoft.

Hackfest Day 1

The annual KansasFest HackFest is on!  I’ve heard rumors of Wizardy cracking and a Rockhurst text adventure.  I’m learning Complete Pascal, learning IIGS toolbox programming, and, just in case I run out of things to do, using those skills to write a graphical Apple II/KFest trivia adventure.  I have Complete Pascal running and am ready to crank out a bit of code.  Stay tuned for more …

Saying “Hello” with Macrosoft

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

Macrosoft allows the programmer to achieve machine language speed with a familiar BASIC-like syntax.  Technically, Macrosoft is a macro library for the Mindcraft Assembler.

First, follow the directions included with Macrosoft to create a working disk with The Assembler and Macrosoft.  Next, just like last week’s tutorial, slide the disk into your drive and 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.  Also, make sure to begin each line with a space; otherwise, the assembler will interpret your entry as a label.  Notice that, except for a few extra “boilerplate” lines, the program appears similar to BASIC.

USE MACROSOFT.3.1
UEN
MUL
BEGIN $2000
PRINT "Hello world."
CLEANUP
END

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”.

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”.

Low-Res Life for the Apple II

Conway’s Game of Life is mathematical exploration into artificial life.  The game consists of a grid of cells, and each cell is either alive or dead.  A simple set of rules relate the cells alive or dead in the current generation to the previous generation.  The interesting thing about the Game of Life is that a simple set of rules creates surprisingly complex patterns and behaviors.  Wikipedia gives more details, including examples, a more formal definition of the game, and history.

I have implemented the game of life for the Apple II computer using the low-resolution (40×40) video mode and the Macrosoft macro language.  Macrosoft is a library of assembler macros that produce assembly language code.  I chose this language because I wanted to learn this unique language for years and to improve performance of the implementation.

Download the program with source.

Look for an article in Juiced.GS (Volume 14, Issue 3).

Screenshot