2014-09-20 20:09:39 +02:00
|
|
|
|
\def\avr@bindec@addmap#1#2{%
|
|
|
|
|
\csdef{avr@bin@#1}{#2}%
|
|
|
|
|
\csdef{avr@dec@#2}{#1}%
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
\avr@bindec@addmap{0}{00000000}
|
|
|
|
|
\avr@bindec@addmap{1}{00000001}
|
|
|
|
|
\avr@bindec@addmap{2}{00000010}
|
|
|
|
|
\avr@bindec@addmap{3}{00000011}
|
|
|
|
|
\avr@bindec@addmap{4}{00000100}
|
|
|
|
|
\avr@bindec@addmap{5}{00000101}
|
|
|
|
|
\avr@bindec@addmap{6}{00000110}
|
|
|
|
|
\avr@bindec@addmap{7}{00000111}
|
|
|
|
|
\avr@bindec@addmap{8}{00001000}
|
|
|
|
|
\avr@bindec@addmap{9}{00001001}
|
|
|
|
|
\avr@bindec@addmap{10}{00001010}
|
|
|
|
|
\avr@bindec@addmap{11}{00001011}
|
|
|
|
|
\avr@bindec@addmap{12}{00001100}
|
|
|
|
|
\avr@bindec@addmap{13}{00001101}
|
|
|
|
|
\avr@bindec@addmap{14}{00001110}
|
|
|
|
|
\avr@bindec@addmap{15}{00001111}
|
|
|
|
|
\avr@bindec@addmap{16}{00010000}
|
|
|
|
|
\avr@bindec@addmap{17}{00010001}
|
|
|
|
|
\avr@bindec@addmap{18}{00010010}
|
|
|
|
|
\avr@bindec@addmap{19}{00010011}
|
|
|
|
|
\avr@bindec@addmap{20}{00010100}
|
|
|
|
|
\avr@bindec@addmap{21}{00010101}
|
|
|
|
|
\avr@bindec@addmap{22}{00010110}
|
|
|
|
|
\avr@bindec@addmap{23}{00010111}
|
|
|
|
|
\avr@bindec@addmap{24}{00011000}
|
|
|
|
|
\avr@bindec@addmap{25}{00011001}
|
|
|
|
|
\avr@bindec@addmap{26}{00011010}
|
|
|
|
|
\avr@bindec@addmap{27}{00011011}
|
|
|
|
|
\avr@bindec@addmap{28}{00011100}
|
|
|
|
|
\avr@bindec@addmap{29}{00011101}
|
|
|
|
|
\avr@bindec@addmap{30}{00011110}
|
|
|
|
|
\avr@bindec@addmap{31}{00011111}
|
|
|
|
|
\avr@bindec@addmap{32}{00100000}
|
|
|
|
|
\avr@bindec@addmap{33}{00100001}
|
|
|
|
|
\avr@bindec@addmap{34}{00100010}
|
|
|
|
|
\avr@bindec@addmap{35}{00100011}
|
|
|
|
|
\avr@bindec@addmap{36}{00100100}
|
|
|
|
|
\avr@bindec@addmap{37}{00100101}
|
|
|
|
|
\avr@bindec@addmap{38}{00100110}
|
|
|
|
|
\avr@bindec@addmap{39}{00100111}
|
|
|
|
|
\avr@bindec@addmap{40}{00101000}
|
|
|
|
|
\avr@bindec@addmap{41}{00101001}
|
|
|
|
|
\avr@bindec@addmap{42}{00101010}
|
|
|
|
|
\avr@bindec@addmap{43}{00101011}
|
|
|
|
|
\avr@bindec@addmap{44}{00101100}
|
|
|
|
|
\avr@bindec@addmap{45}{00101101}
|
|
|
|
|
\avr@bindec@addmap{46}{00101110}
|
|
|
|
|
\avr@bindec@addmap{47}{00101111}
|
|
|
|
|
\avr@bindec@addmap{48}{00110000}
|
|
|
|
|
\avr@bindec@addmap{49}{00110001}
|
|
|
|
|
\avr@bindec@addmap{50}{00110010}
|
|
|
|
|
\avr@bindec@addmap{51}{00110011}
|
|
|
|
|
\avr@bindec@addmap{52}{00110100}
|
|
|
|
|
\avr@bindec@addmap{53}{00110101}
|
|
|
|
|
\avr@bindec@addmap{54}{00110110}
|
|
|
|
|
\avr@bindec@addmap{55}{00110111}
|
|
|
|
|
\avr@bindec@addmap{56}{00111000}
|
|
|
|
|
\avr@bindec@addmap{57}{00111001}
|
|
|
|
|
\avr@bindec@addmap{58}{00111010}
|
|
|
|
|
\avr@bindec@addmap{59}{00111011}
|
|
|
|
|
\avr@bindec@addmap{60}{00111100}
|
|
|
|
|
\avr@bindec@addmap{61}{00111101}
|
|
|
|
|
\avr@bindec@addmap{62}{00111110}
|
|
|
|
|
\avr@bindec@addmap{63}{00111111}
|
|
|
|
|
\avr@bindec@addmap{64}{01000000}
|
|
|
|
|
\avr@bindec@addmap{65}{01000001}
|
|
|
|
|
\avr@bindec@addmap{66}{01000010}
|
|
|
|
|
\avr@bindec@addmap{67}{01000011}
|
|
|
|
|
\avr@bindec@addmap{68}{01000100}
|
|
|
|
|
\avr@bindec@addmap{69}{01000101}
|
|
|
|
|
\avr@bindec@addmap{70}{01000110}
|
|
|
|
|
\avr@bindec@addmap{71}{01000111}
|
|
|
|
|
\avr@bindec@addmap{72}{01001000}
|
|
|
|
|
\avr@bindec@addmap{73}{01001001}
|
|
|
|
|
\avr@bindec@addmap{74}{01001010}
|
|
|
|
|
\avr@bindec@addmap{75}{01001011}
|
|
|
|
|
\avr@bindec@addmap{76}{01001100}
|
|
|
|
|
\avr@bindec@addmap{77}{01001101}
|
|
|
|
|
\avr@bindec@addmap{78}{01001110}
|
|
|
|
|
\avr@bindec@addmap{79}{01001111}
|
|
|
|
|
\avr@bindec@addmap{80}{01010000}
|
|
|
|
|
\avr@bindec@addmap{81}{01010001}
|
|
|
|
|
\avr@bindec@addmap{82}{01010010}
|
|
|
|
|
\avr@bindec@addmap{83}{01010011}
|
|
|
|
|
\avr@bindec@addmap{84}{01010100}
|
|
|
|
|
\avr@bindec@addmap{85}{01010101}
|
|
|
|
|
\avr@bindec@addmap{86}{01010110}
|
|
|
|
|
\avr@bindec@addmap{87}{01010111}
|
|
|
|
|
\avr@bindec@addmap{88}{01011000}
|
|
|
|
|
\avr@bindec@addmap{89}{01011001}
|
|
|
|
|
\avr@bindec@addmap{90}{01011010}
|
|
|
|
|
\avr@bindec@addmap{91}{01011011}
|
|
|
|
|
\avr@bindec@addmap{92}{01011100}
|
|
|
|
|
\avr@bindec@addmap{93}{01011101}
|
|
|
|
|
\avr@bindec@addmap{94}{01011110}
|
|
|
|
|
\avr@bindec@addmap{95}{01011111}
|
|
|
|
|
\avr@bindec@addmap{96}{01100000}
|
|
|
|
|
\avr@bindec@addmap{97}{01100001}
|
|
|
|
|
\avr@bindec@addmap{98}{01100010}
|
|
|
|
|
\avr@bindec@addmap{99}{01100011}
|
|
|
|
|
\avr@bindec@addmap{100}{01100100}
|
|
|
|
|
\avr@bindec@addmap{101}{01100101}
|
|
|
|
|
\avr@bindec@addmap{102}{01100110}
|
|
|
|
|
\avr@bindec@addmap{103}{01100111}
|
|
|
|
|
\avr@bindec@addmap{104}{01101000}
|
|
|
|
|
\avr@bindec@addmap{105}{01101001}
|
|
|
|
|
\avr@bindec@addmap{106}{01101010}
|
|
|
|
|
\avr@bindec@addmap{107}{01101011}
|
|
|
|
|
\avr@bindec@addmap{108}{01101100}
|
|
|
|
|
\avr@bindec@addmap{109}{01101101}
|
|
|
|
|
\avr@bindec@addmap{110}{01101110}
|
|
|
|
|
\avr@bindec@addmap{111}{01101111}
|
|
|
|
|
\avr@bindec@addmap{112}{01110000}
|
|
|
|
|
\avr@bindec@addmap{113}{01110001}
|
|
|
|
|
\avr@bindec@addmap{114}{01110010}
|
|
|
|
|
\avr@bindec@addmap{115}{01110011}
|
|
|
|
|
\avr@bindec@addmap{116}{01110100}
|
|
|
|
|
\avr@bindec@addmap{117}{01110101}
|
|
|
|
|
\avr@bindec@addmap{118}{01110110}
|
|
|
|
|
\avr@bindec@addmap{119}{01110111}
|
|
|
|
|
\avr@bindec@addmap{120}{01111000}
|
|
|
|
|
\avr@bindec@addmap{121}{01111001}
|
|
|
|
|
\avr@bindec@addmap{122}{01111010}
|
|
|
|
|
\avr@bindec@addmap{123}{01111011}
|
|
|
|
|
\avr@bindec@addmap{124}{01111100}
|
|
|
|
|
\avr@bindec@addmap{125}{01111101}
|
|
|
|
|
\avr@bindec@addmap{126}{01111110}
|
|
|
|
|
\avr@bindec@addmap{127}{01111111}
|
|
|
|
|
\avr@bindec@addmap{128}{10000000}
|
|
|
|
|
\avr@bindec@addmap{129}{10000001}
|
|
|
|
|
\avr@bindec@addmap{130}{10000010}
|
|
|
|
|
\avr@bindec@addmap{131}{10000011}
|
|
|
|
|
\avr@bindec@addmap{132}{10000100}
|
|
|
|
|
\avr@bindec@addmap{133}{10000101}
|
|
|
|
|
\avr@bindec@addmap{134}{10000110}
|
|
|
|
|
\avr@bindec@addmap{135}{10000111}
|
|
|
|
|
\avr@bindec@addmap{136}{10001000}
|
|
|
|
|
\avr@bindec@addmap{137}{10001001}
|
|
|
|
|
\avr@bindec@addmap{138}{10001010}
|
|
|
|
|
\avr@bindec@addmap{139}{10001011}
|
|
|
|
|
\avr@bindec@addmap{140}{10001100}
|
|
|
|
|
\avr@bindec@addmap{141}{10001101}
|
|
|
|
|
\avr@bindec@addmap{142}{10001110}
|
|
|
|
|
\avr@bindec@addmap{143}{10001111}
|
|
|
|
|
\avr@bindec@addmap{144}{10010000}
|
|
|
|
|
\avr@bindec@addmap{145}{10010001}
|
|
|
|
|
\avr@bindec@addmap{146}{10010010}
|
|
|
|
|
\avr@bindec@addmap{147}{10010011}
|
|
|
|
|
\avr@bindec@addmap{148}{10010100}
|
|
|
|
|
\avr@bindec@addmap{149}{10010101}
|
|
|
|
|
\avr@bindec@addmap{150}{10010110}
|
|
|
|
|
\avr@bindec@addmap{151}{10010111}
|
|
|
|
|
\avr@bindec@addmap{152}{10011000}
|
|
|
|
|
\avr@bindec@addmap{153}{10011001}
|
|
|
|
|
\avr@bindec@addmap{154}{10011010}
|
|
|
|
|
\avr@bindec@addmap{155}{10011011}
|
|
|
|
|
\avr@bindec@addmap{156}{10011100}
|
|
|
|
|
\avr@bindec@addmap{157}{10011101}
|
|
|
|
|
\avr@bindec@addmap{158}{10011110}
|
|
|
|
|
\avr@bindec@addmap{159}{10011111}
|
|
|
|
|
\avr@bindec@addmap{160}{10100000}
|
|
|
|
|
\avr@bindec@addmap{161}{10100001}
|
|
|
|
|
\avr@bindec@addmap{162}{10100010}
|
|
|
|
|
\avr@bindec@addmap{163}{10100011}
|
|
|
|
|
\avr@bindec@addmap{164}{10100100}
|
|
|
|
|
\avr@bindec@addmap{165}{10100101}
|
|
|
|
|
\avr@bindec@addmap{166}{10100110}
|
|
|
|
|
\avr@bindec@addmap{167}{10100111}
|
|
|
|
|
\avr@bindec@addmap{168}{10101000}
|
|
|
|
|
\avr@bindec@addmap{169}{10101001}
|
|
|
|
|
\avr@bindec@addmap{170}{10101010}
|
|
|
|
|
\avr@bindec@addmap{171}{10101011}
|
|
|
|
|
\avr@bindec@addmap{172}{10101100}
|
|
|
|
|
\avr@bindec@addmap{173}{10101101}
|
|
|
|
|
\avr@bindec@addmap{174}{10101110}
|
|
|
|
|
\avr@bindec@addmap{175}{10101111}
|
|
|
|
|
\avr@bindec@addmap{176}{10110000}
|
|
|
|
|
\avr@bindec@addmap{177}{10110001}
|
|
|
|
|
\avr@bindec@addmap{178}{10110010}
|
|
|
|
|
\avr@bindec@addmap{179}{10110011}
|
|
|
|
|
\avr@bindec@addmap{180}{10110100}
|
|
|
|
|
\avr@bindec@addmap{181}{10110101}
|
|
|
|
|
\avr@bindec@addmap{182}{10110110}
|
|
|
|
|
\avr@bindec@addmap{183}{10110111}
|
|
|
|
|
\avr@bindec@addmap{184}{10111000}
|
|
|
|
|
\avr@bindec@addmap{185}{10111001}
|
|
|
|
|
\avr@bindec@addmap{186}{10111010}
|
|
|
|
|
\avr@bindec@addmap{187}{10111011}
|
|
|
|
|
\avr@bindec@addmap{188}{10111100}
|
|
|
|
|
\avr@bindec@addmap{189}{10111101}
|
|
|
|
|
\avr@bindec@addmap{190}{10111110}
|
|
|
|
|
\avr@bindec@addmap{191}{10111111}
|
|
|
|
|
\avr@bindec@addmap{192}{11000000}
|
|
|
|
|
\avr@bindec@addmap{193}{11000001}
|
|
|
|
|
\avr@bindec@addmap{194}{11000010}
|
|
|
|
|
\avr@bindec@addmap{195}{11000011}
|
|
|
|
|
\avr@bindec@addmap{196}{11000100}
|
|
|
|
|
\avr@bindec@addmap{197}{11000101}
|
|
|
|
|
\avr@bindec@addmap{198}{11000110}
|
|
|
|
|
\avr@bindec@addmap{199}{11000111}
|
|
|
|
|
\avr@bindec@addmap{200}{11001000}
|
|
|
|
|
\avr@bindec@addmap{201}{11001001}
|
|
|
|
|
\avr@bindec@addmap{202}{11001010}
|
|
|
|
|
\avr@bindec@addmap{203}{11001011}
|
|
|
|
|
\avr@bindec@addmap{204}{11001100}
|
|
|
|
|
\avr@bindec@addmap{205}{11001101}
|
|
|
|
|
\avr@bindec@addmap{206}{11001110}
|
|
|
|
|
\avr@bindec@addmap{207}{11001111}
|
|
|
|
|
\avr@bindec@addmap{208}{11010000}
|
|
|
|
|
\avr@bindec@addmap{209}{11010001}
|
|
|
|
|
\avr@bindec@addmap{210}{11010010}
|
|
|
|
|
\avr@bindec@addmap{211}{11010011}
|
|
|
|
|
\avr@bindec@addmap{212}{11010100}
|
|
|
|
|
\avr@bindec@addmap{213}{11010101}
|
|
|
|
|
\avr@bindec@addmap{214}{11010110}
|
|
|
|
|
\avr@bindec@addmap{215}{11010111}
|
|
|
|
|
\avr@bindec@addmap{216}{11011000}
|
|
|
|
|
\avr@bindec@addmap{217}{11011001}
|
|
|
|
|
\avr@bindec@addmap{218}{11011010}
|
|
|
|
|
\avr@bindec@addmap{219}{11011011}
|
|
|
|
|
\avr@bindec@addmap{220}{11011100}
|
|
|
|
|
\avr@bindec@addmap{221}{11011101}
|
|
|
|
|
\avr@bindec@addmap{222}{11011110}
|
|
|
|
|
\avr@bindec@addmap{223}{11011111}
|
|
|
|
|
\avr@bindec@addmap{224}{11100000}
|
|
|
|
|
\avr@bindec@addmap{225}{11100001}
|
|
|
|
|
\avr@bindec@addmap{226}{11100010}
|
|
|
|
|
\avr@bindec@addmap{227}{11100011}
|
|
|
|
|
\avr@bindec@addmap{228}{11100100}
|
|
|
|
|
\avr@bindec@addmap{229}{11100101}
|
|
|
|
|
\avr@bindec@addmap{230}{11100110}
|
|
|
|
|
\avr@bindec@addmap{231}{11100111}
|
|
|
|
|
\avr@bindec@addmap{232}{11101000}
|
|
|
|
|
\avr@bindec@addmap{233}{11101001}
|
|
|
|
|
\avr@bindec@addmap{234}{11101010}
|
|
|
|
|
\avr@bindec@addmap{235}{11101011}
|
|
|
|
|
\avr@bindec@addmap{236}{11101100}
|
|
|
|
|
\avr@bindec@addmap{237}{11101101}
|
|
|
|
|
\avr@bindec@addmap{238}{11101110}
|
|
|
|
|
\avr@bindec@addmap{239}{11101111}
|
|
|
|
|
\avr@bindec@addmap{240}{11110000}
|
|
|
|
|
\avr@bindec@addmap{241}{11110001}
|
|
|
|
|
\avr@bindec@addmap{242}{11110010}
|
|
|
|
|
\avr@bindec@addmap{243}{11110011}
|
|
|
|
|
\avr@bindec@addmap{244}{11110100}
|
|
|
|
|
\avr@bindec@addmap{245}{11110101}
|
|
|
|
|
\avr@bindec@addmap{246}{11110110}
|
|
|
|
|
\avr@bindec@addmap{247}{11110111}
|
|
|
|
|
\avr@bindec@addmap{248}{11111000}
|
|
|
|
|
\avr@bindec@addmap{249}{11111001}
|
|
|
|
|
\avr@bindec@addmap{250}{11111010}
|
|
|
|
|
\avr@bindec@addmap{251}{11111011}
|
|
|
|
|
\avr@bindec@addmap{252}{11111100}
|
|
|
|
|
\avr@bindec@addmap{253}{11111101}
|
|
|
|
|
\avr@bindec@addmap{254}{11111110}
|
|
|
|
|
\avr@bindec@addmap{255}{11111111}
|
|
|
|
|
|
|
|
|
|
\newcount\avr@count@tmpa
|
|
|
|
|
\newcount\avr@count@tmpb
|
|
|
|
|
|
|
|
|
|
% \avr@count@tobin@b uint8_t count|integer, \result -> \result = bin(arg)
|
|
|
|
|
\def\avr@count@tobin@b#1#2{%
|
|
|
|
|
\ifnum #1 > 255 %
|
|
|
|
|
\avr@error{#1 to large value}%
|
|
|
|
|
\fi%
|
|
|
|
|
\ifnum #1 < 0 %
|
|
|
|
|
\avr@error{#1 to small value}%
|
|
|
|
|
\fi%
|
|
|
|
|
\avr@count@tmpa=#1%
|
|
|
|
|
\ifcsdef{avr@bin@\the\avr@count@tmpa}{}{%
|
|
|
|
|
\avr@error{Incorrect Number: #1}%
|
|
|
|
|
}%
|
|
|
|
|
\edef#2{\csuse{avr@bin@\the\avr@count@tmpa}}%
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
% \avr@count@tobin@w uint16_t count|integer, \result -> \result = bin(arg)
|
|
|
|
|
\def\avr@count@tobin@w#1#2{%
|
|
|
|
|
\ifnum #1 > 65535 %
|
|
|
|
|
\avr@error{#1 to large value}%
|
|
|
|
|
\fi%
|
|
|
|
|
\ifnum #1 < 0 %
|
|
|
|
|
\avr@error{#1 to small value}%
|
|
|
|
|
\fi%
|
|
|
|
|
\avr@count@tmpa=#1%
|
|
|
|
|
\avr@count@tmpb=\avr@count@tmpa%
|
|
|
|
|
\divide\avr@count@tmpa by 256\relax%
|
|
|
|
|
\multiply\avr@count@tmpa by 256\relax%
|
|
|
|
|
\advance\avr@count@tmpb by -\avr@count@tmpa\relax%
|
|
|
|
|
\divide\avr@count@tmpa by 256\relax%
|
|
|
|
|
\ifcsdef{avr@bin@\the\avr@count@tmpa}{}{%
|
|
|
|
|
\avr@error{Incorrect Number: #1}%
|
|
|
|
|
}%
|
|
|
|
|
\ifcsdef{avr@bin@\the\avr@count@tmpb}{}{%
|
|
|
|
|
\avr@error{Incorrect Number: #1}%
|
|
|
|
|
}%
|
|
|
|
|
\edef#2{\csuse{avr@bin@\the\avr@count@tmpa}\csuse{avr@bin@\the\avr@count@tmpb}}%
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
\def\avr@bin@tocount#1#2{% BitString Counter
|
|
|
|
|
\avr@count@tmpa=0%
|
|
|
|
|
\edef\@tempa{#1}%
|
|
|
|
|
\expandafter\avr@bin@tocount@helper\@tempa\@nnil%
|
|
|
|
|
#2=\avr@count@tmpa%
|
|
|
|
|
}
|
|
|
|
|
\def\avr@bin@tocount@helper#1#2#3#4#5#6#7#8#9\@nnil{%
|
|
|
|
|
\multiply\avr@count@tmpa by 256\relax%
|
|
|
|
|
\ifcsdef{avr@dec@#1#2#3#4#5#6#7#8}{}{%
|
|
|
|
|
\avr@error{Incorrect Number: #1}%
|
|
|
|
|
}%
|
|
|
|
|
\advance\avr@count@tmpa by \csuse{avr@dec@#1#2#3#4#5#6#7#8}%
|
|
|
|
|
\if	&\else%
|
|
|
|
|
\avr@bin@tocount@helper #9\@nnil%
|
|
|
|
|
\fi%
|
|
|
|
|
}
|
|
|
|
|
|
2014-09-26 19:42:18 +02:00
|
|
|
|
\csdef{avr@hex@0}{0000}
|
|
|
|
|
\csdef{avr@hex@1}{0001}
|
|
|
|
|
\csdef{avr@hex@2}{0010}
|
|
|
|
|
\csdef{avr@hex@3}{0011}
|
|
|
|
|
\csdef{avr@hex@4}{0100}
|
|
|
|
|
\csdef{avr@hex@5}{0101}
|
|
|
|
|
\csdef{avr@hex@6}{0110}
|
|
|
|
|
\csdef{avr@hex@7}{0111}
|
|
|
|
|
\csdef{avr@hex@8}{1000}
|
|
|
|
|
\csdef{avr@hex@9}{1001}
|
|
|
|
|
\csdef{avr@hex@A}{1010}
|
|
|
|
|
\csdef{avr@hex@B}{1011}
|
|
|
|
|
\csdef{avr@hex@C}{1100}
|
|
|
|
|
\csdef{avr@hex@D}{1101}
|
|
|
|
|
\csdef{avr@hex@E}{1110}
|
|
|
|
|
\csdef{avr@hex@F}{1111}
|
|
|
|
|
\csdef{avr@hex@a}{1010}
|
|
|
|
|
\csdef{avr@hex@b}{1011}
|
|
|
|
|
\csdef{avr@hex@c}{1100}
|
|
|
|
|
\csdef{avr@hex@d}{1101}
|
|
|
|
|
\csdef{avr@hex@e}{1110}
|
|
|
|
|
\csdef{avr@hex@f}{1111}
|
|
|
|
|
|
|
|
|
|
% Hexstring to Bitstring: hexstring, \result macro
|
|
|
|
|
\def\avr@hex@tobin#1#2{%
|
|
|
|
|
\def\avr@hex@helper##1##2\@nnil{%
|
|
|
|
|
\xdef#2{#2\csuse{avr@hex@##1}}%
|
|
|
|
|
\ifx&##2&\else%
|
|
|
|
|
\avr@hex@helper ##2\@nnil%
|
|
|
|
|
\fi%
|
|
|
|
|
}%
|
|
|
|
|
\def#2{}%
|
|
|
|
|
\edef\@tempa{#1}\relax%
|
|
|
|
|
\expandafter \avr@hex@helper \@tempa \@nnil%
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2014-09-20 20:09:39 +02:00
|
|
|
|
\def\avr@count@overflow#1{%
|
|
|
|
|
\def\avr@count@overflow@flag{0}%
|
|
|
|
|
\ifnum #1 < 0%
|
2014-09-28 22:53:22 +02:00
|
|
|
|
\advance #1 by 65535%
|
2014-09-20 20:09:39 +02:00
|
|
|
|
\def\avr@count@overflow@flag{1}%
|
|
|
|
|
\fi%
|
|
|
|
|
\ifnum #1 > 65535%
|
2014-09-28 22:53:22 +02:00
|
|
|
|
\advance #1 by -65535%
|
2014-09-20 20:09:39 +02:00
|
|
|
|
\def\avr@count@overflow@flag{1}%
|
|
|
|
|
\fi%
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
\def\avr@count@modulo@byte#1{%
|
2014-09-28 22:53:22 +02:00
|
|
|
|
\avr@count@tmpa=#1\relax%
|
|
|
|
|
\avr@count@tmpb=#1\relax%
|
|
|
|
|
\divide \avr@count@tmpa by 256\relax%
|
|
|
|
|
\multiply \avr@count@tmpa by 256\relax%
|
|
|
|
|
\advance \avr@count@tmpb by -\avr@count@tmpa\relax%
|
|
|
|
|
#1 = \avr@count@tmpb\relax%
|
2014-09-20 20:09:39 +02:00
|
|
|
|
}
|
|
|
|
|
|
2014-09-28 22:53:22 +02:00
|
|
|
|
\def\avr@ascii@def#1#2{\csdef{avr@ascii@#1}{\detokenize{#2}}}
|
|
|
|
|
\def\avr@ascii#1#2{\def#2{\csuse{avr@ascii@#1}}}
|
|
|
|
|
|
|
|
|
|
\avr@ascii@def{0}{^0}
|
|
|
|
|
\avr@ascii@def{1}{^1}
|
|
|
|
|
\avr@ascii@def{2}{^2}
|
|
|
|
|
\avr@ascii@def{3}{^3}
|
|
|
|
|
\avr@ascii@def{4}{^4}
|
|
|
|
|
\avr@ascii@def{5}{^5}
|
|
|
|
|
\avr@ascii@def{6}{^6}
|
|
|
|
|
\avr@ascii@def{7}{^7}
|
|
|
|
|
\avr@ascii@def{8}{^8}
|
|
|
|
|
\avr@ascii@def{9}{^9}
|
|
|
|
|
\avr@ascii@def{10}{^10}
|
|
|
|
|
\avr@ascii@def{11}{^11}
|
|
|
|
|
\avr@ascii@def{12}{^12}
|
|
|
|
|
\avr@ascii@def{13}{^13}
|
|
|
|
|
\avr@ascii@def{14}{^14}
|
|
|
|
|
\avr@ascii@def{15}{^15}
|
|
|
|
|
\avr@ascii@def{16}{^16}
|
|
|
|
|
\avr@ascii@def{17}{^17}
|
|
|
|
|
\avr@ascii@def{18}{^18}
|
|
|
|
|
\avr@ascii@def{19}{^19}
|
|
|
|
|
\avr@ascii@def{20}{^20}
|
|
|
|
|
\avr@ascii@def{21}{^21}
|
|
|
|
|
\avr@ascii@def{22}{^22}
|
|
|
|
|
\avr@ascii@def{23}{^23}
|
|
|
|
|
\avr@ascii@def{24}{^24}
|
|
|
|
|
\avr@ascii@def{25}{^25}
|
|
|
|
|
\avr@ascii@def{26}{^26}
|
|
|
|
|
\avr@ascii@def{27}{^27}
|
|
|
|
|
\avr@ascii@def{28}{^28}
|
|
|
|
|
\avr@ascii@def{29}{^29}
|
|
|
|
|
\avr@ascii@def{30}{^30}
|
|
|
|
|
\avr@ascii@def{31}{^31}
|
|
|
|
|
\avr@ascii@def{32}{ }
|
|
|
|
|
\avr@ascii@def{33}{!}
|
|
|
|
|
\avr@ascii@def{34}{"}
|
|
|
|
|
\avr@ascii@def{35}{\#}
|
|
|
|
|
\avr@ascii@def{36}{\$}
|
|
|
|
|
\avr@ascii@def{37}{\%}
|
|
|
|
|
\avr@ascii@def{38}{\&}
|
|
|
|
|
\avr@ascii@def{39}{'}
|
|
|
|
|
\avr@ascii@def{40}{(}
|
|
|
|
|
\avr@ascii@def{41}{)}
|
|
|
|
|
\avr@ascii@def{42}{*}
|
|
|
|
|
\avr@ascii@def{43}{+}
|
|
|
|
|
\avr@ascii@def{44}{,}
|
|
|
|
|
\avr@ascii@def{45}{-}
|
|
|
|
|
\avr@ascii@def{46}{.}
|
|
|
|
|
\avr@ascii@def{47}{/}
|
|
|
|
|
\avr@ascii@def{48}{0}
|
|
|
|
|
\avr@ascii@def{49}{1}
|
|
|
|
|
\avr@ascii@def{50}{2}
|
|
|
|
|
\avr@ascii@def{51}{3}
|
|
|
|
|
\avr@ascii@def{52}{4}
|
|
|
|
|
\avr@ascii@def{53}{5}
|
|
|
|
|
\avr@ascii@def{54}{6}
|
|
|
|
|
\avr@ascii@def{55}{7}
|
|
|
|
|
\avr@ascii@def{56}{8}
|
|
|
|
|
\avr@ascii@def{57}{9}
|
|
|
|
|
\avr@ascii@def{58}{:}
|
|
|
|
|
\avr@ascii@def{59}{;}
|
|
|
|
|
\avr@ascii@def{60}{<}
|
|
|
|
|
\avr@ascii@def{61}{=}
|
|
|
|
|
\avr@ascii@def{62}{>}
|
|
|
|
|
\avr@ascii@def{63}{?}
|
|
|
|
|
\avr@ascii@def{64}{@}
|
|
|
|
|
\avr@ascii@def{65}{A}
|
|
|
|
|
\avr@ascii@def{66}{B}
|
|
|
|
|
\avr@ascii@def{67}{C}
|
|
|
|
|
\avr@ascii@def{68}{D}
|
|
|
|
|
\avr@ascii@def{69}{E}
|
|
|
|
|
\avr@ascii@def{70}{F}
|
|
|
|
|
\avr@ascii@def{71}{G}
|
|
|
|
|
\avr@ascii@def{72}{H}
|
|
|
|
|
\avr@ascii@def{73}{I}
|
|
|
|
|
\avr@ascii@def{74}{J}
|
|
|
|
|
\avr@ascii@def{75}{K}
|
|
|
|
|
\avr@ascii@def{76}{L}
|
|
|
|
|
\avr@ascii@def{77}{M}
|
|
|
|
|
\avr@ascii@def{78}{N}
|
|
|
|
|
\avr@ascii@def{79}{O}
|
|
|
|
|
\avr@ascii@def{80}{P}
|
|
|
|
|
\avr@ascii@def{81}{Q}
|
|
|
|
|
\avr@ascii@def{82}{R}
|
|
|
|
|
\avr@ascii@def{83}{S}
|
|
|
|
|
\avr@ascii@def{84}{T}
|
|
|
|
|
\avr@ascii@def{85}{U}
|
|
|
|
|
\avr@ascii@def{86}{V}
|
|
|
|
|
\avr@ascii@def{87}{W}
|
|
|
|
|
\avr@ascii@def{88}{X}
|
|
|
|
|
\avr@ascii@def{89}{Y}
|
|
|
|
|
\avr@ascii@def{90}{Z}
|
|
|
|
|
\avr@ascii@def{91}{[}
|
|
|
|
|
\avr@ascii@def{92}{\char92}
|
|
|
|
|
\avr@ascii@def{93}{]}
|
|
|
|
|
\avr@ascii@def{94}{^}
|
|
|
|
|
\avr@ascii@def{95}{_}
|
|
|
|
|
\avr@ascii@def{96}{`}
|
|
|
|
|
\avr@ascii@def{97}{a}
|
|
|
|
|
\avr@ascii@def{98}{b}
|
|
|
|
|
\avr@ascii@def{99}{c}
|
|
|
|
|
\avr@ascii@def{100}{d}
|
|
|
|
|
\avr@ascii@def{101}{e}
|
|
|
|
|
\avr@ascii@def{102}{f}
|
|
|
|
|
\avr@ascii@def{103}{g}
|
|
|
|
|
\avr@ascii@def{104}{h}
|
|
|
|
|
\avr@ascii@def{105}{i}
|
|
|
|
|
\avr@ascii@def{106}{j}
|
|
|
|
|
\avr@ascii@def{107}{k}
|
|
|
|
|
\avr@ascii@def{108}{l}
|
|
|
|
|
\avr@ascii@def{109}{m}
|
|
|
|
|
\avr@ascii@def{110}{n}
|
|
|
|
|
\avr@ascii@def{111}{o}
|
|
|
|
|
\avr@ascii@def{112}{p}
|
|
|
|
|
\avr@ascii@def{113}{q}
|
|
|
|
|
\avr@ascii@def{114}{r}
|
|
|
|
|
\avr@ascii@def{115}{s}
|
|
|
|
|
\avr@ascii@def{116}{t}
|
|
|
|
|
\avr@ascii@def{117}{u}
|
|
|
|
|
\avr@ascii@def{118}{v}
|
|
|
|
|
\avr@ascii@def{119}{w}
|
|
|
|
|
\avr@ascii@def{120}{x}
|
|
|
|
|
\avr@ascii@def{121}{y}
|
|
|
|
|
\avr@ascii@def{122}{z}
|
|
|
|
|
\avr@ascii@def{123}{{}
|
|
|
|
|
\avr@ascii@def{124}{|}
|
|
|
|
|
\avr@ascii@def{125}{}}
|
|
|
|
|
\avr@ascii@def{126}{~}
|
|
|
|
|
\avr@ascii@def{127}{^?}
|
|
|
|
|
\avr@ascii@def{128}{^128}
|
|
|
|
|
\avr@ascii@def{129}{^129}
|
|
|
|
|
\avr@ascii@def{130}{^130}
|
|
|
|
|
\avr@ascii@def{131}{^131}
|
|
|
|
|
\avr@ascii@def{132}{^131}
|
|
|
|
|
\avr@ascii@def{133}{^133}
|
|
|
|
|
\avr@ascii@def{134}{^134}
|
|
|
|
|
\avr@ascii@def{135}{^135}
|
|
|
|
|
\avr@ascii@def{136}{^136}
|
|
|
|
|
\avr@ascii@def{137}{^137}
|
|
|
|
|
\avr@ascii@def{138}{^138}
|
|
|
|
|
\avr@ascii@def{139}{^139}
|
|
|
|
|
\avr@ascii@def{140}{^140}
|
|
|
|
|
\avr@ascii@def{141}{^141}
|
|
|
|
|
\avr@ascii@def{142}{^142}
|
|
|
|
|
\avr@ascii@def{143}{^143}
|
|
|
|
|
\avr@ascii@def{144}{^144}
|
|
|
|
|
\avr@ascii@def{145}{^145}
|
|
|
|
|
\avr@ascii@def{146}{^146}
|
|
|
|
|
\avr@ascii@def{147}{^147}
|
|
|
|
|
\avr@ascii@def{148}{^148}
|
|
|
|
|
\avr@ascii@def{149}{^149}
|
|
|
|
|
\avr@ascii@def{150}{^150}
|
|
|
|
|
\avr@ascii@def{151}{^151}
|
|
|
|
|
\avr@ascii@def{152}{^152}
|
|
|
|
|
\avr@ascii@def{153}{^153}
|
|
|
|
|
\avr@ascii@def{154}{^154}
|
|
|
|
|
\avr@ascii@def{155}{^155}
|
|
|
|
|
\avr@ascii@def{156}{^156}
|
|
|
|
|
\avr@ascii@def{157}{^157}
|
|
|
|
|
\avr@ascii@def{158}{^158}
|
|
|
|
|
\avr@ascii@def{159}{^159}
|
|
|
|
|
\avr@ascii@def{160}{^160}
|
|
|
|
|
\avr@ascii@def{161}{¡}
|
|
|
|
|
\avr@ascii@def{162}{¢}
|
|
|
|
|
\avr@ascii@def{163}{£}
|
|
|
|
|
\avr@ascii@def{164}{¤}
|
|
|
|
|
\avr@ascii@def{165}{¥}
|
|
|
|
|
\avr@ascii@def{166}{¦}
|
|
|
|
|
\avr@ascii@def{167}{§}
|
|
|
|
|
\avr@ascii@def{168}{¨}
|
|
|
|
|
\avr@ascii@def{169}{©}
|
|
|
|
|
\avr@ascii@def{170}{ª}
|
|
|
|
|
\avr@ascii@def{171}{«}
|
|
|
|
|
\avr@ascii@def{172}{¬}
|
|
|
|
|
\avr@ascii@def{173}{^173}
|
|
|
|
|
\avr@ascii@def{174}{®}
|
|
|
|
|
\avr@ascii@def{175}{¯}
|
|
|
|
|
\avr@ascii@def{176}{°}
|
|
|
|
|
\avr@ascii@def{177}{±}
|
|
|
|
|
\avr@ascii@def{178}{²}
|
|
|
|
|
\avr@ascii@def{179}{³}
|
|
|
|
|
\avr@ascii@def{180}{´}
|
|
|
|
|
\avr@ascii@def{181}{µ}
|
|
|
|
|
\avr@ascii@def{182}{¶}
|
|
|
|
|
\avr@ascii@def{183}{·}
|
|
|
|
|
\avr@ascii@def{184}{¸}
|
|
|
|
|
\avr@ascii@def{185}{¹}
|
|
|
|
|
\avr@ascii@def{186}{º}
|
|
|
|
|
\avr@ascii@def{187}{»}
|
|
|
|
|
\avr@ascii@def{188}{¼}
|
|
|
|
|
\avr@ascii@def{189}{½}
|
|
|
|
|
\avr@ascii@def{190}{¾}
|
|
|
|
|
\avr@ascii@def{191}{¿}
|
|
|
|
|
\avr@ascii@def{192}{À}
|
|
|
|
|
\avr@ascii@def{193}{Á}
|
|
|
|
|
\avr@ascii@def{194}{Â}
|
|
|
|
|
\avr@ascii@def{195}{Ã}
|
|
|
|
|
\avr@ascii@def{196}{Ä}
|
|
|
|
|
\avr@ascii@def{197}{Å}
|
|
|
|
|
\avr@ascii@def{198}{Æ}
|
|
|
|
|
\avr@ascii@def{199}{Ç}
|
|
|
|
|
\avr@ascii@def{200}{È}
|
|
|
|
|
\avr@ascii@def{201}{É}
|
|
|
|
|
\avr@ascii@def{202}{Ê}
|
|
|
|
|
\avr@ascii@def{203}{Ë}
|
|
|
|
|
\avr@ascii@def{204}{Ì}
|
|
|
|
|
\avr@ascii@def{205}{Í}
|
|
|
|
|
\avr@ascii@def{206}{Î}
|
|
|
|
|
\avr@ascii@def{207}{Ï}
|
|
|
|
|
\avr@ascii@def{208}{Ð}
|
|
|
|
|
\avr@ascii@def{209}{Ñ}
|
|
|
|
|
\avr@ascii@def{210}{Ò}
|
|
|
|
|
\avr@ascii@def{211}{Ó}
|
|
|
|
|
\avr@ascii@def{212}{Ô}
|
|
|
|
|
\avr@ascii@def{213}{Õ}
|
|
|
|
|
\avr@ascii@def{214}{Ö}
|
|
|
|
|
\avr@ascii@def{215}{×}
|
|
|
|
|
\avr@ascii@def{216}{Ø}
|
|
|
|
|
\avr@ascii@def{217}{Ù}
|
|
|
|
|
\avr@ascii@def{218}{Ú}
|
|
|
|
|
\avr@ascii@def{219}{Û}
|
|
|
|
|
\avr@ascii@def{220}{Ü}
|
|
|
|
|
\avr@ascii@def{221}{Ý}
|
|
|
|
|
\avr@ascii@def{222}{Þ}
|
|
|
|
|
\avr@ascii@def{223}{ß}
|
|
|
|
|
\avr@ascii@def{224}{à}
|
|
|
|
|
\avr@ascii@def{225}{á}
|
|
|
|
|
\avr@ascii@def{226}{â}
|
|
|
|
|
\avr@ascii@def{227}{ã}
|
|
|
|
|
\avr@ascii@def{228}{ä}
|
|
|
|
|
\avr@ascii@def{229}{å}
|
|
|
|
|
\avr@ascii@def{230}{æ}
|
|
|
|
|
\avr@ascii@def{231}{ç}
|
|
|
|
|
\avr@ascii@def{232}{è}
|
|
|
|
|
\avr@ascii@def{233}{é}
|
|
|
|
|
\avr@ascii@def{234}{ê}
|
|
|
|
|
\avr@ascii@def{235}{ë}
|
|
|
|
|
\avr@ascii@def{236}{ì}
|
|
|
|
|
\avr@ascii@def{237}{í}
|
|
|
|
|
\avr@ascii@def{238}{î}
|
|
|
|
|
\avr@ascii@def{239}{ï}
|
|
|
|
|
\avr@ascii@def{240}{ð}
|
|
|
|
|
\avr@ascii@def{241}{ñ}
|
|
|
|
|
\avr@ascii@def{242}{ò}
|
|
|
|
|
\avr@ascii@def{243}{ó}
|
|
|
|
|
\avr@ascii@def{244}{ô}
|
|
|
|
|
\avr@ascii@def{245}{õ}
|
|
|
|
|
\avr@ascii@def{246}{ö}
|
|
|
|
|
\avr@ascii@def{247}{÷}
|
|
|
|
|
\avr@ascii@def{248}{ø}
|
|
|
|
|
\avr@ascii@def{249}{ù}
|
|
|
|
|
\avr@ascii@def{250}{ú}
|
|
|
|
|
\avr@ascii@def{251}{û}
|
|
|
|
|
\avr@ascii@def{252}{ü}
|
|
|
|
|
\avr@ascii@def{253}{ý}
|
|
|
|
|
\avr@ascii@def{254}{þ}
|
|
|
|
|
\avr@ascii@def{255}{ÿ}
|
2014-09-20 20:09:39 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%%% Local Variables:
|
|
|
|
|
%%% mode: latex
|
2014-09-28 22:53:22 +02:00
|
|
|
|
%%% TeX-master: "avr.tex"
|
2014-09-20 20:09:39 +02:00
|
|
|
|
%%% End:
|