Discover millions of ebooks, audiobooks, and so much more with a free trial

Only $11.99/month after trial. Cancel anytime.

SuperBASIC: The Manual
SuperBASIC: The Manual
SuperBASIC: The Manual
Ebook60 pages22 minutes

SuperBASIC: The Manual

Rating: 0 out of 5 stars

()

Read preview

About this ebook

Do you want to write BASIC programs for your Color Computer, but don’t want to deal with two-character variables and invisible (or non-existent) structure? Consider superBASIC. Use loops, multi-line if/else/endifs, include files, and more. You can even use command-line switches to target the same BASIC program for computers with different hardware.

LanguageEnglish
Release dateApr 17, 2020
ISBN9780463594568
SuperBASIC: The Manual
Author

Jerry Stratton

Jerry Stratton writes at Mimsy Were the Borogoves on politics, technology, and programming for all. He has a Bachelor's degree in Psychology from Cornell University and studied guitar at the Musicians Institute of Technology in Hollywood, California. He has appeared in at least one bad movie from the eighties and participated in at least one ill-fated pre-Internet hypermedia startup.

Read more from Jerry Stratton

Related to SuperBASIC

Related ebooks

Programming For You

View More

Related articles

Reviews for SuperBASIC

Rating: 0 out of 5 stars
0 ratings

0 ratings0 reviews

What did you think?

Tap to rate

Review must be at least 10 words

    Book preview

    SuperBASIC - Jerry Stratton

    SuperBASIC

    Jerry Stratton

    SuperBASIC

    The Manual

    For the TRS-80 Color Computer

    ©2020 Jerry Stratton

    Published May 2020

    ISBN 979-8-63-977180-4 (print)

    ISBN 978-0-46-359456-8 (ePub)

    hoboes.com/superbasic

    SuperBASIC version 1.0.0

    Today it seems like a kludge, but all technology looks inelegant 35 years later.—Wayne Lorentz, This TRS-80Getting Started

    Where?

    Download superBASIC and its sample files at hoboes.com/superbasic.

    Why?

    SuperBASIC is a preprocessor for creating Extended Color BASIC code using lengthy variable names, loops, and if/else/endif blocks. It should also work with Color BASIC.

    SuperBASIC is not meant to hide BASIC behind a modern wall. It is meant as a superstructure that enhances BASIC. I wrote it specifically for the TRS-80/Tandy Color Computer, though it may well work with other old-school Microsoft BASICs. It adds to and does not subtract from Extended Color BASIC, with the exception of line numbers. Because line numbers are generated by the program, you cannot use GOTO statements in your code. You must use superBASIC’s loops and other blocks, so that every GOTO is generated with the correct line number.

    If you provide superBASIC with nothing more than normal BASIC, you will get exactly what you provided, with line numbers added:

    INPUT WHAT IS YOUR NAME?;A$

    PRINT HELLO, ;A$

    Run superBASIC on it:

    superbasic hello.txt

    10 INPUT WHAT IS YOUR NAME?;A$

    20 PRINT HELLO, ;A$

    30 END

    The real power of superBASIC, however, are its loops and readable variable names.

    loop

    loop

    %key$=inkey$

    endloop unless (%key$=)

    print asc(%key$)

    endloop

    Run superBASIC on this, and it converts the two loops into standard old-school BASIC. The first loop is a single line looking at INKEY$ until the user presses a key. The second loop reruns the entire program after displaying the ASCII value of the keypress:

    superbasic keyboard\ values.txt

    10 KE$=INKEY$:IF KE$= THEN 10

    20 PRINT ASC(KE$)

    30 GOTO 10

    40 END

    Enjoying the preview?
    Page 1 of 1