Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

PLASMA: Proto Language ASsembler for Apple

67 views
Skip to first unread message

D Finnigan

unread,
Mar 6, 2012, 12:02:46 PM3/6/12
to
David Schmenk has released PLASMA, a combination virtual machine and
assembler for the 6502.

"Introduction
PLASMA is a combination of virtual machine and assembler/compiler matched
closely to the 6502 architecture. It is an attempt to satisfy a few
challenges surrounding code size, efficient execution, small runtime and
fast just-in-time compilation. By architecting a unique bytecode that maps
nearly one-to-one to the higher level representation, the compiler/assembler
can be very simple and execute quickly on the Apple II for a self-hosted
environment. A modular approach provides for incremental development and
code reuse. Different projects have led to the architecture of PLASMA, most
notably Apple Pascal, FORTH, and my own Java VM for the 6502, VM02. Each has
tried to map a generic VM to the 6502 with varying levels of success. Apple
Pascal, based on the USCD Pascal using the p-code interpreter, was a very
powerful system and ran fast enough on the Apple II to be interactive but
didn't win any speed contests. FORTH was the poster child for efficiency and
obtuse syntax. Commonly referred to as a write only language, it was
difficult to come up to speed as a developer, especially when using other's
code. My own project in creating a Java VM for the Apple II uncovered the
folly of shoehorning a large system into something never intended to run 32
bit applications."

"The ultimate target is to have a complete IDE available for the Apple II."

Read More at Mr. Schmenk's web site:
http://schmenk.is-a-geek.com/PLASMA.html

--
]DF$
Mac GUI Vault - A source for retro Apple II and
Macintosh computing.
http://macgui.com/vault/

BLuRry

unread,
Mar 7, 2012, 11:05:23 PM3/7/12
to
Sweet! Can't wait to see if library loading is supported in the future! It would rock with an iron fist if we could have a graphics library comparable to the stuff that Paul Lutus did with GraForth!

-Brendan

D Finnigan

unread,
Mar 8, 2012, 12:13:56 PM3/8/12
to
It looks like as of 11 hours ago, Mr. Schmenk has written a PLASMA compiler
in PLASMA, thus making the system self-hosting!

http://vm02.cvs.sourceforge.net/viewvc/vm02/vm02/plasma/?sortby=date#dirlist

David Schmidt

unread,
Mar 8, 2012, 12:42:48 PM3/8/12
to
On 3/8/2012 12:13 PM, D Finnigan wrote:
> It looks like as of 11 hours ago, Mr. Schmenk has written a PLASMA compiler
> in PLASMA, thus making the system self-hosting!

This is crazy-cool alpha-geekery.

D Finnigan

unread,
Mar 8, 2012, 1:49:07 PM3/8/12
to
I tried out the demo disk last evening. I used the editor, and I took a look
at cat (produces a ProDOS catalog) and rod (the famous Rod's Color Demo).

But now I'm not sure where to go from there, in regards to writing my own
plasma program.

David Schmenk

unread,
Mar 8, 2012, 9:48:07 PM3/8/12
to
It's all very preliminary right now. Not much more than a technology demonstration and experimentation platform. However, at this point it will progress quickly into a more full featured, self hosted environment. The compiler is now written in PLASMA and running on the Apple II, although the code generated is only a text listing.

Funny that GraForth is mentioned. That is my all time most favorite Apple II language system and actually helped launch my career in 3D graphics. I would love to see PLASMA become a blend of the programmer productivity of Apple Pascal with the performance and features of GraForth.

Dave...

David Schmenk

unread,
Mar 11, 2012, 6:22:16 PM3/11/12
to
Not to beat a subject to death, but I thought some of you might like to actually play with a PLASMA IDE on your Apple II. I've updated the demo disk on my website: http://schmenk.is-a-geek.com/tarfiles/plasma01.dsk

I ported the compiler itself to PLASMA and compiled it for ProDOS. Then, I combined the editor written earlier with the compiler and had it emit code right into a memory buffer instead of a formatted text file. After fixing some porting typos and massaging the memory map to get everything to fit, it all came together. Some caveats: everything is bytecode in order to get it all to fit, so compiling is slow. Only the screen drawing routine and the text buffer allocator are in threaded code. Patience is required when compiling, but it will get through it. There is about 12K of source code buffer space and 4K of compiled code and data. There is no importing of other files. Pretty much a playground for trying things out is all you get. And it might not be real stable - even a correct program may make the environment unstable. So save often. The compiler only generates byte code regardless of the definition type used.

When you boot the floppy, you will be confronted with a blank screen and a blinking '+' cursor. You can either start writing code or press 'ESC' to enter command mode. 'C' will catalog the disk. Type 'R HELLO.PLA' to load the classic Hello World. Type 'X' to compile and execute the program in memory. Press '<RETURN>' to enter back into the editor. 'Q' will exit back to ProDOS from command mode. EDIT.README is a file you can load to understand all the editor commands. You can load and compile all the other .PLA files on the disk with the exception of HGR.PLA. The hires graphics pages are completely used by the IDE. Any attempt to access those buffers will crash the system. ProDOS buffer space is also limited. Look at CAT.PLA for safe buffer locations. You can call any of the ROM routines, but most BASIC routines can't be called because of zero page usage.

Enjoy!

Dave...

D Finnigan

unread,
Mar 12, 2012, 5:20:26 PM3/12/12
to
David Schmenk wrote:
> Not to beat a subject to death, but I thought some of you might like to
> actually play with a PLASMA IDE on your Apple II. I've updated the demo
> disk on my website: http://schmenk.is-a-geek.com/tarfiles/plasma01.dsk
>

No worries; I'm looking forward to fiddling around with this! :-)

David Schmenk

unread,
Mar 20, 2012, 10:28:11 PM3/20/12
to
A final update before I jump in and rewrite everything. There are a number of bug fixes and speed improvements to the PLASMA IDE, PLEAIDES. There is a new sample program, PONG.PLA, that shows off a complete interactive program that you can edit, compile and run - all from within the IDE. Same disk image link as previously posted,

Dave...
0 new messages