The AROS Archives(anonymous IP: 35.175.190.77,116) 
 HomeRecentStatsSearchSubmitUploadsMirrorsContactInfoDisclaimerConfigAdmin
 Menu


 Categories

   o Audio (57)
   o Datatype (13)
   o Demo (26)
   o Development (198)
   o Document (18)
   o Driver (18)
   o Emulation (55)
   o Game (341)
   o Graphics (126)
   o Library (18)
   o Network (43)
   o Office (9)
   o Utility (173)
   o Video (20)

Total files: 1115

Full index file
Recent index file

Hosted by
aros-exec.org
 Readme for:  Development » Language » sdl_basic-1.0.2.i386-aros.tar.gz

Sdl_basic-1.0.2.i386-aros

Description: This is an implementation of the language BASIC
Download: sdl_basic-1.0.2.i386-aros.tar.gz       (TIPS: Use the right click menu if your browser takes you back here all the time)
Size: 288kb
Version: 1.0.2
Date: 02 Oct 09
Author: Dave Ashley
Submitter: Miloslav Martinka
Homepage: http://www.linuxmotors.com/
Requirements: i386 AROS
Category: development/language
License: GPL
Distribute: yes
FileID: 615
 
Snapshots:
 
Comments: 0
Snapshots: 1
Videos: 0
Downloads: 195  (Current version)
195  (Accumulated)
Votes: 0 (0/0)  (30 days/7 days)

[Show comments] [Show snapshots] [Show videos] [Show content] [Replace file] 
This is an implementation of the language BASIC I made to expose my kids
to programming. You should be able to build under linux if you have SDL
installed, just do

make
./basic

There are a number of sample basic programs included. Within basic just
do

load cool
run

or
load cool2
run

etc.
cool9 is an "asteroids" game.



Arrow keys work for moving within the typed line, and through a line history.
The page up and down keys, or shifted page up and down keys, scroll through
a text history.

**** BUILDING ON MAC OSX:
If the SDL framework is installed in /Library/Frameworks/SDL.framework
you should be able to build by just doing
make -f Makefile.osx



Basic interpreter commands. Commands can be shortened

edit #             = edit line, arrow keys, delete, backspace, always in
                     insert mode
ren [#[,#]]          = renumber lines, first number is step count, 2nd start #
save filename      = save out program to file (appends .bas automatically)
load filename      = load program from file (appends .bas automatically)
run                = Initialize everything run program
exit               = Exit the program
        = Can execute any statement
list [#[-#]]       = list program or parts of it
new                = Delete program + all variables
scr                = same as new
info               = Print out info on current program
parse              = Parse the basic program and dump the virtual machine code
help  --- prints out help, more detail than this file

Multiple statements can be on a line, separated by ':'.

Variables are any string starting with a-z. Case is not sensitive. Can
contain numbers. Up to 16 characters. Might not be able to start with a
keyword.

[let] variable = expression
goto #
gosub #
return
on expr goto #, ...          ;one based
rem 
dim variable(#[,...])  ; arrays are one based
for variable = expression to espression [step expression]
next [variable]
print string|expression[,|;][...][,|;]
color ,,[,]   ; range 0-255 each
cls  ; clear screen to black
fill ; fill screen with current pen color
pen  ; always circular for now, defaults to '1'
move ,
spot
line ,
NOT IMPLEMENTED:flood , ; does flood fill
NOT IMPLEMENTED:arc ,, ; in radians
NOT IMPLEMENTED: curve ,,,  ; bezier curve
rectangle ,,,
box ,,<1/2 width>,<1/2 height>
rect ,,<1/2 width>,<1/2 height>
circle ,,
disc ,,
NOT IMPLEMENTED:text ,,
NOT IMPLEMENTED:randomize
input variable|string
sleep 
Copyright (c) 2005 The AROS Archives All Rights Reserved
Contact us at: archives@aros-exec.org