C Board  

Go Back   C Board > Community Boards > Projects and Job Recruitment

Reply
 
LinkBack Thread Tools Display Modes
Old 03-16-2009, 03:55 PM   #31
Registered User
 
Join Date: Jun 2004
Posts: 76
Sounds good! Thanks for the update.

Paul
Paul Panks is offline   Reply With Quote
Old 03-16-2009, 07:03 PM   #32
Kernel hacker
 
Join Date: Jul 2007
Location: Farncombe, Surrey, England
Posts: 15,686
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
Attached Images
  
__________________
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.

Last edited by matsp; 03-16-2009 at 07:11 PM.
matsp is offline   Reply With Quote
Old 03-16-2009, 09:20 PM   #33
Guest
 
Sebastiani's Avatar
 
Join Date: Aug 2001
Posts: 5,034
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.
Sebastiani is offline   Reply With Quote
Old 03-17-2009, 03:11 AM   #34
Kernel hacker
 
Join Date: Jul 2007
Location: Farncombe, Surrey, England
Posts: 15,686
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.
matsp is offline   Reply With Quote
Old 03-17-2009, 04:22 AM   #35
Guest
 
Sebastiani's Avatar
 
Join Date: Aug 2001
Posts: 5,034
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.
Sebastiani is offline   Reply With Quote
Old 03-17-2009, 04:46 AM   #36
Kernel hacker
 
Join Date: Jul 2007
Location: Farncombe, Surrey, England
Posts: 15,686
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.
matsp is offline   Reply With Quote
Old 03-17-2009, 07:18 AM   #37
Guest
 
Sebastiani's Avatar
 
Join Date: Aug 2001
Posts: 5,034
No rush - I don't expect this to become your second job, either!
Sebastiani is offline   Reply With Quote
Old 03-17-2009, 01:50 PM   #38
Registered User
 
Join Date: Jun 2004
Posts: 76
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
Paul Panks is offline   Reply With Quote
Old 03-17-2009, 02:23 PM   #39
Kernel hacker
 
Join Date: Jul 2007
Location: Farncombe, Surrey, England
Posts: 15,686
Quote:
Originally Posted by Paul Panks View Post
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
It will almost certainly be slower (although some of the assembler tricks makes short code rather than fast code, it's still VERY unlikely that the code will run faster in C++).

I haven't had any Windows API errors yet.

--
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.
matsp is offline   Reply With Quote
Old 03-17-2009, 02:25 PM   #40
Registered User
 
Join Date: Jun 2004
Posts: 76
Yeah, Windows API errors were frequent in the assembled version.

Paul
Paul Panks is offline   Reply With Quote
Old 03-17-2009, 02:53 PM   #41
Kernel hacker
 
Join Date: Jul 2007
Location: Farncombe, Surrey, England
Posts: 15,686
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
Attached Images
 
__________________
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.
matsp is offline   Reply With Quote
Old 03-17-2009, 03:02 PM   #42
Registered User
 
Join Date: Jun 2004
Posts: 76
Quote:
Originally Posted by matsp View Post
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
Quote:
Originally Posted by matsp View Post
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
That's definitely a great start. It's looking good!

Paul
Paul Panks is offline   Reply With Quote
Old 03-17-2009, 07:09 PM   #43
Registered User
 
Join Date: Jun 2004
Posts: 76
Quote:
Originally Posted by matsp View Post
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
Looking good.

Paul
Paul Panks is offline   Reply With Quote
Old 03-18-2009, 12:47 AM   #44
Registered User
 
Join Date: Jun 2004
Posts: 76
Quote:
Originally Posted by leeor_net View Post
It probably comes down to shoddy programming -- that is usually the case with so-called fragile software. Fragile = badly written. Being written in ASM only compounds these problems when somebody is using the language without a complete and thorough understanding of internal machine code.

If you were to convert or 'port' it, I would suggest that you just rewrite it from scratch. ASM - C++ is, if you ask me, a waste of time.

Note, though, that C++ is only based on C... it is not C. (I know that's going to start an argument but I'm quoting Bjorn Stroustrup himself). You would need to choose one or the other. C++ is a lot easier when it comes to dealing with errors and the STL names it almost trivial to write an interpretter.

I would say, however, that if you're not familiar with C/C++ you should probably start with a project a little smaller than that.
Assembly language is a different animal altogether, true...but I think porting it to C/C++ would benefit the C/C++ community. It is a useful language modeled after Palo Alto Tiny BASIC from 1976.

Paul
Paul Panks is offline   Reply With Quote
Old 03-18-2009, 08:25 AM   #45
Registered User
 
Join Date: Jun 2004
Posts: 76
Quote:
Originally Posted by matsp View Post
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
Does the list function list the whole program?

Paul
Paul Panks is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Converting textBox1->Text into a basic string. azjherben C++ Programming 5 06-07-2009 08:27 PM
[ANN] New script engine (Basic sintax) MKTMK C++ Programming 1 11-01-2005 10:28 AM
what are your thoughts on visual basic? orion- General Discussions 16 09-22-2005 04:28 AM
VC++ 6 & MASM (eek) ahluka C++ Programming 2 07-16-2005 10:00 AM


All times are GMT -6. The time now is 02:12 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2

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