Skip to content

Peek command seems to alter memory #34

Description

@econtrerasd

Version:
BASIC816 v0.2.0-alpha+274

Description:
When you peek at a memory address (at least in the graphics area memory &hb0000) the memory position at the location+4 that you peek is zeroed.
For a graphical demo of this behavior the provided code shows sprite 1 on screen and then proceeds to poke 1s to create a solid sprite. Just after this the code peeks at all its values.
You'll see the sprite appear and dissapear magically!

Code:

5 CLS
10 GRAPHICS 47
20 spb%=&hb00000: REM sprite block constant
30 SPRITE 1,0,spb%
40 SPRITEAT 1,100,100
50 SPRITESHOW 1,1
60 FOR c%=0 to 1024:POKE spb%+c%,1:NEXT
70 FOR c%=0 to 1024:a%=PEEK(spb%+c%):NEXT

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions