Getting Started
Introduction
Sample Programs
IDEs
History
Advice
Mini-Tutorial
Tutorials
Code Snippets

Resources
Web Sites
More Tutorials
Forums
Vendors/Tools
Books
Magazines
Newsletters
NewsGroups
User Groups
Talk Shows
Blogs

Controls
Overview
Button
Check3State
Checkbox
ComboBox
Frame
Graphic
Image
ImageX
ImgButton
ImgButtonX
Label
Line
ListBox
ListView
Option
Progress Bar
Scrollbar
StatusBar
TAB
TextBox
Toolbar
TreeView

GBIC >> PowerBASIC >> Tutorials >> ASM

PowerBASIC Information Center Tutorials
These tutorials were written to help you get a quick, but thorough, understanding of PowerBASIC - the scope of the language as well as it's specific capabilities.

Introduction       Projects       Language           Messages       Functions           Advanced
  • Overview
  • Examples
  • IDE
  • Compilation
  • Distribution
  • Project Files
  • DDT Windows
  • Controls
  • Menus
  • Dialogs  
  • Help Files
  • Resources  
  • Templates  
  • Project Shell  
  • Syntax
  • Operators
  • Data Types
  • Variables
  • Scope
  • Declarations  
  • Procedures
  • Flow Control
  • Windows
  • Messages
  • Callbacks
  • Mouse
  • Keyboard
  • Dialogs
  • Controls
  • Subclassing
  • Arithmetic
  • Trig  
  • Strings
  • Arrays
  • Date/Time
  • Printing
  • Files
  • Folders
  • Keyboard
  • Mouse
  • Sound
  • System
  • Error Traps
  • Debugging
  • Objects
  • Graphics
  • Databases
  • API
  • DLLs
  • ASM
  • Threads
  • Inline Assembler
    PowerBASIC allows you to embed assembly language statement within the source code of a PowerBASIC program. Programmers sometimes find that assembly language code provides better performance or simply allows the programmer to add features that PowerBASIC does not directly support.

    The PowerBASIC compiler can compile the assembly language statements directly into your PowerBASIC application without the need for an external assembler (assembly language compiler).

    Whole programs, procedures, or simply lines of code can be written in assembly language.

    The use of assembly language does involve accepting some constraints on program data types and variable names. See the PowerBASIC Help file for more details on embedding assembly language code.

    Examples
    Here are a couple of a examples which show the basic syntax for including lines of assembly language code in PowerBASIC applications.

    LOCAL a&, b&, c&, z&
    ASM MOV  EAX, a&
    ASM ADD  EAX, b&
    ASM ADD  EAX, c&
    ASM MOV  z&, EAX
    

    The "ASM" notation can be replaced with an "!" (exclamation point).

    If you have any suggestions or corrections, please let me know.