Jump to content
spookt

Complete PL65 Manual

Recommended Posts

Hey - gotta love providence. I was patiently scanning through this a page at a time on my flatbed when guess what rolls up in the office? A brand spanking new colour copier / fax / digital sender / laser printer ! OK, I entrusted the manual to the sheet feed, tapped in my email address and ... presto PDF file. (Well actually 14 PDF files with 10 pages in each - need to find that setting and change it) And no bleed through ! :)

 

So after stitching it together and having made a quick check here at last is the complete PL65 Programming Manual:

 

PL65.pdf

 

Happy reading !

Edited by spookt
  • Like 1

Share this post


Link to post
Share on other sites

Oops, uploaded this in a hurry. Didn't realise it was 6Mb ! Here's a zipped version (roughly half the download size):

 

PL65.pdf.zip

Share this post


Link to post
Share on other sites

WOW, this language looks cool! I wish that I had known about this language when it came out!

 

& the editor looks like it would be great...

 

Can someone post the ATR of the last version? I presume that there is a non-copy protected version out there, right?

 

Are there any additional toolkits, user contributed libraries, or example source listings out there?

Share this post


Link to post
Share on other sites

It's here.

 

I have an original disk from the same collection as the manual but it's bad - boots to the menu but the editor doesn't load :(

 

If anyone wants a label scan for that true authentic looks gimme a shout ;)

Share this post


Link to post
Share on other sites

I don't believe it. I'm not alone!! :D

 

I've got the original disk and a happied backup somewhere (both still worked last time I tried them). Unfortunately it looked like my parents threw out the manual before I could retrieve it, so I'm sooo happy someone else has scanned it.

 

And how the hell did I miss this old thread? Didn't know that someone had actually cracked PL65, presumably from one of the uncracked/half cracked disk images I posted some time ago?

 

PL65 is my favourite 8-bit language. The compiler is a little slow because it seems to work its way compiling a function/procedure at a time before saving it, producing a compound file as it goes. If anyone could come up with a tool to convert the compound file into one contiguous block so that it could be run from a ROM cart then that would be :cool: 0

 

If anyone seriously wants to have a go at the language and needs any help then feel free to PM me. Although I haven't access to my 8-bits at the minute, I used this language so much that I should be able to remember most of it. It was my first introduction to pointers, long before I came across C/C++. :)

Edited by Tickled_Pink

Share this post


Link to post
Share on other sites

@ spookt: Thanks a lot for scanning the manual! I'd never heard of this language before. I assumed I had the disk for it, but alas not to be. Good to see that the program has been cracked already. I didn't catch the thread about that being done before either.

 

The language looks great. On first review, it looks to be much better than Turbo-BASIC XL. No line numbers, PMG Library, Assembly functions, better constructs/functionality, etc.

 

@ Tickled_Pink: In the PL65 Cracked thread, the author of the language claims to have written a defragmenter for the executables. Unfortunately he says, "God knows if you would ever find this".

 

BTW: Now I know why you said, "I can't vote. My primary language has never been any of those." in the Programming Languages Poll. I thought you were making a joke, as I had assumed I hadn't forgotten any major languages (arrogant). You may soon have more company in your language choice. ;)

Edited by MrFish

Share this post


Link to post
Share on other sites

OPTION-ESC...

 

Finally now I know how to exit the editor!!!

 

:D

 

Many thanks spookt for taking the time to scan this manual...

Share this post


Link to post
Share on other sites
@ Tickled_Pink: In the PL65 Cracked thread, the author of the language claims to have written a defragmenter for the executables. Unfortunately he says, "God knows if you would ever find this".

The guy who made the post wasn't the author (and didn't claim to be). I remember writing a letter to Noahsoft once and got a reply from someone with an Eastern European surname.

 

I might have a stab at doing a similar program myself. Wanted to do one for years but never got around to it. As it's all just stripping headers, it can't be too difficult to do.

Share this post


Link to post
Share on other sites

Spookt: many thanks for PDFing and posting the manual.

 

Tickled_pink: yes, I cracked and posted PL65 using one of your images -- for which, thank you.

 

Now we can all enjoy what is surely the most obscure of the available 8-bit languages...

Share this post


Link to post
Share on other sites

How did you crack it in the end? Do you remember what you did? When I made my attempt I only half did the job - I could get the compiler to load and run, but anything I tried compiling with it wouldn't run.

Share this post


Link to post
Share on other sites

I had problems with compiled programs not running with the cracked PL65 version from the other thread.

 

What I found is that there is code (Location $3637) that runs when you press 1 to start the compiler, this code does a checksum of the copy protection code. Since the copy protection code was modifed to bypass the bad sector check the checksum no longer matches. This in turn triggers code at $3649 that XORs the first $80 bytes of the runtime with $AA rendering the compiled program unusable.

 

The version in the attached ATR has all of the code mentioned above removed and produces compiled code that runs now. :)

pl65fix.zip

Share this post


Link to post
Share on other sites
Completely bookmarked now... EDIT: i forgot to say, text searchable too...

PL65___Manual.pdf

 

Excellent! Thanks. I was intending to go back and do that this week but you've saved me some work. :)

Share this post


Link to post
Share on other sites
I had problems with compiled programs not running with the cracked PL65 version from the other thread.

 

What I found is that there is code (Location $3637) that runs when you press 1 to start the compiler, this code does a checksum of the copy protection code. Since the copy protection code was modifed to bypass the bad sector check the checksum no longer matches. This in turn triggers code at $3649 that XORs the first $80 bytes of the runtime with $AA rendering the compiled program unusable.

 

The version in the attached ATR has all of the code mentioned above removed and produces compiled code that runs now. :)

Yes, compiled programs run now. Great work! Many thanks.

Edited by MrFish

Share this post


Link to post
Share on other sites
I had problems with compiled programs not running with the cracked PL65 version from the other thread.

 

What I found is that there is code (Location $3637) that runs when you press 1 to start the compiler, this code does a checksum of the copy protection code. Since the copy protection code was modifed to bypass the bad sector check the checksum no longer matches. This in turn triggers code at $3649 that XORs the first $80 bytes of the runtime with $AA rendering the compiled program unusable.

 

The version in the attached ATR has all of the code mentioned above removed and produces compiled code that runs now. :)

That's great. I suspected that something was affecting the runtime code rather than the user compiled program.

 

Nice to see a few interested people downloading the manual too. :)

 

 

BTW: Can't remember if this is in the manual, but here's a little tip. If you're finding the compilation process a little slow and just want to do some syntax checking, just type in the source filename and press return for all the others the compiler prompts for. That way it'll just read the source, compile it, but won't save anything to disk.

Edited by Tickled_Pink

Share this post


Link to post
Share on other sites

I've done a little reversing of the compiler, and it seems it has at least one bad bug. Use of the builtin variables like XSAVE, PUSH etc. will fail because there is a bug in the table scanner, it's off by one. So references to STACK will work, but nothing after that should be found. The compiler code is so odd that I remain convinced that it was written itself in either PL65 or something like it. For sure it was not written in Action!, it doesn't have any of the watermarks you'd see if that was used.

Share this post


Link to post
Share on other sites

Wow - I just found out about this language today! Have there been any familiar programs that were developed on this language?

Share this post


Link to post
Share on other sites

Hi Friends!

I bring to your kind attention and to your free disposal Memory Allocation Library for PL65 compiler.

It is fully working.

Just to ensure the clarity of the text I added some primitive functions to work with free-list in structs/records oriented manner.
You know of course that PL65 lacks of structs and records.

To my great surprise, this innovation made programming much easier.

Here are the code of library itself and program for debugging.

ALLOC.LIB

!====================================!
! ALLOC.LIB Memory allocation library
!       for PL65 compiler            !
! First-fit algorythm for malloc/free
!------------------------------------!
! by Evgeny Zolotarev (aka 576XE),2017
!====================================!
CONST NULL=0,FRED=1,USED=0
CONST MEMSTART=$4000,MEMEND=$BC00
CONST MEMSIZ=MEMEND-MEMSTART
CONST METALEN=6,BYTSZ=1,INTSZ=2
!------------------------------------!
POINTER gpP INT gpV BASED gpP
POINTER freList
!------------------------------------!
FUNC getFlag(INT adr)
BEGIN gpP=adr END gpV
!------------------------------------!
FUNC getSize(INT adr)
BEGIN gpP=adr+2 END gpV
!------------------------------------!
FUNC getNext(INT adr)
BEGIN gpP=adr+4 END gpV
!------------------------------------!
PROC setFlag(INT adr,flag)
BEGIN gpP=adr gpV=flag END
!------------------------------------!
PROC setSize(INT adr,size)
BEGIN gpP=adr+2 gpV=size END
!------------------------------------!
PROC setNext(INT adr,next)
BEGIN gpP=adr+4 gpV=next END
!------------------------------------!
PROC memInit()
BEGIN
  setFlag(freList,FRED)
  setSize(freList,MEMSIZ-METALEN)
  setNext(freList,NULL)
END
!------------------------------------!
PROC split(POINTER fits INT size)
  POINTER new INT blkSiz
BEGIN
  blkSiz=METALEN+size
  new=fits+blkSiz
  setFlag(new,FRED)
  setSize(new,getSize(fits)-blkSiz)
  setNext(new,getNext(fits))
  setFlag(fits,USED)
  setSize(fits,size)
  setNext(fits,new)
END
!------------------------------------!
FUNC alloc(INT nBytes)
  POINTER curr,result
BEGIN
  IF (getSize(freList)=0) THEN
    memInit()
    WRTLN("Memory initialized") CR()
  ENDIF

  curr=freList
  WHILE ((getSize(curr)<nBytes OR getFlag(curr)=USED) AND getNext(curr)<>NULL) DO
    curr=getNext(curr)
    WRTLN("- Search for fitting block...")
  ENDWHILE

  IF getSize(curr)=nBytes THEN
    setFlag(curr,USED)
    result=curr+METALEN
    WRTLN("+ Exact fitting block allocated")
    RETURN result
  ENDIF

  IF getSize(curr)>nBytes+METALEN THEN
    split(curr,nBytes)
    result=curr+METALEN
    BASE=16
    WRTSTR("Block $") WRITE(result) WRTSTR("-$") WRITE(result+nBytes)
    WRTSTR(" size=") BASE=10 WRITE(getSize(curr)) WRTLN(" allocated")
    RETURN result
  ELSE
    result=NULL
    WRTLN("- No sufficient memory to allocate")
  ENDIF
END result
!------------------------------------!
PROC merge()
  POINTER curr
  INT size,next
BEGIN
  curr=freList
  WHILE getNext(curr)<>NULL DO
    IF (getFlag(curr) AND getFlag(getNext(curr))) THEN
      size=getSize(curr)+getSize(getNext(curr))+METALEN
      setSize(curr,size)
      next=getNext(getNext(curr))
      setNext(curr,next)
    ENDIF
    curr=getNext(curr)
  ENDWHILE
END
!------------------------------------!
PROC free(POINTER ptr)
  POINTER curr
BEGIN
  IF ptr>=MEMSTART AND ptr<=MEMEND THEN
    curr=ptr
    curr=curr-METALEN
    setFlag(curr,FRED)
    merge()
    WRTLN("+ Block freed, space merged")
  ELSE
    WRTLN("Please provide a valid allocated pointer")
  ENDIF
END
!====================================!
! End of Library
ENDFILE

ALLOC.PRG

INCLUDE TERMINAL.LIB
INCLUDE ALLOC.LIB

MAIN()
  POINTER p,r,k
  POINTER q,w
BEGIN
  freList=MEMSTART

  p=alloc(100*INTSZ)
  q=alloc(250*BYTSZ)
  r=alloc(1000*INTSZ)

  free(p)
  w=alloc(700)

  free(r)
  k=alloc(500*INTSZ)

  CR() WRTLN("Allocation and deallocation")
  WRTLN("are done successfully!")
END

And here is the result of allocations and deallocations of memory with related atr.

ALLOC in use

post-20208-0-98889100-1497942453_thumb.png

PL65 Compiler SpDOSx33a 360.atr

 

There is no simple way without using of monitor to find the beginning of heap, but you can use an arbitrary value after looking at XREF table.

 

You can freely delete debugging messages, of course

Best wishes from Moscow.
ez

  • Like 2

Share this post


Link to post
Share on other sites

Hi there, atx4us.

 

As I can remember KED - (PL65 full featured editor) was written in PL65.

Also I know that KrisCross by Simon Trew was written in PL65 too.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...