Age | Commit message (Collapse) | Author |
|
The carry flag is now set properly, and the rotation
now is set properly by the carry flag, even for
shift values greater than one.
- Added a test program for properly testing the rotate
instructions.
|
|
emulator's memory.
All reads outside of the emulator's memory give back
$/0xFF bytes, while all writes outside of the
emulator's memory are ignored.
- Implemented malloc(), and free() in the SuB Suite.
In order to do this, I had to add support for a heap,
which I did by reserving the first 3 banks of the
address space (the first 192K), and by adding a
routine that finds the end of the RAM.
In this case, I set the starting address for the
routine at bank 3 (bank 4 with one indexing), but,
the routine's starting address isn't hardcoded, and
thus, any starting address can be passed as an
argument.
The routine uses the fact that we can now read/write
outside the emulator's memory, and also uses the
fact that writing outside the emulator's memory will
be ignored, and that reading outside the emulator's
memory will always read $/0xFF bytes, and uses that
to signal that it's reached the end of the RAM.
- Added a test program for getting the size of RAM
starting at address $/0x20000.
|
|
|
|
handled.
- Added a function called fix_symtree(), which when
called. will rearrange the symbol tree based on the
order they're declared in by the token stream.
The reason I wrote this, was to make sure the symbol
tree could be printed correctly.
- Optimized print_symtree() to now use tail recursion.
- Started adding all of the SuB Suite's structs.
|
|
emulator's assembler.
- Make the symbol table a doublely linked list, in
both ways.
- Optimized the memcopy() function.
- Changed the benchmark timing, to now use a timer, and
stops once the timer reaches zero.
When the timer hits zero, it sends SIGALRM to the
main function, which tells the emulator that the
benchmark is done.
|
|
- Added a memcopy() function, for later on.
|
|
- Optimized the memory read, and write functions.
- Made the emulator faster, and cleaner in general.
|
|
- Simplified the effective address functions.
- Made SuBEditor a bit faster.
- JSR, and RTS now support using the RS prefix, which
is used to specify the return address size, with an
RS prefix of 0 being a return address size of 64
bits, rather than 8 bits.
|
|
instruction formatting simpler.
- Refactored the instruction table of the emulator's
assembler, it now has two parts, the addressing mode
bits, and the base value.
The base value is what's used to generate the actual
opcode, with the addressing mode bits telling the
assembler what addressing modes this instruction
supports.
The reason for doing this was to use less space. For
comparison, the previous version used 870 bytes for
the instruction table, while the new version uses
only 222 bytes. The new version is nearly 4 times
smaller than the pervious version.
- The B register based ALU instructions now use their
own addressing mode, and are specified by using 'b'
as the operand for those instructions.
For example, to add the Accumulator with the B
register, you now use "ADC B" instead of "AAB".
|
|
- Changed the file structure of the SuB Suite, so that
all variable declarations, symbols, and constants
are in a single file.
- Moved the C library functionss into a separate
file, and made them use stack frames.
- Added support for using the emulator's assembler for
realtime debugging, to enter it, get in to stepping
mode by pressing Ctrl+s, press any other key, then
press F1,
The reason for having to press some other key before
pressing F1 is because it only allows entering the
assembler when the keyboard is not ready.
- Added the ".res" directive to the emulator's
assembler, the ".res" directive tells the assembler
to reserve however many bytes specified by the
operand.
- Fixed some bugs in the emulator's assembler.
|
|
- Added a new preifx called the OF prefix, which adds
the contents of a specific register to the current
operand.
- Added a table generator, which parses opcode table
csv files.
|
|
The reason for doing this was because JSL, and RTL are
redundent, as they both do the same thing as JSR, and
RTS.
|
|
- Moved the large enums, and large tables into separate
header files.
- Added enums for implementing the base extension
- Fixed a bug in the assembler.
- Worked more on SuBAsm.
|
|
assembler.
Single quote marks works in the assembler just like
they do in C, except that it only supports a handful
of escaped characters, like '\n', and '\r'.
|
|
emulator some more.
I optimized the emulator by replacing the main loop
from a conditional while loop, to an unconditional for
loop.
|
|
emulator smaller, and faster.
I am also starting to make SuBEditor's source code
more readable.
|
|
It now has a lexer/tokenizer, along with a parser.
I have also made the emulator even smaller.
|
|
|
|
efficient, and ported SuBEditor to C.
I revamped the opcode table to add another prefix bit
for the addressing mode, finally giving access to all
addresses, without wasting any bytes.
I made the stack based operations more efficient, by
sort of applying Duff's device to it.
And I ported SuBEditor to C, to make it easier for me
to figure out how to implement SuBAsm.
|
|
Which I am now calling, SuBEditor.
|
|
I also added a new input testing program called
input-3.s, which contains a mostly working editor.
|
|
We're now Free Software!!!
|
|
for use of the B register as an operand, for ALU based
instructions.
This allows for both low code size, and high
performance.
This means we can save upto 9 bytes, by just using
the B register for ALU operations, rather than using a
memory address.
The indirect addressing modes, give Sux the abillity
to now use pointers.
Hope you guys have a Merry Christmas!
From mr b0nk 500 <b0nk@b0nk.xyz>
|
|
monitor, and the cursor movement routines for SuBAsm.
|
|
remainder during a DIV instruction.
I also added the TAB, and TBA instructions, for
transfering between the Accumulator, and the
B register.
|
|
Also added support for moving the cursor arround.
|
|
It now does not use an interrupt, although, in the
emulator, it does act like an interrupt, when the
keypoll macro is set to 0.
|
|
I also added the WAI instruction, which puts the thread
that executed it, into a catatonic stat, where it can't
do anything, until an interrupt occurs.
I will be starting work on GFsuX next.
I also might start work on SuBAsm, the
Sux Bootstrapping Assembler.
|
|
the suffix.
I added this because BieHDC said the already existing
notation glowed in the dark too much.
|
|
I also added the ASR instruction, for doing arithmetic
shifts, and have added a hello world program.
|
|
AKA, referencing a label before it has been declared
yet.
|
|
monitor.
I also rewrote the fibonacci program to include lables.
|
|
between the three main registers.
These instructions are:
TAY: Transfer Accumulator to Y.
TAX: Transfer Accumulator to X.
TYX: Transfer Y to X.
TYA: Transfer Y to Accumulator.
TXA: Transfer X to Accumulator.
TXY: Transfer X to Y.
|
|
from it into sux.c.
|
|
I have also added a program that computes the
Fibonacci sequence that I wrote in Sux assembly.
|
|
|
|
Any instructions that either have a register size of
8 bits, use implied addressing, or branch can save a
byte by disabling the prefix byte.
It does this by checking if the first three bits are
all set to 1.
If true, then it will treat it as a prefix
byte, otherwise, it will treat it as an opcode.
|
|
Added a prefix byte to tell the CPU certain
information such as, how many bytes to load into the
registers, or what ISA extension we want to use.
I also added an assembly language monitor, so that I
don't have to write stuff in machine code.
|