[Coco] OS9 Pascal

Gene Heskett gene.heskett at verizon.net
Sat Aug 11 04:41:02 EDT 2007


On Saturday 11 August 2007, Willard Goosey wrote:
>>Date: Fri, 10 Aug 2007 17:25:25 -0400
>>From: Gene Heskett <gene.heskett at verizon.net>
>>
>>Humm, I know that an os9 executable starts with an $87CD, and that a c code
>>library module starts with a $62CD, but not what a PCODE module starts with
>>to identify itself as PCODE.  Is there a conventional integer assigned to
>>that case?
>
>OK, I was in a hurry earlier, let me try this again:
>
>A pcode file, Pascal_Compiler, for instance, starts with a small OS-9
>module named PCODE.  Type/Language byte is $13 (program module, PASCAL
>P-Code).  However, this module is only 24 bytes long.  The rest of the
>59K file is simply P-code.
>
>So, it starts $87CD...PCODE...<crc> <lots of pcode>

The $87CD then doesn't have a crc, but it does have an 8 bit checksum in 
normal os9 style.

>
>                                   |module ends

Oh Fudge.  I'd have to assume then that the rest of that PCODE module would 
have a normal os9 crc attached at the end.  AFAIK, os9 doesn't skip doing the 
crc if it finds the language byte is pascal.

>As far as I can tell, the same module gets stuck on the beginning of
>every P-code file.
>
>I don't know why the P-code isn't contained in a module, but it's not.
>Perhaps there's some level of compatibility with other P-code
>engines.  Or it has to do with the swapping pcode interpeter, which
>can run programs with more that 64K code.
>
>As for the P-code itself, it might be documented somewhere... but
>Pascal is all about not letting the programmer know what's really
>going on.

IZZAT what its all about?  I knew there was some reason I couldn't get my head 
around that language.  I'm sorry, but generally speaking, I want to know what 
every byte does.
>
>>I'm thinking, just in case there is ever need for a vfy18.
>
>Perhaps an arbitrary-file CRC calculator, such as used to be common on
>CP/M and MS-DOS machines?

I wonder if the PCODE header does that somehow already?

I also wonder what vfy would say about such a module.  Has anyone used it to 
inspect a PCODE file yet, and if so, how did it fare?

>Willard



-- 
Cheers, Gene
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Tell a man there are 300 billion stars in the universe and he'll believe you.
Tell him a bench has wet paint on it and he'll have to touch to be sure.



More information about the Coco mailing list