Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Suggestion: an example for QuickBASIC's Gorillas.bas
#3
You can mimic 'gosub' too:

Code:
pln "i'm going to jump somewhere and return!"

' mimic a gosub to label A_LABEL.
asm
    move @0 A_LABEL:
    call @0
endasm

pln "and i'm back!"

system "pause"

' terminate program.
end


' a sub-routine.
asm
    A_LABEL:
endasm

pln "i'm in a sub-routine now!"

' return to whereever we were called from.
asm
    ret
endasm
Reply


Messages In This Thread
RE: Suggestion: an example for QuickBASIC's Gorillas.bas - by Marcus - 04-27-2025, 08:37 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)