Welcome, Guest.
Please login or register.
xblite.exe revision 2.41.16
Forum Login
Login Name: Create a new account
Password:     Forgot password

XBLite Forum    General Boards    XBLite Compiler  ›  xblite.exe revision 2.41.16
Users Browsing Forum
No Members and 2 Guests

xblite.exe revision 2.41.16   This thread currently has 3,758 views. Print Print Thread
2 Pages 1 2 All Recommend Thread
gentsky
May 17, 2017, 2:11pm Report to Moderator Report to Moderator
Baby Member
Posts: 5
Hi Guy,

Thanks for all you efforts on the new compiler version - I can see you have been very busy!!
I have only recently come back to Xblite after a long absence and am catching up on things. I have looked through xblite.x to see what you have been changing and note that you are doing a lot of tidying up besides your new CODE, GRAB and  STRIP facilities. One such change involves replacing the standard 3 instruction function entry with ENTER. I wonder if you realize just how very slow this is. I am attaching a small test program which compares the speed of various function entry / exit methods. You will see that ENTER slows things down dramatically.

There is an existing problem with xblite.x which causes the function entry to generate 4 excess pushes when initializing the local variables area. This is nothing to do with your changes but dates back to 2007 when the stack frame was modified to include an unwind space of 16 bytes. Various changes were made as a result of this but one seems to have been missed in the initialization routine. It is a minor correction and I am currently testing the fix on a modified xblite.x . I will post a separate entry / test file for this soon.

Best Wishes,

Alan

P.S. For some reason, my file enter.x has been renamed enter_1653.x when I attached it!



This post contains attachments; to download them you must login.

Logged Offline
Private Message Private message
Guy1954
May 17, 2017, 11:21pm Report to Moderator Report to Moderator

Medium Member
Posts: 187
Hi Alan,

Thank you so much for your time reviewing my changes: I have a tendency to go one step too many, so I appreciate that you had taken the time to pinpoint my oversight.

I implemented the 'enter' opcode because I exceeded a size limit compiling my program vxbl.x. I found this way to cut the generated GoAsm source down in a safe manner. And I figured:
"If Intel knows of this problem since back to the '80s, they might have speed up their microcode in three decades".

So, since I'm using the compile flag "-rc" to reduce the size of the source.asm file, I can generate 'enter' opcodes when size counts, and the 3 opcode sequence otherwise.

How do you feel about that?
Probably, I'd better forget about the 'enter' opcode altogether, shouldn't I?

In the mean time, I take in account your comment: I'm reverting back this 'enter' addition and I post here a corrected version ASAP.

Bye!
Guy
Logged Offline
Site Site Private Message Private message Reply: 1 - 18
Guy1954
May 18, 2017, 1:35am Report to Moderator Report to Moderator

Medium Member
Posts: 187
May 17, 2017

Hi Xbliters!

Please find attached xblib_v2_41_16.zip, which contains all the modified sources of XFORMAT.dll Revision 3:
- XFORMAT.x
- the custom makexformat.mak
- BuildXformatLib_bat.txt (to rename BuildXformatLib.bat)

Bye!
Guy



This post contains attachments; to download them you must login.

Logged Offline
Site Site Private Message Private message Reply: 2 - 18
gentsky
May 19, 2017, 7:36pm Report to Moderator Report to Moderator
Baby Member
Posts: 5
Hi Guy,

Thanks for you response. I think reverting to the 3 instruction prologue instead of ENTER is the best idea.

If you are having space problems with GoAsm I have a couple of suggestions:

1. The version of GoAsm in the current Xblite distribution is very out of date. You could try downloading the latest version from the GoDevTools site and see if it can cope with larger files.

2. If not, could you split your 1 large file into 2 or more smaller ones. Try splitting off a lot of the smaller support functions into a separate .lib or .dll

Cheers,

Alan
Logged Offline
Private Message Private message Reply: 3 - 18
gentsky
May 28, 2017, 9:06am Report to Moderator Report to Moderator
Baby Member
Posts: 5
Hi Guy,

Attached is a small test program regarding the minor problem where 4 too many zeros are pushed on to the stack when initializing locals in a function. This problem is totally harmless and extremely easy to fix merely requiring -24 to be changed to -40 at the point where the number of dwords is calculated. More explanation is given in the comments within locals_8799.x

I did try posting this some days ago but it just disappeared! Hopefully we'll have better luck this time.

Cheers,

Alan



This post contains attachments; to download them you must login.

Logged Offline
Private Message Private message Reply: 4 - 18
Guy1954
May 29, 2017, 4:51pm Report to Moderator Report to Moderator

Medium Member
Posts: 187
Hi Alan.

Please find attached a corrected version of xblite.x.
Could you please check if I got your fix right?
Kindly drop me a note to confirm or contest.

Bye! Guy

PS.
I added the following header comments:
Line 370
' - gentsky discovered a minor problem where 4 too many zeros are pushed on to the stack
'   when initializing locals in a function.
'   This problem is totally harmless and extremely easy to fix merely requiring -24 to be
'   changed to -40 at the point where the number of dwords is calculated.
' r16-new~~~

And the following code:
Line 6106
' gentsky-28may17-fix:
' The number of DWORDS was and still is calculated as:          count     = ((-24 - zeroz) >>> 2) + 1
' It should now be changed to:                                  count     = ((-40 - zeroz) >>> 2) + 1
' I have made this change in my current xblite and all cases below now push the correct number of zeros
' This problem is completely benign but wastes clock cycles and slows down any function with 1 or more locals
' gentsky---
'          count     = ((-24 - zeroz) >>> 2) + 1                                                            ' with nothing at ebp-20
          count     = ((-40 - zeroz) >>> 2) + 1                                                            ' with nothing at ebp-20
' gentsky~~~



This post contains attachments; to download them you must login.

Logged Offline
Site Site Private Message Private message Reply: 5 - 18
gentsky
May 29, 2017, 9:19pm Report to Moderator Report to Moderator
Baby Member
Posts: 5
Hi Guy,

Xblite_1209.x looks OK to me.

You might want to tidy up the comments:
The original comment "with nothing at ebp - 20" should be changed to "with nothing at ebp - 36" on the NEW line only

Cheers,

Alan
Logged Offline
Private Message Private message Reply: 6 - 18
Guy1954
May 30, 2017, 7:22pm Report to Moderator Report to Moderator

Medium Member
Posts: 187
Hi Alan.

Done and uploaded!

Bye! Guy
Logged Offline
Site Site Private Message Private message Reply: 7 - 18
Guy1954
June 26, 2017, 3:58am Report to Moderator Report to Moderator

Medium Member
Posts: 187
The new and improved XFORMAT.x

Please find attached: xformat_3_26jun17_src.zip (revision 3 - 26 June 2017), which contains:
1.XFORMAT.x
2.makexformat.mak
3.BuildXformatDll_bat.txt (to be renamed BuildXformatDll.bat)

(xblite 2.41.16 4 of 5)



This post contains attachments; to download them you must login.

Logged Offline
Site Site Private Message Private message Reply: 8 - 18
Guy1954
June 27, 2017, 8:16pm Report to Moderator Report to Moderator

Medium Member
Posts: 187
The new and improved Xblite compiler xsx.x

Please find attached: xsx_23_26jun17_src.zip (revision 23 - 27 June 2017), which contains:
1.xsx.x
2.xst.dec (for the new intrinsic types)
3.makexsx.mak
4.BuildXsxDll_bat.txt (to be renamed BuildXsxDll.bat)

(xblite 2.41.16 2 of 5)



This post contains attachments; to download them you must login.

Logged Offline
Site Site Private Message Private message Reply: 9 - 18
gentsky
June 27, 2017, 9:20pm Report to Moderator Report to Moderator
Baby Member
Posts: 5
Hi Guy,

I am building a new dll which contains a lot of assembly language so decided to use your release 16 and take advantage of your CODE, END CODE facility. It is very useful and is working well but I did spot a few minor anomalies when setting up sections. They are not serious but I have created a small test script to demonstrate them and have attached it here for your consideration.

Regards,

Alan




This post contains attachments; to download them you must login.

Logged Offline
Private Message Private message Reply: 10 - 18
Guy1954
September 12, 2017, 10:51pm Report to Moderator Report to Moderator

Medium Member
Posts: 187
September 13, 2017

Hi Xbliters!

Please find attached xsx_23_11sep17_src.zip, which contains the modified source xsx.x Revision 23.
- makexsx.mak
- BuildXsxDll_bat.txt (to be renamed BuildXsxDll.bat)
- xsx.x with the new XstLog function.doc
- The XstLogGMT function.doc, described by MS Word as "Document Word 97-2003"

Time in log file are by default local time. I added the style = 2 in order to use GMT time.

Could it please, be merged to the Xblite manual: xblite_manual.chm?

Bye!
Guy



This post contains attachments; to download them you must login.

Logged Offline
Site Site Private Message Private message Reply: 11 - 18
Guy1954
September 12, 2017, 11:09pm Report to Moderator Report to Moderator

Medium Member
Posts: 187
September 13, 2017

Hi Xbliters!

The new and improved Xblite standard library xst.x

Please find attached: xst_71_13sep17_src.zip (revision 71 - 18 August 2017), which contains:
1.xst.x
2.xst.dec (for the new intrinsic types)
3.makexst.mak
4.BuildXstDll_bat.txt (to be renamed BuildXstDll.bat)

