Implement LDA Operation
authorJacob Casper <dev@jacobcasper.com>
Tue, 16 Jan 2024 02:21:29 +0000 (20:21 -0600)
committerJacob Casper <dev@jacobcasper.com>
Tue, 16 Jan 2024 02:47:29 +0000 (20:47 -0600)
commitf8ce1d6ff81596babe0f2c581c0646870cfafd82
tree15fcdd6ac2b423c0c074d9c73a30c83776d1cba6
parent5a34417306c564ec0b47c893836df914140ebc6c
Implement LDA Operation

The LDA operation reads the value from a memory location given by the
instruction, and loads it to rA. Implementing this required fleshing out
the address calculations, fixing bugs in the `Word::as_field_spec()`
method, and fixing up visibilities of various structs. Pulling the
FieldSpec out of a Word being used as an Instruction was also necessary.

Work to have addressing respect the index offset is still necessary, but
we can update state with registers now!

This desperately needs convenience methods for testing so I can take
human readable opcodes and convert them to Words more easily.
src/instruction.rs [new file with mode: 0644]
src/machine.rs
src/main.rs