Positron Compiler Documentation

Call

Positron16 · Revision 1.1.3.5 · PDF page 328

Call Label

Execute the assembly language subroutine named label.

Label must be a valid label name.

' Call an assembler routine
   Call Asm_Sub

   Asm
     Asm_Sub:
     {mnemonics}
     Return
   EndAsm

The Gosub command is usually used to execute a BASIC subroutine. However, if your subroutine happens to be written in assembler, the Call command should be used. The main difference between Gosub and Call is that when Call is used, the label's existence is not checked until assembly time. Using Call, a label in an assembly language section can be accessed that would otherwise be inaccessible to Gosub. This also means that any errors produced will be assembler or linker types, which can be misleading and rather obscure.

See also : Gosub, GoTo

View original PDF page 328Open page in PDFOriginal PDF page 328