# 6502 emulator

The 6502 emulator lives at /emul/6502.fs and interprets 6502 native code. It
exposes itself through the "6502E" struct which extends the CPU struct (see
doc/emul/cpu) and holds register values.

For running an emulated Collapse OS under 6502, see doc/emul/cos.

# API

Fields:

A X Y S P
  8-bit fields corresponding to the register of the same name

PC
  16-bit field corresponding to the register of the same name

Values (not tied to the struct, but inside namespace):

verbose
  If nonzero, will call :. at each instruction it runs.

Words:

exec(
  mem( + $200, where execution begins.

)mem
  mem( + $10000, where emulated memory ends

:reset ( self -- )
  Set P to 0 and PC to $200.
