milliForth for Picocomputer 6502 #138
rumbledethumps
started this conversation in
General
Replies: 1 comment
-
|
Hello,
Yes, The first alive milli-forth-6502. Thanks !!!
The millifort-6502 is a proof of concept about the minimal indirect thread
code and a minimal set of primitives.
Different of many implementations of Forth in 6502, it does not use
hardware stack, and just few words in page zero. The pointers and stacks
are in normal ram and all operations are by indirect access indexed by Y
and by X.
The stdin/sdtout part of milliforth uses bios calls ibm-pc like, the 6502
version comes just with a minimal suport from emulator,
and leave all text edition with terminal program, and just read a line
until CR/LF.
As done, just the I/O need be rewritten for each system.
Now, is time for a review and maybe shorten a bit more.
[]s agsb
Em qui., 24 de abr. de 2025 às 20:16, rumbledethumps <
***@***.***> escreveu:
… A few days ago @ceptimus <https://github.com/ceptimus> posted this
article about a new forth the the 6502:
https://hackaday.com/2025/04/20/milliforth-6502-a-forth-for-the-6502-cpu/
I quickly ported it to the Picocomputer:
https://github.com/rumbledethumps/milliForth
I got confirmation from @agsb <https://github.com/agsb> that the
Picocomputer was the first hardware to run it. Since milliForth was built
with an emulator connected to STDIN/STDOUT, swapping the read and write
functions to the Picocomputer UART was trivial.
The story doesn't end there. The UART connects to a terminal, so line
endings are not what milliForth expected. A few cr/lt hacks were needed. If
only we had STDIN/STDOUT...
But we do have STDIN and STDOUT. Today I changed the code to use API calls
instead of the UART. Then I backed out all the cr/lf hacks, which felt good.
But that's not the best part. The Picocomputer STDIN has full line
editing. The milliForth code doesn't even allow for backspace. So for about
40 bytes of additional code, we go from nothing to modern line editing and
cr/lf translation.
Making it easy and painless to play with stuff like this is what drives
the Picocomputer design. Enjoy being among the first to play with this
brand new project on real hardware.
—
Reply to this email directly, view it on GitHub
<#138>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADR73T4OFOP4XLRMBD4Z66L23FWGXAVCNFSM6AAAAAB32ILRZGVHI2DSMVQWIX3LMV43ERDJONRXK43TNFXW4OZYGI2DANRYGA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
--
Slings move continents, a rock at a time.
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
A few days ago @ceptimus posted this article about a new forth the the 6502:
https://hackaday.com/2025/04/20/milliforth-6502-a-forth-for-the-6502-cpu/
I quickly ported it to the Picocomputer:
https://github.com/rumbledethumps/milliForth
I got confirmation from @agsb that the Picocomputer was the first hardware to run it. Since milliForth was built with an emulator connected to STDIN/STDOUT, swapping the read and write functions to the Picocomputer UART was trivial.
The story doesn't end there. The UART connects to a terminal, so line endings are not what milliForth expected. A few cr/lt hacks were needed. If only we had STDIN/STDOUT...
But we do have STDIN and STDOUT. Today I changed the code to use API calls instead of the UART. Then I backed out all the cr/lf hacks, which felt good.
But that's not the best part. The Picocomputer STDIN has full line editing. The milliForth code doesn't even allow for backspace. So for about 40 bytes of additional code, we go from nothing to modern line editing and cr/lf translation.
Making it easy and painless to play with stuff like this is what drives the Picocomputer design. Enjoy being among the first to play with this brand new project on real hardware.
Beta Was this translation helpful? Give feedback.
All reactions