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

System Specification for C65Fred BowenMarch 1, 1991

This command should be used before and BASIC command that has an address parameter. The address parameters are limited to the range (0-65535, $0000-$FFFF hex). The BANK command tells the computer which 64K byte memory bank the location you want is in.

The memory__bank parameter is number from 0-255. Refer to the System memory map to see what is in each bank. A BANK number greater t1fan 127 (i.e., has its most significant bit set) means "use the current system configuration", and must be used to access an 1/0 location. BASIC defaults to BANK 128.

For examples, see PEEK, POKE, etc.

BEGIN/BEND - Extend an IF clause over more than one line

BEGIN/BEND are used to define a block of code which is considered by the IF statement to be one statement.

The normal usage of IF/THEN/ELSE would be along the following lines:

    IF boolean THEN statement(s) : ELSE statement(s)

The main restriction is that the entire body of the IF/THEN/ELSE construct can only occupy one line. BEGIN/BEND allows either the 'THEN' or the 'ELSE' clause to run on for more than one line.

    IF boolean THEN BEGIN ;
    
    statements ....
    statements ...
    statements ... BEND : ELSE BEGIN
    statements ...
    statements ... BEND

Remember, however, that this is only a way to extend the body for more than one line: all other 'IF/THEN' rules apply. For example:

    100 IF x=1 THEN BEGIN : a=5
    110 b=6
    120 c=7
    130 BEND : print "ah-ha!"

In the above example, "ah-ha!" would be printed ONLY if the expression expression 'x=1' is TRUE, because the print statement is on the same logical line as the THEN clause.

It is bad practice to GOTO a line in the middle of a BEGIN-BEND block. If BEGIN or BEND is encountered outside of an active IF,statement, it is ignored.

BLOAD - loads a binary disk file into memory

           BLOAD "filename" [,Bbank] [,Paddress] [<ON|,>Udevice]

Used to load a machine language program or other binary data (such as display pictures or sprite data) into memory. If a load address is not given, the load address given in the disk file will be used. If a bank number is not given, the bank given in the last BANK statement will be used. If a load overflows a bank (that is, the load address exceeds 65535 ($FFFF), an 'OUT OF MEMORY' error is reported. Also see the LOAD command.

    BLOAD "sprites", P(dec("600")), BO

BOOT - Load and execute a program



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