aboutsummaryrefslogtreecommitdiff
path: root/src/inst.c
AgeCommit message (Collapse)Author
2023-10-22Added opcode OP_DUP_*Aryadev Chavali
Duplicates the nth datum off the stack, pushing it to the top. Useful for operations such as MOV which eat the stack.
2023-10-22Cleaned up inst.cAryadev Chavali
Use (H)WORD_SIZE more, added some notes, etc
2023-10-22Functions which convert (h)words to and from bytesAryadev Chavali
Uses memcpy internally, so we don't need to care about endianness.
2023-10-22Changed format of inst_printAryadev Chavali
Prints the opcode then any operands in the following brackets
2023-10-21Implemented opcode_as_cstr for NOT,OR,AND,XOR,EQAryadev Chavali
2023-10-21Helper functions for read/write instructions from darr or FILE*Aryadev Chavali
2023-10-21Switched from floats to halfwordAryadev Chavali
Registers are now just words, with pushing from and moving to registers with specified subtypes just pushing those types into the word registers. That means there are 8 word registers which can act as 16 half word registers, which themselves can act as 64 byte registers.
2023-10-16Added opcode_as_cstr, opcode_type_as_cstr and inst_printAryadev Chavali
Pretty self explanatory, helps with logging.
2023-10-16Fixed bug with get_opcode_data_typeAryadev Chavali
Pushed the bits one step too far.
2023-10-16Set opcode after reading parameters in inst_read_byteAryadev Chavali
2023-10-16Added functionality to read and write instruction bytecodeAryadev Chavali
Uses some bit hacks to quickly check what data type an opcode may have by shifting down to units then casting it to a data_type_t. Not very well tested yet, we'll need to see now.