Is this an easy conversion? Converting MINI-BASIC, written in MASM, over to C++? The Yahoo group for MINI-BASIC is here:
http://tech.groups.yahoo.com/group/minibasic/
Paul
Is this an easy conversion? Converting MINI-BASIC, written in MASM, over to C++? The Yahoo group for MINI-BASIC is here:
http://tech.groups.yahoo.com/group/minibasic/
Paul
I should also note that MINI-BASIC uses the Windows API for display, keyboard and file I/O. This should be easy to convert to C or C++ using the stdlib.h
Paul
The original Palo Alto Tiny BASIC appeared in 1976 in the pages of Dr. Dobbs Journal. MINI-BASIC is a modern variant of Palo Alto Tiny BASIC using Windows API calls for screen, keyboard and file I/O. It has 26 variables, A-Z, and 1 array, @(I).
Despite these limitations, MINI-BASIC is a robust programming language written in ASM. More commands can be added with ease.
Paul
Not having looked at it, I'd say that rewriting it in C++ is an "intermediate" difficultly - far from impossible, but not a "5 minutes whilst browsing the web" either.
--
Mats
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.
What should a person focus on when converting from one language to another?
Paul
First, you need to understand BOTH languages well. Next you need to have some way of testing the new code, to ensure that it still does the same thing as the old one.
I have looked a bit at the Mini-Basic code now, and it's using an awful lot of global variables and various naughty assembler tricks (like calls to the middle of a function), which makes the task a bit difficult.
--
Mats
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.
Calls to the middle of a function? Could that be causing the occasional (and strange) Windows API error?
Paul
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.
Looks good. Is that a mock screen, or the real thing?
Paul
It's real in the sense that I copied the MASM code into C++ - although it is more "assembler written in C" than C++, if you see what I mean.
I'm currently trying to get the input going - it's a bit long-winded to try to translate back from assembler, but I'm getting there. Once I have basic input working, I'll go to bed for today. Don't know when I will continue (and I don't know if I'll EVER finish it).
I've got over 600 lines, but that includes a bit of "comments of work to be done with untranslated assembler code".
--
Mats
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.
Looks good. Keep up the good work.
Paul
Global variables are hard to keep track of, since it's hard to follow where such variables are being changed. I currently keep some global variables, but a lot of variables are passed around between functions.
And it's only 120KB of source code, so I wouldn't call it a "large" program.
How is your translation work going? Or are you waiting for me to do it for you?
--
Mats
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.