2 %%BoundingBox: 18 36 577 806
3 %%Title: Enscript Output
4 %%Creator: GNU enscript 1.6.4
5 %%CreationDate: Tue Apr 6 12:07:47 2010
6 %%Orientation: Landscape
8 %%DocumentMedia: A4 595 842 0 () ()
9 %%DocumentNeededResources: (atend)
12 %%BeginResource: procset Enscript-Prolog 1.6 4
17 /_S { % save current state
20 /_R { % restore from saved state
24 /S { % showpage protecting gstate
30 /MF { % fontname newfontname -> - make a new encoded font
34 /fontdict fontname findfont def
35 /newfont fontdict maxlength dict def
43 % copy to the new font dictionary
44 exch newfont 3 1 roll put
48 newfont /FontName newfontname put
50 % insert only valid encoding vectors
51 encoding_vector length 256 eq {
52 newfont /Encoding encoding_vector put
55 newfontname newfont definefont pop
58 /MF_PS { % fontname newfontname -> - make a new font preserving its enc
62 /fontdict fontname findfont def
63 /newfont fontdict maxlength dict def
71 % copy to the new font dictionary
72 exch newfont 3 1 roll put
76 newfont /FontName newfontname put
78 newfontname newfont definefont pop
81 /SF { % fontname width height -> - set a new font
86 [width 0 0 height 0 0] makefont setfont
89 /SUF { % fontname width height -> - set a new user font
94 /F-gs-user-font width height SF
97 /SUF_PS { % fontname width height -> - set a new user font preserving its enc
101 /F-gs-user-font MF_PS
102 /F-gs-user-font width height SF
108 /Box { % x y w h -> - define box path
109 /d_h exch def /d_w exch def /d_y exch def /d_x exch def
117 /bgs { % x y height blskip gray str -> - show string with bg color
126 x y blskip sub str stringwidth pop height Box
133 /bgcs { % x y height blskip red green blue str -> - show string with bg color
144 x y blskip sub str stringwidth pop height Box
145 red green blue setrgbcolor
152 /highlight_bars { % nlines lineheight output_y_margin gray -> -
159 % This 2 is just a magic number to sync highlight lines to text.
160 0 d_header_y ymarg sub 2 sub translate
162 /cw d_output_w cols div def
163 /nrows d_output_h ymarg 2 mul sub lineheight div cvi def
172 rn lineheight mul neg /yp exch def
173 rn nlines idiv 2 mod 0 eq {
174 % Draw highlight bar. 4 is just a magic indentation.
175 xp 4 add yp cw 8 sub lineheight neg Box fill
183 % Line highlight bar.
184 /line_highlight { % x y width height gray -> -
187 Box gray setgray fill
191 % Column separator lines.
195 0 d_footer_h translate
196 /cw d_output_w cols div def
199 0 d_output_h rlineto stroke
211 0 d_output_h neg rlineto
216 % Do the actual underlay drawing
219 ul_str true charpath stroke
229 d_page_h neg d_page_w atan rotate
233 /dw d_page_h dup mul d_page_w dup mul add sqrt def
234 ul_str stringwidth pop dw exch sub 2 div ul_h_ptsize -2 div moveto
239 /user_underlay { % - -> -
245 0 0 ul_h_ptsize 2 div sub moveto
251 /page_prefeed { % bool -> -
252 statusdict /prefeed known {
253 statusdict exch /prefeed exch put
259 % Wrapped line markers
260 /wrapped_line_mark { % x y charwith charheight type -> -
268 % Black boxes (like TeX does)
272 0 h rlineto w 2 div 0 rlineto 0 h neg rlineto
280 x w 2 div add y h 2 div add M
282 x w 4 div add y lineto stroke
284 x w 4 div add w 8 div add y h 4 div add M
285 x w 4 div add y lineto
286 w 4 div h 8 div rlineto stroke
297 /b4_Inc_state save def % Save state for cleanup
298 /dict_count countdictstack def % Count objects on dict stack
299 /op_count count 1 sub def % Count objects on operand stack
302 0 setgray 0 setlinecap
303 1 setlinewidth 0 setlinejoin
304 10 setmiterlimit [ ] 0 setdash newpath
305 /languagelevel where {
308 false setstrokeadjust false setoverprint
314 count op_count sub { pos } repeat % Clean up stacks
315 countdictstack dict_count sub { end } repeat
319 % Check PostScript language level.
320 /languagelevel where {
321 pop /gs_languagelevel languagelevel def
323 /gs_languagelevel 1 def
326 %%BeginResource: procset Enscript-Encoding-88591 1.6 4
328 /.notdef /.notdef /.notdef /.notdef
329 /.notdef /.notdef /.notdef /.notdef
330 /.notdef /.notdef /.notdef /.notdef
331 /.notdef /.notdef /.notdef /.notdef
332 /.notdef /.notdef /.notdef /.notdef
333 /.notdef /.notdef /.notdef /.notdef
334 /.notdef /.notdef /.notdef /.notdef
335 /.notdef /.notdef /.notdef /.notdef
336 /space /exclam /quotedbl /numbersign
337 /dollar /percent /ampersand /quoteright
338 /parenleft /parenright /asterisk /plus
339 /comma /hyphen /period /slash
340 /zero /one /two /three
341 /four /five /six /seven
342 /eight /nine /colon /semicolon
343 /less /equal /greater /question
350 /X /Y /Z /bracketleft
351 /backslash /bracketright /asciicircum /underscore
359 /bar /braceright /tilde /.notdef
360 /.notdef /.notdef /.notdef /.notdef
361 /.notdef /.notdef /.notdef /.notdef
362 /.notdef /.notdef /.notdef /.notdef
363 /.notdef /.notdef /.notdef /.notdef
364 /.notdef /.notdef /.notdef /.notdef
365 /.notdef /.notdef /.notdef /.notdef
366 /.notdef /.notdef /.notdef /.notdef
367 /.notdef /.notdef /.notdef /.notdef
368 /space /exclamdown /cent /sterling
369 /currency /yen /brokenbar /section
370 /dieresis /copyright /ordfeminine /guillemotleft
371 /logicalnot /hyphen /registered /macron
372 /degree /plusminus /twosuperior /threesuperior
373 /acute /mu /paragraph /bullet
374 /cedilla /onesuperior /ordmasculine /guillemotright
375 /onequarter /onehalf /threequarters /questiondown
376 /Agrave /Aacute /Acircumflex /Atilde
377 /Adieresis /Aring /AE /Ccedilla
378 /Egrave /Eacute /Ecircumflex /Edieresis
379 /Igrave /Iacute /Icircumflex /Idieresis
380 /Eth /Ntilde /Ograve /Oacute
381 /Ocircumflex /Otilde /Odieresis /multiply
382 /Oslash /Ugrave /Uacute /Ucircumflex
383 /Udieresis /Yacute /Thorn /germandbls
384 /agrave /aacute /acircumflex /atilde
385 /adieresis /aring /ae /ccedilla
386 /egrave /eacute /ecircumflex /edieresis
387 /igrave /iacute /icircumflex /idieresis
388 /eth /ntilde /ograve /oacute
389 /ocircumflex /otilde /odieresis /divide
390 /oslash /ugrave /uacute /ucircumflex
391 /udieresis /yacute /thorn /ydieresis
396 %%IncludeResource: font Courier-Bold
397 %%IncludeResource: font Courier
400 /Courier-Bold /HF-gs-font MF
401 /HF /HF-gs-font findfont [HFpt_w 0 0 HFpt_h 0 0] makefont def
402 /Courier /F-gs-font MF
405 % Pagedevice definitions:
406 gs_languagelevel 1 gt {
411 %%BeginResource: procset Enscript-Header-simple 1.6 4
413 /do_header { % print default simple header
415 d_header_x d_header_y HFpt_h 3 div add translate
419 5 0 moveto user_header_left_str show
421 d_header_w user_header_center_str stringwidth pop sub 2 div
422 0 moveto user_header_center_str show
424 d_header_w user_header_right_str stringwidth pop sub 5 sub
425 0 moveto user_header_right_str show
427 5 0 moveto fname show
428 45 0 rmoveto fmodstr show
429 45 0 rmoveto pagenumstr show
455 /fname (bmw_small-tinyasm.S) def
457 /ftail (bmw_small-tinyasm.S) def
458 % User defined strings:
459 /fmodstr (Mo Apr 05 09:57:29 2010) def
461 /user_header_p false def
462 /user_footer_p false def
468 (/* bmw_small-tinyasm.S */) s
472 ( This file is part of the AVR-Crypto-Lib.) s
474 ( Copyright \(C\) 2009 Daniel Otte \(daniel.otte@rub.de\)) s
476 ( This program is free software: you can redistribute it) s
480 ( it under the terms of the GNU General Public License a) s
484 ( the Free Software Foundation, either version 3 of the ) s
488 ( \(at your option\) any later version.) s
490 ( This program is distributed in the hope that it will b) s
494 ( but WITHOUT ANY WARRANTY; without even the implied war) s
498 ( MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ) s
502 ( GNU General Public License for more details.) s
504 ( You should have received a copy of the GNU General Pub) s
508 ( along with this program. If not, see <http://www.gnu.) s
516 ( * File: bmw_small-tinyasm.S) s
518 ( * Author: Daniel Otte) s
520 ( * Date: 2010-03-28) s
522 ( * License: GPLv3 or later) s
524 ( * Description: implementation of BlueMidnightWish) s
530 (#include "avr-asm-macros.S") s
532 (/*********************************************************) s
534 (*********************/) s
538 ( param a: r22:r23:r24:r25) s
550 ( brlo bitrotateleft_1) s
562 ( rjmp shiftleft32) s
564 (/*********************************************************) s
566 (*********************/) s
570 ( param a: r22:r23:r24:r25) s
580 ( brlo bitshiftright) s
592 ( rjmp shiftright32) s
614 (/*********************************************************) s
616 (*********************/) s
620 ( param a: r22:r23:r24:r25) s
630 ( brlo bitrotateleft) s
644 ( rjmp rotateleft32) s
674 (/*********************************************************) s
676 (*********************/) s
680 (s0: .byte 1, 3, 4,19) s
682 (s1: .byte 1, 2, 8,23) s
684 (s2: .byte 2, 1,12,25) s
686 (s3: .byte 2, 2,15,29) s
688 (s4: .byte 1, 0, 0, 0) s
690 (s5: .byte 2, 0, 0, 0) s
706 ( param x: r22:r23:r24:25) s
720 ( ldi r30, lo8\(s_table\)) s
722 ( ldi r31, hi8\(s_table\)) s
738 ( rcall shiftright32) s
752 ( rcall shiftleft32) s
754 ( rcall eor_r22_in_r16) s
764 ( rcall rotateleft32) s
766 ( rcall eor_r22_in_r16) s
776 ( rcall rotateleft32) s
794 (/*********************************************************) s
796 (*********************/) s
800 ( param dest: r26:r27 \(X\)) s
802 ( param src: r30:r31 \(Z\)) s
812 (; breq memxor_exit) s
830 (/*********************************************************) s
832 (*********************/) s
847 /fname (bmw_small-tinyasm.S) def
849 /ftail (bmw_small-tinyasm.S) def
850 % User defined strings:
851 /fmodstr (Mo Apr 05 09:57:29 2010) def
853 /user_header_p false def
854 /user_footer_p false def
908 (30: /* substract */) s
938 (/*********************************************************) s
940 (*********************/) s
986 (/*********************************************************) s
988 (*********************/) s
992 ( param q: r28:r29 \(Y\)) s
994 ( param h: r26:r27 \(X\)) s
996 ( param m: r30:r31 \(Z\)) s
1002 ( .byte 0x03, 0x11) s
1004 ( .byte 0xDD, 0xB3) s
1006 ( .byte 0x2A, 0x79) s
1008 ( .byte 0x07, 0xAA) s
1010 ( .byte 0x51, 0xC2) s
1014 ( .byte 5*4,7*4,10*4,13*4,14*4) s
1016 (; .byte 0 ; just for alignment) s
1020 ( .byte 0,1,2,3,4) s
1022 ( .byte 0,1,2,3,4) s
1024 ( .byte 0,1,2,3,4) s
1038 (; push_range 22, 25) s
1046 (; pop_range 22, 25) s
1052 (; push_range 22, 25) s
1060 (; pop_range 22, 25) s
1064 ( /* xor m into h */) s
1068 ( rcall memxor_short) s
1074 ( /* set q to zero */) s
1086 ( /* calculate W and store it in Q */) s
1094 ( /* load initial index */) s
1096 ( ldi r30, lo8\(f0_indextable-1\)) s
1098 ( ldi r31, hi8\(f0_indextable-1\)) s
1106 ( /* load values from hacktable */) s
1108 ( ldi r30, lo8\(f0_hacktable-2\)) s
1110 ( ldi r31, hi8\(f0_hacktable-2\)) s
1126 ( call add_hx_to_w) s
1130 ( andi r16, 0x0f<<2) s
1146 (; push_range 22, 25) s
1154 (; pop_range 22, 25) s
1158 ( /* xor m into h */) s
1166 ( rcall memxor_short) s
1172 ( ldi r30, lo8\(f0_s_table\)) s
1174 ( ldi r31, hi8\(f0_s_table\)) s
1198 ( rcall add_X_to_32) s
1230 ( rcall add_X_to_32) s
1251 /fname (bmw_small-tinyasm.S) def
1253 /ftail (bmw_small-tinyasm.S) def
1254 % User defined strings:
1255 /fmodstr (Mo Apr 05 09:57:29 2010) def
1257 /user_header_p false def
1258 /user_footer_p false def
1270 (/*********************************************************) s
1272 (*********************/) s
1276 ( .long 0x55555550, 0x5aaaaaa5, 0x5ffffffa, 0x655555) s
1280 ( .long 0x6aaaaaa4, 0x6ffffff9, 0x7555554e, 0x7aaaaa) s
1284 ( .long 0x7ffffff8, 0x8555554d, 0x8aaaaaa2, 0x8fffff) s
1288 ( .long 0x9555554c, 0x9aaaaaa1, 0x9ffffff6, 0xa55555) s
1292 (/*********************************************************) s
1294 (**********************) s
1296 (* uint32_t addelment\(uint8_t j, const uint32_t* m, const u) s
1302 (* r = pgm_read_dword\(k_lut+j\);) s
1304 (* r += rotl_addel\(\(\(uint32_t*\)m\)[j&0xf], j+0\);) s
1306 (* r += rotl_addel\(\(\(uint32_t*\)m\)[\(j+3\)&0xf], j+3\);) s
1308 (* r -= rotl_addel\(\(\(uint32_t*\)m\)[\(j+10\)&0xf], j+10\);) s
1310 (* r ^= \(\(uint32_t*\)h\)[\(j+7\)&0xf];) s
1318 (* param m: r22:r23) s
1320 (* param h: r20:r21) s
1366 (load_acc_from_X:) s
1406 (load_rotate_add_M:) s
1432 ( rcall rotateleft32) s
1436 ( rcall add32_to_acc) s
1440 (10: sub acc0, r22) s
1464 ( ldi r30, lo8\(const_lut\)) s
1466 ( ldi r31, hi8\(const_lut\)) s
1484 ( rcall load_rotate_add_M) s
1490 ( rcall load_rotate_add_M) s
1498 ( rcall load_rotate_add_M) s
1534 (/*********************************************************) s
1536 (*********************/) s
1540 ( param q: r26:r27) s
1542 ( param m: r22:r23) s
1544 ( param h: r20:r21) s
1552 ( push_range 20, 27) s
1556 ( rcall addelement) s
1560 ( pop_range 20, 27) s
1574 ( rcall expand_intro) s
1580 ( rcall load32_from_X) s
1588 ( rcall add32_to_acc) s
1610 (/*********************************************************) s
1612 (*********************/) s
1616 ( param q: r26:r27) s
1618 ( param m: r22:r23) s
1620 ( param h: r20:r21) s
1626 (expand2_rot_table:) s
1628 ( .byte 0,3,0,7,0,13,0,16,0,19,0,23,0,27) s
1632 ( rcall expand_intro) s
1636 ( ldi r30, lo8\(expand2_rot_table\)) s
1645 /fname (bmw_small-tinyasm.S) def
1647 /ftail (bmw_small-tinyasm.S) def
1648 % User defined strings:
1649 /fmodstr (Mo Apr 05 09:57:29 2010) def
1651 /user_header_p false def
1652 /user_footer_p false def
1658 ( ldi r31, hi8\(expand2_rot_table\)) s
1662 ( rcall load32_from_X) s
1668 ( rcall rotateleft32) s
1670 ( rcall add32_to_acc) s
1676 ( rcall load32_from_X) s
1682 ( rcall add32_to_acc) s
1684 ( rcall load32_from_X) s
1690 ( rcall add32_to_acc) s
1692 ( rjmp expand1_exit) s
1694 (/*********************************************************) s
1696 (*********************/) s
1700 ( param q: r24:r25) s
1702 ( param m: r22:r23) s
1704 ( param h: r20:r21) s
1708 (/* for calling expand1/2) s
1710 ( param q: r26:r27) s
1712 ( param m: r22:r23) s
1714 ( param h: r20:r21) s
1750 (10: movw r26, r2) s
1774 (/*********************************************************) s
1776 (*********************/) s
1780 ( param q: r24:r25) s
1782 ( param m: r22:r23) s
1784 ( param h: r20:r21) s
1788 (f2_1_shift_table:) s
1790 ( .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x) s
1794 ( .byte 0x2B, 0x64, 0x66, 0x03, 0x51, 0x55, 0x87, 0x) s
1798 (f2_2_shift_table:) s
1800 ( .byte \(2<<1\), \(7<<1\), \(4<<1\), \(3<<1\), \(4<<1\)+1, \(6) s
1802 (<<1\)+1, \(6<<1\)) s
1804 ( .byte 0 ; just for alignment) s
1848 ( movw q16_0, r26) s
1880 (;--- /* calc XH */) s
1910 (; push_range 22, 25) s
1924 (; pop_range 22, 25) s
1928 (;--- /* calc first half of h0..h15 */) s
1934 ( movw r26, q16_0) s
1950 ( ldi r30, lo8\(f2_1_shift_table-1\)) s
1952 ( ldi r31, hi8\(f2_1_shift_table-1\)) s
1982 ( rcall shiftright32) s
1986 (25: rcall shiftleft32) s
1988 (26: rcall eor32_to_acc) s
1992 ( rcall load32_from_X) s
2004 ( rcall shiftleft32) s
2008 (27: rcall shiftright32) s
2010 (28: rcall eor32_to_acc) s
2034 ( sbiw r26, 4*8 /* X points to q[24] */) s
2040 ( sbiw r28, 33 /* Y points to q[0] */) s
2044 ( sbiw r30, 1 /* Z points to h0 */) s
2048 (10: movw acc0, xl0) s
2059 /fname (bmw_small-tinyasm.S) def
2061 /ftail (bmw_small-tinyasm.S) def
2062 % User defined strings:
2063 /fmodstr (Mo Apr 05 09:57:29 2010) def
2065 /user_header_p false def
2066 /user_footer_p false def
2072 ( rcall load32_from_X) s
2074 ( rcall eor32_to_acc) s
2076 ( rcall load32_from_Y) s
2078 ( rcall eor32_to_acc) s
2080 ( rcall add_acc_to_Z) s
2086 ( sbiw r26, 9*4 /* X points to q[23] */) s
2088 ( rcall load_acc_from_X) s
2096 ( rcall load32_from_Y) s
2098 ( rcall eor32_to_acc) s
2100 ( rcall add_acc_to_Z) s
2104 ( sbiw r26, 8*4 /* X points to q[16] */) s
2112 ( ldi r30, lo8\(f2_2_shift_table-1\)) s
2114 ( ldi r31, hi8\(f2_2_shift_table-1\)) s
2122 ( rcall load_acc_from_X) s
2132 ( rcall shiftleft32) s
2136 (20: rcall shiftright32) s
2140 ( rcall eor32_to_acc) s
2142 ( rcall load32_from_Y) s
2144 ( rcall eor32_to_acc) s
2148 ( rcall add_acc_to_Z) s
2158 ( sbiw r30, 8*4 /* Z points to h8 */) s
2162 ( sbiw r26, 4*4 /* X points to h4 */) s
2170 ( rcall load32_from_X) s
2174 ( rcall rotateleft32) s
2180 ( rcall add_acc_to_Z) s
2194 (20: sbiw r26, 8*4) s
2200 (/*********************************************************) s
2202 (*********************/) s
2206 ( param ctx: r24:r25) s
2208 ( param msg: r22:r23) s
2214 ( param q: r28:r29 \(Y\)) s
2216 ( param h: r26:r27 \(X\)) s
2218 ( param m: r30:r31 \(Z\)) s
2224 ( param q: r24:r25) s
2226 ( param m: r22:r23) s
2228 ( param h: r20:r21) s
2234 ( param q: r24:r25) s
2236 ( param m: r22:r23) s
2238 ( param h: r20:r21) s
2242 (.global bmw_small_nextBlock) s
2244 (.global bmw224_nextBlock) s
2246 (.global bmw256_nextBlock) s
2248 (bmw_small_nextBlock:) s
2250 (bmw224_nextBlock:) s
2252 (bmw256_nextBlock:) s
2254 ( push_range 28, 29) s
2256 ( push_range 2, 17) s
2258 ( stack_alloc_large 32*4, r28, r29) s
2262 (; push_range 28, 29 /* push Q */) s
2264 (; push_range 22, 25 /* push M & H */) s
2266 ( /* increment counter */) s
2276 ( rcall load_acc_from_X) s
2314 (; pop_range 20, 25) s
2316 (; push_range 20, 25) s
2338 ( stack_free_large3 32*4) s
2340 ( pop_range 2, 17) s
2342 ( pop_range 28, 29) s
2346 (/*********************************************************) s
2348 (*********************/) s
2352 ( param ctx: r24:r25) s
2354 ( param msg: r22:r23) s
2356 ( param len: r20:r21) s
2376 (.global bmw_small_lastBlock) s
2378 (.global bmw224_lastBlock) s
2380 (.global bmw256_lastBlock) s
2382 (bmw_small_lastBlock:) s
2384 (bmw224_lastBlock:) s
2386 (bmw256_lastBlock:) s
2388 (/* while\(length_b >= BMW_SMALL_BLOCKSIZE\){) s
2390 ( bmw_small_nextBlock\(ctx, block\);) s
2392 ( length_b -= BMW_SMALL_BLOCKSIZE;) s
2394 ( block = \(uint8_t*\)block + BMW_SMALL_BLOCKS) s
2402 ( push_range 2, 7) s
2404 ( push_range 28, 29) s
2414 ( cpi len1, hi8\(512\)) s
2422 ( rcall bmw_small_nextBlock) s
2430 ( subi len1, hi8\(512\)) s
2438 ( uint8_t buffer[64];) s
2446 ( stack_alloc_large 68) s
2452 (/* memset\(pctx.buffer, 0, 64\);) s
2454 ( memcpy\(pctx.buffer, block, \(length_b+7\)/8\);) s
2456 ( pctx.buffer[length_b>>3] |= 0x80 >> \(length_b&0x07) s
2460 (*/ movw r24, len0) s
2473 /fname (bmw_small-tinyasm.S) def
2475 /ftail (bmw_small-tinyasm.S) def
2476 % User defined strings:
2477 /fmodstr (Mo Apr 05 09:57:29 2010) def
2479 /user_header_p false def
2480 /user_footer_p false def
2500 ( /* copy \(#r24\) bytes to stack buffer */) s
2510 (301: /* calculate the appended byte */) s
2550 (/* if\(length_b+1>64*8-64\){ ; = 64*7-1 = 447 max\(lengt) s
2554 ( bmw_small_nextBlock\(ctx, pctx.buffer\);) s
2556 ( memset\(pctx.buffer, 0, 64-8\);) s
2558 ( ctx->counter -= 1;) s
2576 ( rcall bmw_small_nextBlock) s
2612 (/* *\(\(uint64_t*\)&\(pctx.buffer[64-8]\)\) = \(uint64_t\)\(ct) s
2614 (x->counter*512LL\)+\(uint64_t\)length_b;) s
2616 ( bmw_small_nextBlock\(ctx, pctx.buffer\);) s
2684 ( rcall bmw_small_nextBlock) s
2686 (/* memset\(pctx.buffer, 0xaa, 64\);) s
2688 ( for\(i=0; i<16;++i\){) s
2690 ( pctx.buffer[i*4] = i+0xa0;) s
2718 (/* bmw_small_nextBlock\(\(bmw_small_ctx_t*\)&pctx, ctx->) s
2722 ( memcpy\(ctx->h, pctx.buffer, 64\);) s
2730 ( rcall bmw_small_nextBlock) s
2748 ( stack_free_large 68) s
2750 ( pop_range 28, 29) s
2756 (/*********************************************************) s
2758 (**********************) s
2760 (* void bmw224_ctx2hash\(void* dest, const bmw224_ctx_t* ctx) s
2764 (* memcpy\(dest, &\(ctx->h[9]\), 224/8\);) s
2770 (* param dest: r24:r25) s
2772 (* param ctx: r22:r23) s
2776 (.global bmw224_ctx2hash) s
2778 (bmw224_ctx2hash:) s
2790 (/*********************************************************) s
2792 (**********************) s
2794 (* void bmw256_ctx2hash\(void* dest, const bmw256_ctx_t* ctx) s
2798 (* memcpy\(dest, &\(ctx->h[8]\), 256/8\);) s
2804 (* param dest: r24:r25) s
2806 (* param ctx: r22:r23) s
2810 (.global bmw256_ctx2hash) s
2812 (bmw256_ctx2hash:) s
2834 (/*********************************************************) s
2836 (**********************) s
2838 (* void bmw256\(void* dest, const void* msg, uint32_t length) s
2842 (* bmw_small_ctx_t ctx;) s
2844 (* bmw256_init\(&ctx\);) s
2846 (* while\(length_b>=BMW_SMALL_BLOCKSIZE\){) s
2848 (* bmw_small_nextBlock\(&ctx, msg\);) s
2850 (* length_b -= BMW_SMALL_BLOCKSIZE;) s
2852 (* msg = \(uint8_t*\)msg + BMW_SMALL_BLOCKSIZE_) s
2858 (* bmw_small_lastBlock\(&ctx, msg, length_b\);) s
2860 (* bmw256_ctx2hash\(dest, &ctx\);) s
2866 (* param dest: r24:r25) s
2868 (* param msg: r22:r23) s
2870 (* param length_b: r18:r21) s
2885 /fname (bmw_small-tinyasm.S) def
2887 /ftail (bmw_small-tinyasm.S) def
2888 % User defined strings:
2889 /fmodstr (Mo Apr 05 09:57:29 2010) def
2891 /user_header_p false def
2892 /user_footer_p false def
2922 ( rjmp bmw_small_all) s
2924 (/*********************************************************) s
2926 (**********************) s
2928 (* void bmw224\(void* dest, const void* msg, uint32_t length) s
2932 (* bmw_small_ctx_t ctx;) s
2934 (* bmw224_init\(&ctx\);) s
2936 (* while\(length_b>=BMW_SMALL_BLOCKSIZE\){) s
2938 (* bmw_small_nextBlock\(&ctx, msg\);) s
2940 (* length_b -= BMW_SMALL_BLOCKSIZE;) s
2942 (* msg = \(uint8_t*\)msg + BMW_SMALL_BLOCKSIZE_) s
2948 (* bmw_small_lastBlock\(&ctx, msg, length_b\);) s
2950 (* bmw224_ctx2hash\(dest, &ctx\);) s
2956 (* param dest: r24:r25) s
2958 (* param msg: r22:r23) s
2960 (* param length_b: r18:r21) s
2994 ( push_range 2, 11) s
2996 ( stack_alloc_large 64+4) s
3012 ( ldi r30, pm_lo8\(init_lut\)) s
3014 ( ldi r31, pm_hi8\(init_lut\)) s
3034 ( rcall bmw_small_nextBlock) s
3060 ( rcall bmw_small_lastBlock) s
3066 ( ldi r30, pm_lo8\(c2h_lut\)) s
3068 ( ldi r31, pm_hi8\(c2h_lut\)) s
3076 ( stack_free_large 64+4) s
3078 ( pop_range 2, 11) s
3086 ( rjmp bmw224_init) s
3088 ( rjmp bmw256_init) s
3092 ( rjmp bmw224_ctx2hash) s
3094 ( rjmp bmw256_ctx2hash) s
3096 (/*********************************************************) s
3098 (**********************) s
3100 (* void bmw224_init\(bmw224_ctx_t* ctx\){) s
3104 (* ctx->h[0] = 0x00010203;) s
3106 (* for\(i=1; i<16; ++i\){) s
3108 (* ctx->h[i] = ctx->h[i-1]+ 0x04040404;) s
3112 (* ctx->counter=0;) s
3118 (* param ctx: r24:r25) s
3122 (.global bmw224_init) s
3182 (.global bmw256_init) s
3196 ( rjmp bmw_small_init) s
3198 (/*********************************************************) s
3200 (*********************/) s
3206 ( push_range 20, 25) s
3214 ( ldi r24, lo8\(qdbg_str\)) s
3216 ( ldi r25, hi8\(qdbg_str\)) s
3218 ( call cli_putstr_P) s
3222 (10: ldi r24, lo8\(qdbg_str1\)) s
3224 ( ldi r25, hi8\(qdbg_str1\)) s
3226 ( call cli_putstr_P) s
3230 ( call cli_hexdump_byte) s
3232 ( ldi r24, lo8\(qdbg_str2\)) s
3234 ( ldi r25, hi8\(qdbg_str2\)) s
3236 ( call cli_putstr_P) s
3244 ( call cli_hexdump_rev) s
3256 ( pop_range 20, 25) s
3260 (qdbg_str: .asciz "\\r\\nDBG Q: ") s
3262 (qdbg_str1: .asciz "\\r\\n Q[") s
3264 (qdbg_str2: .asciz "] = ") s
3268 ( push_range 6, 9) s
3270 ( push_range 16, 27) s
3272 ( push_range 30, 31) s
3285 /fname (bmw_small-tinyasm.S) def
3287 /ftail (bmw_small-tinyasm.S) def
3288 % User defined strings:
3289 /fmodstr (Mo Apr 05 09:57:29 2010) def
3291 /user_header_p false def
3292 /user_footer_p false def
3302 ( ldi r24, lo8\(Xdbg_str\)) s
3304 ( ldi r25, hi8\(Xdbg_str\)) s
3306 ( call cli_putstr_P) s
3318 (10: ldi r24, lo8\(Xdbg_str1\)) s
3320 ( ldi r25, hi8\(Xdbg_str1\)) s
3322 ( call cli_putstr_P) s
3334 ( call cli_hexdump_byte) s
3336 ( ldi r24, lo8\(Xdbg_str2\)) s
3338 ( ldi r25, hi8\(Xdbg_str2\)) s
3340 ( call cli_putstr_P) s
3348 ( call cli_hexdump_rev) s
3360 ( pop_range 30, 31) s
3362 ( pop_range 16, 27) s
3368 (Xdbg_str: .asciz "\\r\\nDBG ") s
3370 (Xdbg_str1: .asciz "\\r\\n ") s
3372 (Xdbg_str2: .asciz "] = ") s
3376 ( push_range 6, 9) s
3378 ( push_range 16, 27) s
3380 ( push_range 30, 31) s
3386 ( ldi r24, lo8\(Xdbg_str\)) s
3388 ( ldi r25, hi8\(Xdbg_str\)) s
3390 ( call cli_putstr_P) s
3394 ( call cli_hexdump_byte) s
3398 ( call cli_hexdump_byte) s
3402 ( call cli_hexdump_byte) s
3406 ( call cli_hexdump_byte) s
3408 ( pop_range 30, 31) s
3410 ( pop_range 16, 27) s
3418 ( push_range 16, 27) s
3420 ( push_range 30, 31) s
3422 ( ldi r24, lo8\(Xdbg_str\)) s
3424 ( ldi r25, hi8\(Xdbg_str\)) s
3426 ( call cli_putstr_P) s
3430 ( call cli_hexdump_byte) s
3434 ( call cli_hexdump_byte) s
3438 ( call cli_hexdump_byte) s
3442 ( call cli_hexdump_byte) s
3444 ( pop_range 30, 31) s
3446 ( pop_range 16, 27) s
3455 %%DocumentNeededResources: font Courier-Bold Courier