My first big zig project, A 16-bit CPU emulator (kind of)
I think the assembler should count as esolangish
I think the assembler should count as esolangish
A few days ago I started learning zig and thought it would be a good idea to recreate a CPU i had made in C++ a few weeks before.
So I did, Obviously I almost broke my keyboard and jumped off the roof due to the zig compiler being so needed, However in the end i managed to fully complete it.
Then I decided to make an assembler for it. which I have NOT done before, I have made lexers and parsers before but I've never tried making a compiler.
However after writing over 500 lines of code and getting no sleep I managed to write the FOX assembly assembler.
It was a very fun experience and I learned a lot about zig doing so.
This cpu "emulator" is more of a CPU simulator since i don't understand shi about CPUs.
sorry if you were looking to find some LC-3 or some things like that.
Its a 16-bit cpu with 128 registers, and a 128 KB stack (you use offsets to manipulate it).
The most fun part for me right now is the assembler because this is the first time I'm making a lexer and stuff in something other than god-dang C#.
Whilst developing this I've come to learn lots of new things and use much less AI.
For example I learnt you're not supposed to use catch with try like in mainstream languages.
and i also scratched the tip of the iceberg that is ownership.
Github: https://github.com/orewaluffy500/fox16
I wrote a simple documentation for writing machine code directly and I'm still working on the assembler (today I wrote the base for the compiler so I can add more instructions and eventually labels)
I've always wanted to make my own programming language but I could just never fully grasp the concept of ASTs and Intepreters.
So I decided to make eso-langs with different designs, and eventually I realized I was slowly getting better at understanding these designs,
So to start my journey of programming languages, I made zyte, A register-based eso-lang with an actual AST.
It currently has loops, copying, functions, input, output and other stuff.
You can check it out on: https://github.com/orewaluffy500/Zyte
I was going through my google notes today and i found a script for present a game library i dont remember making
I went to the GitHub page and i know I MADE it bcs it obviously has memory leaks and it's only shipped for msys and linux which are the main things i use.
But i dont remember ONE thing about coding it.
If you want to view it here it is.
https://github.com/devpython88/Core.2D/tree/master
I was 10 when i made it, i know that because i used cmake
I dropped cmake after 11 and started using xmake
Tyle doesn't have a quirk or annoying thing, I just want to share it because as someone who just began C# a week or two ago, I'm very proud to make this (even if i know the code is kind of shitty).
It has a register and RAM kind of memory you'd see in assembly, That's why i called it a virtual machine.
You can use different `-coreX` flags to change the amount of RAM and Registers there are, The lowest you can go are 8 registers and 768 RAM registers.
I added memory dumping to my esolang Slack.
Also i removed cell duplication and replaced it with copy-pasting, You use `copy` to copy the current cell's value into a temporary variable, then `paste` to paste it anywhere.
To clear the temporary variable simply go to an empty cell and do copy.
Also now you can do `change by N` and `change to N` instead of constantly doing `change up|down`.
It's similar to brain-fuck where you have a tape of memory, I haven't added a error system yet because it's still in development.
The documentation is on the git-hub page.
Flinty is a 2d TopDown game where you make mods in lua to add content.
Right now its just a prototype, you can do basic stuff like adding blocks, moving blocks, having metadata etc.
The link is: https://github.com/orewaluffy500/Flinty2D
I can't share a photo right now.
Lemme know what y'all think and if i should improve stuff.
Ive been making a modding engine, This video showcases some features I added.
The thing is, Nothing besides soil or rock is in the game, I made it all with the modding API!
Here's the GitHub: (There's only one mod by default , I coded the others for fun) https://github.com/orewaluffy500/Flinty2D
Lemme know if y'all have any feedback/suggestions, (My bad I haven't wrote a documentation yet.)