Hacker's Edge Game Guide: Programming/Example program: peek.asm

Example program: peek.asm
Sept. 4, 2014
Last updated at June 29, 2016

Here is an example program which takes an argument from the command-line and displays the data in that memory address back to the terminal:

LDA $f4
CMP #1
BNE done
LDA ($f5),Y
STA $ffd2
LDA #10
STA $ffd0

This example will be available on the in-game examples server, which you can then copy the source to your host and compile it yourself. This tool can be very helpful to see what's at a specific address in memory, and is used like this:

peek.bin $2aff