(xblite 2.41.16 3 of 5)



This post contains attachments; to download them you must login.

Logged Offline
Site Site Private Message Private message Reply: 12 - 18
Guy1954
September 12, 2017, 11:18pm Report to Moderator Report to Moderator

Medium Member
Posts: 187
September 13, 2017

Hi David!

Please find attached xblite_manual_new_statements_doc_2017_09_13.zip,
which contains the modifications to the HTML Xblite manual
described by MS Word as "Document Word 97-2003":
- xblite_code_statement.doc
- xblite_grab_statement.doc
- xblite_strip_directive.doc
- xblite_xstlog_function.doc

Could it please, be merged to the Xblite manual: xblite_manual.chm?

Bye!
Guy



This post contains attachments; to download them you must login.

Logged Offline
Site Site Private Message Private message Reply: 13 - 18
Guy1954
October 29, 2017, 12:05pm Report to Moderator Report to Moderator

Medium Member
Posts: 187
29 October 2017

Hi Xbliters!

My new and improved personal Grab Bag.

Please find attached: grab_bag_29oct17_src.zip (29 October 2017), which contains:
1.accessors and stringaccessors(from Callum Lowcay)
2.QuickSort (to rebuild xsx.x)
3.Wapi (Windows APIs for GUI apps)
4.XGrid (an Xblite wrapper for the grid custom control)

This is my personal touch  

(xblite 2.41.16 5 of 5 - the end!)



This post contains attachments; to download them you must login.

Logged Offline
Site Site Private Message Private message Reply: 14 - 18
Guy1954
October 29, 2017, 12:10pm Report to Moderator Report to Moderator

Medium Member
Posts: 187
29 October 2017

Hi Xbliters!

Please find attached xsed_16oct17.zip, which contains the modified source xsed.x of xsed.exe,
as of 29 October 2017 Revision 1.33.

You can recompile xsed.x using your current XSED.exe, but you can't run it from within a running XSED.exe.
1. Load xsed.c in your current XSED editor;
2. F9 (compile), F10 (link);
3. You have to quit your running XSED.exe;
4. Copy (manually) 'xsed.exe' to your system folder: C:\xblite\bin\;
5. Re-load xsed.x in your new XSED.exe;
6. Select menu option Help/About XSED;
   the About Box should read: Version 1.33 and David Szafranski (c) 2005-2017.

Easier is to use CompileXsed_bat.txt, which you have to rename "CompileXsed.bat" first.

Running CompileXsed.bat:
1. Compiles xsed.x and produces compile.txt;
2. Copies 'xsed.exe' to your system folder: C:\xblite\bin\.

I tested and re-tested these 2 procedures, and it works fine for me.
Please, let me know if you experience difficulties.

Bye!
Guy



This post contains attachments; to download them you must login.

Logged Offline
Site Site Private Message Private message Reply: 15 - 18
Guy1954
October 29, 2017, 12:36pm Report to Moderator Report to Moderator

Medium Member
Posts: 187
Quoted from gentsky
Hi Guy,

I am building a new dll which contains a lot of assembly language so decided to use your release 16 and take advantage of your CODE, END CODE facility. It is very useful and is working well but I did spot a few minor anomalies when setting up sections. They are not serious but I have created a small test script to demonstrate them and have attached it here for your consideration.

Regards,

Alan



Hi Alan,

Sorry for getting back to you so late, but I'm not very comfortable with this forum as it is a new way for me to communicate.

I reviewed your example, and I confirm the following mishandling:
CODE                    'gives SYNTAX ERROR
     CODE SECTION          ' GL-Syntax Error(12)
mov eax, 1
END CODE

The reason is that "CODE SECTION" is not properly assembled by xblite.exe.

I have to add proper parsing in order to inject it in the generated assembly.

I have an open list of such issues, but I'm not in a hurry to address them since I'm by far an assembly specialist.

One of the issues that bothered me is GoAsm's "unnamed" labels, so practical to avoid a runaway list of ad-hoc labels.

However, I'm willing to spend some time in correcting the GoAsm parser if you provide with a good guideline for the assemby newbe that I am.

Bye! Guy
Logged Offline
Site Site Private Message Private message Reply: 16 - 18
Guy1954
October 29, 2017, 12:42pm Report to Moderator Report to Moderator

Medium Member
Posts: 187
29 October 2017

Hi Xbliters!

The new and improved Xblite standard library xst.x

