LUCIDATA Pascal for 6502

Programming the 6502 microprocessor and its relatives in assembly and other languages.
BillG
Posts: 710
Joined: 12 Mar 2020
Location: North Tejas

Re: LUCIDATA Pascal for 6502

Post by BillG »

The weekend was spent experimenting further with version 2.2 of the compiler.

Findings:

* Much functionality had been added. Shame there is not a new manual documenting those.
* The version 2.2 run-time system cannot successfully run all version 1.2 binaries. There is no version checking, unfortunately.
* Some of the P-code instructions have small changes - a single bit here or a single bit there. Without further analysis, I cannot speculate the impact.

Summary:

* I am very glad I wrote the disassembler. A binary file comparison between a program compiled with the two versions of the compiler is unintelligible. Disassembled, the two listings can be loaded into an editor and visually compared in useful context.
* The disassembler currently does not understand the new version 2 instructions. If you are using version 2 of the compiler, you cannot run the version 1 binary from the repository; you must recompile it.
* The version 2 environment uses a bit more stack space than version 1. Attempting to compile the disassembler errors out in version 2 with an unhelpful message. By increasing the default $1000 byte stack allocation to $1800, the compile succeeds. Boo inflation!
User avatar
barrym95838
Posts: 2056
Joined: 30 Jun 2013
Location: Sacramento, CA, USA

Re: LUCIDATA Pascal for 6502

Post by barrym95838 »

BillG wrote:
Attempting to compile the disassembler errors out in version 2 with an unhelpful message. By increasing the default $1000 byte stack allocation to $1800, the compile succeeds. Boo inflation!
Yep, that's how it starts. If this wicked trend keeps going, pretty soon 64KB isn't gonna be enough for anyone. :(
Got a kilobyte lying fallow in your 65xx's memory map? Sprinkle some VTL02C on it and see how it grows on you!

Mike B. (about me) (learning how to github)
Keenid2
Posts: 2
Joined: 23 May 2024

Re: LUCIDATA Pascal for 6502

Post by Keenid2 »

Bill:

I stumbled across your work when I was getting LUCIDATA PASCAL running on a FLEX emulator (SWTPCemu.exe), and I am very impressed by what you have been able to accomplish.

I am focused more on the 6800 implementation, a couple of questions:

1. What emulator did you use? Reason I ask is when I try to run the PASCAL compiler in SimH (with the --swtpc option, it can't seem to write the .SCR files. SWTPCemu.exe worked correctly.
2. Do you have a complete disassembly of the runtime system for LUCIDATA PASCAL version 1?

Regards,

Keenid
User avatar
BigEd
Posts: 11464
Joined: 11 Dec 2008
Location: England
Contact:

Re: LUCIDATA Pascal for 6502

Post by BigEd »

(Welcome, Keenid!)
BillG
Posts: 710
Joined: 12 Mar 2020
Location: North Tejas

Re: LUCIDATA Pascal for 6502

Post by BillG »

Keenid2 wrote:
Bill:

I stumbled across your work when I was getting LUCIDATA PASCAL running on a FLEX emulator (SWTPCemu.exe), and I am very impressed by what you have been able to accomplish.
Thank you.
Keenid2 wrote:
I am focused more on the 6800 implementation, a couple of questions:

1. What emulator did you use? Reason I ask is when I try to run the PASCAL compiler in SimH (with the --swtpc option, it can't seem to write the .SCR files. SWTPCemu.exe worked correctly.
2. Do you have a complete disassembly of the runtime system for LUCIDATA PASCAL version 1?

Regards,

Keenid
1. I use my own emulator.

2. I did not disassemble the code for "paged mode" to run programs in limited memory. There are a couple of P-codes which are apparently for use by the compiler. I do not understand those yet.

I put a copy of my document for what I know so far on GitHub: https://github.com/BillGee1/P-6502

Attached is the latest listing of my disassembly. *** Well, I cannot seem to be able to attach the file ***
User avatar
BigEd
Posts: 11464
Joined: 11 Dec 2008
Location: England
Contact:

Re: LUCIDATA Pascal for 6502

Post by BigEd »

(you can probably attach a zip of a text file, or rename the file to .zip and tell people that it's not a zip, but that's a bit of a workaround)
BillG
Posts: 710
Joined: 12 Mar 2020
Location: North Tejas

Re: LUCIDATA Pascal for 6502

Post by BillG »

Thanks, Ed, I should have thought of that...

Anyway, here is the listing:
Attachments
RUN.ZIP
(46.31 KiB) Downloaded 101 times
Keenid2
Posts: 2
Joined: 23 May 2024

Re: LUCIDATA Pascal for 6502

Post by Keenid2 »

Bill:

Well, this is going to take a while to understand, thank you for sharing your work.

I had mentioned emulators, Michael Evenson maintains the FLEX User Group WEB and FTP sites authored by Ian P. Blythe and their library holds the following versions of LUCIDATA PASCAL as part of their FLEX software library:

P-6800 PASCAL SYSTEM VERSION 1.2 RELEASED MAY 79
P-6800 PASCAL SYSTEM VERSION 2.2 RELEASED 31
P-6800 PASCAL SYSTEM VERSION 2.2 RELEASED 31 JAN 80 UPDATE 20 JUL 80 2.2:3
P-6800 RUN TIME SYSTEM COPYRIGHT C 1980 LUCIDATA UPDATED FOR 3.X:1 MAR 81

Thumbing through the disk catalogs with the tools available, it appears that Real numbers were introduced in version 2.2 and beyond.

I recall that you said the later versions of PASCAL changed the P-Codes significantly.

Thanks again for your work -

Keenid
BillG
Posts: 710
Joined: 12 Mar 2020
Location: North Tejas

Re: LUCIDATA Pascal for 6502

Post by BillG »

I got the compilers from the FLEX User Group site and started with version 1 because there were fewer trees to analyze.

I have not looked at the newer versions much. I do know that the version 2 run-time will not successfully run binaries compiled with version 1.

There are references of versions for CP/M and Zenith/HeathKit DOS, but no binaries or manuals have surfaced so far.
Post Reply