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
|
0d060248cb
|
Forgot about the bloody IN instruction...
|
2022-08-25 21:01:35 -05:00 |
|
glm94
|
80bea6f1a8
|
I'm dumb, fixed the CMP opcode overlap..
|
2022-08-25 20:57:33 -05:00 |
|
glm94
|
a96f485da6
|
I believe I have the bit patterns for my opcodes worked out.
|
2022-08-25 20:45:46 -05:00 |
|
glm94
|
88d550f344
|
Added unconditional jump opcode to my comment section.
|
2022-08-25 20:27:25 -05: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
|
64326937b1
|
Added a LineEnd token type.
|
2022-08-25 18:37:25 +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
|
3c4cce0883
|
Added assembler directives as a class of token.
|
2022-05-16 14:27:49 +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
|
fc47bf2143
|
Fixed up the code a bit and fixed a memory leak bug (of course, there's still no good way to free Tokens but that'll be sorted out later).
|
2022-05-05 20:10:10 +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
|
9fa48520c7
|
Added support for 'labels' in the Scanner.
|
2022-05-04 22:58:06 -05:00 |
|
glm94
|
caeaaefbf0
|
Fixed a bug where numbers weren't being added to the token list (I'm very dumb it seems) and added hexadecimal support to the scanner.
|
2022-05-04 22:37:49 -05:00 |
|
glm94
|
101f206dce
|
Hooked up punctuation detection.
|
2022-05-04 21:50:42 +00:00 |
|
glm94
|
859035da2a
|
Updated the scanner to parse registers, assembly keywords and identifiers.
|
2022-05-04 20:07:47 +00:00 |
|
glm94
|
2c9478d311
|
Attempting to declutter the lexer and tokenizer by rereolling them into the 'Scanner' object.
|
2022-05-03 21:20:38 +00:00 |
|
glm94
|
1900b504e7
|
Setup the assembler to use the new file reading code.
|
2022-04-28 22:24:10 -05:00 |
|
glm94
|
1968590654
|
Add a file utility to allow me to read in an entire file instead of doing so line by line.
|
2022-02-23 21:29:53 +00:00 |
|
glm94
|
1fd5c3af57
|
Fixed a bug with the opcode and register types not being set correctly.
|
2022-02-22 21:09:04 -06: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 |
|
glm94
|
7c6e5e1541
|
Last bit of clean up before building the parser.
|
2022-02-02 20:43:25 +00:00 |
|
glm94
|
d39e37b078
|
Updated the lexer to pick out some more language specific grammar.
|
2022-02-02 19:18:27 +00:00 |
|
glm94
|
7a88d6e34d
|
Added code to detect assembler directives and did some minor code clean up.
|
2022-02-01 22:07:00 -06:00 |
|
glm94
|
ebc1d30c1c
|
Added a peek function to the tokenizer.
|
2022-01-31 22:06:52 +00:00 |
|
glm94
|
f88cfda90a
|
Added a dedicated function to the tokenizer for getting string literals.
|
2022-01-31 19:15:27 +00:00 |
|
glm94
|
375fd46045
|
Split up some code to more in line with what its actually doing.
|
2022-01-27 18:20:09 +00:00 |
|
glm94
|
f88613a160
|
Expanded the tokenizer to recognize some opcodes and registers.
|
2022-01-24 17:09:02 +00:00 |
|
glm94
|
2570c5cac0
|
Made some chanegs to the tokenizer to understand hexadecimal formatted numbers, along with some more language grammar primitives.
|
2022-01-23 21:54:06 -06:00 |
|
glm94
|
019a7f44a8
|
Cleaned up the tokenizer and setting the stage for more granular token types.
|
2022-01-21 21:17:37 +00:00 |
|
glm94
|
0636315166
|
Starting to get a basic structure for tokenizing. Currently TK_Number tokens are being generated successfully.
|
2022-01-21 19:35:32 +00:00 |
|
glm94
|
72f6ec12e0
|
Tokenizing now strips the double quotes from strings, leaving only the intended value.
|
2022-01-20 22:10:48 +00:00 |
|
glm94
|
b32e1bad7c
|
Fixed some bugs in the string tokenizer.
|
2022-01-20 21:21:18 +00:00 |
|
glm94
|
23d4bd8089
|
Included a check for commas in the whitespace splitter. Might rename that function but this is all just testing before refactoring so I won't rename things just yet.
|
2022-01-20 19:48:24 +00:00 |
|
glm94
|
99ebd82996
|
Experimenting with tokenizing strings. This commit just focuses on splitting strings up by whitespace.
|
2022-01-20 18:17:58 +00:00 |
|
glm94
|
479dc57ea8
|
Code cleanup in the List code. Possibly saved myself some headache in the future by using the right pointer type in the struct definition.
|
2022-01-18 16:28:49 +00:00 |
|
glm94
|
929f2a7f4b
|
Made the List generic, though more care needs to be taken when using it since memory leaks can happen when structs are used with it.
|
2022-01-17 17:21:40 +00:00 |
|
glm94
|
2c18b593ab
|
Expanded the assembly test code partially, and added some ideas on how to encode instructions.
|
2022-01-07 21:37:32 +00:00 |
|
glm94
|
8656ba7d0c
|
Fixed a bug where the last character of a line would be lost when generating a list of string tokens.
|
2022-01-05 22:51:56 +00:00 |
|