GOSUBCall function. If function not found - command will be skipped (unlike the CALL).GOSUB is equal to CALL, except cases then pointed function not defined and not found. Syntaxgosub <function> [count] ; Call the <function> for [count] times gosub <function> <function> ... <function> [count] ; Call all functions in series [count] times random gosub <function> <function> ... <function> [count] ; Call any functions [count] times Parametersfunction
count
Example 0x00sleeps 500 ; Set Sleeps = 500 ms gosub FUNCTION5 ; This line will be skipped in that FUNCTION5 is not defined gosub FUNCTION1 ; Call FUNCTION1 CYCLE: ; Define Label "CYCLE" gosub FUNCTION2 3 ; Call FUNCTION2 for 3 times gosub FUNCTION3 ; Call FUNCTION3 goto CYCLE ; Infinite cycle ; ================================= sub FUNCTION1 ; Define FUNCTION1 10 ret ; End of function sub FUNCTION2 ; Define FUNCTION2 rol ret ; End of function sub FUNCTION3 ; Define FUNCTION3 ror 2 ret ; End of function ![]() ![]() ![]() ![]()
|