| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
Reorganize layers to introduce the translation workflow right at the start.
We also avoid duplicating parsing code. Programs are always parsed into
the `program` data structure.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Return to the usual whitespace-skipping istreams. No need to go beyond
word-based parsing.
This exercise reinforces the amount of duplication between
load_program() and transform_immediate().
|
| |
|
|
|
|
|
|
|
|
| |
Drop a safety net; we now assume that Memory is large enough for any
addresses we may encounter.
Dropping all comparisons with Mem.size() now makes our Memory_offset
indirection airtight.
|
|
|
|
| |
Insert an indirection to avoid over-allocating memory for RAM.
|
|
|
|
| |
Encapsulate RAM management.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Learning to use the data segment.
Currently, subx can only run the teensy files generated from flat
assembler:
test4
test5
test7
This is not a priority to fix. These files are just useful references to
have around.
|
|
|
|
| |
We'll see if this is useful. Mostly just stretching our legs.
|
|
|
|
| |
Starting to work out the skeleton every phase needs to have.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
The source 'language' is still entirely open. We'll see how it evolves
as I write programs in machine code.
|
| |
|
| |
|
|
|
|
| |
subx: unconditional 'jump'
|
| |
|
| |
|
| |
|
|
|
|
| |
subx: now starting on subtraction instructions.
|
| |
|
|
|
|
|
|
|
| |
subx: add immediate
First example of a more complex opcode that needs to do its own decoding
to decide what instruction to run.
|
| |
|
|
|
|
| |
Fix non-standard switch statement.
|
|
|
|
| |
Start implementing core x86 addressing mode decoding.
|
|
|
|
| |
Consistent naming for the common terms 'register' and 'memory'.
|
|
|
|
|
|
| |
No, go back to a vector for `Memory`. We need it to be contiguously laid
out in memory so that we can write words all at once rather than a byte
at a time.
|
|
|
|
| |
Take control of hex byte parsing.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Make memory a sparse map rather than contiguous vector.
In the process, a bugfix for `load_program`: support multiple lines of
comments.
Also save a local copy of the x86 cheatsheet I've been using:
https://net.cs.uni-bonn.de/fileadmin/user_upload/plohmann/x86_opcode_structure_and_instruction_overview.pdf
|
|
|
|
| |
Fix CI.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|