Updated READMEs

This commit is contained in:
Dominik Moritz Roth 2021-01-29 22:16:14 +01:00
parent bebaa8ba05
commit 06b64f9568
2 changed files with 9 additions and 3 deletions

View File

@ -10,7 +10,7 @@ The emulator / debugger...
### compiler.py / compiler_beta.py ### compiler.py / compiler_beta.py
This compiler compiles from 'tronScript' to a binary save-state of the emulator. It has been designed with the main priority of being as easy as possible to compile. Usability was ~~maybe~~ impacted by this decisio. This compiler compiles from 'tronScript' to a binary save-state of the emulator. It has been designed with the main priority of being as easy as possible to compile. Usability was ~~maybe~~ impacted by this decisio.
I forget, what the difference between normal and beta is... I forgot, what the difference between normal and beta is...
More information about tronScript can be found in TronScript_README.txt More information about tronScript can be found in TronScript_README.txt

View File

@ -1,10 +1,11 @@
tronScript is a stupid pretty assembly-like low level language for my asmTron emulator tronScript is a stupid and pretty assembly-like low level language for my asmTron emulator
Available Commands: Available Commands:
newVar [var] - Initializes new var; not needed most of the time: newVar [var] - Initializes new var; not needed most of the time:
Compiler automatically initializes new vars when used Compiler automatically initializes new vars when used,
so this is no longer necessary...
jumpMark [jumpMark name] - Sets an JumpMark to jump to using the "jump" command jumpMark [jumpMark name] - Sets an JumpMark to jump to using the "jump" command
jump [jumpMark name] - Jumps to an JumpMark jump [jumpMark name] - Jumps to an JumpMark
getVarAddress [var A] [var B] - Saves [var A]'s memory-address into [var B] getVarAddress [var A] [var B] - Saves [var A]'s memory-address into [var B]
@ -43,3 +44,8 @@ function [funcName] { - Defines function [funcName] with code
. Why is that so? This is a stupid compiler, which does not use . Why is that so? This is a stupid compiler, which does not use
[funcCode line n] a stack to return from functions, but a function-specific variable [funcCode line n] a stack to return from functions, but a function-specific variable
} to store the jump-back-address... :P } to store the jump-back-address... :P
Fun Fact: Pascal used to do a similar thing, which is why you couldn't
do recursion in early versions of Pascal.
Q: There are some command ś that operate on an array. How do I initialize one?
A: Good Question. Do you know, what defines a good question? That you dont have an answer to it...