about summary refs log tree commit diff stats
path: root/subx/013direct_addressing.cc
Commit message (Collapse)AuthorAgeFilesLines
* 4688Kartik Agaram2018-10-121-35/+35
|
* 4686Kartik Agaram2018-10-121-5/+5
|
* 4634Kartik Agaram2018-10-011-5/+5
|
* 4614 - redo simulated RAMKartik Agaram2018-09-291-1/+2
| | | | | | | | | | | Now simulated 'Memory' isn't just a single flat array. Instead it knows about segments and VMAs. The code segment will always be first, and the data/heap segment will always be second. The brk() syscall knows about the data segment. One nice side-effect is that I no longer need to mess with Memory initialization regardless of where I place my segments.
* 4503Kartik Agaram2018-09-221-3/+15
| | | | Include LEA (load effective address) in the SubX subset of x86 ISA.
* 4578 - subx: implement inc/dec operationsKartik Agaram2018-09-211-0/+121
|
* 4547Kartik Agaram2018-09-161-1/+1
|
* 4537Kartik Agaram2018-09-071-8/+48
| | | | | | | | | | | | | | | Streamline the factorial function; we don't need to save a stack variable into a register before operating on it. All instructions can take a stack variable directly. In the process we found two bugs: a) Opcode f7 was not implemented correctly. It was internally consistent but I'd never validated it against a natively running program. Turns out it encodes multiple instructions, not just 'not'. b) The way we look up imm32 operands was sometimes reading them before disp8/disp32 operands.
* 4527 - reading commandline argumentsKartik Agaram2018-08-301-7/+0
| | | | | | | | | | | The new example ex9 doesn't yet work natively. In the process I've emulated the kernel's role in providing args, implemented a couple of instructions acting on 8-bit operands (useful for ASCII string operations), and begun the start of the standard library (ascii_length is the same as strlen). At the level of SubX we're just only going to support ASCII.
* 4469Kartik Agaram2018-08-031-0/+425