Skip to content

Instantly share code, notes, and snippets.

@remy
Created June 23, 2020 11:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save remy/4faa54109293d3e72982bd05434ef925 to your computer and use it in GitHub Desktop.
Save remy/4faa54109293d3e72982bd05434ef925 to your computer and use it in GitHub Desktop.

Assuming you're using VS Code to generate the NextBASIC files, you'll need:

  • bank-demo.bas.txt: "Export to binary BAS"
  • b12.bas.txt: "Export to BANK"

bank-demo is expecting to find the file named "b12.bas" - but you can change it as you please, the name is purely asthetic.

I've use autoline just because I can't be bothered with line numbers, but the line numbers in b12.bas can be anything (from what I understand) between 1-9999 and can overlap with line numbers in other banked code or your main NextBASIC file.

#program b12
#autoline 10
DEFPROC demo()
PRINT "I live inside a bank"
ENDPROC
#program bank-demo
#autoline 10
PRINT "hello world"
PRINT "I'm going to run some code from a banked PROC"
LOAD "b12.bas" BANK 12
BANK 12 PROC demo(): ; there trick is to make sure you call the function from the right bank
PAUSE 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment