Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: SUBLEQ interpreter  (Read 1034 times)


  • Bay Watcher
    • View Profile
SUBLEQ interpreter
« on: December 04, 2010, 09:41:22 pm »

This isn't exactly a creative project, in being a game or story, but it's a programming project and I wanted to share it, so this seemed to be the most logical place.

SUBLEQ Interpreter 0.7
This is a project I've been working on for the past few months with C++. It's basically what inspired me to pick it back up again after I got frustrated and quit. It can load and interpret SUBLEQ code in a user-neutral interface (that is to say, the interface sucks). It's not pretty, but it works.
Spoiler (click to show/hide)
The interface on startup
Spoiler (click to show/hide)
Displaying SUBLEQ basics for those not familiar
Spoiler (click to show/hide)
Loading, then running some code! I also showcase the memory-dump feature. (You can replicate this screenshot, it's the included for-loop example).
If you are annoyed by "the noise", silent mode cuts almost all of that out.

It's certainly not the best program ever, but I think it's pretty cool and have had a fun time playing around with it.
About Cross-Platform-ness:
I honestly don't know how cross-platform it is. It solely uses the C++ standard libarary, and is compiled with GCC in Vista. I don't have much experience with OS'es other than Windows (shame on me, I know), but if a Linux/Mac guy would offer to compile it for me I'd gladly hand over the source. Just give me the program afterwards so I can host it up here for other people. And don't judge me on organazation.  :(
I've included the text from the in-program tutorials here, as well as in the download if console text is to hard to read.
Spoiler: "help" (click to show/hide)
Spoiler: "prog" (click to show/hide)

Ok, here's the real attraction.
.7z~86kb. No viruses, obviously.
The code is NOT included. If you want to take a peek, or compile it on a different system for me, I'll be happy to hand it over, but I figured for now I'd keep the download a bit smaller by leaving it out. It you do take a look, be warned it includes "gems" like
Code: [Select]
b = memory[(ROM[pc][1])];and in general the code is quite ugly. I've done a bit of cleaning up on it, but there's more to do.

Future plans:
I have only a few features I want to add, namely two:
-More robust debugging
-A 'compile to executable' function (this counts as +0.2, so that's why it's only at 0.7 when there's just two remaining features)
Then I'll probably move on to other, more game oriented programs. (Hint: Space station. Roguelike. Random disasters. SPACE WIZARDS)
True, but at a certain velocity the resulting explosion expels invader-bits at fatal speeds. You don't want to be dropping trogdolyte-shaped shrapnel bombs into your boneworks.
Only in Dwarf Fortress...