Sounds good! Thanks for the update.
Paul
Sounds good! Thanks for the update.
Paul
Just done a load and save function, and VERY basic (pun intended!) testing.
Picture for proof (check the URL for "proof" [it's either that, or I'm spending a lot of time doing photoshopping! ]).
Note that the program is absolutely not valid basic, but just something I typed in before doing save.
Edit: I just loaded pitman.mbi as well - it seems to work so far as I can tell. Just paused it a bit into the listing.
--
Mats
Last edited by matsp; 03-16-2009 at 07:11 PM.
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.
Hey, that's pretty cool, matsp. Would you mind sharing what you have so far? I'd be interested to see what approach you've taken with this. Maybe some of us could pitch in on whatever else needs to be done, to make things a little easier? Just a thought.
Code:#include <cmath> #include <complex> bool euler_flip(bool value) { return std::pow ( std::complex<float>(std::exp(1.0)), std::complex<float>(0, 1) * std::complex<float>(std::atan(1.0) *(1 << (value + 2))) ).real() < 0; }
I'd be happy to share it, but bear in mind that I'm following the original format/functions and it's a bit messy and hacky.
Once I've got something roughly working (at least a small section of the functionality of the language, such as assigning variables, goto's, gosub's and for-loops working), I'm thinking that I should do a bit of a refactoring, and use more C++ style approach, rather than "Assembler written in C", as it is now.
I don't think that will happen for a few weeks yet.
And I'd rather share something that I'm reasonably proud of, than a "quick hack".
--
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.
Well, I figured it would be pretty hackish, given what you have to work with. But I'm game. I don't really have a lot of (practical) assembly experience, but there are other areas I could be of some use. And I don't mind working in straight C, either - it doesn't have to be very fancy, it just has to work, right? Either way, keep us posted on the progress. It looks like an interesting project.
Code:#include <cmath> #include <complex> bool euler_flip(bool value) { return std::pow ( std::complex<float>(std::exp(1.0)), std::complex<float>(0, 1) * std::complex<float>(std::atan(1.0) *(1 << (value + 2))) ).real() < 0; }
I may put something up tonight - I'm not doing any of this at work, you know... ;-)
--
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.
No rush - I don't expect this to become your second job, either!
Code:#include <cmath> #include <complex> bool euler_flip(bool value) { return std::pow ( std::complex<float>(std::exp(1.0)), std::complex<float>(0, 1) * std::complex<float>(std::atan(1.0) *(1 << (value + 2))) ).real() < 0; }
Looks nice. I think it would work well in C++. I don't know about speed-wise, if it would be faster, but hopefully those Windows API errors would be less frequent.
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.
Yeah, Windows API errors were frequent in the assembled version.
Paul
Just thought I'd share that "run" now works too - it only supports ONE command within the code (PRINT, and only with quoted strings as argument), but it's a move in the right direction.
--
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.