CScroll/JScroll Documenation

Instructions

Pointer Move Instructions

Instruction Symbol Instruction Language Version Added
< Move Left JScroll
> Move Right JScroll

Pointer Interaction Instructions

Instruction Symbol Instruction Language Version Added
+ Increment JScroll
- Decrement JScroll
. Store Value In Pointer Memory JScroll
, Store Current Index In Pointer Memory CScroll 1.0.2
* Add Pointer Memory To Current Pointer Location JScroll
/ Subtract Pointer Memory To Current Pointer Location JScroll
Note: By default the the Pointer's Memory is set to 0.

Pointer Print Instructions

Instruction Symbol Instruction Language Version Added
# Print As Integer JScroll
@ Print As Character JScroll

Misc. Instructions

Instruction Symbol Instruction Language Version Added
^ Print A Newline Character JScroll
'{char}' Override Print char JScroll
"{string}" Override Print string JScroll
& Print Current Tape JScroll
$ Print Current Tape With Spaces JScroll
; End Program, Returns The Current Value Stored In The Pointer's Memory JScroll
Note: In JScroll does not return anything out of the program.
In JScroll ';' just ends the program.

Conditional Logic Instructions

All conditional logic is proceeded by a '_' to inidicate that it is conditional logic.
Conditional logic sits on the tape and involves 3 points.
Example (i0, i1, i2) i0 gets compared to i2, the result is stored as a 0 (false) or 1 (true) in i1.
In the above example the tape may look like ... i0, i1, i2, ... and i1 would be where the pointer must sit to make the comparison.
Instruction Symbol Instruction Language Version Added
_<< Less Than CScroll 1.0.1
_>> Greater Than CScroll 1.0.1
_<= Less Than Or Equal To CScroll 1.0.1
_>= Greater Than Or Equal Toe CScroll 1.0.1
_== Equal To CScroll 1.0.1
_!= Not Equal To CScroll 1.0.1

Interation Instructions

All iteration instructions follow the same format and take 3 parameters.
>({param_1}:{param_2}:{param_3})
{param_1} declares the type of iteration to be performed.
 "f" is used for for-loops and "w" is used for while=loops.
{param_2} is the integer parameter for the loop.
 In for-loops this is the number of iterations.
 In while-loops this is an index on the tape that the loop will run as long as it is true.
{param_3} is the actual contents of the loop.
Instruction Symbol Instruction Language Version Added
(f:{int}:...) For-Loop CScroll 1.0.4
(w:{int}:...) While-Loop CScroll 1.0.5
Note: CScroll does not support nested loops. You cannot embed a loop within another loop.

Examples

Hello World

"Hello World";
Output: Hello World

Fibonnaci Without Loops

+.> *.> *<.>*> *<.>*> *<.>*> *<.>*> *<.>*> *<.>*> *<.>*>$;
Output: 1 1 2 3 5 8 13 21 34

+.> *.> *<.>*> *<.>*> *<.>*> *<.>*> *<.>*> *<.>*> *<.>*>$;
  1   1      2      3      5      8     13     21     34
Output: 1 1 2 3 5 8 13 21 34
This is also valid because everything after the ';' is read as a comment.