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 1 Guests

xblite.exe revision 2.41.16   This thread currently has 1,951 views. Print Print Thread
2 Pages 1 2 » All Recommend Thread
Guy1954
September 16, 2015, 12:22am Report to Moderator Report to Moderator

Medium Member
Posts: 162
Hi Xbliters,

As you know, I would like to release a pre-Unicode revision of the XBLite compiler.

Please find attached xblite_2_41_16.zip.

Installation:
- Make a backup copy of all files of folder C:\xblite\bin\ to C:\xblite\bin\bak\
- Create a folder xblite_2_41_16
- Unzip xblite_2_41_16.zip into the new folder
(Extracts xblite.x and the other files)
- Rename CompileXbite.txt CompileXbite.bat
- Use CompileXbite.bat to recompile
- Copy xblite.exe into C:\xblite\bin\

New features:
- CHAR type: in ASCII mode, CHAR <=> UBYTE, CHAR() <=> UBYTE(), CHARAT <=> UBYTEAT().
- (CODE, END CODE) for GoAsm code injection.
- GRAB statement: sort of COBOL's COPY REPLACING ==text1== BY ==text2==:

Usage of GRAB:
In WinX.x, I replaced m4_include(`accessors.m4') by GRAB "accessors\\*.x"

1.GRAB ".\\accessors\\declare.x"        ' "$1" := "BINDING"
2.GRAB ".\\accessors\\declare02.x"
' "$1" := "BINDING"
' OMIT FUNCTIONs "_ActiveId", "_Get_idMin"

The 1st GRAB imports file .\\accessors\\declare.x replacing all $1 by BINDING.
The 2nd GRAB imports file .\\accessors\\declare02.x replacing all $1 by BINDING, but not only:
it remvoves the FUNCTIONs BINDING_ActiveId and BINDING_Get_idMin, which are not needed.

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

Bye! Guy.



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

Logged Offline
Site Site Private Message Private message
Guy1954
May 2, 2016, 11:48am Report to Moderator Report to Moderator

Medium Member
Posts: 162
Dear Xbliters,

The compiler xblite version 2.41 revision 16 must be installed
in order to compile revision 17, which handles Unicode.


However, revision 16 offers new possibilities for GoAsm code
injection; as a for instance, here is how I emulated (for fun) the
standard function XstCopyMemory (sourceAddr, &dest$, bytes) in
xblite.x revision 17 (compilable with revision 16):

               ' r17-XstCopyMemory (sourceAddr, &dest$, bytes)

'#################################################################
' r17-assume a 32 bit processor
CODE
     mov     ecx,[EmitString.bytes]      ; byte count
     jecxz > .is_zero32_end              ; LEN(source$) == 0

     mov     esi,[EmitString.sourceAddr] ; source string
     mov     edi,[EmitString.dest$]      ; destination string

     shr     ecx,2
     jecxz > .is_zero32_01     ; LEN(source$) <= 3
     cld
     rep movsd                    ; 32-word shuffle

.is_zero32_01
     mov     ecx,[EmitString.bytes]
     and     ecx,3
     jecxz > .is_zero32_end
     cld
     rep movsb                    ; the very last bytes

.is_zero32_end
END CODE
'#################################################################

I believe that Coders such as bushpilot and gentski will
appreciate the convenience of this CODE statement, drawn
from my needs as an assembler Noob.

The GRAB statement was also great help in xsx.x in order to
generate "typed" quick sort routines from a single "grabbed"
snippet.

However, I would appreciate if you put it to the test as I can't
cover all the regressions, in spite of my heavy duty testing.

Happy xbliting!
Bye! Guy



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

Logged Offline
Site Site Private Message Private message Reply: 1 - 24
Guy1954
August 13, 2016, 2:08am Report to Moderator Report to Moderator

Medium Member
Posts: 162
Hi Xbliters,

I corrected a (rare) bug in the handling of GRABbed file paths.
Please, download the attached version of xblite.x, with the proper xst.dec that contains additional constants, such as $$ASCII, $$UTF16_LE...

Bye! Guy



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

Logged Offline
Site Site Private Message Private message Reply: 2 - 24
Guy1954
April 22, 2017, 6:15pm Report to Moderator Report to Moderator

Medium Member
Posts: 162
Hi Xbliters.

Please find attached the latest revision 16 in xblite_rev16.zip, mainly:
- xblite\xblite.x
- xbdll\xst.x
- xsx\xsx.x
- read_file\read_file.x

You have everything to rebuild the compiler; just rename "_bat.txt" to ".bat" and run the 3 .BAT:
- xblite\BuildXbiteExe_bat.txt for xblite.x
- xbdll\BuildXstDll_bat.txt for xst.x
- xsx\BuildXsxDll_bat.txt for xsx.x.

New are Explicit Integers to described 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)

read_file.x is a test program to test:
- INT32LE (to map to SLONG)
- UINT32LE (to map to ULONG)
actually, you can test with:
INT8 count          ' r16-SBYTE
INT16LE count          ' r16-SSHORT
UINT16LE count          ' r16-USHORT
INT32LE count          ' r16-SLONG, not XLONG
UINT32LE count          ' r16-ULONG
INT64LE count          ' r16-GIANT

I known of a David that would appreciate...

Bye, Guy



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

Logged Offline
Site Site Private Message Private message Reply: 3 - 24
gentsky
May 17, 2017, 2:11pm Report to Moderator Report to Moderator
Baby Member
Posts: 4
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 Reply: 4 - 24
Guy1954
May 17, 2017, 11:21pm Report to Moderator Report to Moderator

Medium Member
Posts: 162
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: 5 - 24
Guy1954
May 18, 2017, 1:16am Report to Moderator Report to Moderator

Medium Member
Posts: 162
May 17, 2017

Hi Xbliters!

Please find attached xblite_v2_41_16.zip, which contains all the modified sources of Xblite 2.41 Revision 16:
- xblite.x
- the new xst.h (just in case)
- the custom makexblite.mak
- BuildXbiteExe_bat.txt (to rename BuildXbiteExe.bat)
- a backup directory .\bak\

As a matter of safety, BuildXbiteExe.bat will backup your c:\xblite files in directory .\old\, which is created "on the fly".

Bye!
Guy



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

Logged Offline
Site Site Private Message Private message Reply: 6 - 24
Guy1954
May 18, 2017, 1:25am Report to Moderator Report to Moderator

Medium Member
Posts: 162
May 17, 2017

Hi Xbliters!

Please find attached xbdll_v2_41_16.zip, which contains all the modified sources of Xst.dll Revision 71:
- xst.x
- the new xst.h
- the updated xbl.def (with the new functions)
- the custom makexbdll.mak
- BuildXstDll_bat.txt (to rename BuildXstDll.bat)
- a backup directory .\bak\

As a matter of safety, BuildXstDll.bat will backup your c:\xblite files in directory .\old\, which is created "on the fly".

You'll find also a demo GetFileBOM.x, which uses XstGetFileBOM() to decode the Byte Order Mark of a text file.
It is in directory .\xbdll\GetFileBOM\
- GetFileBOM.x
- GetFileBOM.manifest
- GetFileBOM.rc
- GetFileBOM_gen.vxn (the viXen project)

In directory .\xbdll\GetFileBOM\test_files\
- ascii.txt
- UTF8_BOM.txt
- UTF16BigEnd_BOM.txt
- UTF16LE_BOM.txt

Bye!
Guy



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

Logged Offline
Site Site Private Message Private message Reply: 7 - 24
Guy1954
May 18, 2017, 1:30am Report to Moderator Report to Moderator

Medium Member
Posts: 162
May 17, 2017

Hi Xbliters!

Please find attached xsx_v2_41_16.zip, which contains all the modified sources of Xsx.dll Revision 23:
- the new xst.h
- xsx.x
- the custom makexsx.mak
- BuildXsxDll_bat.txt (to rename BuildXsxDll.bat)
- a backup directory .\bak\

As a matter of safety, BuildXsxDll.bat will backup your c:\xblite files in directory .\old\, which is created "on the fly".

Bye!
Guy



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

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

Medium Member
Posts: 162
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: 9 - 24
Guy1954
May 18, 2017, 1:43am Report to Moderator Report to Moderator

Medium Member
Posts: 162
May 17, 2017

Hi Xbliters!

Please find attached xsed_v2_41_16.zip, which contains the modified source xsed.x of xsed.exe Revision 1.33.
- xsed.x
- the custom makexsed.mak
- CompileXsed_bat.txt (to rename CompileXsed.bat)
- a GRAB directory .\xsed\wapi\
- ...

As a matter of safety, CompileXsed.bat will backup your c:\xsed files in directory .\bak\.

Bye!
Guy



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

Logged Offline
Site Site Private Message Private message Reply: 10 - 24
Guy1954
May 18, 2017, 1:48am Report to Moderator Report to Moderator

Medium Member
Posts: 162
May 17, 2017

Hi Xbliters!

Please find attached XstLog_XstLogGMT.zip, which contains the modified source xsed.x of xsed.exe Revision 1.33.
- The XstLog function.doc
- The XstLogGMT function.doc

Time in log file are by default local time. I added the XstLogGMT function in Xst.x in order to use GMT time.

Please find attached XstLog_XstLogGMT.zip: description of XstLog and XstLogGMT in the style of Xblite manual in attached XstLog_XstLogGMT.zip.

They are .doc, described by MS Word as "Document Word 97-2003".

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 - 24
gentsky
May 19, 2017, 7:36pm Report to Moderator Report to Moderator
Baby Member
Posts: 4
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: 12 - 24
gentsky
May 28, 2017, 9:06am Report to Moderator Report to Moderator
Baby Member
Posts: 4
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: 13 - 24
Guy1954
May 29, 2017, 4:51pm Report to Moderator Report to Moderator

Medium Member
Posts: 162
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: 14 - 24
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