[Prev] [Next] [Contents] [Commodore] [New] [Search] [Home]


TYPE: String Function
FORMAT: STR$ (<numeric>)

Action: STR$ gives you the STRing representation of the numeric value of the argument. When the STR$ value is converted to each variable represented in the <numeric> argument, any number shown is followed by a space and, if it's positive, it is also preceded by a space.

EXAMPLE of STR$ Function:
   100 FLT = 1.5E4: ALPHA$ = STR$(FLT)

   15000     15000


TYPE: Statement
FORMAT: SYS <memory-location>

Action: This is the most common way to mix a BASIC program with a machine language program. The machine language program begins at the location given in the SYS statement. The system command SYS is used in either direct or program mode to transfer control of the microprocessor to an existing machine language program in memory. The memory-location given is by numeric expression and can be anywhere in memory, RAM or ROM. When you're using the SYS statement you must end that section of machine language code with an RTS (ReTurn from Subroutine) instruction so that when the machine language program is finished, the BASIC execution will resume with the statement following the SYS command.

EXAMPLES of SYS Statement:
SYS 64738 (Jump to System Cold Start in ROM)
10 POKE 4400,96:SYS 4400(Goes to machine code location 4400 and returns immediately)

[Prev] [Next] [Contents] [Commodore] [New] [Search] [Home]
This page has been created by Sami Rautiainen.
Read the small print. Last updated November 08, 1998.