.
VR
idbeholda's Journal


idbeholda's Journal

THIS JOURNAL IS ON 107 FAVORITE JOURNAL LISTS

Honor: 0    [ Give / Take ]

PROFILE




1 entry this month
 

TTScript

14:12 Jun 16 2015
Times Read: 589


I decided that 8 years of procrastinating was more than enough. So I wrote and compiled (from the ground up) a low-level scripting language with a high level implementation just because I can. As time goes on, I'll add new features while working on optimizing the engine overall. The artificial architecture is similar to that of a graphing calculator with potential for simultaneous text and vector graphics.



http://www.tot-ltd.org/tt/TTScript.rar



Language Documentation

==========================

TTScript is not intended as a replacement to anything. It's meant as a hobbyist's dream come true. Remember back when we used to play with graphing calculators? It's kinda like that, but with a few more improvements to the environment and userspace.



Variables have one name, but 4 "aspects" - Numeric, String, Module/Filename (String2), and Byte



If you need more than 256 variables or 255 files open at any given time, you'll either need to use memd/meml feature, or just put down the keyboard and find something else to do with your time.



Main output screen is handled like an LCD for a graphing calculator. If you're looking for fancy, 3D hardware accelerated graphics with a 4GB GPU, go play some World of Chatcraft or Prunescape, you freak. DSCRN is used to handle the "output" graphical LCD-type display (10x33)



Arguments are handled via TARG, TCMD, TC0-Tc5, which means that each argument has up to six optional parameters. Declared variables that are present in TARG are replaced with their appropriate memory addresses for each argument that requires them. Yes, that includes the disp command, mainly because I'm lazy, and you should be naming your variables something cryptic and unreadable.



There is no GOTO/IF...THEN command. If/Then type results explicitly execute a command. Compare two variables, if the operand returns true, execute module. This forces clean, modularized code right from the break, especially since this is a high level implementation of a low level interpreted scripting language. I do what I want.



Commands/Syntax

=======================



Address Space Format XX = 00-FF (must be hex)





cls - clear screen

disp [] - display []

loadgr filename - load plain text graphic display (

rndfill - fills individual displays with randomzied r,g,b background, no additional arguments required

set x,y,r,g,b - sets back color at x,y; r,g,b must be 00-ff

setfill r,g,b - sets entire display to r,g,b

out x,y,[] - display [] starting at x,y

msgbox [message],[title] - display standard "OK" messagebox with "message", and title bar.

drwln X1,Y1,X2,Y2,0-200,0-6 - draw specific line vector on form (X1,Y1 - X2,Y2), line types 0-6

0 - Transparent

1 - Solid

3 - Dash

4 - Dot

5 - Dash-Dot-Dot

6 - Inside Solid

'drwln 200,200,300,300,0,1

clrln - 0-200 clear specific vector line

clrv - clear vector lines



'--------------------

'set, declare, and access variables

'after declaring variables, use their names, followed by either #,$,*, or a period.

'# = Numeric Aspect

'$ = String Aspect

'* = File/Module Aspect

'. = Byte Aspect

' if you don't declare a variable name, you'll need to use XX addresses, followed by notation

'--------------------

dvar XX,name - declare variable at XX memory address, assign name to address; X = 0-f

rvar XX - remove variablename pointer, reset all aspects

svar XX/variablename,(#$*.),[]/00-FF - Save to variable aspect, value (00-FF in cases of ./byte)

dspvr XX/variablename, aspect - Display variable aspect

shwvr x,y,XX/variablename,aspect - Show variable aspect on screen at X,Y

'-------------------------

'math operations, and saving to variables (only implements numeric aspect

'-------------------------

str XX/variablename - set variablename to saving variable

add XXXX - add value to target and save

sub XXXX - subtract value from target and save

mult XXXX - multiply value with target and save

div XXXX - divide by value and save

int XX/variblename - save integer value of variable to target

abs XX/variablename - save absolute value of variable to target

rnd XXXX - seed random value of variable to target and save

sin XXXX - sine of variable to target and save

cos XXXX - cosine of variable to target and save

tan XXXX - tangent value of variable to target and save

'-------------------------

'DOS-like Command Sequence

'-------------------------

run modulename

mkdir dirname

rmdir dirname

del filename

copy sourcename,destinationname

'-------------------------

'File, I/O Control

' ---types---

' input

' output

' binary

'-------------------------

onkey XXX(decimal),modulename

iseof 02-FF,modulename

in$ XX/variablename,prompt

in# XX/variablename,prompt

fopen filename,02-FF,type

fclose 02-FF

fprint 02-FF,[]

fread 02-FF,XX/Variablename

get 02-FF,XX/Variablename

put 02-FF,XX/Variablename

'-------------------------

'memstate management

'-------------------------

clrsys - garbage collection/reset system variables and aspects

memd spacename - saves memory state to /memstate/spacename_aspect

meml spacename - loads memory state from /memstate/spacename_aspect

'-------------------------

'If/Then type arguments

if=! aspect, XX/variablename1, XX/variablename2, modulename

':example

' if! $, First_Name_Guest1, First_Name_Guest2, MEET_NEW_PEOPLE

'The bad news is that you're gradually slipping into senility.

'-------------------------


COMMENTS

-



Heckle
Heckle
19:19 Jun 16 2015

...I can't even motivate myself to clean out my closet.





idbeholda
idbeholda
18:40 Jun 24 2015

I'm not even close to being done with this abomination.








COMPANY
REQUEST HELP
CONTACT US
SITEMAP
REPORT A BUG
UPDATES
LEGAL
TERMS OF SERVICE
PRIVACY POLICY
DMCA POLICY
REAL VAMPIRES LOVE VAMPIRE RAVE
© 2004 - 2024 Vampire Rave
All Rights Reserved.
Vampire Rave is a member of 
Page generated in 0.0682 seconds.
X
Username:

Password:
I agree to Vampire Rave's Privacy Policy.
I agree to Vampire Rave's Terms of Service.
I agree to Vampire Rave's DMCA Policy.
I agree to Vampire Rave's use of Cookies.
•  SIGN UP •  GET PASSWORD •  GET USERNAME  •
X