April 26, 2024, 01:16:16 PM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


Small bug in NASM found -FIXED

Started by Ionic Wind Support Team, December 08, 2006, 12:05:57 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Ionic Wind Support Team

December 08, 2006, 12:05:57 PM Last Edit: December 10, 2006, 03:42:04 PM by Paul Turley
Just a FYI

The assember we use, NASM, has a bug that causes the wrong opcode to be used in certain cases.  If you are getting an access violation on a return from a subroutine, with no other possible causes, then it is probably due to this bug.

What is happening is if the subroutine is located at a far memory distance from the call, in the same module, NASM is still using a 'near' form of the opcode.  No error is reported by NASM either making it very hard to track down.

I have determined a correction for the problem and will include it in the next update.  So far in five years of using NASM this is the first time we have encountered it. 

Paul.
Ionic Wind Support Team

Zen

Thanks Paul.

Have you told the folks who make NASM so they can fix it too?

Lewis

Ionic Wind Support Team

I emailed Frank.  He hasn't been too active though,
Ionic Wind Support Team

paravantis

Paul and all,

Excuse my intervening, but (since I am the user who emailed you the eBasic code that crashed when ran and eventually lead to your finding the NASM bug) I hardly think this is a "small" bug.

A question has to be answered at this point in time: is eBasic a TOY compiler for programs up to a few tens or hundreds of lines (something a user would dapple with rather than do serious work in) OR is it a REAL Basic compiler which can be used to write programs that may run into thousands of lines?

As an illustration, I have a second algorithmic code that I would very much like to translate into Basic; the problem is that that code is around 7500 lines (over seven thousand lines). Could I realistically attempt to write it in eBasic? As my recent experience has shown, NO. In the case at hand, it completely baffles me that you selected to use a freeware assembler that has (at least one) serious bug, prone to occur to anyone who writes medium length programs, INSTEAD of investing in a commercial assembler that would be guaranteed to work correctly.

Confessedly, I for one have somewhat lost my confidence in eBasic and have turned to Powerbasic for "serious" programming. I am sorry to see that some of iBasic's worst traits are still alive and kicking today.

Having said that, I remain a fan of PAUL TURLEY, will maintain my registration with eBasic and cross my fingers that at some point in the not-too-distant future, a new version will appear that is mature enough (e.g. meaningful error messages while compiling, meaningful runtime messages, rock solid code that works per specifications) to prove me wrong.

For those of you who would like to taste my frustration, you may download the offending code from

http://paravantis.com/sensor_grid_08Dec06.eba

John Paravantis
University of Piraeus
Greece

Ionic Wind Support Team

NASM is an open source assembler, not a freeware one.  And we've been using it for many years without problems.  You certainly cannot blame me for a bug in code that I didn't write.

Emergence is only a week old.  So give me a little bit of a break as there may be problem still we haven't encountered.  The release I have planned today not only fixes the single bug you found but also adds arrays up to 5 array dimensions to the language.  And the only reason I did that is you requested it ;)

If you don't understand an error message then by all means ask here and we will help you, very quickly in most cases.

You will always run into conversion issues when porting code from one language to another. Again that is why we are here.  I was able to get the program you sent me by email to run, emailed you a solution, and am still awaiting your reply.

Paul.
Ionic Wind Support Team

splakidas

December 09, 2006, 11:56:15 AM #5 Last Edit: December 09, 2006, 12:10:59 PM by splakidas
Hi i wroteÂÃ,  a project that is more than 25.000 lines (16.000 the main programm and about 9.000 the rest modules) . Compiled with ibasic and ebasic !!

Stathis Plakidas

mrainey

My largest project (38,000 lines) compiles and runs flawlessly in IBPro.  I expect the same to happen when I run it through EBasic later this weekend.

A NASM limitation (not a bug really) did originally prevent me from compiling the code as a single file in IBPro.  Paul identified the problem - too many string concatenations using "+".  Converting to a project got rid of the problem.
Software For Metalworking
http://closetolerancesoftware.com

Rod

Quoteis eBasic a TOY compiler

