summaryrefslogtreecommitdiff
path: root/io.c
AgeCommit message (Collapse)Author
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-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-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-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-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.