Use enums for write mode, and change datatypes from int/long/char to int32_t/uint8_t where possible
Syntax: write <memtype> <start addr> <no. byte to write> <byte to write> ...