STOS BASIC

STOS BASIC is an interpreted language for the Atari ST. First issued, it was founded in October 1989 by Ariola Soft. Produced STOS Basic Francois Lionet, Constantin Sotiropolus and Frédéric Pinlet under the direction of Jacues Fleurance at the company Mandarin software. STOS Basic does not run on GEM and contains 340 commands.

The programming language, a dialect of BASIC, specializes in game development and provides for the use of graphical user interfaces, graphics, music, commands, and sprites are available. Animations and music can thereby run independently from the main program. Parts of the memory are maintained as so-called memory banks, which allow a command to the screen content or parts thereof, and to secure restore later. Individual banks are reserved for data such as sprites, icons, music or character sets.

Programming Example Screen

This example copies back the screen image and a section in the memory bank and again.

10 reserve as data screen 10 20 screen copy logic to 10 ( Saves the screen contents in bank 10 ) 30 screen copy 10 to logic ( Holt the content from bank 10 and displays it on the monitor ) 40 screen copy logic, 0,0,100,100 to 10,0,0 ( Saves a screen -Neck ) Programming example Sprites

This example illustrates a sprite is animated and moves it on the screen.

10 load " sprites.mbk " ( Loading a whole group of sprites into memory ) 20 sprite 1,100,100,6 ( Showing picture 6 as Sprite # 1 on ) 30 anim 1 " (6.10) (7.10) (8.10) L" ( Sets the animation sequence fixed) 40 move x 1 " ( 1,3,50 ) (1, -3.50 )" ( Sets the movement sequence fixed) 50 anim on 60 move on Sound Programming Example

10 load " sound.mbk " ( Loading a file with sound data into memory ) 20 music 2 ( Lets Play the melody 2 ) 30 tempo 10 ( Reduces playback speed ) 40 transpose 30 ( Increases the pitch) graphics commands

STOS BASIC provides 32 commands for the creation of graphics available, including:

  • ARC ( arc )
  • EARC ( elliptical arc )
  • BOX ( empty rectangle )
  • RBOX ( empty rectangle with rounded corners)
  • PIE ( circular section )
  • BAR (Bar )
  • SET LINE ( line shape set )

Programming example window

10 wind open 1,0,0,9,4,4,3 ( Opens a new window ) 20 title " Window # 1 " ( Sets the title for the window) 40 window 1 (Enabled window 1) 50 windmove 20.20 ( Moves the window ) Programming example menu

10 menue $ (1 ) = " Action " 20 menue $ ( 2 ) = " Mouse" 30 menue $ (2,1 ) = " Arrow" 40 menue $ ( 2,2) = 'hand' Onmenue 50 goto 10 Program flow instructions

  • GOTO
  • GOSUB
  • FOR / NEXT
  • WHILE / WEND
  • REPEAT / UNTIL
  • IF / THEN / ELSE
  • Var ON GOTO / GOSUB ( change depending on the value of the variable )
  • ON ERROR GOTO ( for error handling )
  • INKEY $ ( keyboard query )
  • INPUT

Trigonometric and Mathematical Functions

Floating point numbers are calculated exactly at STOS Basic to 16 decimal places. To increase the speed of programs, one can reduce the accuracy to 7 decimal places.

  • DEG
  • RAD
  • SIN / ASIN / HSIN
  • COS / ACOS / HCOs
  • TAN / ATAN / Htan
  • PI
  • LOG
  • EXP
  • SQR
  • ABS
  • INT
  • MAX / MIN
  • RND

Additionally, you can also use direct machine instructions at STOS Basic or call the STOS functions via machine language commands directly. Thus, one can affect the Bitwise processor also. It is also possible to load more complex machine programs into memory and call from the Basic program out on.

There is also a compiler that converts programs written in BASIC into executable machine code programs to STOS Basic.

750833
de