Note to John Paravantis: Paul doesn't do toys. There is NO project which I would hesitate to approach using Paul's eBasic or Aurora. And yes, I DO know what a major project is. I choose not to elaborate, lest it come across as "braggy".

As for Paul's choice of an open-source assembler, please consider the price you paid for eBasic. Even as it is, Paul could have justifiably charged much more for his work. A purchased assembler module would have run the price up even more, and probably have come out with a lower-quality product.

Chill out, trust the old hands around here who have come to know Paul over the course of several years. Paul knows what he's doing. He's not going to leave his community hanging out in the wind. If you have a problem with your 7.5 thousand-line module (or 7.5 million, it doesn't matter), he will do everything reasonable (and usually a thing or two beyond reason) to help you.

If I had to hang my career and reputation on one compiler, it would be one of Paul's.

Brice Manuel

Quote from: Paul Turley on December 09, 2006, 11:33:38 AMYou certainly cannot blame me for a bug in code that I didn't write.
Might as well blame you for that too.  Afterall, you have been getting blamed for everything else under the sun lately.  ;D

Dennisc

QuoteChill out, trust the old hands around here who have come to know Paul over the course of several years. Paul knows what he's doing. He's not going to leave his community hanging out in the wind. If you have a problem with your 7.5 thousand-line module (or 7.5 million, it doesn't matter), he will do everything reasonable (and usually a thing or two beyond reason) to help you.

If I had to hang my career and reputation on one compiler, it would be one of Paul's.

Cannot agree more! I have IBasic programmes of 6000 lines of code and more with many windows and dialogs which are rock steady and I am sure EBasic will be equally steady .....

I've hit many bugs in many compilers both mainframe and PC over my 40 years of programming including VB but very few with Paul's compilers besides which Paul has always very rapidly fixed any problem within hours of reporting it. :) :)

Dennis Comninos
Failure is only the opportunity to begin again more intelligently
www.denniscomninos.com

GWS

I'm sure we are all grateful to John for pointing out a bug which might occur under certain circumstances when returning from a subroutine.

How the 'near - far' situation arises I've no idea, but no-one had ever found it before.

We are even more grateful that we have an all-round expert (Paul) on hand to correct it.

Within a few days, he located the problem (in an internationally used piece of open source software), corrected it, and introduced a major enhancement (Arrays of up to 5 dimensions) to the language. :)

I've looked at John's program, and it is a lovely sweep of pure Basic generating scientific results.ÂÃ,  I know he would say it's no use having a great piece of code if it won't run.ÂÃ,  Very true.

But you have to consider - the problem was rapidly corrected.

Imagine if you find a problem with a major company's software like Microsoft. They are not easy to communicate with, and bug reports get shoved on a stack for investigation.ÂÃ,  It might be months before it gets addressed in some patch or update.ÂÃ,  So even major companies experience lots of bugs in their software.ÂÃ,  ÂÃ, The difference is, you are left to try a workaround, 'cos the bug might not be fixed for ages - whereas a small developer can address the problem straight away.

The independent developer relies on problem reports and hands-on adjustment to comb out bugs - both during beta testing by users, and later from user reports like this one.ÂÃ,  It always amazes me how few are found. :)

The correct reponse to finding a bug, is to look on it as an opportunity to make the language even better.ÂÃ,  It's not helpful to just criticise and walk away, with dark hints that there are even more problems that haven't been mentioned.ÂÃ,  ÂÃ, That is unfair, since no-one else has reported any problems, and what is not known about cannot be put right.

So I would ask John to give it another go - the chances of finding another bug are very small - and look how neatly you were able to express your application and obtain the results you required.ÂÃ,  And you haven't even got to the amazing Windows programming bits yet .. ;)

all the best, :)

Graham






Tomorrow may be too late ..

paravantis

Graham,

Thanks for the wise, soothing and kind words you had the kindness of sharing with us.

My further postings to this forum show that, although my mind tells me to use a different compiler, my heart still lies with Paul and his efforts.

I will, as time permit, use eBasic on relatively large source codes and will report back with results.

John

GWS

Thanks John - your expert applications usage is most valuable in enhancing Basic's general purpose status ..

Enjoy, :)

Graham
Tomorrow may be too late ..