s502 assembler
A very simple assembler for the 6502 line of processors written in C
|
Conventions Naming everything in snake_case functions should start with module name Structure Objects no one should possess a direct instance of any object
const char * ADRM_NAMES[]
Human-readable names of address modes.
@ ADRM_COUNT
Total number of addressing modes.
Conventions Naming everything in snake_case functions should start with module name Structure Objects no one should possess a direct instance of any only pointers constructors should return with a or NULL destructors(named free) should free ALL memory associated with the object - deleting an object should always be at MOST 2 lines - calling object_free and setting the ptr to NULL(later can be omitted) Error handling - functions should return 0 to indicate success
int ADRM_SIZES[ADRM_COUNT+1]
operand sizes of addressmodes
Simple key->value map (str->int)
AddressMode enum and related data.
An element of a TokensList.
Conventions Naming everything in snake_case functions should start with module name Structure Objects no one should possess a direct instance of any only pointers constructors should return with a pointer
A doubly-linked list for storing Tokens.
Questions to Szkup object model ok pass Tokens by ref possily better logging modular or macro commandline would be better
Questions to Szkup object model ok pass Tokens by ref possily better logging modular or macro possibly
Conventions Naming everything in snake_case functions should start with module name Structure Objects no one should possess a direct instance of any only pointers constructors should return with a or NULL or negative to indicate error most errors should cause the program to end error handling should still free all allocated resources(memory, files) - all functions should signal their failed state on receiving an error