Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Suggestion: an example for QuickBASIC's Gorillas.bas
#1
QuickBASIC's Gorillas.bas is so classic.
[Image: %2BsIG7E.png]

A QB64 version is here:
https://lunduke.itch.io/gorillabas

The technical information of the game: https://lunduke.substack.com/p/compiling...orillas-on

I hope that some NaaLaa experts will try to write the game in NaaLaa and Marcus will add the NaaLaa version to the next version of NaaLaa!
Wink
Reply
#2
(04-27-2025, 01:37 AM)luwal Wrote: QuickBASIC's Gorillas.bas is so classic.
[Image: %2BsIG7E.png]

A QB64 version is here:
https://lunduke.itch.io/gorillabas

The technical information of the game: https://lunduke.substack.com/p/compiling...orillas-on

I hope that some NaaLaa experts will try to write the game in NaaLaa and Marcus will add the NaaLaa version to the next version of NaaLaa!
Wink

Great idea Smile

Lots of 'goto' in the source code. Naalaa doesn't have that ... hm. You can probably use 'asm' blocks to make those jumps. It looks dumb, but it works:

Code:
pln "n7 has no goto"

' goto DOWN_THERE.
asm
    jmp DOWN_THERE:
endasm

pln "i'm never written"

' a label named UP_HERE.
asm
    UP_HERE:
endasm

pln "bye bye!"
system "pause"

' have to call end here or the program will jump to UP_HERE down there ...
end

' a label named DOWN_THERE.
asm
    DOWN_THERE:
endasm
pln "okay?"
asm
    jmp UP_HERE:
endasm
Reply
#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
#4
Thanks! Please finish it. Our forum members will look forward to the NaaLaa version of Gorillas.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)