[Coco] OS9 Pascal

Willard Goosey goosey at virgo.sdc.org
Fri Aug 10 03:16:22 EDT 2007


>From: "Bob Devries" <devries.bob at gmail.com>
>Date: Fri, 10 Aug 2007 08:08:03 +1000

>How compatible is the Pascal compiler with OS9 Level 2? I have never 
>programmed in Pascal (I prefer C and Assembler), but I know the language 
>superficially. I'd like to expand this knowledge soon, if the compiler is 
>compatible.

It needs two one byte patches to be happy under Level 2.  In the file
"Pascal", patch:
at 0x0697, change 0x21 to 0x25
at 0x1692, change 0x21 to 0x25

(Thanks 1e6 to Tim Koonce for this!!!)

There are some additional patches on RTSI (I think), someone built a
Turbo-style IDE around it.  The additional patches just change the
built-in paths to /r0, instead of /whatever. 

Also (buried somewhere on RTSI) is Support3, a subroutine module for
Pascal programs that supports windint windows and graphics.

The OS-9 Pascal compiler is a very compliant Pascal implementation.
Wirth would be proud.  It matches Wirth & Jensen very closely.  Which
is a positive way of saying it has a lot of strange restrictions that
weren't enforced on some other compilers...

If you want to port old Turbo code, prepare for pain.  I had
reasonable luck porting my old Pascal programs from HP-UX Pascal.  

For anything negative I'd say about Pascal itself, Ken Thompson said
it better.  Dig up "Why Pascal is not my favorite programming
language."  It's a great read. ;-)  And all of it applies to the OS-9
compiler.

My 2 biggest complaints about the OS-9 compiler is first, when it
compiles a program, it spits your full source back at you in a list
file, error messages hidden inside.  Second, as part of being a very
compliant compiler, its run-time library is a bit sparse.

On the good side, OS-9 Pascal programs are going to be pretty portable
with any other Pascal compiler.  The swapping P-code interpeter is an
interesting program, if not as potentially useful under LII.  

Willard
-- 
Willard Goosey  goosey at sdc.org
Socorro, New Mexico, USA
"I've never been to Contempt!  Isn't that somewhere in New Mexico?"
   --- Yacko



More information about the Coco mailing list