6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Fri May 10, 2024 2:00 pm

All times are UTC




Post new topic Reply to topic  [ 11 posts ] 
Author Message
PostPosted: Sun Mar 10, 2019 3:59 pm 
Offline
User avatar

Joined: Mon Apr 23, 2012 12:28 am
Posts: 760
Location: Huntsville, AL
In the figForth source, it is stated the value 0xD25E0004, or 0x00045ED2, is 6502 encoded in radix-36. I've probably made a mistake in my attempts to duplicate the values I've found hard-coded in the figForth source, but I've been unable to verify the values after several permutations of the input to the Python base36encode() I located on the internet. That routine yields an encoded string of '50M'. My hand calculations also yield the same answer. At the moment, I can't see a way to realize the values found in the figForth source.

Does anyone know how to calculate the value found in the figForth source?

_________________
Michael A.


Top
 Profile  
Reply with quote  
PostPosted: Sun Mar 10, 2019 5:20 pm 
Offline

Joined: Fri Apr 15, 2016 1:03 am
Posts: 136
6*36*36*36+5*36*36+0*36+2 = 286418 = $45ed2


Top
 Profile  
Reply with quote  
PostPosted: Sun Mar 10, 2019 5:51 pm 
Offline
User avatar

Joined: Mon Apr 23, 2012 12:28 am
Posts: 760
Location: Huntsville, AL
Thanks. Certainly did not try that approach, but your solution clearly matches the value in the figForth source. :?

_________________
Michael A.


Top
 Profile  
Reply with quote  
PostPosted: Mon Mar 11, 2019 11:08 pm 
Offline

Joined: Fri May 05, 2017 9:27 pm
Posts: 858
It's easy enough to check in Forth:
Code:
DECIMAL 36 BASE ! 6502. HEX D. 45ED2  OK


Top
 Profile  
Reply with quote  
PostPosted: Tue Mar 12, 2019 1:12 am 
Offline
User avatar

Joined: Mon Apr 23, 2012 12:28 am
Posts: 760
Location: Huntsville, AL
Jim:

Thanks. At my level of Forth competency, I would not have thought of that particular solution either.

Again, thanks to you and Lee for taking the time to answer my question.

At the moment, I am working to convert figForth that I picked up from this site, and got running on my M65C02 core, to use the expanded instruction set represented in my second core: M65C02A. I am plugging along in the conversion, which I suppose is going pretty well. It has been hampered somewhat by my lack of understanding of the Forth VM and the design of the FIG dialect. The primary issue with my conversion effort has been adding support for the various instructions, addressing modes, and assembler operations required by the figForth source. However, I think that I've got the assembler in a state of development that it supports what's needed to complete the porting of figForth to use the M65C02A instruction set. When that's complete, I hope to test the result in the py65 environment. Perhaps then, I may gain a better understanding of Forth.

_________________
Michael A.


Top
 Profile  
Reply with quote  
PostPosted: Tue Mar 12, 2019 1:40 am 
Offline

Joined: Fri May 05, 2017 9:27 pm
Posts: 858
If you would like to take a look at figForth before your project is finished and have a Commodore 64 emulator, 64Forth for the Commodore 64, with user manual, is a superset of figForth.


Top
 Profile  
Reply with quote  
PostPosted: Tue Mar 12, 2019 7:24 am 
Offline
User avatar

Joined: Sun Jun 30, 2013 10:26 pm
Posts: 1928
Location: Sacramento, CA, USA
JimBoyd wrote:
... 64Forth for the Commodore 64, with user manual ...

I hadn't stumbled across that neat package before; thank you!

_________________
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)


Top
 Profile  
Reply with quote  
PostPosted: Tue Mar 12, 2019 9:01 am 
Offline
User avatar

Joined: Mon Apr 23, 2012 12:28 am
Posts: 760
Location: Huntsville, AL
Thanks for the link. Will take a look at it. figForth or any Forth is not my primary objective at the moment. Instead the objective is to exercise the Forth VM and supporting instructions in the M65C02A core. If they work well and improve performance, then my near term objective has been met.

As discussed in another thread, the current structure of the Forth VM and its supporting instructions make the implementation of EXECUTE somewhat awkward, so the current effort to get figForth running in py65 is driven primarily by the desire to get the Forth VM out of the way. It would be interesting to get any Forth running within the py65 environment that I've forked from Mike Nabarez's py65. It certainly was a milestone to get the Pascal Sieve of Eratosthenes program running, and I expect that getting figForth running will provide the same sense of satisfaction.

_________________
Michael A.


Top
 Profile  
Reply with quote  
PostPosted: Thu Mar 14, 2019 10:25 pm 
Offline

Joined: Fri May 05, 2017 9:27 pm
Posts: 858
MichaelM wrote:
figForth or any Forth is not my primary objective at the moment.

Maybe it will grow on you. :D


Top
 Profile  
Reply with quote  
PostPosted: Fri Mar 15, 2019 1:01 am 
Offline
User avatar

Joined: Mon Apr 23, 2012 12:28 am
Posts: 760
Location: Huntsville, AL
It might at that. :D

_________________
Michael A.


Top
 Profile  
Reply with quote  
PostPosted: Wed Mar 27, 2019 5:35 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8433
Location: Southern California
barrym95838 wrote:
JimBoyd wrote:
... 64Forth for the Commodore 64, with user manual ...

I hadn't stumbled across that neat package before; thank you!

It's one of the Forths on the "Taygeta C64 Forths" page linked in my links page's Forth section.

_________________
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  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 

All times are UTC


Who is online

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