Recent

Author Topic: P65Pas a new 6502 Pascal compiler  (Read 12860 times)

Edson

  • Hero Member
  • *****
  • Posts: 1301
Lazarus 2.2.6 - FPC 3.2.2 - x86_64-win64 on Windows 10

Squall_FF8

  • Newbie
  • Posts: 3
Re: P65Pas a new 6502 Pascal compiler
« Reply #16 on: October 31, 2019, 02:06:57 pm »
Found you on Facebook. A friend request was sent. :)

And yes, the links that sstvmaster shared are the one. It still in process of designing but has already huge fan base and many people developing for it. It will be close to Comodore 64, this where similarities come from.
In the spirit of 8bit era it comes with BASIC. I can do assembly but it is a much slower process and very easy to make mistakes. So the Pascal and your IDE make it a RAD tool  8-)

P.S. Here is a screenshot of the application showing the system palette written with p65pas:

« Last Edit: October 31, 2019, 02:12:48 pm by Squall_FF8 »

Edson

  • Hero Member
  • *****
  • Posts: 1301
Re: P65Pas a new 6502 Pascal compiler
« Reply #17 on: October 31, 2019, 09:27:24 pm »
It's good to see people are using the P65Pas. There are still many features to implement and fix in the compiler. The support for assembler is very complete and can interact well with the Pascal code.

Fortunately  P65Pas was designed to be a general 6502 compiler, and not for a specific target. You can write a unit for the Commander X16 defining the hardware specific details.
Lazarus 2.2.6 - FPC 3.2.2 - x86_64-win64 on Windows 10

Squall_FF8

  • Newbie
  • Posts: 3
Re: P65Pas a new 6502 Pascal compiler
« Reply #18 on: November 04, 2019, 09:13:11 am »
Quote
The support for assembler is very complete and can interact well with the Pascal code.
That is what I love about Pascal - it eliminate the need to write in pure assembly by providing a good asm code for output. In places where the compiler doesn't you can always rewrite segments for speed ups.
Quote
Fortunately  P65Pas was designed to be a general 6502 compiler, and not for a specific target. You can write a unit for the Commander X16 defining the hardware specific details.
That is exactly what I did - I used the included C64 as a base and modified it for X16 :)

Edson

  • Hero Member
  • *****
  • Posts: 1301
Re: P65Pas a new 6502 Pascal compiler
« Reply #19 on: January 14, 2020, 05:32:04 am »
P65Pas is updated. Now in version 0.7.5.  Some bugs are fixed, and the code generator is modified to map internal register in the system unit.
Documentation is updated too.
Lazarus 2.2.6 - FPC 3.2.2 - x86_64-win64 on Windows 10

lazdeveloper

  • Jr. Member
  • **
  • Posts: 61
Re: P65Pas a new 6502 Pascal compiler
« Reply #20 on: January 14, 2020, 07:25:02 pm »
GREAT!
I would to thank you for such great projects. Pascal is so good for hardware programming please and again keep the support to keep it alive
Thanks

Edson

  • Hero Member
  • *****
  • Posts: 1301
Re: P65Pas a new 6502 Pascal compiler
« Reply #21 on: March 14, 2022, 03:33:33 am »
Version 0.9.0 are available now in https://github.com/t-edson/P65Pas.

First version with a new lexer and an improved Code generator.  :)
« Last Edit: March 14, 2022, 03:35:34 am by Edson »
Lazarus 2.2.6 - FPC 3.2.2 - x86_64-win64 on Windows 10

dseligo

  • Hero Member
  • *****
  • Posts: 1196
Re: P65Pas a new 6502 Pascal compiler
« Reply #22 on: March 14, 2022, 04:17:33 am »
Great work 8)

Chronos

  • Full Member
  • ***
  • Posts: 240
    • PascalClassLibrary
Re: P65Pas a new 6502 Pascal compiler
« Reply #23 on: March 14, 2022, 10:32:39 am »
Analyzer.pas file is missing from github project so it can't be built.

Edson

  • Hero Member
  • *****
  • Posts: 1301
Re: P65Pas a new 6502 Pascal compiler
« Reply #24 on: March 14, 2022, 03:56:39 pm »
Analyzer.pas file is missing from github project so it can't be built.

 :o
Sorry. It's fixed now and updated to work with Lazarus 2.2.0.

To compile the compiler you'll only need the Epik Timer component. All other dependencies are included in the /Source folder.

There are some detailed documentation about the compiler for interested people.
Lazarus 2.2.6 - FPC 3.2.2 - x86_64-win64 on Windows 10

Chronos

  • Full Member
  • ***
  • Posts: 240
    • PascalClassLibrary
Re: P65Pas a new 6502 Pascal compiler
« Reply #25 on: March 14, 2022, 06:56:42 pm »
Thanks for the missing file.

