SecondBASIC Documentation v3

Home / Command Reference / Call

Call

Description: Calls a user defined assembly routine.

Syntax:

Call <label> [, <argument> [, <argument> [, n]]]

Part Description
<label> Required. This is the line label of the assembly routine to jump to. This label cannot be any keywords that are used by SecondBASIC.
<argument> Optional. The arguments passed to the routine are stored in the heap which stored in register A5. <integer> and <long> data types are stored as 4 byte <long> numbers, and <string> data types are pushed onto the stack and is null terminated. If the address is odd, an additional null character is added.

Example:

        ' Requires \slibrary\example.s and \slibrary\example.var
        Import Example
        Call ExamplePrint, "Hello World"