User:Doruletz72/ONBA/Onboard Assembler

Starting OnbA
Many guys stop their attemps to use the OnbA simply because it have a poor interface with no help. Now is time to solve this.

To use OnbA you will need an assembler source code file. To do this open SrcEdit, edit a file and save it with ".asm" extension. Start the OnbA and tap DOC button. Now all your ".asm" files will be listed. Select one and tap "Build" button to compile it.

Don't forgot to specify in your file the prc destination name and the creator identifier: Also, if you have a multi-segment application, take care with your output, which record will be overwritten or created inside your prc file. If you need additionally resources, create an Onboard C project with the same prc name and creator identifier, include in project your resource files, then build it. Next time when you launch OnbA, it will overwrite only the data or code records which you have specified. So don't bother cause you will damage the prc file. Got the point? Very simple.
 * prc "MyPRC"
 * creator "Me00"
 * code - will write to the current code record, default CODE 1
 * code - will write to the code segment, CODE
 * Note: valid values are integers bigger than 0

First program
Open the SrcEdit and type this code: If you don't have a systraps.inc file, replace the line with Now save the file as "MyFirst.asm" and compile it. Before running you will need an alert resource named 1000. Open the RsrcEdit, find and open file "MyFirst" with creator "test", then create an alert resource with id 1000. Now save and run your application.

Skeleton with no forms
A template Onboard C source file with no form API included:
 * #include
 * some global variables
 * startApp // definition
 * stopApp // definition
 * MyEventHandler // definition
 * PilotMain // finally the program
 * startApp
 * do eventLoop {
 * MyEventHandler
 * } while !appStopEvent
 * stopApp
 * } while !appStopEvent
 * stopApp

Skeleton translation into OnbA: Check the last section for systraps.inc content. You can make your custom file only with very used system routines.