It seems that P65Pas really looks very like PicPas. So one would think that you can have single project for both P65Pas and PicPas. It may not be easy to develop such dual/multi target IDE but I guess it would reduce code duplicity a lot. At least I would merge those two project into one. And perhaps release it as multi-target compiler/IDE or also as two single target compilers/IDEs.

And my previous suggestions for PicPas are also valid for P65Pas:
* The application doesn't remember windows size and position.
* Scaling and High DPI support is not enabled. So windows and text looks wrong under high DPI.
* File open and save dialog won't use path to current opened file or last used path.
* Application config file P65Pas-linux.xml should be better placed into user config directory. Use function GetAppConfigDir(False) to get that directory. Also don't put your local recent files into that file and into git. It should be initialized as clean.
* Temp directory should be located under linux in /tmp directory or something like /tmp/P65Pas or /tmp/P65Pas-username. Or it can be also located in user config dir as temp.
* Use .gitignore file to ignore dynamically created directories and files like project.lrs, project.res and project/lib.
* It would be better to support translation via standard .po files generation rather than manually generate translation as pascal source.
* Put EpikTimer package source into your project so anybody compiling your project won't need to download it manually and the package version will match with your project nicely

Feel free to implement them if you want to improve usability of your app.

Chronos

  • Full Member
  • ***
  • Posts: 240
    • PascalClassLibrary
Re: P65Pas a new 6502 Pascal compiler
« Reply #26 on: March 14, 2022, 11:28:02 pm »

Edson

  • Hero Member
  • *****
  • Posts: 1301
Re: P65Pas a new 6502 Pascal compiler
« Reply #27 on: March 15, 2022, 01:26:02 am »
It seems that P65Pas really looks very like PicPas. So one would think that you can have single project for both P65Pas and PicPas. It may not be easy to develop such dual/multi target IDE but I guess it would reduce code duplicity a lot. At least I would merge those two project into one. And perhaps release it as multi-target compiler/IDE or also as two single target compilers/IDEs.

Yes. P65Pas and PicPas share the almost all the same code for the IDE (Although, at the compiler level, P65Pas has a more advanced internal architecture). The merge of both projects it's one of my future objectives. But that requires several tasks to be done beforehand. For example I have been doing considerable work on separation of the IDE and compiler code. Now it's almost done. I hope to have soon a command line compiler.
Finally, there would be a single IDE (With debugger and emulator) and several compilers for the 6502/65C02, PIC10F/16F/18F and I'm thinking on create new compilers for the Z80 and AMD devices. All accessible from the same IDE.

And my previous suggestions for PicPas are also valid for P65Pas:
* The application doesn't remember windows size and position.
* Scaling and High DPI support is not enabled. So windows and text looks wrong under high DPI.
* File open and save dialog won't use path to current opened file or last used path.
* Application config file P65Pas-linux.xml should be better placed into user config directory. Use function GetAppConfigDir(False) to get that directory. Also don't put your local recent files into that file and into git. It should be initialized as clean.
* Temp directory should be located under linux in /tmp directory or something like /tmp/P65Pas or /tmp/P65Pas-username. Or it can be also located in user config dir as temp.
* Use .gitignore file to ignore dynamically created directories and files like project.lrs, project.res and project/lib.
* It would be better to support translation via standard .po files generation rather than manually generate translation as pascal source.
* Put EpikTimer package source into your project so anybody compiling your project won't need to download it manually and the package version will match with your project nicely

I can implement most of this features now in this branch. Currently I'm fixing a problem with units references and some other features. When the compiler is more advanced, I will start migrating PicPas to the new P65Pas architecture and separating the IDEs to eventually merge them into a single IDE.
« Last Edit: March 15, 2022, 01:29:08 am by Edson »
Lazarus 2.2.6 - FPC 3.2.2 - x86_64-win64 on Windows 10

Edson

  • Hero Member
  • *****
  • Posts: 1301
Re: P65Pas a new 6502 Pascal compiler
« Reply #28 on: August 15, 2022, 06:51:54 pm »
P65Pas https://github.com/t-edson/P65Pas is now updated with a new redesign of the core compiler and the IDE/Debugger. Some changes are:

- New lexer with ability to change the syntax definition on runtime.
- Abstract syntax Tree improved with new syntax elements.
- Improved Assembler blocks with support for DB or DW.
- Compiler separated from the IDE. Now there are two separated projects.
- IDE redesigned to support several compilers including tools.
- More control about the binary code to adapt to several 6502 system like Commodore PET or Commodore 128.
Lazarus 2.2.6 - FPC 3.2.2 - x86_64-win64 on Windows 10

Chronos

  • Full Member
  • ***
  • Posts: 240
    • PascalClassLibrary
Re: P65Pas a new 6502 Pascal compiler
« Reply #29 on: August 15, 2022, 09:25:32 pm »
Nice. Can you create new tag or also new release in github for that 1.0.0 version?

 

TinyPortal © 2005-2018