about summary refs log tree commit diff stats
path: root/subx/013direct_addressing.cc
Commit message (Collapse)AuthorAgeFilesLines
* 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