6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Mon Apr 29, 2024 2:49 pm

All times are UTC




Post new topic Reply to topic  [ 9 posts ] 
Author Message
PostPosted: Sun Jun 30, 2019 5:19 pm 
Offline

Joined: Sun Jun 30, 2019 4:16 pm
Posts: 5
Hi. I want to present my new like-Pascal compiler/IDE/Debugger "P65Pas" for 6502 CPU. It's a incomplete compiler yet, but It can compile simple programs. It's cross-platform (binaries in Windows and Linux included), well optimized and generates binary directly without any help.

https://github.com/t-edson/P65Pas


Attachments:
Sin título.png
Sin título.png [ 158.75 KiB | Viewed 1204 times ]
Top
 Profile  
Reply with quote  
PostPosted: Mon Jul 01, 2019 7:54 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10793
Location: England
Looks interesting, thanks for sharing and for open-sourcing. And, welcome!


Top
 Profile  
Reply with quote  
PostPosted: Mon Jul 01, 2019 2:56 pm 
Offline
User avatar

Joined: Wed Feb 14, 2018 2:33 pm
Posts: 1399
Location: Scotland
Will there be the possibility of running it on a 6502 at any point?

Cheers,

-Gordon

_________________
--
Gordon Henderson.
See my Ruby 6502 and 65816 SBC projects here: https://projects.drogon.net/ruby/


Top
 Profile  
Reply with quote  
PostPosted: Mon Jul 01, 2019 5:11 pm 
Offline

Joined: Sun Jun 30, 2019 4:16 pm
Posts: 5
drogon wrote:
Will there be the possibility of running it on a 6502 at any point?


Do you refer to set the address where the program is compiled?
P65Pas have the directive $ORG, like: {$ORG $0200} So you can set the position where the program start. The unit Commodore.pas set $ORG to $0801, because it's a good place for binaries in the Commodore 64.

There is also the directive ORG in assembler blocks, so you can change the position where the compiler is working (dangerous).


Top
 Profile  
Reply with quote  
PostPosted: Mon Jul 01, 2019 5:25 pm 
Offline
User avatar

Joined: Wed Feb 14, 2018 2:33 pm
Posts: 1399
Location: Scotland
Edson wrote:
drogon wrote:
Will there be the possibility of running it on a 6502 at any point?


Do you refer to set the address where the program is compiled?


No, I mean running the compiler on a 6502 - like what we did all those years ago with UCSD Pascal, Beeb Pascal and so on..

-Gordon

_________________
--
Gordon Henderson.
See my Ruby 6502 and 65816 SBC projects here: https://projects.drogon.net/ruby/


Top
 Profile  
Reply with quote  
PostPosted: Tue Jul 02, 2019 2:37 am 
Offline

Joined: Sun Jun 30, 2019 4:16 pm
Posts: 5
drogon wrote:
Edson wrote:
drogon wrote:
Will there be the possibility of running it on a 6502 at any point?


Do you refer to set the address where the program is compiled?


No, I mean running the compiler on a 6502 - like what we did all those years ago with UCSD Pascal, Beeb Pascal and so on..

-Gordon


This compiler is something complex and big to run on a small CPU as 6502. P65Pas is a compiler/assembler/linker/simulator/debugger/IDE all in one. It's clear it has not sense to run a 6502 simulator in a 6502. This compiler includes a internal 64K RAM virtual device to compile and simulate.
It's possible to make a simplified version of P65Pas including only a compiler, but this will be probably as doing other compiler. Anyway if I'm going to program something in 6502 I would like to do in my own compiler.


Top
 Profile  
Reply with quote  
PostPosted: Tue Jul 02, 2019 4:36 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10793
Location: England
That's fair enough. It's clear that making a compiler is a big project, and making one small enough to run on a 6502 is a bigger project. That's not a goal which one would necessarily have, although it is something I find interesting.

Just for clarity: it looks like this project is to be built within Lazarus, a cross-platform IDE which uses Free Pascal?


Top
 Profile  
Reply with quote  
PostPosted: Tue Jul 02, 2019 5:36 am 
Offline

Joined: Sun Jun 30, 2019 4:16 pm
Posts: 5
Yes. The compiler P65Pas is built with Lazarus/Free Pascal and is brother of my other compiler PicPas, that target to PIC microcontrollers (Series 12F, 14F y 16F). Both compilers are developed using Lazarus and share several libraries including the IDE. Some special feature of my compilers is that they are built using only my own libraries (used too for other programmers) for compiling/assembler/linker. I don't use LEX/YACC or LLVM.
For example, for this projects I have created a fast lexer that is used in several syntax of the compiler (like ASM blocks and DIRECTIVES) and is used too as a highlighter for edit and for code-completion, so I really reuse code.


Top
 Profile  
Reply with quote  
PostPosted: Wed Jul 24, 2019 2:20 am 
Offline

Joined: Sun Jun 30, 2019 4:16 pm
Posts: 5
P65Pas has been updated. Now in the version 0.7.1, includes better support for arrays, pointers and types in general: https://github.com/t-edson/P65Pas


Attachments:
Sin título.png
Sin título.png [ 169.87 KiB | Viewed 1023 times ]
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 28 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: