Occasionally, you may run into a situation where the syntax and structure of the BASIC language is not the most suitable for a task at hand. PowerBASIC addresses the need for optimal speed and flexibility with its built-in assembler. Inline assembly is the process of embedding assembly-language statements (opcodes) within the overall structure of your BASIC code. Those statements are compiled along with your BASIC code without the need for an external assembler.
This chapter discusses the different ways that PowerBASIC lets you use assembly-language code in your BASIC programs. It also discusses some design philosophies and considerations, which you should keep in mind if you decide to write your own assembly-language procedures or functions.
The technique of interfacing with assembly-language is, by its very nature, somewhat complex. You should be reasonably familiar with assembly-language concepts before tackling the information in this chapter.
See Also
Using assembly-language in your code
Saving Registers at the Sub/Function level
Intermixing ASM and BASIC code
Tricks in preserving registers
Parameters passed by reference or by copy
Accessing PowerBASIC variables by name