summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* nqasm: allow spaces around operators in expressionsBobby Bingham2017-01-191-8/+8
|
* nqasm: use " " in grammar instead of T_SPACEBobby Bingham2017-01-191-10/+10
|
* ndasm: re-indent token definitionsBobby Bingham2017-01-191-13/+13
|
* nqasm: don't echo unknown tokensBobby Bingham2017-01-192-0/+3
|
* nqdasm: simplifyBobby Bingham2017-01-191-2/+2
|
* nqasm: add command line processingBobby Bingham2017-01-193-18/+82
|
* Change addpc back to immediate instead of pc offset operandBobby Bingham2017-01-181-1/+1
| | | | | Now that PC offset operands convert an absolute address into a relative offset from the PC, having this be immediate is much more useful.
* nqasm: support binary arithmetic operators in immediate operandsBobby Bingham2017-01-184-9/+36
|
* nqasm: support unary operators in immediate expressionsBobby Bingham2017-01-184-6/+45
|
* nqasm: allow "." to refer to current pc in immediate operandBobby Bingham2017-01-184-4/+9
|
* nqasm: reformat argument rules in grammarBobby Bingham2017-01-181-14/+7
|
* nqasm: lex registers as if they were labelsBobby Bingham2017-01-182-13/+29
| | | | | This makes parsing registers trickier, but allows a label to have a name 'r0'-'r7', which would otherwise conflict with the registers.
* nqasm: allow specifying labels for operandsBobby Bingham2017-01-186-44/+100
|
* nqasm: store instructions in memory before assemblingBobby Bingham2017-01-181-16/+37
|
* nqasm: parse labelsBobby Bingham2017-01-176-2/+110
|
* nqdasm: reduce size of line structureBobby Bingham2017-01-151-11/+13
| | | | | | | | This structure represents essentially all the run-time memory use of the disassembler, with 32k instances of it allocated. On 64-bit systems, this cuts the size of a single instance from 16 bytes to 8 bytes. On a 32-bit system, it goes from 12 bytes to 8 bytes.
* nqdasm: use a static buffer for input linesBobby Bingham2017-01-151-65/+33
| | | | Simplifies buffer handling and searches for lines by address.
* nqdasm: Generate necessary labels for pcoff operandsBobby Bingham2017-01-151-1/+48
|
* nqdasm: Factor out operand value extraction codeBobby Bingham2017-01-151-10/+28
|
* nqdasm: read entire file into memory before processingBobby Bingham2017-01-151-10/+71
|
* nqdasm: Factor out disassembly code from command line parsingBobby Bingham2017-01-151-16/+21
|
* nqdasm: Add command line opt for input/output filesBobby Bingham2017-01-151-13/+80
|
* nqasm: Fix warnings about missing braces in initializersBobby Bingham2017-01-151-2/+2
|
* Turn on compiler warningsBobby Bingham2017-01-151-1/+1
|
* nqdasm: Output .word directives for unknown instructionsBobby Bingham2017-01-151-1/+1
|
* nqdasm: improve spacing between mnemonic and operandsBobby Bingham2017-01-151-1/+3
|
* nqdasm: Add disassemblerBobby Bingham2017-01-155-37/+87
|
* Switch addpc to use pc-offset instead of immediate operandBobby Bingham2017-01-152-2/+5
| | | | | This makes more sense, as the argument is really a signed offset from the program counter.
* nqasm: Reformat nop grammarBobby Bingham2017-01-151-2/+1
|
* nqasm: Handle pc offset argumentsBobby Bingham2017-01-151-14/+20
|
* nqasm: Rename arglist non-terminals to a_*Bobby Bingham2017-01-151-39/+46
| | | | | This will allow differentiation between pcoff (a single argument) and a_pcoff (an argument list consisting of only a pcoff argument).
* nqasm: Handle immediate argumentsBobby Bingham2017-01-152-6/+41
|
* nqasm: Handle register and register indirect argumentsBobby Bingham2017-01-155-53/+76
|
* nqasm: Improve parsing at end of fileBobby Bingham2017-01-152-4/+6
| | | | | | | | | Bison's implicit $accept rule ends with the END token. The fact that input could also end with END (via the line non-terminal) resulted in a shift reduce conflict. We resolve the conflict by modifying the lexer so that if it encounters end of file partway through a line, it produces a final EOL token before EOF.
* Add gitignoreBobby Bingham2017-01-151-0/+7
|
* nqasm: Initial stab at a lexer and parserBobby Bingham2017-01-155-0/+278
| | | | | So far, this only understands instructions, but no operands or labels. It doesn't handle bad input gracefully. It's just enough to test the basics.
* Add table of instructions and their encodingsBobby Bingham2017-01-152-0/+104