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

System Specification for C65Fred BowenMarch 1, 1991

write channel, such as one to a disk filet printer, or RS232.

when redirected via CMD, all output which normally would go to the screen (such as PRINT commands, LIST output, DIRECTORY lists, etc.) is sent to another device or file.

The redirection is terminated by CLOSE-ing the CMD channel or executing a PRINT# to the CMD channel. Some output devices require a PRINT# to be performed before the CMD channel is closed, such as printers, to cause the device's buffer to be flushed (i.e., displayed).,

Any system error will redirect output back to the system default, normally the screen, but will not flush nor close the output channel.

If the optional string is given, it is output immediately after the CMD device is established. This feature is normally used to set up printers (eg., set printer modes via escape codes) or to identify the output (eg., title printouts).

        OPEN 4,4  OPENS device #4, which is the printer,
        CMD 4     All normal output now goes to the printer.
        LIST      The LISTing goes to the printer.
        PRINT#4   Set output back to the screen.
        CLOSE 4   Close the printer channel.

COLLECT - Check (validate) disk, delete bad files and free lost sectors

                      COLLECT [Ddrive] [<ON|,>Udevice]

Refer to the DOS 'V'alidate command. This command will cause the DOS to recalculate the Block Availability Bain (BAM) of the diskette in the indicated drive, allocatimT only those sectors being used by valid, properly closed files. All other sectors are marked as "free" and improper files are automatichly deleted.

Note: COLLECT should be used with extreme care, and MUST NOT be used on diskettes with special boot sectors or direct access (eg., random) files. In any case, be sure the diskette has been BACKUP-ed first.

COLLISION - Setup subroutine to handle special events

                        COLLISION type [,linenumber]
    
                         [*** THIS MIGHT CHANGE ***]

COLLISION is used to handle "interrupt" situations in BASIC, such as sprites bumping into things or lightpen triggers. When the specified situation occurs, BASIC will finish processing the currently executing instruction and perform an automatic GOSUB to the linenumber given.

When the subroutine terminates (it must end with a RETURN) BASIC will resume processing where it left off. Interrupt handling continues until a COLLISION of the same type but without any linenumber is specified. More than one type interrupt may be enabled at the same time, but only one interrupt can be handled at a time (i.e., no recursion and no nesting of interrupts). The type interrupt can be:

  1. = Sprite to Sprite collision
  2. = Sprite to display data collision
  3. = Light pen

Note that what caused an interrupt may continue causing interrupts for some time unless the situation is altered or the interrupt is. disabled. This is especially true for BASIC, which is slow to


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