aboutsummaryrefslogtreecommitdiff
path: root/lib/base.h
AgeCommit message (Collapse)Author
2024-04-12Fixing build problems due to endian.hAryadev Chavali
Have to define _DEFAULT_SOURCE before you can use the endian conversion functions. As most standard library headers use features.h, and _DEFAULT_SOURCE must be defined before features.h is included, we have to include base.h before other headers.
2024-04-09Done TODO: Comment coverage > lib > base.hAryadev Chavali
Pretty simple
2023-11-02Small fixesAryadev Chavali
2023-10-31Added flag which forces the printing of hexesAryadev Chavali
Anything other than char (which can just use print.byte to print the hex) and byte (which prints hexes anyway), all other types may be forced to print a hex rather than a number if PRINT_HEX is 1.
2023-10-31Introduced 3 new union members to data_tAryadev Chavali
These new members are just signed versions of the previous members. This makes type punning and usage for signed versions easier than before (no need for memcpy).
2023-10-31Introduced signed versions of common typesAryadev Chavali
For each type T there is the signed version s_T
2023-10-29Added a "usage" message and colours for assemblerAryadev Chavali
Prints useful and pretty messages when verbose being at least 1.
2023-10-29Auto-fill copyright notice in examples/fib.cAryadev Chavali
2023-10-28Added macro to do safe subtractions on a wordAryadev Chavali
Default C just lets overflows occur for subtraction, so this macro will default to 0 if the subtraction causes an overflow.
2023-10-23Added lib folder for general stuff, introduced as target to MakefileAryadev Chavali