summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-08-31- Optimized the memory read/write functions a bit more.mrb0nk500
- Added a memcopy() function, for later on.
2020-08-30- Did some more work on SuBAsm's lexer.mrb0nk500
- Optimized the memory read, and write functions. - Made the emulator faster, and cleaner in general.
2020-08-17- Fixed some bugs in the emulator's assembler.mrb0nk500
- 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.
2020-08-13Refactored get_addr(), and all of the effectivemrb0nk500
address handling. It's now all done using several functions for each addressing mode, with the result being the effective address. I did this to make the codebase cleaner, and more readable.
2020-08-12- Refactored the escape sequence parsing, and handling.mrb0nk500
It now uses a struct to store the escape sequence. Before it handles the escape sequence, it parses it, which includes things like getting any arguments that are supplied, and getting the mode type. - Moved the code that handles control codes to a separate function. The reason for doing this was because I wanted to make the escape sequence handling faster, but also make the code more readable at the same time. I got the idea to do this from st, a terminal emulator created by the suckless.org project.
2020-08-11Refactored the keyboard I/O emulation, again.mrb0nk500
I decided to use keypad now, and create a function to return the actual key sequences. The keyboard I/O is also now being handled by the io emulation function, and not by the main function. This should get rid of any possible deadlocks.
2020-08-11- Changed the spacing format to now store the number ofmrb0nk500
spaces, and tabs before the current token. Along with also now storing a sub-token count which is used in case the token's secondary id is meant to be treated as a sub-token. - Added suppor for saving the number of blank lines before the current tokenized line.
2020-08-10Refactored the keyboard I/O emulation.mrb0nk500
It now saves the characters of the typed key into a buffer, and returns each character in the buffer one at a time, until it reaches a null terminator, at which point it starts getting the next key. The reason for doing this was to make getting multi character keys faster, by not calling getch() for each character. The only downside to this is that I have to set a timeout() for getch(), making it somewhat non blocking, although the delay is 8 milliseconds. The next thing I'll probably be doing, is working more on the SuB suite.
2020-08-09Added the bitwise OR, left shift, and right shiftmrb0nk500
expressions to the emulator's assembler.
2020-08-08- Refactored the opcode table, in order to make themrb0nk500
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".
2020-08-08Did a ton of stuff.mrb0nk500
- 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.
2020-07-08- Simplified some parts of the codebase.mrb0nk500
- Fixed some bugs with the push, and pull functions - Fixed a bug in the assembler.
2020-07-06- Implemented a new opcode table.mrb0nk500
- 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.
2020-06-22Did some more stuff.mrb0nk500
- Fixed some bugs in the emulator's assembler. - Worked on SuBAsm's lexer some more. - Created a new directory for the SuB suite, and moved all of the SuB suite's files in there.
2020-06-13Optimized, and cleaned up the codebase.mrb0nk500
2020-06-13Made the source code cleaner.mrb0nk500
2020-06-13Renamed get_opsize(), to get_addrsize(), in order tomrb0nk500
make it clear about what it does.
2020-06-13Make the registers single 64 bit uints, and convertmrb0nk500
all the value getting, and setting into macros. This is to make the codebase cleaner.
2020-06-13Fixed some bugs with freeing the linked lists.mrb0nk500
Thanks to BieHDC for pointing this out to me.
2020-06-11Did some more stuff.mrb0nk500
- Fix some bugs with strings. - Started to refactor the instruction functions. - Added support for using RS prefixes on the memory based increment, and decrement instructions. - Started work on SuBAsm's lexer. Have fun looking at this, BieHDC. :)
2020-06-01- Deleted some commented code.mrb0nk500
- Fixed a bug in SuBAsm.
2020-06-01Did some more refactoring to the assembler.mrb0nk500
- Refactored the symbol, and fixup table to now use a linked list - Added support for local symbols to the assembler. - Rewrote SuBEditor, and SuBAsm to use local symbols.
2020-05-30Fixed a typo, oof.mrb0nk500
2020-05-30Refactored the assembler a bit more, in order to removemrb0nk500
code duplication. The assembler now uses pre-tokens, which are smaller tokens, that make up the larger tokens.
2020-05-29Make JSL, JSR absolute, and remove RTL.mrb0nk500
The reason for doing this was because JSL, and RTL are redundent, as they both do the same thing as JSR, and RTS.
2020-05-28Fixed some stuff in the assembler.mrb0nk500
2020-05-28Refactored the assembler, yet again, and implementedmrb0nk500
support for comma separated values. The assembler now uses a linked list of tokenized lines, each containing a linked list of tokens for that line. I also moved all of the large tables into the higher parts of memory, in order to free up the lower part of memory for the user. Comma sepparated values only work with directives, and only with the byte", word, dword, and qword directives. I also added support for getting the upper, and lower halves of an address. The tokens for both of those are '<', and '>' respectively.
2020-05-18Fixed some more bugs in the assembler.mrb0nk500
2020-05-18Did alot of stuff while I was up at the family trailer.mrb0nk500
- 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.
2020-05-09Added support for single quote marks to the emulator'smrb0nk500
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'.
2020-05-06Removed some duplicate code in the assembler, and mademrb0nk500
the processor status register, a union now.
2020-05-04Made all address decoding, and memory reads/writes bemrb0nk500
done with a union, in order to make it more readable.
2020-05-03Put the instruction, and I/O routines into separatemrb0nk500
functions. I did this to make it more readable, while still making it fast, due to inlining it.
2020-04-27Added support for including source files to themrb0nk500
emulator's assembler. And removed three pointers, and the linewrap table from zero page, in SuBEditor. I moved the linewrap table to address $1000. And because of finally adding include support to the assembler, I can now start work on SuBAsm!
2020-04-19Removed most of the commented code, and optimized themrb0nk500
emulator some more. I optimized the emulator by replacing the main loop from a conditional while loop, to an unconditional for loop.
2020-04-17Made both the assembly language monitor, and themrb0nk500
emulator smaller, and faster. I am also starting to make SuBEditor's source code more readable.
2020-04-09Completely changed the assembler.mrb0nk500
It now has a lexer/tokenizer, along with a parser. I have also made the emulator even smaller.
2020-04-02Made the emulator less bloated, and faster.mrb0nk500
2020-03-24Added support in SuBEditor for true backspace, andmrb0nk500
inserting characters without replacing the old ones.
2020-03-17Cleaned up the debug prints in the C port of SuBEditor.mrb0nk500
2020-03-17Revamped the opcode table, made the emulator moremrb0nk500
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.
2020-03-05Optimize the emulator, even more.mrb0nk500
2020-02-20Finished SuBAsm's screen editor.mrb0nk500
Which I am now calling, SuBEditor.
2020-01-23Start optimizing the emulator.mrb0nk500
I also added a new input testing program called input-3.s, which contains a mostly working editor.
2020-01-10Added GPLv2.mrb0nk500
We're now Free Software!!!
2019-12-24Added support for Indirect addressing modes, and allowmrb0nk500
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>
2019-12-19Fixed some bugs in both the assembly languagemrb0nk500
monitor, and the cursor movement routines for SuBAsm.
2019-12-19Added the B register, which is used for storing themrb0nk500
remainder during a DIV instruction. I also added the TAB, and TBA instructions, for transfering between the Accumulator, and the B register.
2019-12-18Start work on SuBAsm.mrb0nk500
Also added support for moving the cursor arround.
2019-12-17Revamped how the keyboard works.mrb0nk500
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.