Converting MINI-BASIC in MASM over to C++?

This is a discussion on Converting MINI-BASIC in MASM over to C++? within the Projects and Job Recruitment forums, part of the Community Boards category; Can you post the source sometime soon-ish? I was going to poke around a few things I noticed from the ...

  1. #121
    Master Apprentice phantomotap's Avatar
    Join Date
    Jan 2008
    Posts
    4,215
    Can you post the source sometime soon-ish?

    I was going to poke around a few things I noticed from the original, but if you've done that much, or gone in a different direction, it may be pointless.

    Soma

  2. #122
    Registered User
    Join Date
    Jun 2004
    Posts
    76
    The assembly source should be included with the archive.

    Or do you mean the C++ source?

    Paul

  3. #123
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,699
    Sure, I'll post what I have as soon as I get home. But I have to warn you - it's a real mess, and potentially may have some major bugs still. Having said that, other than the pitman code, it has run little test programs just fine. Anyway. Another thing I was thinking was that this would be much better if it ran off of a simple instructions set. Thoughts on that?
    Code:
    bool fun(bool value)
    {
        return std::pow(std::exp(1), std::complex<float>(0, 1) 
        * std::complex<float>(std::atan(1)*(1 << (value + 2))))
        .real() > 0;
    }

  4. #124
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,699
    Oh, and by the way...the input routines really need attention. I think their just plain junk. May need a complete rewrite in that area...
    Code:
    bool fun(bool value)
    {
        return std::pow(std::exp(1), std::complex<float>(0, 1) 
        * std::complex<float>(std::atan(1)*(1 << (value + 2))))
        .real() > 0;
    }

  5. #125
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,699
    One more thing. It would really help to have some mini-basic programs to test with. Do you have any, Paul?
    Code:
    bool fun(bool value)
    {
        return std::pow(std::exp(1), std::complex<float>(0, 1) 
        * std::complex<float>(std::atan(1)*(1 << (value + 2))))
        .real() > 0;
    }

  6. #126
    Master Apprentice phantomotap's Avatar
    Join Date
    Jan 2008
    Posts
    4,215
    Another thing I was thinking was that this would be much better if it ran off of a simple instructions set.
    My first thoughts exactly...

    (Actually, my first thought was a RISC machine with a simple BASIC JIT front-end.)

    Oh, and by the way...the input routines really need attention.
    Of course, but first one thing and then the other. (I've looked at matsp source and the original.)

    It would really help to have some mini-basic programs to test with.
    ++

    And a complete spec.. Going through the original assembler to figure out what exactly it supported is a pain.

    Soma

  7. #127
    Registered User
    Join Date
    Jun 2004
    Posts
    76
    Quote Originally Posted by Sebastiani View Post
    One more thing. It would really help to have some mini-basic programs to test with. Do you have any, Paul?
    Yes. Go to my website here:

    http://www.geocities.com/dunric/minibas.zip

    Includes about 10 example programs.

    Paul

  8. #128
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,699
    Alright, so this is the latest version of the code. It's still very broken in some areas (I/O, for example). Also did some tidying up, but it's still a bit messy.

    >> Includes about 10 example programs.

    OK, thanks. I'll try them out.
    Attached Files Attached Files
    Code:
    bool fun(bool value)
    {
        return std::pow(std::exp(1), std::complex<float>(0, 1) 
        * std::complex<float>(std::atan(1)*(1 << (value + 2))))
        .real() > 0;
    }

  9. #129
    Registered User
    Join Date
    Jun 2004
    Posts
    76
    Looking good.

    Paul

  10. #130
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,699
    Yeah, it's coming along. But the I/O routines will definitely have to be rewritten. And considering how busy I've been, I may not get around to that for a couple of days. After all that's done, though, we'll just need to make a final pass through the code to tie up the various loose ends. Then we can post the final draft and let you play with it to verify that it works properly. And since the code is basically 99% C, we can probably make it 100% so that you can use any old compiler to make an executable for you machine.
    Code:
    bool fun(bool value)
    {
        return std::pow(std::exp(1), std::complex<float>(0, 1) 
        * std::complex<float>(std::atan(1)*(1 << (value + 2))))
        .real() > 0;
    }

  11. #131
    Registered User
    Join Date
    Jun 2004
    Posts
    76
    Sounds good.

    Paul

  12. #132
    Registered User
    Join Date
    Jun 2004
    Posts
    76
    Quote Originally Posted by Sebastiani View Post
    Sure, I'll post what I have as soon as I get home. But I have to warn you - it's a real mess, and potentially may have some major bugs still. Having said that, other than the pitman code, it has run little test programs just fine. Anyway. Another thing I was thinking was that this would be much better if it ran off of a simple instructions set. Thoughts on that?
    That's okay. It looks good so far.

    Paul

  13. #133
    Registered User
    Join Date
    Jun 2004
    Posts
    76
    Quote Originally Posted by matsp View Post
    PEEK and POKE work within the code itself - we may need to change the way the code is stored to solve that. Let's ignore PEEK and POKE for the very moment.

    Locate is a "gotoxy()" type function to move the cursor.

    --
    Mats
    True, locate is used in that way. Poke and Peek are used to access memory locations within MINI-BASIC.

    Paul

  14. #134
    Registered User
    Join Date
    Jun 2004
    Posts
    76
    Quote Originally Posted by phantomotap View Post
    Can you post the source sometime soon-ish?

    I was going to poke around a few things I noticed from the original, but if you've done that much, or gone in a different direction, it may be pointless.

    Soma
    How's the conversion looking to C++?

    Paul

  15. #135
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,699
    I haven't done much in the past couple of days, but I'll get back onto project soon, and hopefully have things worked out by the end of the week.
    Code:
    bool fun(bool value)
    {
        return std::pow(std::exp(1), std::complex<float>(0, 1) 
        * std::complex<float>(std::atan(1)*(1 << (value + 2))))
        .real() > 0;
    }

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Converting textBox1->Text into a basic string.
    By azjherben in forum C++ Programming
    Replies: 5
    Last Post: 06-07-2009, 08:27 PM
  2. [ANN] New script engine (Basic sintax)
    By MKTMK in forum C++ Programming
    Replies: 1
    Last Post: 11-01-2005, 09:28 AM
  3. what are your thoughts on visual basic?
    By orion- in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 09-22-2005, 04:28 AM
  4. VC++ 6 & MASM (eek)
    By cboard_member in forum C++ Programming
    Replies: 2
    Last Post: 07-16-2005, 10:00 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21