Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
an interrupt gets triggered.
This is done in order to properly use the `read_addr()`
function.
|
|
|
|
|
|
out unwanted bits when inverting the addressing mode
bitmask.
|
|
after all bits have been found, if inverting is enabled.
|
|
bitmask in `opcode-bitmask-gen`.
|
|
memory directly.
|
|
status register.
|
|
|
|
|
|
bitmasks.
|
|
|
|
|
|
instruction entry, rather than the entry of the supplied
instruction id(s).
|
|
modes into a single block.
|
|
|
|
immediate data.
|
|
|
|
macro.
This program will help with generating the bitmasks for
the instruction handler macro.
|
|
This macro will create a function for each opcode,
but with only a single block of code for each one.
It uses a bitmask (one bit for each opcode) that will
evaluate which blocks of code are used by each opcode.
The bitmask checks are (usually) evaluated at compile
time, which means that each function will only have the
blocks that had the bit for that opcode set in the
bitmask.
|
|
This fixes a bug where it would zero out the info of
the next malloc'd block.
|
|
This fixes a bug where when shifting the line left, it
would overwrite everything after the cursor with the
character at the cursor's position.
The reason this was happening is because memcpy copies
from start to end, and because the destination is more
than one byte ahead of the source, it overwrites the
next length source bytes, which will repeat until it's
copied n bytes.
|
|
direction version of memcpy.
This can help with some subroutines/functions like
shftln, which need to copy data in a certain direction
depending on the condition.
|
|
debuging mode.
|
|
`b`.
|
|
registers.
This was due to print_char clobbering `d` when calling
get_index.
|
|
This helps reduce code duplication, and makes it
easier to both read, and add new handlers.
|
|
This subroutine gets the index of a given character
from a string.
This will help in replacing some routines like
get_ctrlidx, isdelm, and isdelm2.
|
|
using SIB, rather than with lsl.
This doesn't increase, or decrease the code size, but
does make it both more compact, and easier to read.
|
|
handle_directive() with a call to parse_quote().
This not only reduces code duplication, but also makes
it more robust in the process.
|
|
parse_quote().
This allows for replacing the string parsing code in
handle_directive() with a call to parse_quote().
|
|
This makes the code much smaller than the previous
version.
|
|
sequence for the escape character.
|
|
with deeper scope local symbols.
This is done to make the code easier to read.
|
|
greater than one are handled.
It wasn't getting the correct depth when relative
local symbols were used.
So to account for that, it adds the relative depth
(number of '@'s in a row), with the absolute depth
(number of '.'s), to get the true scope depth.
|
|
This will eventually replace the per-line lexer.
|
|
in the assembler.
- Rewrote more of the SuB Suite to use the new calling
convention.
- Fixed a bug to do with SIB operands in the
emulator's disassembler.
- Made the MMV instruction not require a loop prefix
for copying data.
|
|
- Implemented support for the SIB addressing mode into
the assembler.
SIB is short for "Scale Index, and Base", and works
much like x86's version of SIB (scale*index+base),
although my version supports any scale value between
1, and 256.
- Redid the line shifting routine in SuBEditor.
It now uses memcpy, and memset to do that, and also
supports shifting the line left, or right by any
number of characters.
|
|
This is because the previous commit actually created
a bug, rather than fixing one.
- Added JMP, and JSR to the ortho extension, and
implemented them both in the assembler, and
emulator.
|
|
|
|
I was finally able to figure out how to implement the
expression parser into two functions.
It can be done in a single function, but I used two
functions to make it easier to read.
|
|
It's now separate from the lexer, and was designed to
make it both easier to understand, and easier to
parse.
|
|
- Started work on implementing the Super VIA emulation.
- Added support for disabling disassembly per
instruction, when in debug mode.
- Did some more work on rewriting the SuB Suite to
work with the new calling convention.
- Rewrote the symbol handling code in the emulator's
assembler, to make it both simpler, and to add
support for arbitrarily deep symbol scopes.
- Added support for arbitrarily deep local symbol
scopes.
For example, to declare a symbol of depth 2, you add
two '@' characters to the start of the symbol name.
In other words, the number of '@' characters before
the symbol name is what determines the scope of that
symbol.
And to use a symbol thats outside the current
scope, you would use the same syntax as using a
struct member, so you would do `global.local`.
|
|
I mainly did this to be able to display all 16 main
registers, but also to simplify the debugger.
|
|
This was done in order to save three bytes whenever
you want to immediatly do a conditional branch after
the `set` instruction.
|
|
assembler.
The main thing I had to do was implement the parsing
of the condition code token, but that wasn't hard to
do, since I had already done the lexing part already.
The next thing to do, will be to design a calling
convention for Sux.
|
|
|