? VC1 interpreter for VC3 ● SmileBASIC Source

Sign In

Register
*Usernames are case-sensitive
Forgot my password

VC1 interpreter for VC3

Submitted
Updated
Author
bluekrill
Public Key
WZENE3ZJ
Min. Compat.
New 3DS
Version
1.0
Size
11.9KB
Rating
2 votes
Description This is an implementation of Bluekrill's virtual computer or VC1 (http://smilebasicsource.com/page?pid=1159) made for virtual computer 3, meaning that VC1 programs now run on multiple platforms! heh. This program is both a loader writing compiled VC1 programs into memory and an interpreter running VC1 code. During the loading sequence, the screen refreshes once per word loaded.

Alternative version (YK38XDQM)

There are two versions of this interpreter. VC1CM (The displayed download code) starts the VC1 interpreter at &HF000 and starts the simulated stack pointer at &HFFFF. This is compatible with all of my VC1 programs, but if the stack gets too full, it may start to overwrite the interpreter. VC1IRW (YK38XDQM) puts the interpreter further to the top of memory and starts the stack pointer before itself, not after. This allows for the stack's length to be much longer but breaks compatibility with my bubble sort VC1 program.

Compatibility problems

VC1 and VC3 have exactly the same amount of RAM, so not all VC1 programs can be run. Programs which write data or code in the area used by the interpreter may crash the interpreter. This problem is inevitable and not fixable. Fortunately, none of my VC1 programs write data in this area, but if yours do, you will need to rewrite your programs to run with this interpreter. VC1's display size is 32x16 characters. VC3's display size is 32x24 characters. This means that the lower third of the screen is displaying areas of RAM not displayed in the real VC1 and that LIFE's touch input is offset.
Instructions This program requires VC3 (http://smilebasicsource.com/page?pid=1234) to run.

How to use this program

  1. Copy a compiled VC1 program into the clipboard.
  2. Paste it into the editor and add a newline and exclamation point onto the end.
  3. After this, anything in the clipboard is clipboard input for the VC1 program.
  4. Run the VC1 interpreter the same way you would run any VC3 program.
Not formatting the input correctly will result in an infinite loop.

Example

This VC1 program will be run, and it will see the clipboard as containing only the word "TEST". *#20 #1 #0 #23 #24 !TEST
Notes The images show SmileBASIC running VC3 running VC1 running Brainfuck running Brainfuck running Brainfuck. Please tell me if you find that your VC1 programs aren't working in this. Thanks!
Categories
Keywords
  • interpreter
  • assembly
  • code
  • cpu
  • vc
8 Comment(s) 12Me21 12Me21 Head Admin Second Year My account is over 2 years old Website Syntax Highlighter Received for creating the code syntax highlighter on SBS Night Person I like the quiet night and sleep late. Express Yourself Why is Min. Compat. New 3DS? bluekrill bluekrill Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Drawing I like to draw! Hobbies Video Games I like to play video games! Hobbies VC3 and VC1's minimum compatibility are both New 3DS. AnswerXOX AnswerXOX Great Page Hidden Achievements RNG Hidden Easter Eggs Second Year My account is over 2 years old Website is it because of memory limitations? IAmRalsei IAmRalsei Forum Leader Hidden Achievements First Year My account is over 1 year old Website Expert Programmer Programming no longer gives me any trouble. Come to me for help, if you like! Programming Strength Maybe it's because it's not tested on o3DS 12Me21 12Me21 Head Admin Second Year My account is over 2 years old Website Syntax Highlighter Received for creating the code syntax highlighter on SBS Night Person I like the quiet night and sleep late. Express Yourself It's because the debugger uses the C-stick and ZR IAmRalsei IAmRalsei Forum Leader Hidden Achievements First Year My account is over 1 year old Website Expert Programmer Programming no longer gives me any trouble. Come to me for help, if you like! Programming Strength The circle pad pro exists though 12Me21 12Me21 Head Admin Second Year My account is over 2 years old Website Syntax Highlighter Received for creating the code syntax highlighter on SBS Night Person I like the quiet night and sleep late. Express Yourself do you have proof of that? bluekrill bluekrill Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Drawing I like to draw! Hobbies Video Games I like to play video games! Hobbies Yes, minimum compatibility is New 3DS because the debugger uses c-stick and ZR. If you use VC2 or VC3 on an Old 3DS, you will get a warning message on startup saying that the debug menu is inacessible during program execution without a circle pad pro, so debug settings cannot be changed after they are set on startup.