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

System Specification for C65Fred BowenMarch 1, 1991

    BSAVE [@]filename", Pstart-adr TO Pend-adr [,Bbank) [,Ddrive] [<ON|,>Udevice]

BSAVE copies an area of memory into a binary disk file called "filename", starting at start adr and ending at end adr-1 (i.e., end adr must be one more than-actual last address saived). If a bank number is not given, the bank given in the last BANK statdment will be used. End adr must be greater than start adr, and area to be saved must be limit-ed to the indicated memory bank. You cannot save data from more than one bank at a time. Start adr is saved on disk as the load address. If filename already exists on the designated diskette, memory is NOT saved and a 'FILE EXITS' error is reported., Preceding the filename with an '@'-sign will allow you to overwrite an existing file, but see the cautions at DSAVE.

    BSAVE "sprites", P(dec("600")) TO P(dec("800")), BO

BUMP - Sprite collision function

                                BUMP (type)

This function return a numeric summary of sprite-collisions accumulated since the last time the BUMP function was used.

You can use the COLLISION command to set up a special routine in your program to receive control whenever a sprite BUMPs into something, but a particular COLLISION does not have to be enabled to use BUMP. See the COLLISION command.

To evaluate sprite collisions, where a BIT position (0-7) in the numeric result corresponds to a sprite number (0-7):

    BIT position:           7 6 5 4 3 2 1 0
                            | | | | | | | |
    BUMP value in binary:   0 0 0 0 0 1 0 1     = 5 decimal

BUMP (1) returns a value representing sprite-to-sprite collisions.
BUMP(2) returns a value representing sprite-to-data collisions.

    X = BUMP(1)         Result is X=3 if sprites 0 & 1 collided,
                        as shown above. (binary 101 = 5 decimal).

Note that more than one collision can be recorded, in which case you should evaluate a spritels.position using the RSPPOS function to figure out which sprite collided with what. BUNP is reset to zero after each use.

BVERIFY - Compare a binary disk file to an area of memory

    BVERIFY "filename" [,Paddress] [,Bbank) [,Ddrive ] [<ON|,>Udevice]

BVERIFY compares a binary disk file called "filename" to an area of memory. In direct mode, if the areas contain the same data the message "OK" is displayed, and if the data differs the message 'VERIFY ERROR' is displayed.

In program mode, an error is generated if a mismatch is found, otherwise the program continues normally. The comparison starts with the address given, else it starts at the address stored on disk. The comparison ends when the last byte is read from the disk file.

If a bank number is not given, the bank given in the last BANK statement will be used. The ending address is determined by the length of the disk file. The comparison halts on the first mismatch


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