|
Post by George on Jul 2, 2020 9:54:19 GMT -5
I know several of you have been experimenting with the new XFORM support. It would be helpful to us, and probably everyone, if we had a better idea of how it's being used.
So if you have experience to share, please do so. Feel free to suggest changes, enhancements etc. - and report problems
George
===> I asked George to send out this call to all XFORM experimenters. He wanted me to write a tutorial on how to use XFORM, since I originated the idea. But since then, so much has gone on, I feel like I need someone to tutor ME on what's going on and how you are all using it. I need your real world expertise - such as it is this early - so the tutorial actually teaches things people need to learn. I need your help to make this a community effort - which is what I hoped for all along. Thanks, Robert
|
|
|
Post by mueh on Jul 3, 2020 3:39:19 GMT -5
Hi George and Robert ! I use XFORM in following way . Only use XFORM Macro by specifying it on cmd f.e V /XLL Here a n extract of a macro which can also be invoked as XLL c to simulate a COPY of an File which should be processed by XFORM Macro . For Performance reasons i do the reading and formating of the file in MRCKD.exe (Freebasic routine) and use the ADD_ARRAY to pass the txt lines file to SPFLite . Here a picture of INPUT file and how it's displayed in SPFLite . Thanks ELSEIF UCase$(Get_Arg$(1)) = "C" then ' COPY
fnams = Dialog_OpenFile(0, _
"Open a file", _
Get_FilePath$, _
, _
"", _
%OFN_FILEMUSTEXIST OR %OFN_HIDEREADONLY or %OFN_ENABLESIZING)
reply = InputBox$("XLL C FN prompt","XLL COPY Box",fnams)
fname = reply ' fn from prompt
ai = Get_Csr_LPtr ' Set insert point
func ="COPY"
call CopyFile ' Go do it
SPF_CMD("c "" "" "" """) ' set modified
halt(OK, "XLL - "+func+" complete "+i+" Lines")
'----- READ routine
function ReadFile()
func ="LOAD"
ai = 0
call CopyFile ' Go do it
halt(OK, "XLL - "+func+" complete "+i+" Lines")
end function
function CopyFile()
dim MyMatrix() as string
dim fid as long
dim func as string
dim tempfn as string
dim nLines as long
dim nRec as long
redim MyMatrix(2000+File_Size(fname)/20)
i = 1
SPF_Exec(SYNC,HIDDEN,"MRCKD "+fname) ' deblock temp in freebasic (faster) OUTPUT fname+".R"
PARSE(FILE_Load(fname+".R"), MyMatrix(), $CRLF)
nLines = CountOf(MyMatrix(1))-1
nRec = (nLines-2)/3
redim PRESERVE MyMatrix(nLines) ' parse create Null String as last entry
RC = Add_Array(ai,MyMatrix) ' Pass to SPFLite at ai insert point
REDIM MyMatrix
i = nLines
end function
|
|
|
Post by Jo on Jul 6, 2020 15:56:42 GMT -5
Hi ! I have some microcontrollers and the fileformat produced by the assembler and loaded into the micro is "Intel Hex"-format (https://en.wikipedia.org/wiki/Intel_HEX) where the databytes are formatted as 2 hex digits per byte. This is great for machinecode, but if your code contains text, its hard to find in this format. Some month ago I started with an IMACRO for .HEX-files, the macro calls a rexx, the rexx adds the "X2B"-text to each line. Now I use a XFORM macro instead to show the text via Hex_To_Bin$. I only use the READ-routine, no WRITE. Since the file is a plain ASCII-file, FILE_LineInput is done. Jo
|
|