C++ is now my bitch. p.s. advice needed!

It took a while, but I did it! I really don't know why it took so long for be to learn c++, but but I'm glad its finally over with. I really needed to get past languages with VMs, because I want to try to make my own language, with its own compiler or, optionally a vm with a shell. (like python, although i do realize python still only compiles to bytecode, not machinecode). the exact details of how my language, vm, and compiler will work are still in their infancy, but this is roughly what I plan to do:

language:
-modernized version of BASIC (to start, at least)
-it will include goto, because the state machine in the vm will be coded by hand (no bison!), so there wont be any optimization to ruin in the first place.
vm:
-written in c++
- this is where i need help should i create a stack machine? or a register machine? what are the pros and cons of each?
compiler:
-written in c++, then rewritten in BITCH (my version of BASIC) once i can compile it.

I've been researching this stuff for a while now, and I know how each part of the compiler and vm functions individually, so I think I'm finally ready. wish me luck! and if any of you have any advice, I'd love to hear it. if this ever works out, Im thinking about doing something with brainfuck.

Comments

So it's mod version of basic that's cool but all everyone ever does in basic is

10 print "Amanda Rose is beautiful"
20 goto 10
run
 
well, I'm not trying to do anything advanced yet. I figured it would be a good place to start, and might just be complex enough to move beyond text-based visuals.
 
  • Like
Reactions: 1 person
speaking of test based visuals, it occurred to me that doing something like window creation might not even be possible in a stack based machine. do any of you know if this really is the case?
 
I thought BASIC had classes and what not?
I took a class last year and I remember it having classes, though I also did Visual basic, so it might of been that
 
90% sure you took visual basic. BASIC is what ran on the c64 and has like, 20-25 keywords and supports two literals (EDIT: I think operators also count as literals, so add 5-6). visual basic is part of whats known as the third generation of BASIC, and being oo, does indeed use classes.
 
You'll need to use assembly if you want to be more like King Terry Davis, the smartest programmer who ever lived.
 

Blog entry information

Author
HamBone41801
Views
407
Comments
20
Last update

More entries in Personal Blogs

More entries from HamBone41801

General chit-chat
Help Users
  • No one is chatting at the moment.
    Psionic Roshambo @ Psionic Roshambo: This parrot is no more it has ceased to be!