Task 2: memory dump
Float Format (
f) – Add formatfto interpret the next 4 bytes as a 32-bit floating-point number.Octal Format (
o) – Add formatoto print the next 4 bytes as an octal (base-8) integer.Binary Format (
b) – Add formatbto print the next 1 byte as 8 bits of binary (e.g., 01010101).Hex without Prefix (
x) – Add formatxto print 4 bytes in hexadecimal without the standard0xprefix.Truncated String Pointer (
s) – Modify thes(pointer) format to truncate and only print the first 8 characters of the string.Address Tracking (
A) – Add a format characterAthat prints the hex memory address of the current data pointer.Skip Logic (
k) – Implement a "skip" characterkthat advances the data pointer by 4 bytes without printing anything.Item Delimiter – Modify
memdumpto print a custom delimiter (like a vertical bar|) between every parsed item.Big-Endian Integer – Change the integer format
ito print the 4 bytes in Big-Endian order instead of Little-Endian.String Length Tracking (
S) – Change formatS(inline string) to print the string length in parentheses after the text.
Last updated