Author Topic: Bxbasic (Blunt Axe Basic)  (Read 13703 times)

SteveA

  • Guest
Bxbasic (Blunt Axe Basic)
« on: October 14, 2011, 09:26:48 AM »
Hey guys,
I'm not entirely new to this forum, but I will re-introduce myself and my project:
I'm Steve and beginning in 2000 I started work on Blunt Axe Basic (Bxb or Bxbasic).
Here is a link to an interview I gave regarding Bxbasic:
http://imortisoft.no-ip.org/b2b/?Issue_%234

Bxb is currently an ongoing project and is always being added to.
As stated in the interview, Bxb started as a learning tool that morphed into a 16 chapter compiler design tutorial, complete with source code.
http://sites.google.com/site/bluntaxebasic/tutor/
At the point where the tutorial finishes, Bxb is developed into a QuickBasic'ish (subset) interpreter and byte-code compiler.

At this date, Bxb has many advanced math functions included and also has API/GUI capabilities.
The portion of the API that is now intrinsic to Bxb is a portion of the GDI.
However, Bxb is not limited to only those portions of the API which are intrinsic (built-in).
Bxb has fully incorporated "Dyncall" as an intrinsic component.
Dyncall, (by Daniel Adler and Tassilo Philipp) is a tool designed specifically with interpreters and scripting engines in mind so that they can dynamically access the full API and OEM DLLs.

Besides Bxbasic (the interpreter) there is also Bxbasm, which is an actual Basic compiler, that takes Bxbasic scripts and compiles to actual binaries. Bxbasm is not a byte-code compiler. It is written in C and built around Masm. It takes a script and converts it into Intel x86 Assembly Language, which is then assembled by the Masm assembler and linked directly into an executable.
I have not worked on Bxbasm in several years and despite the fact that it has a lengthy list of commands available, it is still in an early state of development.
I like Masm and the Intel syntax, that is why I chose to use that particular assembler. I have, however, gotten quite a bit of flack from the open-source community about using it. At this time I am about to embark on a project that my bring some life back to Bxbasm. I have not made a final decision of whether to continue using Masm, even though Microsoft has made it readily available for download.

Steve

jcfuller

  • Guest
Re: Bxbasic (Blunt Axe Basic)
« Reply #1 on: October 14, 2011, 10:15:26 AM »
Steve,
  Re Bxbasm: Use JWAsm. Fully masm compatible and there is also a Linux version.
http://www.japheth.de/JWasm.html

James

SteveA

  • Guest
Re: Bxbasic (Blunt Axe Basic)
« Reply #2 on: October 14, 2011, 10:58:12 AM »
Steve,
  Re Bxbasm: Use JWAsm. Fully masm compatible and there is also a Linux version.
http://www.japheth.de/JWasm.html

James

Hey James,
Yes..., I just downloaded the latest version of JWasm and I'm about to begin testing it.
Expect me to "bend you ear" in the near future, as I'm sure to have some questions about it.
I am disappointed that JWasm's user/support forum is on sourceforge, tho.

I have been a member of sourceforge for over ten years now and have grown to hate it.
It's slow, cumbersome to use and ugly.
That's why I have refused to take Bxbasic to sourceforge.

I wish japheth (aka Andreas Grech) would setup a different forum for his user base.
I think JWasm could benefit by it.

Steve




SteveA

  • Guest
Re: Bxbasic (Blunt Axe Basic)
« Reply #3 on: October 15, 2011, 03:05:15 PM »
@ J.C.Fuller,

Hey James,
just wondering, how are you setting up JWasm ?
Are you using it in the MASM32\bin\ folders ?
Or, are you setting it up in it's own folder structure ?
If the latter is the case..., what are you putting where, (assuming: \jwasm\...) ?

TIA

jcfuller

  • Guest
Re: Bxbasic (Blunt Axe Basic)
« Reply #4 on: October 15, 2011, 04:46:41 PM »
Steve,
  I am using RadAsm3 with JWAsm in it's own directory but using Masm32 libs/incs ...etc

This is fine for just playing around as I am doing but you have to watch out. Steve is very protective of the Masm32 package. I am not sure of the license of BxAsm but it may very well violate Steve's edicts of not allowing anything from the Masm32 package to be used for a GPL project.
I got a separate ok from Raymond on using his floating point library.
 
James


Offline John

  • Forum Support / SB Dev
  • Posts: 3005
    • ScriptBasic Open Source Project
Re: Bxbasic (Blunt Axe Basic)
« Reply #5 on: October 15, 2011, 05:59:13 PM »
You guys lost me. I thought Steve was looking for a good assembler to generate executables from his BxBasic to ASM converter. I don't think Steve is trying to create a new assembler.


jcfuller

  • Guest
Re: Bxbasic (Blunt Axe Basic)
« Reply #6 on: October 16, 2011, 03:09:00 AM »
Steve,
As a followup note most of my work with JWAsm was on 32bit Linux.
I took another look at my windows setup and I am using polink (Pelles) linker.

James

SteveA

  • Guest
Re: Bxbasic (Blunt Axe Basic)
« Reply #7 on: October 16, 2011, 07:56:56 PM »
You guys lost me. I thought Steve was looking for a good assembler to generate executables from his BxBasic to ASM converter. I don't think Steve is trying to create a new assembler.

You are correct John.
(but, this conversation does have too many Steve's in it, doesn't it ?)

Quote
Steve is very protective of the Masm32 package. I am not sure of the license of BxAsm but it may very well violate Steve's edicts of not allowing anything from the Masm32 package to be used for a GPL project.

For those out of the loop, there is me, SteveA and then there is Steve (Hutch) Hutchesson, (author of Masm32 package).

It it my intention to continue with the BxBasic to ASM converter.
I would build the front-end, to make the conversion and use the assembler of choice as the back-end, to compile the executable.
« Last Edit: October 16, 2011, 08:42:19 PM by SteveA »

SteveA

  • Guest
Re: Bxbasic (Blunt Axe Basic)
« Reply #8 on: October 16, 2011, 08:40:47 PM »
Quote
Steve,
...but you have to watch out. Steve is very protective of the Masm32 package. I am not sure of the license of BxAsm but it may very well violate Steve's edicts of not allowing anything from the Masm32 package to be used for a GPL project.

James

I have searched, and I don't really see where Hutch has restricted (in documentation) the usage of the Masm32 package.
Except for the cautions regarding using freely downloadable Microsoft executeables, I don't see that that should be a problem, any way.
I don't see anywhere in Hutch's docs where he mentions GPL.
Now, maybe he has posted on the forum about it, but, if it's not in the docs, it doesn't carry any weight.
I could be missing something.

Besides, I don't rely on MS free download executables.
I have purchased Visual Studio and it has it's own EULA.

Additionally, besides referencing the MS EULA, I don't see where Hutch has provided a seperate license for the Masm32 package.
I see no obvious restrictions on it's usage.

jcfuller

  • Guest
Re: Bxbasic (Blunt Axe Basic)
« Reply #9 on: October 17, 2011, 03:40:32 AM »
Steve,
Re:No GPL
Bottom of the page.

http://www.masm32.com/license.htm


As I said I was primarily using JWAsm on Linux so I could not use any of the included macros

What you CANNOT do with the MASM32 Project.
4. You cannot use the MASM32 Project to write software for Non-Microsoft Operating Systems

James




jcfuller

  • Guest
Re: Bxbasic (Blunt Axe Basic)
« Reply #10 on: October 17, 2011, 06:37:55 AM »
SteveA,
  After looking at the BxbAsm-Masm package I thought you might be in violation of Hutch's license so I inquired of him on it's compliance.
  I just received an email where he stated your BxbAsm-Masm.zip package is basically not in compliance with his License.
He said he didn't care because the package was so old but if a revival is in order you may want to email him as to how you might comply.

I might want to contribute to a JWAsm port (Win/Linux) so I wanted to make sure on the current status.

James

SteveA

  • Guest
Re: Bxbasic (Blunt Axe Basic)
« Reply #11 on: October 17, 2011, 07:32:29 AM »
Quote
...besides referencing the MS EULA, I don't see where Hutch has provided a seperate license...
I was looking at my old install, which does not include Hutch's license.

Quote
...www.masm32.com/license.htm...
Thanks for the link.
I'm sure I must have seen this at some point in the past.
I don't understand why this isn't contained within the Masm32 package.

Quote
What you CANNOT do with the MASM32 Project.
4. You cannot use the MASM32 Project to write software for Non-Microsoft Operating Systems
This makes complete sense, since the Masm32 package is based on Windows.
I don't know how you would use Windows (exclusive) tools to create *nix software.
Maybe there is a way to do it... I don't know.

Quote
I just received an email where he stated your BxbAsm-Masm.zip package is basically not in compliance with his License.
Thanks for checking James. 
I was completely unaware of this fact.

I am puzzled tho, about Hutch's position on software development.
The Masm32 package itself is freely available, but, Hutch places restrictions on how and under what circumstances users may use it. (?)

I am aware of the flame wars over the years between Hutch and numerous (unnamed) indviduals.
Basically, I have always liked Hutch. I have never found myself in disagreement with his forum postings.
And, I have always found his forum as a wealth of information.
I just don't get his position on open-source software.
I have scanned Microsoft's license (those which I have) and they don't make any mention regarding open-source software.
I don't see that he can place the blame on MS.
Puzzled...

jcfuller

  • Guest
Re: Bxbasic (Blunt Axe Basic)
« Reply #12 on: October 17, 2011, 08:00:02 AM »
SteveA,
  It has nothing to do with MS software only on the macros,libraries, and include files created by users (and Hutch) and incorporated into the Massm32 package.
You may use any of the macros/libraries/includes if you can track down the contributor and get individual permissions. I did this with Raymond's floating point library so I could use it on Linux.
 
James


SteveA

  • Guest
Re: Bxbasic (Blunt Axe Basic)
« Reply #13 on: October 17, 2011, 11:53:44 AM »
Quote
You may use any of the macros/libraries/includes if you can track down the contributor and get individual permissions.
Oh...I get it.

Thanks for the tip.
All considered, it may not be too important, at this point.
I'm getting ready to dig into JWasm.


jcfuller

  • Guest
Re: Bxbasic (Blunt Axe Basic)
« Reply #14 on: October 24, 2011, 12:20:05 PM »
Steve,
  I am working my way through your excellent Bxb tutorial and have just finished chapter 1.
 While I have been programming since the early 70's it has mostly been BASIC so my "c" is suspect.
Question:
In the void program_array() you allocate memory for array1 and array2

Code: [Select]
    array1 = malloc(nrows * sizeof(char *));
    for(ii = 0; ii < nrows; ii++)
    {   array1[ii] = malloc(ncolumns * sizeof(char));
    }
    array2 = malloc(nrows * sizeof(char *));
    for(ii = 0; ii < nrows; ii++)
    {   array2[ii] = malloc(LINE_NUM * sizeof(char));
    }

In main() you free it with:
Code: [Select]
    free(array1)
    free(array2)

should there not be a loop and first free the actual lines memory:
Code: [Select]
    for(ii = 0; ii < nrows; ii++)
    {   free(array1[ii]);
    }
    for(ii = 0; ii < nrows; ii++)
    {   free(array2[ii]);
    }

I believe in practice you do not "NEED" to free either one as they will be freed by the os on termination of the program.


James