Please find attached: xst_71_29oct17_src.zip (revision 71 - 18 August 2017), which contains:
1.xst.x
2.xst.dec (for the new intrinsic types)
3.makexst.mak
4.BuildXstDll_bat.txt (to be renamed BuildXstDll.bat)
5.\lib\*.asm (GoAsm support library)
6.\lib\BuildObjs_bat.txt (to be renamed BuildObjs.bat)
'
' r71-new+++
  $$ASCII               = 19          ' Ansi WinAPIs
  $$UTF8                = 20          ' UTF 8 bit encoding
  $$UTF16LE             = 21          ' Little Endian 16-bit encoding (Windows)
  $$WIDE                = 21          ' Unicode WinAPIs
  $$UTF16BE             = 22          ' Big Endian 16-bit encoding (Internet)
  $$UTF32LE             = 23          ' 32-bit Intel machines
  $$UTF32BE             = 24          ' Big Endian 32-bit encoding (Motorola, ...)
  $$UNICODE             = 25          ' True Unicode string type
' r71-new~~~
'
' r71-new+++
' r71-new+++
' Explicit Integers (imported data record)
'
$$INT8                =  2          ' == $$SBYTE : 8-bit integer
$$UINT8               =  3          ' == $$UBYTE : unsigned 8-bit integer
$$INT16LE             =  4          ' == $$SSHORT: Little Endian 16-bit integer (Windows)
$$UINT16LE            =  5          ' == $$USHORT: Little Endian unsigned 16-bit integer (Windows)
$$INT32LE             =  6          ' == $$SLONG : Little Endian 32-bit integer (Windows)
$$UINT32LE            =  7          ' == $$ULONG : Little Endian unsigned 32-bit integer (Windows)
$$INT64LE             = 12          ' == $$GIANT : Little Endian 64-bit integer (Windows)
' r71-new~~~
'
' r71-new+++
' Byte Order Marks (borrowed from Alan Gents' unc.x)
'
'
     $$BOM8$          = "\xEF\xBB\xBF"         ' UTF-8
     $$BOM16$         = "\xFF\xFE"             ' Normal   16 bit BOM - LE machine stores as FFFE - BE machine stores as FEFF
     $$INVERSE_BOM16$ = "\xFE\xFF"             ' Inverted 16 bit BOM - used to emulate BE output on LE machine
     $$BOM32$         = "\xFF\xFE\x00\x00"     ' Normal   32 bit BOM - LE machine stores as FFFE0000 - BE machine stores as 0000FEFF
     $$INVERSE_BOM32$ = "\x00\x00\xFE\xFF"     ' Inverted 32 bit BOM - used to emulate BE output on LE machine
' r71-new~~~
'
Enjoy!
Bye! Guy

(xblite 2.41.16 3 of 5)



This post contains attachments; to download them you must login.

Logged Offline
Site Site Private Message Private message Reply: 17 - 18
Guy1954
November 10, 2017, 4:47am Report to Moderator Report to Moderator

Medium Member
Posts: 187
10 November 2017

Hi Xbliters!

Please find attached xblite_2_41_16_10nov17_src.zip, which contains:
- BuildXbiteExe_bat.txt
- makexblite.mak
- read_me.txt
- xblite.x
- xblite_original.x
- xst.dec


Installation
============
1. Make a backup copy of all files of folder C:\xblite\bin\ to C:\xblite\bin\bak\
2. Create a folder /xblite_2_41_16/
3. Unzip xblite_2_41_16_10nov17_src.zip into the new folder /xblite_2_41_16/
   (Extracts xblite.x and the other files)
4. Rename CompileXbite.txt CompileXbite.bat
5. Use CompileXbite.bat to recompile
6. Copy xblite.exe into C:\xblite\bin\


New features
============
1. New size-dependant integer types:
   -  INT8 <=> SBYTE,  INT16LE <=> SSHORT,  INT32LE <=> SLONG, INT64LE <=> GIANT
   - UINT8 <=> UBYTE, UINT16LE <=> USHORT, UINT32LE <=> ULONG

2. New default character type: CHAR (similar to STRING)
   - CHAR <=> UBYTE, CHAR() <=> UBYTE(), CHARAT <=> UBYTEAT().
   - CHAR <=> UINT8, CHAR() <=> UINT8(), CHARAT <=> UINT8AT().

3. Assembly code injection: CODE and END CODE
   - (CODE, END CODE) for GoAsm code injection.

4. Improved IMPORT: GRAB
   - GRAB statement: sort of COBOL's COPY REPLACING ==text1== BY ==text2==:

I believe this will promote code reuse, and a snippet production.

Bye! Guy


(xblite 2.41.16 1 of 5)



This post contains attachments; to download them you must login.

Logged Offline
Site Site Private Message Private message Reply: 18 - 18
2 Pages 1 2 All Recommend Thread
Print Print Thread

XBLite Forum    General Boards    XBLite Compiler  ›  xblite.exe revision 2.41.16

Thread Rating
There is currently no rating for this thread