The MASM Forum Archive 2004 to 2012

Project Support Forums => PowerBASIC Low Level Code => Archival PowerBASIC Code => Topic started by: noman9607 on March 20, 2006, 11:23:31 PM

Title: How to give PowerBASIC a boost?
Post by: noman9607 on March 20, 2006, 11:23:31 PM
I don't want to jump in the deep water just yet How can I use inline assembler to speed up text or string manipulation programs? Can I use the macro feature of PowerBASIC to make the code look understandable while substituting inline assembly code? I am writing dll's to extend the functions of text editors. I am strictly an amateur at this kind of thing but I like doing it.

later edit: i have found a book Assembly Language for Intel-Based Computers 2nd that covers inline assembly for cpp. Is this close enough to powerbasic to be useful?
Title: Re: How to give PowerBASIC a boost?
Post by: hutch-- on March 21, 2006, 01:43:48 AM
Hi noman,

Welcome on board, I am guilty of being a PowerBASIC addict myself for my high level development. The assembler dialect in PB is industry standard Intel notation so in the first instance I would get the 4 manual set directly from Intel as they are the best available.

You have a couple of choices in the direction you can go. making complete functions or subs is a viable and tidy way to go as you can use the results like any other high level function or sub but there are some instances where directly inlining assembler code is to your advantage as it reduces stack frame overhead.

Get the masm2pb converter posted in this subforum as it will do a reasonable job on most of the simpler algorithms in the masm32 library and this should be of use to you in designing your own algorithms.
Title: Re: How to give PowerBASIC a boost?
Post by: GregL on March 22, 2006, 07:45:04 PM
Quotelater edit: i have found a book Assembly Language for Intel-Based Computers 2nd that covers inline assembly for cpp. Is this close enough to powerbasic to be useful?

noman9607,

If I remember correctly the 2nd edition of that book only covers 16-bit DOS assembly language. The latest edition, the 4th edition, of that book covers 32-bit Windows assembly, which is what you want. The 4th edition is a decent book.

Like Hutch said, the Intel Manuals are excellent, there is a link to them here http://www.website.masmforum.com/reference.htm

I am also a PowerBASIC fan.  :thumbu