-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
My program crashed the VM #8
Comments
ah. yea the assembler doesn't exactly tell you when the syntax is wrong. (known bug) you may want to take a look at the assembly section of the users manual. the basic arithmetic operations are add, sub, mul, and div. and they work on the values in Registers 1 and 2. and populate register 1 with the result. second, the wait instruction supports a decimal syntax. like so: The assembler is a bit, well dumb. most instructions will treat whats between the first and second separators as 9-trit wide ternary data... what happens is the trom winds up having lines that are too short and contain invalid characters that the VM simply doesn't know what to do with. |
if what is in the users manual doesn't work or doesn't help, check some of the dozen-or-so test roms and accompanying source code. a good algorithm example would be fib.tasm (in VMSYSTEM/ROMS) |
Ah I see! Thank you. Not promising anything, but I'll see what I can do to improve SBTCVM-asm.txt. |
All sorted, thanks! I'm adding little extra bits of info to SBTCVM-asm.txt, as I said. I'll see about getting familiar with git so you can pull it when you want. |
I broke it with my first program!
Hahahaha oh dear! Github "doesn't support" attaching .tasm or .trom... or seemingly any source code. What is this I don't even! Aaaanyway, pasting the tasm since it's so short:
It assembled with no errors, reporting 4 gotorefs, 13 instructions, and extra space: 19670.
On running it, the VM window opens, then soon closes. Here is the console output:
Since I laughed at Github earlier, I'll say I'm happy to see I can attach a screenshot with print screen and ctrl-V.
They say you don't really find the bugs in your code until someone else uses it. :)
The text was updated successfully, but these errors were encountered: