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

Buildable G-Pascal assembler source code available!

231 views
Skip to first unread message

Chris Baird

unread,
Feb 22, 2012, 12:16:22 AM2/22/12
to
In the 1980s an Australian programmer, Nick Gammon, published a Pascal
development system for the Commodore 64 and Apple][ called G-Pascal.

In spite of it being a p-code based interpreter (based, like a lot of
others, on the BYTE Tiny Pascal from 1978), it was amazingly fast, and
it was a life-line to teenage me who was wanting to go beyond BASIC and
assembler. I even used it for writing my first-year University
programming assignments. The G-Pascal software cost $80, and was totally
worth it-- I couldn't wait to actually buy a legal copy! :)

(About two years ago I had a go at reverse-compiling the 16kB G-Pascal
program so that I could port it to other 6502 systems.. and then I got a
Life. :)

Anyway, last year, Nick Gammon was interviewed online at
<http://www.supercoders.com.au/blog/nickgammongpascal.shtml> (Read it!),
and he's now placed all his source code and documentation online at
http://www.gammon.com.au/GPascal/source/

His original code was developed with the Apple][ Merlin assembler (I
can't say I blame him.. writing, editing and building 180kB of source on
a C64..) which was nothing like I have available on Unix today, so I've
munged the original source into something that cc65's ca65 assembler
likes, and managed to produce a byte-perfect copy to G-Pascal v3.1

My edited assembler source is available from:

http://kildall.apana.org.au/~cjb/G-Pascal/

For those of you who don't know which is the correct end of a
executable to hold, there's a gpascal.prg available in the
above directory as well. To run it in VICE:

x64 gpascal.prg (or whatever..)
click/escape into the monitor
> 0000 37 36
goto $8000

--
Chris

Leif Bloomquist

unread,
Feb 22, 2012, 9:32:51 AM2/22/12
to
On 22/02/2012 12:16 AM, Chris Baird wrote:

> In the 1980s an Australian programmer, Nick Gammon, published a Pascal
> development system for the Commodore 64 and Apple][ called G-Pascal.

Hey, that's pretty nifty, thanks for the links and the effort.

The editor reminds me of the BBS-style editors.


Question on your instructions though:

> x64 gpascal.prg (or whatever..)
> click/escape into the monitor
> > 0000 37 36
> goto $8000
>

I take it this is to switch out BASIC and so on, but was it required
with the original version?

Chris Baird

unread,
Feb 22, 2012, 9:59:38 AM2/22/12
to
> I take it this is to switch out BASIC and so on, but was it required
> with the original version?

The original program had a BASIC "SYS 2062" header that copied the
Pascal system into the correct area of RAM, switched the BASIC ROM,
and JMP'd to the start, as you probably suspected..

I'd been telling 6502-dev friends about G-Pascal for /decades/, and like
I'd mentioned before, had tried to decompile it myself out of
desperation to have a nice programming language on our SBC projects..
And then a few months after my last attempt, Nick Gammon goes and
publishes the complete working source code! Squeeeeeee! :D

--
Chris

Tomas Jonsson

unread,
Feb 22, 2012, 1:34:22 PM2/22/12
to

Hi Chris,

Chris Baird <ab...@brushtail.apana.org.au> writes:

> In the 1980s an Australian programmer, Nick Gammon, published a Pascal
> development system for the Commodore 64 and Apple][ called G-Pascal.

It always amazes me that people did these kind of programs back in 1983!

Although I can understand the effort since the C64 was considered a
serious computer back then. When I started programming in 1990, no-one I
knew would even think of programming the C64 with a high-level language,
hence I hardly even knew these compilers existed!

I notice this v3.1 version of G-Pascal is copyrighted in 1986, so I
assume the programmer also did improve it during the years.

> His original code was developed with the Apple][ Merlin assembler (I
> can't say I blame him.. writing, editing and building 180kB of source on
> a C64..) which was nothing like I have available on Unix today, so I've
> munged the original source into something that cc65's ca65 assembler
> likes, and managed to produce a byte-perfect copy to G-Pascal v3.1

Thanks for the ca65 sources, I really appreciate it.

Perhaps the files could be linked from the Commodore Language List,
it appears it's still being updated.
http://www.npsnet.com/danf/cbm/languages.html

All these compilers makes me wonder if anyone actually did develop a
"serious" program with any of them? Or did people merely use them to
learn the basics of high-level programming languages?


Tomas

Glenn Holmer

unread,
Aug 26, 2019, 6:29:34 PM8/26/19
to
On Tuesday, February 21, 2012 at 11:16:22 PM UTC-6, Chris Baird wrote:
> In the 1980s an Australian programmer, Nick Gammon, published a Pascal
> development system for the Commodore 64 and Apple][ called G-Pascal.

Chris, if you see this, are you the guy who wrote the Asterix operating system for the C64? Was the source code ever released?
0 new messages