Call

Last Modified: 12/31/2020

Calls a user defined assembly routine.

Arguments

NameTypeRequiredDescription
LineLabel String Yes The ASM line label for the routine you want to execute.
Argument Any No Arguments that you want to pass to the routine.

Example

Syntax: Call <LineLabel> [,<Argument>, <Argument>, n..]
    Dim a$ As String
    Call ExamplePrint,"Hello World"
    End
    
    Asm
ExamplePrint:
    lea (__STRING_a), a0
    jsr push_string_stack
    clr.b (__STRING_a)
    move.l a3, a2
    lea (__STRING_a), a0
    jsr pop_string_heap
    move.l a3, a5
    move.l #__STRING_a, a0
    jsr push_string;
    jsr popdisplay
    jsr print_cr
    move.l -(a5), a3
    move.l -(a5), (a5)
    moveq #0, d2
    clr.w (a5)
    lea (__STRING_a), a0
    jsr pop_string_stack
    rts
    End Asm

Remarks

The Call command treats an ASM line label as a sub or function. Using arguments requires setting them up as if you were creating a regular sub routine or function. This command is only available for legacy code compatibility as there are better ways to call an ASM routine.

See Also

$IncAsm, $Include, Asm