6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Fri Nov 22, 2024 11:43 pm

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: PLASMA VM for 65802
PostPosted: Mon Dec 04, 2017 5:13 am 
Offline

Joined: Sat Dec 12, 2015 7:48 pm
Posts: 145
Location: Lake Tahoe
I was able to procure a 65802 for a //e of mine. To celebrate, I decided to finally implement a native 16 bit version of the PLASMA VM. Comparing the code to the 8 bit 6502 implementation, I think the 65802 is my new favorite 8 bit CPU ;-)

It significantly shrunk the code for every operation (except CALL and RET - see below), probably due to the fact that PLASMA is a 16 bit stack machine and the 65802 really caters to that architecture. Now I wish WDC had shipped only 65802s after 1986 instead of 6502s (and that they weren't so hard to source now). Of course this works on the 65816, too, but PLASMA doesn't take advantage of the additional memory space. The only concession I had to make was translate the hardware stack used on the 65802 to the zero page evaluation stack used by the 6502 during CALL/RETs. This was so I could continue using all the assembly library code written using the zero page stack implementation.

Along with some compiler improvements and new language features, I may have to call it 1.0 soon.

For your enjoyment:
https://github.com/dschmenk/PLASMA/blob ... /plvm802.s

Dave...


Top
 Profile  
Reply with quote  
 Post subject: Re: PLASMA VM for 65802
PostPosted: Mon Dec 04, 2017 8:24 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10986
Location: England
Excellent!


Top
 Profile  
Reply with quote  
 Post subject: Re: PLASMA VM for 65802
PostPosted: Mon Dec 04, 2017 8:37 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8544
Location: Southern California
Yes, excellent. You also found it's actually easier to program than the '02, didn't you! :wink: (as did I.) :D

_________________
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?


Top
 Profile  
Reply with quote  
 Post subject: Re: PLASMA VM for 65802
PostPosted: Mon Dec 04, 2017 2:59 pm 
Offline

Joined: Sat Dec 12, 2015 7:48 pm
Posts: 145
Location: Lake Tahoe
GARTHWILSON wrote:
Yes, excellent. You also found it's actually easier to program than the '02, didn't you! :wink: (as did I.) :D


It was an interesting exercise deciding how best to integrate the features of the 65802 with the existing 8 bit centric PLASMA architecture. This is, IMHO, the greatest strength of the 16 bit additions to the CPU. It was fairly easy to leverage both environments with a minimum of *glue* between the 16 bit world and the 8 bit world. The difference in the VM implementation is significant. Had I targeted the 65802/65816 first, PLASMA would be very different. In fact, there would be no need for a VM. The whole reason for the VM was to make up for the poor 16 bit-ness of the 6502.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 11 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: