XBLite compiler circa 2018

163 views
Skip to first unread message

Guy1954

unread,
Feb 23, 2018, 8:16:13 AM2/23/18
to xblite
Hi Xbliters, Hi Alan!

I just uploaded my last revision of XBLite ASCII compiler in the XBLite Forum.

There is a lot of code tightening, some bug corrections and a better handling of compile flags such as "-rc".

I'm already toying with XBLite Unicode compiler, and I have some working programs.

However, I must make a design decision:
- either I "clone" the static library xblib.lib, and statically link xblibW.lib to the compiled program,
- or I inject the called assembler routines and get rid of statically linked xblibW.lib, which yields to a smaller generated assembler source.

I already tried both techniques, and (at this point) I feel equally confident with both of them.

Could you please give me your educated opinion on this design decision?

Thanks for your help.

Bye! Guy

Rikus Hidding

unread,
Feb 24, 2018, 7:53:32 AM2/24/18
to xblite
Hi Guy,

in my humble opinion today the amount of code does not count as much as the ease of installation.
So if I had to choose I would go for lesser libraries.

Keep up the good work,
Kind regards,
Rikus.

Op vrijdag 23 februari 2018 14:16:13 UTC+1 schreef Guy1954:

Guy1954

unread,
Feb 25, 2018, 2:49:32 PM2/25/18
to xblite

Hi Rikus.

Excellent point: XBLite's main appeal is a very easy “fresh” installation.

So, if I understand correctly, your vote goes for a compiler generating the support routine on a needed basis.


- 0 for a xblib.lib "clone",
- 1 for assembler routine injection.


Thank you for your answer.


Now, let me ask you, Rikus: How would you benefit for a new XBLite Unicode compiler?


Since you brought your grain of salt, I’m getting curious hear more...


Bye! Guy

Guy1954

unread,
Feb 26, 2018, 7:45:54 AM2/26/18
to xblite
Hi Alan.

Rikus' rationale on reducing the use of .DLL to a minimum put my thinking gears into motion. And your Xmal.dll popped up!

Remember: for my season’s greeting 2016 in this group, I posted a little application that I coded as an e-card: an analog clock that I coded for the occasion, which displayed the message: "Happy new year 2017!".

Instead of using XBLite standard math library, I decided to put into use Xmal.dll, that you released on December 2010.

Since you contributed with your LONGDOUBLE math library, I was wondering if I could embed this library at xblite.x's level, and handle XBLite's native DOUBLE with the proper call to it.

Would take care of Xma.dll and Xmal.dll, wouldn't it!

Would you like that?

Bye! Guy

Rikus Hidding

unread,
Feb 26, 2018, 8:38:57 AM2/26/18
to xblite
Well Guy,

in fact i am not a frequent user of XBlite anymore (being in my 70's now)
I keep some projects in live and once in a while I stumble into unreadable text files.
untill now i read the file in notepad++ covert and save it.
I have been happy with xbasic and later on my windows systems XBlite.
as reply to your question, i think if you would do it for me you better enjoy your pension as I do.
on the other hand i like fooling around with computers.
There are still a lot of people around who can use some help with there computer, having them do what they want.

well keep up the good work and enjoy live.
kind regards Rikus.


Op vrijdag 23 februari 2018 14:16:13 UTC+1 schreef Guy1954:
Hi Xbliters, Hi Alan!

Guy1954

unread,
Feb 26, 2018, 12:07:20 PM2/26/18
to xblite
Hi Rikus.

I'm a long time programmer, but I still get my kick when I produce a piece of code, which "improve" my personal work station. And XBLite is great at that.

Even though I programmed in FORTRAN, ALGOL_W, Pascal, TurboPascal, COBOL, PL/I, RPG, C, Visual Basic 6 and VBA, Java, I still issue my new year card as an XBLite application just for the fun of it.

And the fun is real! So real that my elder Son (who is a grown man) offered me several computer books to experiment with building sophisticated e-card, hopefully upgrading my production to real game! That's, my friend, is what I call a real fan! And it feels good, coming from his very Son!

So keep up with XBLite: your reward will come back to you when you least expect it.

Bye! Guy

PS. I'm currently fascinated by the Raspberry PI; why not porting XBasic, or a dedicated XBLite?

Guy1954

unread,
Mar 1, 2018, 5:48:57 PM3/1/18
to xblite

Hi Xbliters.

A comment in xblite.x says:
"The logic of the compiler is to assure that the standard run-time is always linked, even if not IMPORTed. All programs require it anyway, so it might as well be linked automatically. If the dynamic dll (xst or xbl.dll) is not specified, it will default to a static one, under the assumption that this is what most programmers would want."

Comforted by Rikus' suggestion, I decided to "revert" this very logic.

I decided:
1.To find a way to collect the assembly routines in a single file, which I called asm_routines.xxx;

2.To establish a list of actually called routines;

3.To extract each called routine’s body from asm_routines.xxx.


I started with .\xblib\: I generated exactly 148 GRAB statements and I got my first asm_routines.xxx


When I wanted to move to .\xbdll\lib\, I balked from re-doing it all over.


So, I enhanced the GRAB keyword to accept and process file filters in addition to processing file paths. Then, I got my second “single file” with GRAB "*.asm".


I could append the many [CODE, END CODE] generated by the GRAB "*.asm" to asm_routines.xxx, which I placed in .\xblite\templates\.


When xblite.x will properly generate ASCII assembly programs, I will duplicate this technique for UTF-16 LE.


Quietly sailing the XBLite clipper from the ASCII sea to the Unicode ocean!


Bye! Captain Guy

xblite.x

Guy1954

unread,
Mar 2, 2018, 10:08:32 PM3/2/18
to xblite
Hi Xbliters!

Please find in the XBLite Forum xblite_2_41_16_03mar18_src.zip, which contains:
- read_me.txt
- BuildXbiteExe_bat.txt
- makexblite.mak
- xblite.x
- xblite_03mar18.x (same as this xblite.x)
- xst.dec
- asm_routines.xxx
- xapp.xxx
- xdll.xxx

I already started to search and destroy any regression by compiling and testing the rich set of demos that comes with the XBLite compiler.

Stay tuned!

Bye! Guy

Guy1954

unread,
Mar 3, 2018, 8:37:04 AM3/3/18
to xblite

Hi Xbliters.

I am only one person, and I feel that I can't go through the enormous mass of demo programs in .\xblite\demo\.

I would really appreciate if some of you could bear this load with me.

Could you please offer your time and energy by taking one, two and even more torture tests?

The more, the merriest!

Bye! Guy

PS. Attached is a for instance of what I expect from you, dear Xbliters:
1. demo.x
2. demo.asm (generated by xblite v1.42.16)
3. demo.mak (generated by xblite v1.42.16)
4. compile.png
5. link.png
6. run.png
4, 5 and 6 are screenshots of XSED.

The 6 files are zipped into demo_you_yyyy_mm_dd.zip, here "asmvariable_guy_2018_03_03.zip".

asmvariable_guy_2018_03_03.zip

Guy1954

unread,
Mar 3, 2018, 1:16:56 PM3/3/18
to xblite
Hi Xbliters.

No candidates? Really?

Bye! Guy

Guy1954

unread,
Mar 3, 2018, 4:33:13 PM3/3/18
to xblite
Hi Xbliters.

Good news: xblite v1.41.16 compiles and links vxbl.x.
Bad news: vxbl.exe does not perform exactly the same as the previous vxbl.exe.

If you download this experimental version of xblite.x from the XBLite Forum, expect some glitches and don't rely on this release.

As vxbl.x is too big to spot the problems, the demo set is definitely the way to go, and I'm going to do so myself.

Again, I would appreciate any contribution.

Side note for xblite.x
================
XBLite is a self-compiler, which means that xblite.exe is obtained from xblite.x, compiled with the previous release of xblite.exe.

xblite.x is also cleanly compiled and linked; however, I work only with the first compiled xblite.exe, as I can't be sure that a further self-compilation would be stable. The problem is that the generated assembly source is now different from the past. Too bad, as a text comparison of the generated outputs would prove the absence of regressions.

Bye! Guy

Guy1954

unread,
Mar 3, 2018, 6:13:13 PM3/3/18
to xblite
Hi Xbliters.

I tested the new xblite.exe and, (unlucky me!), the only one that seems to have trouble is vxbl.x!
Not even xblite.x.

It's really good news: I did not expect to get it almost right on first try.

Well, I'm going to try the assembly routine injection trick on the Unicode version of xblite.x.

Hey! Finally I'm on the fast track!

Bye! Guy

Guy1954

unread,
Mar 4, 2018, 6:06:49 AM3/4/18
to xblite
Hi Xbliters.

OK! I'm down from my cloud: injected CHR causes a crash. Well, that was expected.
Still testing...

Bye! Guy

watchman

unread,
Mar 6, 2018, 2:26:54 AM3/6/18
to xbl...@googlegroups.com
Hi Guy.
Sorry bud. Been so busy only got to my mails now. I cannot seem to find
the src file you mentioned at the forum?

Regards

David
> --
> You received this message because you are subscribed to the Google
> Groups "xblite" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to xblite+un...@googlegroups.com.
> To post to this group, send email to xbl...@googlegroups.com.
> Visit this group at https://groups.google.com/group/xblite.
> For more options, visit https://groups.google.com/d/optout.


Guy1954

unread,
Mar 10, 2018, 12:15:24 PM3/10/18
to xblite
Hi David.

Good to hear from you.

In order to download something from the XBLite Forum, you have to:
1. Log in as a Member;
2. Select the right topic (Working Code Snippets, ...)

Regarding the XBLite compiler, the topic is: "XBLite Compiler"! (How appropriate!); the sub-topic is: "xblite.exe revision 2.41.16".

The compiler's source is zipped into xblite_2_41_16_26jan18_src.zip, which can be downloaded from a message on page 2, dated 26 January 2018, with a suggested installation procedure;
the text of this message can also be found in zipped file read_me.txt, so LOG OFF as soon you you completed your download, and GET BACK TO KEYBOARD!................................Sorry! Just pulling your leg ;-).

As a side note, notice that the E-Blah Forum Software renames "xblite_2_41_16_26jan18_src.zip": "xblite_2_41_16_26jan18_src_1521.zip", which I don't mind at all if that's what is good for it ;-).

However, I removed my experimental compiler from the XBLite Forum, because it is really disturbing and disrupting even for myself, and I do it for several years now. I thought I was closing, but every time I solve a technical problem, every time new problems rise from the dead ones.

Boy! When I succeed, I will invent a new victory danse, and I'll danse it ALL NIGHT!
In the mean time, happy Xblitting!

Bye! Guy

gentsky

unread,
Mar 10, 2018, 12:21:50 PM3/10/18
to xblite
Hi Guy,

Sorry for the delay in replying but I don't do much with Xblite these days.

I am not sure I really understand what you are proposing with xmal but there are a number of problems with embedding it in xblite.x.

1. The only support for LONGDOUBLE in the compiler is for simple maths like + - * / etc. The xmal library does not support simple maths but concentrates on the complex / transcendental functions.

2. If you want to use SINGLE or DOUBLE input then there is an overhead to cast them to LONGDOUBLE and also, because longdouble occupies 3 DWORDS on the stack there is a limit of only 5 parameters

3. Equally, results would have to be cast back to single / double with possible overflow and crashes.

4. Xmal has an inbuilt TRACE facility which might cause problems

5. It also has a special exception handler which replaces the standard Xblite one

6. Xmal has never been used in anger by many users and so is certainly not bug free.

7. If embedded into xblite it would be far more difficult to maintain and fix in future. Under these circumstances I would no longer support it. 

8. Xmal can operate in a number of different modes which alter the FPU settings from the standard Xblite environment

9. Xmal contains a significant number of functions to control the way it behaves which are integral to the way it works



There are probably many more reasons why this does not seem a good idea - but I hope you get the gist!

I think this is a classic case for the use of a dll where it stays out of the way from a tight core implementation and it is only imported and used on the rare occasions when it is really needed.

Please do not embed it!

Cheers,

Alan

Guy1954

unread,
Mar 10, 2018, 12:41:02 PM3/10/18
to xblite
Hi Alan.

Thanks for your answer.

I proposed to enhance XBLite's LONGDOUBLE support because I was under the impression that you contributed with your xmal.dll library right after David Szafranski added support to LONGDOUBLE.

I just suggested to pick up where D. left off, and add the new operators, which are handled by the math co-processor.
Nothing too exotic, just a crude binding.

Now, is it worth to add? I don't know. But I guess that an Xbliter like Liviu Armeanu would have love it. (Right, Liviu?)

Bye! Guy

Chad Wilson

unread,
Mar 10, 2018, 12:46:58 PM3/10/18
to xblite
We need SUPERLONGDOUBLE, ULTRALONGDOUBLE, and HYPERLONGDOUBLE options next.  :)

-Chad

Guy1954

unread,
Mar 10, 2018, 3:37:33 PM3/10/18
to xblite
Hi Chad!

What for? To write a super-ultrer-hyper role-game? I'm all for it ;-)

Bye! Guy

Chad Wilson

unread,
Mar 10, 2018, 4:11:57 PM3/10/18
to xblite
You never know when someone is trying to simulate the beginning of the universe and need really, really, big precision.  :)

Guy1954

unread,
Mar 11, 2018, 3:07:46 PM3/11/18
to xblite
Big Bang 2.0? Cool!
Reply all
Reply to author
Forward
0 new messages