Commit Graph
37 Commits
Author SHA1 Message Date
glm94 d3d2b06dbd Redesigning the way the Symbol's represent string declaration (the .db msg 'Hello World' type of declarations). 2022-10-06 21:33:29 -05:00
glm94 f38da9cc74 A bit of cleanup. 2022-10-04 21:05:15 +00:00
glm94 33309a2759 Updated the Instruction's structure and updated the Parser accordingly. 2022-10-04 20:37:47 +00:00
glm94 1f7989533b Fixed a bug in the SymbolsTable where it wouldn't update its size. 2022-10-03 20:11:04 -05:00
glm94 cd1258a724 Fixed various Parser bugs. 2022-10-03 19:58:44 -05:00
glm94 be91e3c112 Updated the parser to better handle parameters, sort of and including a string length assembly program to use as a test for the whole assembler. 2022-10-03 21:26:28 +00:00
glm94 f7cd87f13f Started reworking the Parser to simplify how instructions will be represented. It will act like a 'first pass' that will do grammar checks but not verify the parameters of the opcodes. 2022-10-02 22:54:18 -05:00
glm94 0b58e0124f Some refactoring to update everything to use the new structures and some new considerations for how Symbols and Instructions shoudl be represented. 2022-09-15 22:14:38 -05:00
glm94 2ae60a607c Incomplete, but I want to make sure the ideas I have here don't get wiped. Sadly this commit won't compile. 2022-09-15 21:29:27 +00:00
glm94 2518214585 Added a length attribute to the symbol. 2022-09-06 14:15:45 +00:00
glm94 7004fff659 This feels like a trainwreck but eh. Changed the way the opcodes are managed. Hopefully this is the right direction when I add support for multiple ASM files. 2022-09-01 18:46:59 +00:00
glm94 13f8ff194b Smoothbrain indeed... 2022-08-30 22:48:49 -05:00
glm94 dac01ffd0c Changed the TokenClass from opcode to nomic, a less smoothbrain name IMO and also frees up Opcode for a better use later on. 2022-08-30 22:06:50 -05:00
glm94 3c7056c5e6 The main function will now write out the output of the parser. 2022-08-29 21:23:02 +00:00
glm94 6c7b8d5356 Fixed a bug where CMP REG, REG wouldn't get encoded and a disassembler bug related to said CMP bug. 2022-08-29 19:29:34 +00:00
glm94 5f437b6869 Both the assembler and the disassembler should now support all the instructions I've layed out thus far. 2022-08-29 18:51:48 +00:00
glm94 e3b4293314 Fixed a bug in the parser where the size of the binary was too big. 2022-08-29 18:02:11 +00:00
glm94 ae1e73e00f Fixed a bug to correct the location of symbols in the heap. 2022-08-29 16:00:02 +00:00
glm94 7385a807a5 Created a basic binary format to help guide the disassembler. 2022-08-29 15:57:14 +00:00
glm94 0d3f8a460e Added more instructions for the parser to emit and refactored the code in doing so. 2022-08-28 15:37:56 -05:00
glm94 8e9d1aefe8 Fixed some disassembler issues. At least some instuctions are being disassembled correctly. 2022-08-26 21:43:03 -05:00
glm94 0785f21805 Added a disassembler which is still very buggy. Also fixed some bugs with the opcode mask getting function. 2022-08-26 21:41:02 +00:00
glm94 e4a191a17e Refined the encoding some more. 2022-08-26 19:00:37 +00:00
glm94 eb5e2c506e Got the start of encoding opcodes. 2022-08-26 18:27:41 +00:00
glm94 0e53f9798f Added a distinction between constant numbers and what are effectively memory addresses (i.e. strings and labels). 2022-08-25 19:47:16 -05:00
glm94 03d5660677 Seems I fixed the memory offset bugs, so far anyway... 2022-08-25 19:54:47 +00:00
glm94 4f6d5f652e Made use of the Symbols Table, and started the proccess of determining the memory location of opcodes and variables. 2022-08-25 19:06:05 +00:00
glm94 89ab951c6a Refactored the parsing code just a touch. 2022-08-24 21:23:14 +00:00
glm94 947de1d14c Added support for declaring a variable with the '.db' directive. Address calculations still need to be done, but at the very least the variable's name is showing up in the symbols table. 2022-05-16 15:17:19 +00:00
glm94 5265666178 Got the Parser to, so far, correctly (minus memory leaks) parse out and report errors with opcodes and their parameters. 2022-05-12 23:16:02 -05:00
glm94 2de3538d80 Parser is now mostly setup for the 'peek and advance' pattern. Still having infinite loop issues somewhere though. 2022-05-12 21:30:02 +00:00
glm94 72525959f6 Reworked the tokens to include a broad class to make parameter matching a bit easier, and removed the hexadecimal distinction. 2022-05-12 20:26:14 +00:00
glm94 72abf6c4ab Started work on rewriting the Parser. 2022-05-10 21:03:09 +00:00
glm94 fbef044905 Added some simple symbol handling to the Parser. 2022-05-06 18:55:22 +00:00
glm94 8ec0b9b216 Code cleanup. Converting a number lexeme to a proper integer setup but not done yet. So number tokens don't have a valid value. 2022-05-05 16:12:33 +00:00
glm94 19021ff782 Modified how registers and opcodes are represented. This commit is a bit buggy but doesn't crash and burn at least. I just wanted the new structs push out before making a bigger mess of things as I try to organize this all. 2022-02-17 21:35:57 -06:00
glm94 3d4ab57f05 Created the skeleton for the parser. 2022-02-07 15:33:58 +00:00