TRS-80®
MICRO COLOR
COMPUTER
SYSTEM

Start-Up

  1. Turn the television set ON.
  2. Select the channel 3 or 4
  3. Set the Antenna Switch to COMPUTER
  4. Turn the Computer ON
  5. Turn any accessory equipment (e.g., a printer) on.
    This message will be displayed:

    MICROCOLOR BASIC v.r
    COPYRIGHT 1982 MICROSOFT
    OK

    (v.r represents your version and release)
    The computer is now ready to use.

    Radio Shack®

    The biggest name in little computersTM
    © Copyright 1982 by Radio Shack, A Division of Tandy Corporation

    Special Characters

         
    $Makes variable string type.
    :Separates statements on the same line.
    ,(comma) PRINT punctuation: spaces over to the next 16-column PRINT zone.
    ;PRINT punctuation: separates items in a PRINT list but does not add spaces when they are output.
     

    Operators

    Each operator or group of operators is precedent over the group below it.
    ^Exponentiation
    -, +Unary negative, positive
    *, /Multiplication, division
    +, -Addition and concatenation, subtraction
    <, >, =, <=, >=, <>
    NOT
    AND
    OR
    Relational tests
     

    Functions

    Argument ranges are indicated below by special letters:
    x:(-1x10E38, -1x10E-38), (1x10E-38, 1x10E38)
    c:(0, 255)
    n:(-32768, 32767)
    str:string argument
    var:variable name

    ABS(x)Computes absolute value.
    Y = ABS(X)
    ASC(str)Returns ASCII code of first character of string.
    A = ASC(T$)
    CHR$(c)Returns character for ASCII, control, orgraphics code.
    P$ = CHR$(T)
    COS(numeric)Returns cosine of an angle given in radians.
    Y = COS(7)
    EXP(numeric)Returns natural exponential of number (Enumber).
    Y = EXP(7)
    INKEY$Gets keyboard character if available.
    A$ = INKEY$
    INT(x)Returns largest whole number not greater than x.
    Y = INT(X)
    LEFT$(str,c)Returns the left portion of the string.
    P$ = LEFT$(M$,7)
    LEN(str)Returns the number of characters in a string.
    X = LEN(S$)
    LOG(numeric)Returns natural logarithm.
    Y = LOG(353)
    MEMFinds amount of free memory.
    PRINT MEM
    MID$(string,pos,len)Returns a substring of another string. If length option is omitted, the entire string right of pos is returned.
    PRINT MID$(A$,3,2)
    F$=MID$(A$,3)
    PEEK(n)Gets value in location n (n = 0 to end of memory).
    V = PEEK(18520)
    POINT(x,y)Tests whether the specified graphics cell is on or off, x (horizontal) = 0 - 63; y (vertical) = 0 - 31. The value returned is -1 if the cell is in character mode, 0 if it is off, or the color code if it is on. See CLS for color codes.
    IF POINT(13,25) THEN PRINT "ON"
    RIGHT$(str,c)Returns right portion of string.
    Z$ = RIGHT$(AD$, 5)
    RND(n)Generates a "random" number between 1 and n inclusive if n>1, or between 0 and 1 if n = 0.
    Y = RND(100)
    PRINT RND(0)
    R = RND(X)
    SGN(x)Returns sign component: -1, 0, 1, if x is negative, zero, positive.
    X = SGN(A*B)
    SIN(x)Computes sine; angle must be in radians.
    Y = SIN(X)
    STR$(x)Converts a numeric expression to a string.
    S$ = STR$(X)
    SQR(numeric)Returns the square root of a number.
    Y = SQR(5+3)
    TAN(numeric)Returns tangent of angle given in radians.
    Y = TAN(45.7)
    VAL(str)Evaluates a string as a number.
    V = VAL("100 DOLLARS")

     

    Control Keys

    [CONTROL][A]   Cancels last character typed; moves cursor back one space.
    [CONTROL][Q]   Erases the current line.
    [BREAK]Interrupts anything in progress and returns to command level.
    [ENTER]Signifies end of current line.
    [SPACEBAR]   Enters a space (blank) character and moves cursor one space forward.
    [SHIFT][@]  Causes currently executing program to pause (press any key to continue).
    [SHIFT][0]   (Shift Zero) Causes letters to be printed reversed (on the display) or lowercase (on the line printer).

     

    TRS-80® MICRO COLOR BASIC

     

    BASIC Statements

    CLEARnReserves n bytes of string storage space (0-3142). Initializes all variables.
    CLEAR
    CLEAR 75
    CLEAR0
    CLOADLoads a BASIC program file from cassette. Only the first 8 characters of the file name are used.
    CLOAD
    CLOAD "MIXIT"
    CLOAD*Loads numeric data into an array from a cassette file which has been created using CSAVE*. Array name must be specified.
    CLOAD* G,"TOMFILE"
    CLS(c)Clears the display to the color (c) specified. If c is omitted, green is used.
    Colors:
    all colors off (black)greenyellow
    blueredbuff
    cyanmagentaorange
    CONTContinues execution of program after [BREAK] or STOP.
    CONT
    CSAVEStores resident program on cassette tape. Only the first 8 characters of the file name are used.
    CSAVE
    CSAVE"MIXIT"
    CSAVE*Saves the contents of a numeric array on cassette tape for later use by CLOAD*. Array name must be specified.
    CSAVE* G,"ASHER"
    DATAStores data to be accessed by a READ statement.
    DATA "LINCOLN, A", 1861, ILLINOIS
    DIMDimensions one or more arrays.
    DIM R(65), W(40)
    DIM AR$(8,25)
    DIM L(3,18,5)
    ENDEnds program execution.
    FOR...TO...
    STEP/NEXT
    Opens program loop.
    FOR I=1 TO 8 (...) NEXT I
    FOR C=0 TO 5 STEP 2 (...) NEXT C
    GOSUBTransfers program control to the specified subroutine.
    GOSUB 750
    GOTOTransfers program control to the specified line.
    GOTO 180
    IF...THENTests conditional expression.
    IF P=0 THEN 200
    IF N<>3 THEN GOSUB 500
    INPUTInputs data from the keyboard.
    INPUT X
    INPUT L,M,N
    INPUT "NEXT";N
    LISTLists program lines to the video display.
    LIST
    LIST 50-85
    LLISTLists program lines to the line printer.
    LLIST
    LLIST 50-
    LPRINTPrints an item or list of items on the printer.
    LPRINT "TEST1"
    NEWErases program from memory, intializes all variables.
    NEW
    ON...GOSUBMulti-way branch to specified subroutines.
    ON Y GOSUB 50, 100, 150, 200
    ON...GOTOMulti-way branch to specified lines.
    ON X GOTO 190, 200, 210
    PRINTPrints an item or list of items on the display at current cursor position.
    PRINT X+Y
    PRINT "U.S.A"
    PRINT@nPrints beginning at n, n = 0 - 511.
    PRINT@238, "Center"
    PRINT TABMoves the cursor to specified column position.
    PRINT TAB(5) "NAME"
    READReads value(s) from a DATA statement.
    READ T
    READ S$
    READ NM$, AGE
    REMRemark; instructs computer to ignore rest of line.
    REM PLACE COMMENTS HERE
    RESET(x,y)Turns off graphics block at specified location.
    x (horizontal) = 0-63.    y (vertical) = 0-31
    RESET(21,30)
    RESET(L1,L2)
    RESTOREResets data pointer to first item in the first data line.
    RESTORE
    RETURNReturns from subroutine to next statement after GOSUB.
    RETURN
    RUNExecutes resident program or portion of it.
    RUN
    RUN 150
    SET(x,y,c)Turns on graphics cell to specified color (c) at specified location x (horizontal) = 0-63; y (vertical) = 0-31. See CLS for colors. If c = 0 cell is unchanged or set green (if in character mode).
    SET(10,0,1)
    SET(L1,L2,C)
    SKIPFPositions cassette tape at end of next file.
    SKIPF"PROGRAM"
    SKIPF
    SOUND(f,d)Sounds the frequency (f = 1-255) and duration (d = 1-255) specified.
    SOUND 1,200
    SOUND 128,5
    STOPStops execution of a program.
    STOP

     

    Video Control Codes

    Dec  Hex  PRINT CHR$(code)
    808Backspaces and erases current character.
    130DLine feed with carriage return.
    3220Space

     

    Error Messages

    Abbreviation Explanation
    /0Division by 0
    BSSubscript out of range
    CNCan't continue
    DDRedimensioned array
    FCIllegal function call
    FMBad file mode
    IDIllegal direct
    I/OInput/Output error
    LSString too long
    NFNEXT without FOR
    ODOut of data
    OMOut of memory
    OSOut of string space
    OVOverflow
    RGRETURN without GOSUB
    SNSyntax error
    STString formula too complex
    TMType mismatch
    ULUndefined line

     

    Radio Shack®

    1A3Printed in Korea
    811011870A