GTB

GTB is a compact, Turing complete compiler. It compiles TI-BASIC code for TI-83 and TI-84 calculators. GTB stands for “Golfed TI-BASIC”.

Interesting in learning GTB? See the tutorial.

Currently supported values (in the format of value, @, result)

Use \ to escape []%

[  @:Lbl 0:
]  @:Goto 0:
@  @:If 
#  @:Else
$  @:Then:
&  @:End:
&& @ and 
\\ @ or 
^^ @ xor 
!! @not(
~  @:Disp 
`  @:Input 
_  @Str0
p; @:Prompt 
(; @(((
); @)))
r; @rand
r? @randInt(
n? @randIntNoRep(
++ @+100
-- @-100
g; @:Goto 
l; @:Lbl 
h; @:Horizontal
v; @:Vertical
p; @:Pause:
r? @:Repeat
%  @:While 
x? @expr(
4; @:For(
s; @sub(
S; @inString(
A; @Ans
l? @length(
w; @1
eq;@=
4; @:For(
c; @:ClrDraw:
i; @:DrawInv
%; @fpart(
A? @:SortA(
S? @:{0,1→L₁:{0,Ans→L₂:LinReg(ax+b) Y₁:Equ►String(Y₁,Str0:sub(Str0,1,length(Str0)-3→Str0
l? @length(
q; @Str1
T; @:Text(
pT;@pxl-Test(
C; @cumSum(

Here is the compiler’s source code in iX2Web:

**iX201FE7 D97327MTAJ UmF3PUVudG VyIHRoZSBH VEIgY29kZX x8VSdFbnRl ciB0aGUgR1 RCIGNvZGUn CTANCjcJVG V4dD1bUmF3 XXxVTQkwDQ o3CVRleHQ9 W1RleHRdfE QnXFwnRScg b3IgJ0wJMA 0KNwlUZXh0 PVtUZXh0XX xEJ1xbJ0Un e29ifSdMCT ANCjcJVGV4 dD1bVGV4dF 18RCdcXSdF J3tjYn0nTA kwDQo3CVRl eHQ9W1RleH RdfEQnWydF JzpMYmwgMD onTAkwDQo3 CVRleHQ9W1 RleHRdfEQn XSdFJzpHb3 RvIDA6J0wJ MA0KNwlUZX h0PVtUZXh0 XXxEJ3tvYn 0nRSdbJ0wJ MA0KNwlUZX h0PVtUZXh0 XXxEJ3tjYn 0nRSddJ0wJ MA0KNwlUZX h0PVtUZXh0 XXxEJ0AnRS c6SWYgJ0wJ MA0KNwlUZX h0PVtUZXh0 XXxEJyMnRS c6RWxzZSAn TAkwDQo3CV RleHQ9W1Rl eHRdfEQnJC dFJzpUaGVu OidMCTANCj cJVGV4dD1b VGV4dF18RC cmJ0UnOkVu ZDonTAkwDQ o3CVRleHQ9 W1RleHRdfE QnJiYnRScg YW5kICdMCT ANCjcJVGV4 dD1bVGV4dF 18RCchISdF J25vdCgnTA kwDQo3CVRl eHQ9W1RleH RdfEQnfidF JzpEaXNwIC dMCTANCjcJ VGV4dD1bVG V4dF18RCdg J0UnOklucH V0ICdMCTAN CjcJVGV4dD 1bVGV4dF18 RCdfJ0UnU3 RyMCdMCTAN CjcJVGV4dD 1bVGV4dF18 RCdwOydFJz pQcm9tcHQg J0wJMA0KNw lUZXh0PVtU ZXh0XXxEJ1 5eJ0UnIHhv ciAnTAkwDQ o3CVRleHQ9 W1RleHRdfE QnKDsnRSco KCgnTAkwDQ o3CVRleHQ9 W1RleHRdfE QnKTsnRScp KSknTAkwDQ o3CVRleHQ9 W1RleHRdfE QncjsnRSdy YW5kJ0wJMA 0KNwlUZXh0 PVtUZXh0XX xEJ24/J0Un cmFuZEludE 5vUmVwKCdM CTANCjcJVG V4dD1bVGV4 dF18RCcrKy dFJysxMDAn TAkwDQo3CV RleHQ9W1Rl eHRdfEQnLS 0nRSctMTAw J0wJMA0KNw lUZXh0PVtU ZXh0XXxEJ2 c7J0UnOkdv dG8gJ0wJMA 0KNwlUZXh0 PVtUZXh0XX xEJ2w7J0Un OkxibCAnTA kwDQo3CVRl eHQ9W1RleH RdfEQnaDsn RSc6SG9yaX pvbnRhbCAn TAkwDQo3CV RleHQ9W1Rl eHRdfEQndj snRSc6VmVy dGljYWwgJ0 wJMA0KMTAJ SnVuaz1IZX JlIGlzIHRo ZSBUSS1CYX NpYyA4My84 NCBjb2RlfF tUZXh0XXxV J1RJLUJhc2 ljIDgzLzg0 IGNvZGUnCT ANCg===*

Readers Comments (1)

  1. iX2Web does not appear to be available anywhere.
    This makes all your GTB answers on codegolf.stackexchange.com untestable.
    Can you make iX2Web available for download, or make the GTB compiler available in some other form (like an .exe?). Without this, most of your codegolf answers are BAD.

Leave a comment

Your email address will not be published.


*



*