#include "errorcodes.h"
#include <stdint.h>


Data Structures | |
| struct | Instruction |
| Representation of an instruction in an easily accessible structure. More... | |
Defines | |
| #define | NO_ADDRESSING 0x0 |
| Address mode: no addressing. | |
| #define | IMMEDIATE_ADDRESSING 0x0 |
| Address mode: immediate addressing. | |
| #define | DIRECT_ADDRESSING 0x1 |
| Address mode: direct addressing. | |
| #define | INDIRECT_ADDRESSING 0x2 |
| Address mode: indirect addressing. | |
| #define | NO_OPERAND 0xffffff |
| Value for the operand when no operand has been given. | |
Enumerations | |
| enum | Boolean { _FALSE = 0, _TRUE = 1 } |
| Boolean type. More... | |
Functions | |
| Instruction | pasm_stringToInstruction (char *line, ErrorCode *error) |
| Compile a string into an instruction. | |
| char * | pasm_instructionToString (Instruction instruction) |
| Get a string representation of an instruction. | |
| uint32_t | pasm_instructionToValue (Instruction instruction) |
| Convert an instruction to its numerical value. | |
| Instruction | pasm_valueToInstruction (int32_t value) |
| Convert a numerical value to an instruction. | |
| int32_t | pasm_getSignedValue (uint32_t unsignedValue) |
| Convert an unsigned value into a signed value. | |
| uint32_t | pasm_getUnsignedValue (int32_t signedValue) |
| Convert a signed value into an unsigned value. | |
| enum Boolean |
| int32_t pasm_getSignedValue | ( | uint32_t | unsignedValue | ) |
Convert an unsigned value into a signed value.
| unsignedValue | The unsigned value |
| uint32_t pasm_getUnsignedValue | ( | int32_t | signedValue | ) |
Convert a signed value into an unsigned value.
| signedValue | The signed value |
| char* pasm_instructionToString | ( | Instruction | instruction | ) |
Get a string representation of an instruction.
| instruction | Instruction to get a string representation for |
| uint32_t pasm_instructionToValue | ( | Instruction | instruction | ) |
Convert an instruction to its numerical value.
| instruction | Instruction to convert |
| Instruction pasm_stringToInstruction | ( | char * | line, | |
| ErrorCode * | error | |||
| ) |
Compile a string into an instruction.
| line | String representation of an instruction to compile into an actual instruction | |
| error | An error code (NO_ERROR if no error occured) |
| Instruction pasm_valueToInstruction | ( | int32_t | value | ) |
Convert a numerical value to an instruction.
| value | Numerical value to convert |
1.5.6