This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using CString = const char*; | |
using String = std::string; | |
//----------------------------------------------------------------------------- | |
// Template based sprintf replacement | |
//----------------------------------------------------------------------------- | |
class TSException : public std::runtime_error { | |
public: | |
TSException() : std::runtime_error("Typed String format exception") { } | |
TSException(CString what) : std::runtime_error(what) { } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function chr() { | |
printf \\$(printf '%03o' $((16#$1)) ) | |
} | |
addr=$((16#302100000)) | |
cx=$(devmem $addr w) | |
c=$((16#${cx:2})) | |
echo "- The file size is $c bytes." | |
a=$((addr + 4)) | |
for (( i=0; i<$c; i++)) ; do |