davazp / eulex Goto Github PK
View Code? Open in Web Editor NEWA straightforward standalone Forth implementation for x86.
Home Page: http://davazp.net/2012/12/08/eulex-forth-implementation.html
License: GNU General Public License v3.0
A straightforward standalone Forth implementation for x86.
Home Page: http://davazp.net/2012/12/08/eulex-forth-implementation.html
License: GNU General Public License v3.0
Eulex ===== Eulex is a straightforward Forth implementation for i386 machines. It includes almost as much Forth as I know, as well as a barebone environment with the keyboard, terminal, timer and speaker support, necessary to provide some common Forth words. Indeed, it provides a convenient line editing emacs-like keybindings and completion. As always, a lot of features are missing. If you want to have some fun, consider to write some of them! History ------- Originally, this project came up in 2009. A fellow and I started to write an operating system. We were looking for a low level and easy to implement language, which was fun and allowed to hack the language itself, in order to incorporate it to that system, which we named Eulex. I discovered Forth, and I figured out that it was a good choice, as we wanted to recreate an old system. I set about writing an implementation for the specification Forth79 in assembler, initially on GNU/Linux and using the C library since it was a convenient way to work, meanwhile my fellow implemented a simple C kernel for Eulex that would house Forth. This implementation was never incorporated, however. Two years later, without other idea which in I could work, I took a primitive version of the C kernel of Eulex, and I used it as a thin compatibility layer to run the Forth implementation on the metal. Then, I made up my mind to write the whole system in Forth. So, Forth was ported to 32 bits and pieces of C code were rewritten in Forth. The C layer was an useful scaffolding, as it allowed not only to use modern tools for debugging, but build the system in the right order. Eventually, Forth replaced C and I could move the scaffolding away, removing the whole C code. As outcome of that, I share this barebone Forth system with you, with the hope that someone will have so much fun as I have had. Happy Hacking DVP
First thanks for this wonderful bit of code. I must admit I'm a tad lost when it comes to how the builtin files get into the image, I see you concating all the paths to the various .fs files and then including them with #include "BUILTIN-FILES.S"
. I am unsure by what means their contents end up assembled into the kernel / as theri dictionary entries are just of the form BUILTIN_WORD_NAME(__core_fs, "@core.fs")
which suggests to me they exist as a word __core_fs in the dictionary, but what that word does or how the whole file gets into the image is beyond me.
I'm more of a nasm kind of guy and not the best at it or reading gas and not realizing if I'm missing a directive or something. So any sort of elucidation would be greatly appreciated.
Unused is written : unused dp-base @ dp - ;
Then I see dp-base in essence pushes the address of:
dictionary_start:
.long 0
onto the stack and then fetches it, i never see a value set at that location, unless I am missing something.
Shouldn't unused be written a bit more like:
: unused dp-limit dp - ;
which would give us the upper limit of the dictionary - where we are now ?
Hi,
first thank you for this wonderful forth variant!
I really like it.
I have some questions, and I must admit, that I am a forth beginner.
I would like to modify keyboard.fs for my german keyboard, but I am really unsure how.
Some important characters like @ or \ are only reachable with ALT-key on a german keyboard.
keyboard.fs unfortunately seems only to map a unshifted and a shifted keymap,
at least thats how I understand the code for now. Perhaps you could help me
a bit what to modify?
And the second question is perhaps a bit ridiculous, I don't know how to start the editor that
you build! I don't find a word to execute for it.
Third and last question (I hope), how to use the in-built assembler. Does it follow a particular
forth assembler standard? I would be very interested, how I could take a value from the stack,
and do some assembler things like MOVing, and how to put a value from assembler back on the forth stack.
Thank you very much in advance!
Hi!
How do I run the sokoban game? When I just type sokoban
it says ERROR: Unknown word
.
I also tried using eulex
first to get the extra words. Same error.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.