|
|
|
Following section uses the words: |
|
Following section uses the words: |
|
* '''MUST''' - Means it is part of the standard and must be implemented by any given runtime/parser |
|
* '''MUST''' - Means it is part of the standard and must be implemented by any given runtime/parser |
− |
* '''SHOULD''' - Same as '''UNDEFINED''' but describes the most commonly used behavior. |
|
|
* '''UNDEFINED''' - Means that actual behavior is not defined in the language and support may vary. |
|
* '''UNDEFINED''' - Means that actual behavior is not defined in the language and support may vary. |
|
* '''MAY''' - Same as '''UNDEFINED''' but serves as a way that (may) helps implementors during implementation. |
|
* '''MAY''' - Same as '''UNDEFINED''' but serves as a way that (may) helps implementors during implementation. |
|
|
|
| bgcolor="#99ff99" | Yes |
|
| bgcolor="#99ff99" | Yes |
|
| Technical |
|
| Technical |
− |
| SHOULD |
+ |
| MUST |
− |
| Instruction size SHOULD be 2 bytes. |
+ |
| Instruction size MUST be 2 bytes. |
|
|- |
|
|- |
|
| bgcolor="#99ff99" | Yes |
|
| bgcolor="#99ff99" | Yes |
|
|
|
| UNDEFINED |
|
| UNDEFINED |
|
| Initial values of Instruction slots are UNDEFINED. Behavior when acessing them is up to implementor. |
|
| Initial values of Instruction slots are UNDEFINED. Behavior when acessing them is up to implementor. |
− |
|- |
|
− |
| bgcolor="#99ff99" | Yes |
|
− |
| bgcolor="#99ff99" | Yes |
|
− |
| Technical |
|
− |
| MAY |
|
− |
| GORBITSA runtimes MAY use a Program Counter (PC) to track the current progress. For this specification, it is expected that the implementor uses a PC. If you do not use a PC, adjust the specification readings to your needs. |
|
|
|- |
|
|- |
|
| bgcolor="#99ff99" | Yes |
|
| bgcolor="#99ff99" | Yes |
|
|
|
| bgcolor="#99ff99" | Yes |
|
| bgcolor="#99ff99" | Yes |
|
| Format |
|
| Format |
|
+ |
| MUST |
− |
| UNDEFINED |
|
|
+ |
| Instructions must be separated by spaces, an instruction consists of a valid letter and a number joined together: <code>S97 T R T</code> |
− |
| There are no format requirements to GORBITSA code. Code MAY look like <code>S 0 T</code> or <code>S0 T</code> or <code>S0T</code> or <code>S 0T</code>. |
|
− |
Implementors are RECOMMENDED to support all of those. Implementors SHOULD support <code>S0 T</code>. |
|
|
|- |
|
|- |
|
| bgcolor="#99ff99" | Yes |
|
| bgcolor="#99ff99" | Yes |
|
|
|
| Input |
|
| Input |
|
| UNDEFINED |
|
| UNDEFINED |
− |
| GORBITSA MAY use ascii characters as input or SHOULD use numbers as input. |
+ |
| GORBITSA MAY use ascii characters as input or MAY use numbers as input. |
|
|- |
|
|- |
|
| bgcolor="#99ff99" | Yes |
|
| bgcolor="#99ff99" | Yes |
|
|
|
| Technical |
|
| Technical |
|
| UNDEFINED |
|
| UNDEFINED |
− |
| When PC points at (hypothetical) 256s instruction, it is UNDEFINED wether execution stops or continues at 0. |
+ |
| When PC points at (hypothetical) 256s instruction, execution halts. |
|
|} |
|
|} |
|
|
|
|
|
|
|
|
|
|
|
In each step instruction pointed by IC is read and executed. If instruction doesn't modify IC, the IC is incremented.<br> |
|
In each step instruction pointed by IC is read and executed. If instruction doesn't modify IC, the IC is incremented.<br> |
− |
If IC points after last instruction, it is implementation-defined whether execution halts or continues.<br> |
+ |
If IC points after last instruction, execution halts.<br> |
− |
If IC increments from 255, it is implementation-defined whether execution halts, or IC rolls over to 0. |
|
|
|
|
|
|
Whether input and/or output are in a form of a number or ascii character is implementation-defined. |
|
Whether input and/or output are in a form of a number or ascii character is implementation-defined. |
|
|
|
|
|
|
|
==Computational class== |
|
==Computational class== |
− |
Due to limited amount of cells and limited possible values in cells and register, it's assumed to be [[finite-state automaton]]. |
+ |
Due to limited amount of cells and limited possible values in cells and register, it is a [[Linear bounded automaton]]. |
|
|
|
|
|
==Programs== |
|
==Programs== |
|
|
|
R T B255 S1 T S0 B3 |
|
R T B255 S1 T S0 B3 |
|
|
|
|
− |
===[[Quine]]=== |
+ |
===[[Cheat Quine]]=== |
|
Runs in '''GORBITSA-RAM''' mode |
|
Runs in '''GORBITSA-RAM''' mode |
|
S0 O255 g255 B22 g255 T G255 I1 O255 S0 B4 G255 I1 O240 g240 B36 S0 B10 B200 |
|
S0 O255 g255 B22 g255 T G255 I1 O255 S0 B4 G255 I1 O240 g240 B36 S0 B10 B200 |