Applesoft BASIC
(Redirected from BASIC)
Applesoft BASIC is a programming language created for the Apple II series of computers, developed by Marc McDonald and Ric Weiland and based on Microsoft BASIC. Introduced in January 1978, the language superseded Integer BASIC and added support for floating point math. The great majority of the Eamon game series was originally written in Applesoft BASIC.
Example
The following are the first BASIC instructions in the Main Hall program on the Eamon Master disk:
15 DK$ = CHR$ (4)
16 HOME : VTAB 5: PRINT "EAMON ADVENTURER'S GUILD": PRINT "7625 HAWKHAVEN DR.": PRINT "CLEMMONS, NC 27012": FOR I = 1 TO 500: NEXT
20 ONERR GOTO 7000
30 PRINT DK$;"OPEN THE ADVENTURER": PRINT DK$;"READ THE ADVENTURER": INPUT NAME$: INPUT REC: PRINT DK$;"CLOSE"
40 ONERR GOTO 100
50 PRINT DK$;"OPEN CHARACTERS,L150": PRINT DK$;"READ CHARACTERS,R";REC: INPUT NAME$: INPUT HD,AG,CH: FOR X = 1 TO 4: INPUT SA%(X): NEXT : FOR X = 1 TO 5: INPUT WA%(X): NEXT : INPUT AE
60 INPUT SEX$
70 INPUT GOLD,BANK: INPUT AC: FOR W = 1 TO 4: INPUT WNAME$(W),WTYPE%(W),WODDS%(W),WDICE%(W),WSIDES%(W): NEXT W: PRINT DK$;"CLOSE"
80 DEF FN P(X) = INT (X * RTIO + .5)
100 PRINT : PRINT "AS YOU WANDER ABOUT THE HALL, YOU": PRINT "REALIZE YOU CAN DO ONE OF SIX THINGS--": PRINT " 1. GO ON AN ADVENTURE.": PRINT " 2. VISIT THE WEAPON SHOP FOR WEAPONS AND/OR ARMOUR."
110 PRINT " 3. HIRE A WIZARD TO TEACH YOU SOME SPELLS.": PRINT " 4. FIND THE BANKER TO DEPOSIT OR": PRINT " WITHDRAW SOME GOLD.": PRINT " 5. EXAMINE YOUR ABILITIES.": PRINT " 6. TEMPORARILY LEAVE THE UNIVERSE."
120 PRINT : PRINT "(HIT THE KEY FOR YOUR CHOICE, 1-6)";
130 GET A$:CMD = VAL (A$): IF CMD < 1 OR CMD > 6 THEN 130
140 PRINT CMD: PRINT : ON CMD GOTO 1000,2000,3000,4000,5000,6000