Hi Folks,
I am just in the process of digesting the two current PB compilers and updating some of the tools I use with PowerBASIC. As the PB forum now has attachment capacity I have attached a conversion tool aimed at the massive amount of MASM 32 bit code available to do at least some of the conversion to a PowerBASIC function.
It is updated from an earlier version and has the full range of mnemonics published in the current PB help files and it supports the new PB #ALIGN directive as a translation from MASM.
There are limitations with a tool of this type. If the MASM procedure is built with a normal stack frame and is written wholly in mnemonics the quality is reasonably good but if the MASM procedure is written without a stack frame the results will take some careful editing to get it workable as the address of arguments on the stack are [ESP] based and the mnemonic may change depending on external function calls or stack address changes with PUSH / POP etc ... It is normally better to convert the MASM proc back to a stack frame first so you don't have to track ESP through the proc.
It is normal in a MASM proc to do your own stack preservations and the tool will convert these with no modifications but PowerBASIC already preserves EBX ESI & EDI so you can take out MASM code that does this to avoid extra overhead.
Regards,
hutch at movsd dot com
I am just in the process of digesting the two current PB compilers and updating some of the tools I use with PowerBASIC. As the PB forum now has attachment capacity I have attached a conversion tool aimed at the massive amount of MASM 32 bit code available to do at least some of the conversion to a PowerBASIC function.
It is updated from an earlier version and has the full range of mnemonics published in the current PB help files and it supports the new PB #ALIGN directive as a translation from MASM.
There are limitations with a tool of this type. If the MASM procedure is built with a normal stack frame and is written wholly in mnemonics the quality is reasonably good but if the MASM procedure is written without a stack frame the results will take some careful editing to get it workable as the address of arguments on the stack are [ESP] based and the mnemonic may change depending on external function calls or stack address changes with PUSH / POP etc ... It is normally better to convert the MASM proc back to a stack frame first so you don't have to track ESP through the proc.
It is normal in a MASM proc to do your own stack preservations and the tool will convert these with no modifications but PowerBASIC already preserves EBX ESI & EDI so you can take out MASM code that does this to avoid extra overhead.
Regards,
hutch at movsd dot com
Comment