General Category > Third-Party Add-Ons

TFile2ASM - Makes your data into PB-Code


Theo Gottwald:
Many will know Hutch popular PB-Tools from

Hutch's Site
one of them is his "File2ASM".

Its worth a look!

I used it quite often, but had the need for something that would work without an surface and had no Limitation on 1.5 MB.
So I made my own, based on his.

I have added Hutchs "File to ASM Tool" as an alternative.

It will look in its EXE.PATH$ for a INI-File like this:


--- Code: ---[CustomData]
Input-Filename=Neu Textdatei.txt
--- End code ---

and then just generate the code using Hutch's original idea - with a minor improvement (One JMP less then in Hutch's code!  ;D).

If i take the same RAW-Data, here is what both programms generate:

Here is the Output from TFile2ASM:

--- Code: --- FUNCTION b2b_() AS STRING


   S01 = SPACE$(54)
   T01 = CODEPTR(L43543_9686)

   ! cld
   ! mov ecx,54
   ! mov esi, T01
   ! mov edi, S01
   ! rep movsb



  ! db 49,50,51,52,53,54,55,56,57,49,50,51,52,53,54,55,56,57,49,50,51,52,53,54,55,56,57,49,50,51,52,53,54
  ! db 55,56,57,49,50,51,52,53,54,55,56,57,49,50,51,52,53,54,55,56,57

--- End code ---

Code from Hutch's File2ASM

--- Code: ---FUNCTION Read_BC0A9E5() as STRING

  ' ~\Neu Textdatei.txt 54 bytes(decimal)

  ! jmp end_BC0A9E5

  ! db 49,50,51,52,53,54,55,56,57,49,50,51,52,53,54,55
  ! db 56,57,49,50,51,52,53,54,55,56,57,49,50,51,52,53
  ! db 54,55,56,57,49,50,51,52,53,54,55,56,57,49,50,51
  ! db 52,53,54,55,56,57

    LOCAL Dest  as STRING
    LOCAL lpLbl as LONG

    Dest  = space$(54)
    lpLbl = CodePtr(start_BC0A9E5)

      ! cld
      ! mov ecx, 54
      ! mov esi, lpLbl
      ! mov edi, Dest
      ! rep movsb

    FUNCTION = Dest

--- End code ---

[Update-Notice:Updated the attached file on 14.06.2009, due to speed improvements.]

Steve Hutchesson:
Hi Theo,

I got it to work once I understood the INI file, runs fine and seems to be fast enough. Tell me this much, why do you use the INI file instead of a normal command line or alternatively in an interface ?

Theo Gottwald:

--- Quote ---why do you use the INI file instead of a normal command line or alternatively in an interface ?
--- End quote ---

In my project the pathes are too long. A command line has a limited lenght.
As i always use the same input files, a fixed INI File was the best sollution in that case.
Also its possible to write error-messages back into the ini-file.

Think of a (CPU-uOps-)Pipeline. On the left side is all the source code and binaries.
On the right side is the complete result, even the tests run automatically.

This tool has been designed, to work as an integrated and invisible part of a production "pipeline", not as a standalone Sollution.
Thats why i have choosen an INI.

And that was the only reason why i had to replace your smart tool. Your tool was designed as a standalone sollution.

Aslan Babakhanov:

You might be interested in CCI (Common Conversion Interface) tool.

You can add your own conversion functions and use one GUI

Theo Gottwald:
Hallo Aslan,

thats  good idea, to put all that stuff in one bag. So we do not need to have so many utilities around.

Download CC-Tool


[0] Message Index

Go to full version