-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest_sim.lst
3972 lines (3753 loc) · 142 KB
/
test_sim.lst
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
test_sim.elf: file format elf32-avr
Sections:
Idx Name Size VMA LMA File off Algn
0 .data 0000028e 00800100 0000187c 00001910 2**0
CONTENTS, ALLOC, LOAD, DATA
1 .text 0000187c 00000000 00000000 00000094 2**1
CONTENTS, ALLOC, LOAD, READONLY, CODE
2 .bss 000000f5 0080038e 0080038e 00001b9e 2**0
ALLOC
3 .comment 00000030 00000000 00000000 00001b9e 2**0
CONTENTS, READONLY
4 .debug_aranges 00000020 00000000 00000000 00001bce 2**0
CONTENTS, READONLY, DEBUGGING
5 .debug_info 000017d5 00000000 00000000 00001bee 2**0
CONTENTS, READONLY, DEBUGGING
6 .debug_abbrev 00000432 00000000 00000000 000033c3 2**0
CONTENTS, READONLY, DEBUGGING
7 .debug_line 00000376 00000000 00000000 000037f5 2**0
CONTENTS, READONLY, DEBUGGING
8 .debug_frame 000003c4 00000000 00000000 00003b6c 2**2
CONTENTS, READONLY, DEBUGGING
9 .debug_str 000004a5 00000000 00000000 00003f30 2**0
CONTENTS, READONLY, DEBUGGING
10 .debug_loc 000013cb 00000000 00000000 000043d5 2**0
CONTENTS, READONLY, DEBUGGING
11 .debug_ranges 00000030 00000000 00000000 000057a0 2**0
CONTENTS, READONLY, DEBUGGING
Disassembly of section .text:
00000000 <__vectors>:
0: 0c 94 ae 00 jmp 0x15c ; 0x15c <__ctors_end>
4: 0c 94 cd 00 jmp 0x19a ; 0x19a <__bad_interrupt>
8: 0c 94 cd 00 jmp 0x19a ; 0x19a <__bad_interrupt>
c: 0c 94 cd 00 jmp 0x19a ; 0x19a <__bad_interrupt>
10: 0c 94 cd 00 jmp 0x19a ; 0x19a <__bad_interrupt>
14: 0c 94 cd 00 jmp 0x19a ; 0x19a <__bad_interrupt>
18: 0c 94 cd 00 jmp 0x19a ; 0x19a <__bad_interrupt>
1c: 0c 94 cd 00 jmp 0x19a ; 0x19a <__bad_interrupt>
20: 0c 94 cd 00 jmp 0x19a ; 0x19a <__bad_interrupt>
24: 0c 94 cd 00 jmp 0x19a ; 0x19a <__bad_interrupt>
28: 0c 94 cd 00 jmp 0x19a ; 0x19a <__bad_interrupt>
2c: 0c 94 cd 00 jmp 0x19a ; 0x19a <__bad_interrupt>
30: 0c 94 cd 00 jmp 0x19a ; 0x19a <__bad_interrupt>
34: 0c 94 cd 00 jmp 0x19a ; 0x19a <__bad_interrupt>
38: 0c 94 cd 00 jmp 0x19a ; 0x19a <__bad_interrupt>
3c: 0c 94 cd 00 jmp 0x19a ; 0x19a <__bad_interrupt>
40: 0c 94 cd 00 jmp 0x19a ; 0x19a <__bad_interrupt>
44: 0c 94 cd 00 jmp 0x19a ; 0x19a <__bad_interrupt>
48: 0c 94 cd 00 jmp 0x19a ; 0x19a <__bad_interrupt>
4c: 0c 94 cd 00 jmp 0x19a ; 0x19a <__bad_interrupt>
50: 0c 94 cd 00 jmp 0x19a ; 0x19a <__bad_interrupt>
54: 0c 94 cd 00 jmp 0x19a ; 0x19a <__bad_interrupt>
58: 0c 94 cd 00 jmp 0x19a ; 0x19a <__bad_interrupt>
5c: 0c 94 cd 00 jmp 0x19a ; 0x19a <__bad_interrupt>
60: 0c 94 cd 00 jmp 0x19a ; 0x19a <__bad_interrupt>
64: 0c 94 cd 00 jmp 0x19a ; 0x19a <__bad_interrupt>
68: 0c 94 cd 00 jmp 0x19a ; 0x19a <__bad_interrupt>
6c: 0c 94 cd 00 jmp 0x19a ; 0x19a <__bad_interrupt>
70: 0c 94 cd 00 jmp 0x19a ; 0x19a <__bad_interrupt>
74: 0c 94 cd 00 jmp 0x19a ; 0x19a <__bad_interrupt>
78: 0c 94 cd 00 jmp 0x19a ; 0x19a <__bad_interrupt>
7c: 0c 94 cd 00 jmp 0x19a ; 0x19a <__bad_interrupt>
80: 0c 94 cd 00 jmp 0x19a ; 0x19a <__bad_interrupt>
84: 0c 94 cd 00 jmp 0x19a ; 0x19a <__bad_interrupt>
88: 0c 94 cd 00 jmp 0x19a ; 0x19a <__bad_interrupt>
8c: f6 06 cpc r15, r22
8e: 1a 06 cpc r1, r26
90: 24 06 cpc r2, r20
92: 22 06 cpc r2, r18
94: 22 06 cpc r2, r18
96: 22 06 cpc r2, r18
98: 22 06 cpc r2, r18
9a: 22 06 cpc r2, r18
9c: 22 06 cpc r2, r18
9e: 22 06 cpc r2, r18
a0: 22 06 cpc r2, r18
a2: 22 06 cpc r2, r18
a4: 22 06 cpc r2, r18
a6: e0 06 cpc r14, r16
a8: 22 06 cpc r2, r18
aa: 22 06 cpc r2, r18
ac: 22 06 cpc r2, r18
ae: dc 05 cpc r29, r12
b0: 22 06 cpc r2, r18
b2: 24 06 cpc r2, r20
b4: 22 06 cpc r2, r18
b6: 22 06 cpc r2, r18
b8: e5 06 cpc r14, r21
ba: 05 a8 ldd r0, Z+53 ; 0x35
bc: 4c cd rjmp .-1384 ; 0xfffffb56 <__eeprom_end+0xff7efb56>
be: b2 d4 rcall .+2404 ; 0xa24 <print_int16_itoa+0x2e>
c0: 4e b9 out 0x0e, r20 ; 14
c2: 38 36 cpi r19, 0x68 ; 104
c4: a9 02 muls r26, r25
c6: 0c 50 subi r16, 0x0C ; 12
c8: b9 91 ld r27, Y+
ca: 86 88 ldd r8, Z+22 ; 0x16
cc: 08 3c cpi r16, 0xC8 ; 200
ce: a6 aa std Z+54, r10 ; 0x36
d0: aa 2a or r10, r26
d2: be 00 .word 0x00be ; ????
d4: 00 00 nop
d6: 80 3f cpi r24, 0xF0 ; 240
000000d8 <__trampolines_end>:
d8: 00 00 nop
da: 24 03 mulsu r18, r20
dc: 48 06 cpc r4, r24
de: 6a 09 sbc r22, r10
e0: 8c 0c add r8, r12
e2: ab 0f add r26, r27
e4: c8 12 cpse r12, r24
e6: e2 15 cp r30, r2
e8: f9 18 sub r15, r9
ea: 0b 1c adc r0, r11
ec: 1a 1f adc r17, r26
ee: 23 22 and r2, r19
f0: 28 25 eor r18, r8
f2: 26 28 or r2, r6
f4: 1f 2b or r17, r31
f6: 11 2e mov r1, r17
f8: fb 30 cpi r31, 0x0B ; 11
fa: df 33 cpi r29, 0x3F ; 63
fc: ba 36 cpi r27, 0x6A ; 106
fe: 8c 39 cpi r24, 0x9C ; 156
100: 56 3c cpi r21, 0xC6 ; 198
102: 17 3f cpi r17, 0xF7 ; 247
104: ce 41 sbci r28, 0x1E ; 30
106: 7a 44 sbci r23, 0x4A ; 74
108: 1c 47 sbci r17, 0x7C ; 124
10a: b4 49 sbci r27, 0x94 ; 148
10c: 3f 4c sbci r19, 0xCF ; 207
10e: bf 4e sbci r27, 0xEF ; 239
110: 33 51 subi r19, 0x13 ; 19
112: 9b 53 subi r25, 0x3B ; 59
114: f5 55 subi r31, 0x55 ; 85
116: 42 58 subi r20, 0x82 ; 130
118: 82 5a subi r24, 0xA2 ; 162
11a: b3 5c subi r27, 0xC3 ; 195
11c: d7 5e subi r29, 0xE7 ; 231
11e: eb 60 ori r30, 0x0B ; 11
120: f1 62 ori r31, 0x21 ; 33
122: e8 64 ori r30, 0x48 ; 72
124: cf 66 ori r28, 0x6F ; 111
126: a6 68 ori r26, 0x86 ; 134
128: 6d 6a ori r22, 0xAD ; 173
12a: 23 6c ori r18, 0xC3 ; 195
12c: c9 6d ori r28, 0xD9 ; 217
12e: 5e 6f ori r21, 0xFE ; 254
130: e2 70 andi r30, 0x02 ; 2
132: 54 72 andi r21, 0x24 ; 36
134: b5 73 andi r27, 0x35 ; 53
136: 04 75 andi r16, 0x54 ; 84
138: 41 76 andi r20, 0x61 ; 97
13a: 6b 77 andi r22, 0x7B ; 123
13c: 84 78 andi r24, 0x84 ; 132
13e: 89 79 andi r24, 0x99 ; 153
140: 7c 7a andi r23, 0xAC ; 172
142: 5c 7b andi r21, 0xBC ; 188
144: 29 7c andi r18, 0xC9 ; 201
146: e3 7c andi r30, 0xC3 ; 195
148: 89 7d andi r24, 0xD9 ; 217
14a: 1d 7e andi r17, 0xED ; 237
14c: 9c 7e andi r25, 0xEC ; 236
14e: 09 7f andi r16, 0xF9 ; 249
150: 61 7f andi r22, 0xF1 ; 241
152: a6 7f andi r26, 0xF6 ; 246
154: d8 7f andi r29, 0xF8 ; 248
156: f5 7f andi r31, 0xF5 ; 245
158: ff 7f andi r31, 0xFF ; 255
15a: f5 7f andi r31, 0xF5 ; 245
0000015c <__ctors_end>:
15c: 11 24 eor r1, r1
15e: 1f be out 0x3f, r1 ; 63
160: cf ef ldi r28, 0xFF ; 255
162: d0 e1 ldi r29, 0x10 ; 16
164: de bf out 0x3e, r29 ; 62
166: cd bf out 0x3d, r28 ; 61
00000168 <__do_copy_data>:
168: 13 e0 ldi r17, 0x03 ; 3
16a: a0 e0 ldi r26, 0x00 ; 0
16c: b1 e0 ldi r27, 0x01 ; 1
16e: ec e7 ldi r30, 0x7C ; 124
170: f8 e1 ldi r31, 0x18 ; 24
172: 00 e0 ldi r16, 0x00 ; 0
174: 0b bf out 0x3b, r16 ; 59
176: 02 c0 rjmp .+4 ; 0x17c <__do_copy_data+0x14>
178: 07 90 elpm r0, Z+
17a: 0d 92 st X+, r0
17c: ae 38 cpi r26, 0x8E ; 142
17e: b1 07 cpc r27, r17
180: d9 f7 brne .-10 ; 0x178 <__do_copy_data+0x10>
00000182 <__do_clear_bss>:
182: 24 e0 ldi r18, 0x04 ; 4
184: ae e8 ldi r26, 0x8E ; 142
186: b3 e0 ldi r27, 0x03 ; 3
188: 01 c0 rjmp .+2 ; 0x18c <.do_clear_bss_start>
0000018a <.do_clear_bss_loop>:
18a: 1d 92 st X+, r1
0000018c <.do_clear_bss_start>:
18c: a3 38 cpi r26, 0x83 ; 131
18e: b2 07 cpc r27, r18
190: e1 f7 brne .-8 ; 0x18a <.do_clear_bss_loop>
192: 0e 94 6b 07 call 0xed6 ; 0xed6 <main>
196: 0c 94 3c 0c jmp 0x1878 ; 0x1878 <_exit>
0000019a <__bad_interrupt>:
19a: 0c 94 00 00 jmp 0 ; 0x0 <__vectors>
0000019e <float_convert_to_float>:
float a = 3454.345334, b = 12232.45345, c = 0.0;
short d = 23442;
void float_convert_to_float(void) {
c = d;
19e: 60 91 38 01 lds r22, 0x0138
1a2: 70 91 39 01 lds r23, 0x0139
1a6: 88 27 eor r24, r24
1a8: 77 fd sbrc r23, 7
1aa: 80 95 com r24
1ac: 98 2f mov r25, r24
1ae: 0e 94 4c 0a call 0x1498 ; 0x1498 <__floatsisf>
1b2: 60 93 8e 03 sts 0x038E, r22
1b6: 70 93 8f 03 sts 0x038F, r23
1ba: 80 93 90 03 sts 0x0390, r24
1be: 90 93 91 03 sts 0x0391, r25
1c2: 08 95 ret
000001c4 <float_convert_to_int>:
}
void float_convert_to_int(void) {
d = (short) c;
1c4: 60 91 8e 03 lds r22, 0x038E
1c8: 70 91 8f 03 lds r23, 0x038F
1cc: 80 91 90 03 lds r24, 0x0390
1d0: 90 91 91 03 lds r25, 0x0391
1d4: 0e 94 19 0a call 0x1432 ; 0x1432 <__fixsfsi>
1d8: 70 93 39 01 sts 0x0139, r23
1dc: 60 93 38 01 sts 0x0138, r22
1e0: 08 95 ret
000001e2 <float_add_const>:
}
void float_add_const(void) {
c = a + 4.0;
1e2: 20 e0 ldi r18, 0x00 ; 0
1e4: 30 e0 ldi r19, 0x00 ; 0
1e6: 40 e8 ldi r20, 0x80 ; 128
1e8: 50 e4 ldi r21, 0x40 ; 64
1ea: 60 91 3e 01 lds r22, 0x013E
1ee: 70 91 3f 01 lds r23, 0x013F
1f2: 80 91 40 01 lds r24, 0x0140
1f6: 90 91 41 01 lds r25, 0x0141
1fa: 0e 94 4d 09 call 0x129a ; 0x129a <__addsf3>
1fe: 60 93 8e 03 sts 0x038E, r22
202: 70 93 8f 03 sts 0x038F, r23
206: 80 93 90 03 sts 0x0390, r24
20a: 90 93 91 03 sts 0x0391, r25
20e: 08 95 ret
00000210 <float_add>:
}
void float_add(void) {
c = a + b;
210: 20 91 3a 01 lds r18, 0x013A
214: 30 91 3b 01 lds r19, 0x013B
218: 40 91 3c 01 lds r20, 0x013C
21c: 50 91 3d 01 lds r21, 0x013D
220: 60 91 3e 01 lds r22, 0x013E
224: 70 91 3f 01 lds r23, 0x013F
228: 80 91 40 01 lds r24, 0x0140
22c: 90 91 41 01 lds r25, 0x0141
230: 0e 94 4d 09 call 0x129a ; 0x129a <__addsf3>
234: 60 93 8e 03 sts 0x038E, r22
238: 70 93 8f 03 sts 0x038F, r23
23c: 80 93 90 03 sts 0x0390, r24
240: 90 93 91 03 sts 0x0391, r25
244: 08 95 ret
00000246 <float_mul_const>:
}
void float_mul_const(void) {
c = a * 4.0;
246: 20 e0 ldi r18, 0x00 ; 0
248: 30 e0 ldi r19, 0x00 ; 0
24a: 40 e8 ldi r20, 0x80 ; 128
24c: 50 e4 ldi r21, 0x40 ; 64
24e: 60 91 3e 01 lds r22, 0x013E
252: 70 91 3f 01 lds r23, 0x013F
256: 80 91 40 01 lds r24, 0x0140
25a: 90 91 41 01 lds r25, 0x0141
25e: 0e 94 d8 0a call 0x15b0 ; 0x15b0 <__mulsf3>
262: 60 93 8e 03 sts 0x038E, r22
266: 70 93 8f 03 sts 0x038F, r23
26a: 80 93 90 03 sts 0x0390, r24
26e: 90 93 91 03 sts 0x0391, r25
272: 08 95 ret
00000274 <float_mul>:
}
void float_mul(void) {
c = a * b;
274: 20 91 3a 01 lds r18, 0x013A
278: 30 91 3b 01 lds r19, 0x013B
27c: 40 91 3c 01 lds r20, 0x013C
280: 50 91 3d 01 lds r21, 0x013D
284: 60 91 3e 01 lds r22, 0x013E
288: 70 91 3f 01 lds r23, 0x013F
28c: 80 91 40 01 lds r24, 0x0140
290: 90 91 41 01 lds r25, 0x0141
294: 0e 94 d8 0a call 0x15b0 ; 0x15b0 <__mulsf3>
298: 60 93 8e 03 sts 0x038E, r22
29c: 70 93 8f 03 sts 0x038F, r23
2a0: 80 93 90 03 sts 0x0390, r24
2a4: 90 93 91 03 sts 0x0391, r25
2a8: 08 95 ret
000002aa <float_div_const>:
}
void float_div_const(void) {
c = a / 2.4;
2aa: 2a e9 ldi r18, 0x9A ; 154
2ac: 39 e9 ldi r19, 0x99 ; 153
2ae: 49 e1 ldi r20, 0x19 ; 25
2b0: 50 e4 ldi r21, 0x40 ; 64
2b2: 60 91 3e 01 lds r22, 0x013E
2b6: 70 91 3f 01 lds r23, 0x013F
2ba: 80 91 40 01 lds r24, 0x0140
2be: 90 91 41 01 lds r25, 0x0141
2c2: 0e 94 b1 09 call 0x1362 ; 0x1362 <__divsf3>
2c6: 60 93 8e 03 sts 0x038E, r22
2ca: 70 93 8f 03 sts 0x038F, r23
2ce: 80 93 90 03 sts 0x0390, r24
2d2: 90 93 91 03 sts 0x0391, r25
2d6: 08 95 ret
000002d8 <float_div>:
}
void float_div(void) {
c = a / b;
2d8: 20 91 3a 01 lds r18, 0x013A
2dc: 30 91 3b 01 lds r19, 0x013B
2e0: 40 91 3c 01 lds r20, 0x013C
2e4: 50 91 3d 01 lds r21, 0x013D
2e8: 60 91 3e 01 lds r22, 0x013E
2ec: 70 91 3f 01 lds r23, 0x013F
2f0: 80 91 40 01 lds r24, 0x0140
2f4: 90 91 41 01 lds r25, 0x0141
2f8: 0e 94 b1 09 call 0x1362 ; 0x1362 <__divsf3>
2fc: 60 93 8e 03 sts 0x038E, r22
300: 70 93 8f 03 sts 0x038F, r23
304: 80 93 90 03 sts 0x0390, r24
308: 90 93 91 03 sts 0x0391, r25
30c: 08 95 ret
0000030e <int16_div10>:
static inline unsigned short div10(unsigned short in) {
return (((unsigned long) in * 52429L)) >> 19;
}
void int16_div10(void) {
i_c = i_a / 10;
30e: 20 91 36 01 lds r18, 0x0136
312: 30 91 37 01 lds r19, 0x0137
316: ad ec ldi r26, 0xCD ; 205
318: bc ec ldi r27, 0xCC ; 204
31a: 0e 94 32 09 call 0x1264 ; 0x1264 <__umulhisi3>
31e: 96 95 lsr r25
320: 87 95 ror r24
322: 96 95 lsr r25
324: 87 95 ror r24
326: 96 95 lsr r25
328: 87 95 ror r24
32a: 90 93 b8 03 sts 0x03B8, r25
32e: 80 93 b7 03 sts 0x03B7, r24
332: 08 95 ret
00000334 <int16_div10_fast>:
}
unsigned short i_a = 2344, i_b = 23, i_c;
static inline unsigned short div10(unsigned short in) {
return (((unsigned long) in * 52429L)) >> 19;
334: 20 91 36 01 lds r18, 0x0136
338: 30 91 37 01 lds r19, 0x0137
33c: ad ec ldi r26, 0xCD ; 205
33e: bc ec ldi r27, 0xCC ; 204
340: 0e 94 32 09 call 0x1264 ; 0x1264 <__umulhisi3>
344: dc 01 movw r26, r24
346: cb 01 movw r24, r22
348: 07 2e mov r0, r23
34a: 73 e1 ldi r23, 0x13 ; 19
34c: b6 95 lsr r27
34e: a7 95 ror r26
350: 97 95 ror r25
352: 87 95 ror r24
354: 7a 95 dec r23
356: d1 f7 brne .-12 ; 0x34c <int16_div10_fast+0x18>
358: 70 2d mov r23, r0
35a: 90 93 b8 03 sts 0x03B8, r25
35e: 80 93 b7 03 sts 0x03B7, r24
362: 08 95 ret
00000364 <int16_div16>:
void int16_div10_fast(void) {
i_c = div10(i_a);
}
void int16_div16(void) {
i_c = i_a / 16;
364: 80 91 36 01 lds r24, 0x0136
368: 90 91 37 01 lds r25, 0x0137
36c: 92 95 swap r25
36e: 82 95 swap r24
370: 8f 70 andi r24, 0x0F ; 15
372: 89 27 eor r24, r25
374: 9f 70 andi r25, 0x0F ; 15
376: 89 27 eor r24, r25
378: 90 93 b8 03 sts 0x03B8, r25
37c: 80 93 b7 03 sts 0x03B7, r24
380: 08 95 ret
00000382 <int16_div>:
}
void int16_div(void) {
i_c = i_a / i_b;
382: 80 91 36 01 lds r24, 0x0136
386: 90 91 37 01 lds r25, 0x0137
38a: 60 91 34 01 lds r22, 0x0134
38e: 70 91 35 01 lds r23, 0x0135
392: 0e 94 f6 08 call 0x11ec ; 0x11ec <__udivmodhi4>
396: 70 93 b8 03 sts 0x03B8, r23
39a: 60 93 b7 03 sts 0x03B7, r22
39e: 08 95 ret
000003a0 <int16_mult_const>:
}
void int16_mult_const(void) {
i_c = i_a * 23;
3a0: 20 91 36 01 lds r18, 0x0136
3a4: 30 91 37 01 lds r19, 0x0137
3a8: 47 e1 ldi r20, 0x17 ; 23
3aa: 42 9f mul r20, r18
3ac: c0 01 movw r24, r0
3ae: 43 9f mul r20, r19
3b0: 90 0d add r25, r0
3b2: 11 24 eor r1, r1
3b4: 90 93 b8 03 sts 0x03B8, r25
3b8: 80 93 b7 03 sts 0x03B7, r24
3bc: 08 95 ret
000003be <int16_mult>:
}
void int16_mult(void) {
i_c = i_a * i_b;
3be: 40 91 34 01 lds r20, 0x0134
3c2: 50 91 35 01 lds r21, 0x0135
3c6: 20 91 36 01 lds r18, 0x0136
3ca: 30 91 37 01 lds r19, 0x0137
3ce: 42 9f mul r20, r18
3d0: c0 01 movw r24, r0
3d2: 43 9f mul r20, r19
3d4: 90 0d add r25, r0
3d6: 52 9f mul r21, r18
3d8: 90 0d add r25, r0
3da: 11 24 eor r1, r1
3dc: 90 93 b8 03 sts 0x03B8, r25
3e0: 80 93 b7 03 sts 0x03B7, r24
3e4: 08 95 ret
000003e6 <int32_div10>:
}
unsigned long l_a = 23444, l_b = 23, l_c;
void int32_div10(void) {
l_c = l_a / 10;
3e6: 60 91 30 01 lds r22, 0x0130
3ea: 70 91 31 01 lds r23, 0x0131
3ee: 80 91 32 01 lds r24, 0x0132
3f2: 90 91 33 01 lds r25, 0x0133
3f6: 2a e0 ldi r18, 0x0A ; 10
3f8: 30 e0 ldi r19, 0x00 ; 0
3fa: 40 e0 ldi r20, 0x00 ; 0
3fc: 50 e0 ldi r21, 0x00 ; 0
3fe: 0e 94 0a 09 call 0x1214 ; 0x1214 <__udivmodsi4>
402: 20 93 b3 03 sts 0x03B3, r18
406: 30 93 b4 03 sts 0x03B4, r19
40a: 40 93 b5 03 sts 0x03B5, r20
40e: 50 93 b6 03 sts 0x03B6, r21
412: 08 95 ret
00000414 <int32_div16>:
}
void int32_div16(void) {
l_c = l_a / 16;
414: 80 91 30 01 lds r24, 0x0130
418: 90 91 31 01 lds r25, 0x0131
41c: a0 91 32 01 lds r26, 0x0132
420: b0 91 33 01 lds r27, 0x0133
424: 68 94 set
426: 13 f8 bld r1, 3
428: b6 95 lsr r27
42a: a7 95 ror r26
42c: 97 95 ror r25
42e: 87 95 ror r24
430: 16 94 lsr r1
432: d1 f7 brne .-12 ; 0x428 <int32_div16+0x14>
434: 80 93 b3 03 sts 0x03B3, r24
438: 90 93 b4 03 sts 0x03B4, r25
43c: a0 93 b5 03 sts 0x03B5, r26
440: b0 93 b6 03 sts 0x03B6, r27
444: 08 95 ret
00000446 <int32_div>:
}
void int32_div(void) {
l_c = l_a / l_b;
446: 60 91 30 01 lds r22, 0x0130
44a: 70 91 31 01 lds r23, 0x0131
44e: 80 91 32 01 lds r24, 0x0132
452: 90 91 33 01 lds r25, 0x0133
456: 20 91 2c 01 lds r18, 0x012C
45a: 30 91 2d 01 lds r19, 0x012D
45e: 40 91 2e 01 lds r20, 0x012E
462: 50 91 2f 01 lds r21, 0x012F
466: 0e 94 0a 09 call 0x1214 ; 0x1214 <__udivmodsi4>
46a: 20 93 b3 03 sts 0x03B3, r18
46e: 30 93 b4 03 sts 0x03B4, r19
472: 40 93 b5 03 sts 0x03B5, r20
476: 50 93 b6 03 sts 0x03B6, r21
47a: 08 95 ret
0000047c <int32_mult_const>:
}
void int32_mult_const(void) {
l_c = l_a * 234;
47c: 20 91 30 01 lds r18, 0x0130
480: 30 91 31 01 lds r19, 0x0131
484: 40 91 32 01 lds r20, 0x0132
488: 50 91 33 01 lds r21, 0x0133
48c: aa ee ldi r26, 0xEA ; 234
48e: b0 e0 ldi r27, 0x00 ; 0
490: 0e 94 41 09 call 0x1282 ; 0x1282 <__muluhisi3>
494: 60 93 b3 03 sts 0x03B3, r22
498: 70 93 b4 03 sts 0x03B4, r23
49c: 80 93 b5 03 sts 0x03B5, r24
4a0: 90 93 b6 03 sts 0x03B6, r25
4a4: 08 95 ret
000004a6 <int32_sqrt>:
void int32_mult(void) {
l_c = l_a * l_b;
}
void int32_sqrt(void) {
4a6: cf 92 push r12
4a8: df 92 push r13
4aa: ef 92 push r14
4ac: ff 92 push r15
4ae: 0f 93 push r16
4b0: 1f 93 push r17
4b2: ee e0 ldi r30, 0x0E ; 14
4b4: f0 e0 ldi r31, 0x00 ; 0
return Sine(phase + 0x4000);
}
/* by Jim Ulery http://www.azillionmonkeys.com/qed/ulerysqroot.pdf */
static uint32_t isqrt_c32(uint32_t val) {
uint32_t temp, g = 0, b = 0x8000, bshft = 15;
4b6: 80 e0 ldi r24, 0x00 ; 0
4b8: 90 e8 ldi r25, 0x80 ; 128
4ba: a0 e0 ldi r26, 0x00 ; 0
4bc: b0 e0 ldi r27, 0x00 ; 0
4be: 00 e0 ldi r16, 0x00 ; 0
4c0: 10 e0 ldi r17, 0x00 ; 0
4c2: 98 01 movw r18, r16
4c4: 0f 2e mov r0, r31
4c6: f6 ea ldi r31, 0xA6 ; 166
4c8: cf 2e mov r12, r31
4ca: f3 eb ldi r31, 0xB3 ; 179
4cc: df 2e mov r13, r31
4ce: f5 e6 ldi r31, 0x65 ; 101
4d0: ef 2e mov r14, r31
4d2: ff 24 eor r15, r15
4d4: f3 94 inc r15
4d6: f0 2d mov r31, r0
4d8: 20 c0 rjmp .+64 ; 0x51a <int32_sqrt+0x74>
do {
if (val >= (temp = (((g << 1) + b)<<bshft--))) {
4da: b9 01 movw r22, r18
4dc: a8 01 movw r20, r16
4de: 44 0f add r20, r20
4e0: 55 1f adc r21, r21
4e2: 66 1f adc r22, r22
4e4: 77 1f adc r23, r23
4e6: 48 0f add r20, r24
4e8: 59 1f adc r21, r25
4ea: 6a 1f adc r22, r26
4ec: 7b 1f adc r23, r27
4ee: 0e 2e mov r0, r30
4f0: 04 c0 rjmp .+8 ; 0x4fa <int32_sqrt+0x54>
4f2: 44 0f add r20, r20
4f4: 55 1f adc r21, r21
4f6: 66 1f adc r22, r22
4f8: 77 1f adc r23, r23
4fa: 0a 94 dec r0
4fc: d2 f7 brpl .-12 ; 0x4f2 <int32_sqrt+0x4c>
4fe: c4 16 cp r12, r20
500: d5 06 cpc r13, r21
502: e6 06 cpc r14, r22
504: f7 06 cpc r15, r23
506: 40 f0 brcs .+16 ; 0x518 <int32_sqrt+0x72>
g += b;
508: 08 0f add r16, r24
50a: 19 1f adc r17, r25
50c: 2a 1f adc r18, r26
50e: 3b 1f adc r19, r27
val -= temp;
510: c4 1a sub r12, r20
512: d5 0a sbc r13, r21
514: e6 0a sbc r14, r22
516: f7 0a sbc r15, r23
518: 31 97 sbiw r30, 0x01 ; 1
}
} while (b >>= 1);
51a: b6 95 lsr r27
51c: a7 95 ror r26
51e: 97 95 ror r25
520: 87 95 ror r24
522: ef 3f cpi r30, 0xFF ; 255
524: 4f ef ldi r20, 0xFF ; 255
526: f4 07 cpc r31, r20
528: c1 f6 brne .-80 ; 0x4da <int32_sqrt+0x34>
void int32_mult(void) {
l_c = l_a * l_b;
}
void int32_sqrt(void) {
l_c = isqrt_c32(23442342);
52a: 00 93 b3 03 sts 0x03B3, r16
52e: 10 93 b4 03 sts 0x03B4, r17
532: 20 93 b5 03 sts 0x03B5, r18
536: 30 93 b6 03 sts 0x03B6, r19
}
53a: 1f 91 pop r17
53c: 0f 91 pop r16
53e: ff 90 pop r15
540: ef 90 pop r14
542: df 90 pop r13
544: cf 90 pop r12
546: 08 95 ret
00000548 <int16_sqrt>:
i_c = isqrt16(23442);
#endif
#endif
}
void int16_sqrt(void) {
548: 87 e0 ldi r24, 0x07 ; 7
54a: 90 e0 ldi r25, 0x00 ; 0
} while (b >>= 1);
return g;
}
static uint16_t isqrt_c16(uint16_t val) {
uint16_t temp, g = 0, b = 0x80, bshft = 7;
54c: 20 e8 ldi r18, 0x80 ; 128
54e: 30 e0 ldi r19, 0x00 ; 0
550: 60 e0 ldi r22, 0x00 ; 0
552: 70 e0 ldi r23, 0x00 ; 0
554: e2 e9 ldi r30, 0x92 ; 146
556: fb e5 ldi r31, 0x5B ; 91
do {
if (val >= (temp = (((g << 1) + b)<<bshft--))) {
558: ab 01 movw r20, r22
55a: 44 0f add r20, r20
55c: 55 1f adc r21, r21
55e: 42 0f add r20, r18
560: 53 1f adc r21, r19
562: 08 2e mov r0, r24
564: 02 c0 rjmp .+4 ; 0x56a <int16_sqrt+0x22>
566: 44 0f add r20, r20
568: 55 1f adc r21, r21
56a: 0a 94 dec r0
56c: e2 f7 brpl .-8 ; 0x566 <int16_sqrt+0x1e>
56e: e4 17 cp r30, r20
570: f5 07 cpc r31, r21
572: 20 f0 brcs .+8 ; 0x57c <int16_sqrt+0x34>
g += b;
574: 62 0f add r22, r18
576: 73 1f adc r23, r19
val -= temp;
578: e4 1b sub r30, r20
57a: f5 0b sbc r31, r21
}
} while (b >>= 1);
57c: 36 95 lsr r19
57e: 27 95 ror r18
580: 01 97 sbiw r24, 0x01 ; 1
582: 50 f7 brcc .-44 ; 0x558 <int16_sqrt+0x10>
#endif
#endif
}
void int16_sqrt(void) {
i_c = isqrt_c16(23442);
584: 70 93 b8 03 sts 0x03B8, r23
588: 60 93 b7 03 sts 0x03B7, r22
58c: 08 95 ret
0000058e <int16_sin>:
if (tmp_phase & 0x4000)
tmp_phase = 0x8000 - tmp_phase;
tmp_phase_hi = tmp_phase >> 8; // 0...64
s0 = PW(sin_table[tmp_phase_hi]);
58e: e2 e0 ldi r30, 0x02 ; 2
590: f1 e0 ldi r31, 0x01 ; 1
592: 45 91 lpm r20, Z+
594: 54 91 lpm r21, Z
s0 += ((int16_t)((((int32_t)(PW(sin_table[tmp_phase_hi+1]) - s0))*
596: e4 e0 ldi r30, 0x04 ; 4
598: f1 e0 ldi r31, 0x01 ; 1
59a: 25 91 lpm r18, Z+
59c: 34 91 lpm r19, Z
59e: 24 1b sub r18, r20
5a0: 35 0b sbc r19, r21
5a2: a5 e5 ldi r26, 0x55 ; 85
5a4: b0 e0 ldi r27, 0x00 ; 0
5a6: 0e 94 32 09 call 0x1264 ; 0x1264 <__umulhisi3>
(tmp_phase&0xff))>>8));
5aa: bb 27 eor r27, r27
5ac: 97 fd sbrc r25, 7
5ae: ba 95 dec r27
5b0: a9 2f mov r26, r25
5b2: 98 2f mov r25, r24
5b4: 87 2f mov r24, r23
tmp_phase_hi = tmp_phase >> 8; // 0...64
s0 = PW(sin_table[tmp_phase_hi]);
s0 += ((int16_t)((((int32_t)(PW(sin_table[tmp_phase_hi+1]) - s0))*
5b6: 84 0f add r24, r20
5b8: 95 1f adc r25, r21
void int16_sqrt(void) {
i_c = isqrt_c16(23442);
}
void int16_sin(void) {
l_c = Sine(0x7FFF/6);
5ba: aa 27 eor r26, r26
5bc: 97 fd sbrc r25, 7
5be: a0 95 com r26
5c0: ba 2f mov r27, r26
5c2: 80 93 b3 03 sts 0x03B3, r24
5c6: 90 93 b4 03 sts 0x03B4, r25
5ca: a0 93 b5 03 sts 0x03B5, r26
5ce: b0 93 b6 03 sts 0x03B6, r27
5d2: 08 95 ret
000005d4 <empty_func>:
}
void empty_func(void) {
5d4: 08 95 ret
000005d6 <int16_pi_regler>:
void int16_pi_regler(void) {
static int32_t u_stell_l = 0;
static int16_t reg_abw, reg_abw_old;
static uint8_t kp = 50, ki = 15;
reg_abw = (v_soll - v_ist);
5d6: 20 91 2a 01 lds r18, 0x012A
5da: 30 91 2b 01 lds r19, 0x012B
5de: 80 91 28 01 lds r24, 0x0128
5e2: 90 91 29 01 lds r25, 0x0129
5e6: 28 1b sub r18, r24
5e8: 39 0b sbc r19, r25
5ea: 30 93 b2 03 sts 0x03B2, r19
5ee: 20 93 b1 03 sts 0x03B1, r18
// PI-Regeler Geschwindigkeitsalgorithmus
u_stell_l += reg_abw*kp + ((reg_abw*ki + 16) >> 5) - reg_abw_old*kp;
5f2: e2 e3 ldi r30, 0x32 ; 50
5f4: e2 9f mul r30, r18
5f6: c0 01 movw r24, r0
5f8: e3 9f mul r30, r19
5fa: 90 0d add r25, r0
5fc: 11 24 eor r1, r1
5fe: 6f e0 ldi r22, 0x0F ; 15
600: 62 9f mul r22, r18
602: a0 01 movw r20, r0
604: 63 9f mul r22, r19
606: 50 0d add r21, r0
608: 11 24 eor r1, r1
60a: 40 5f subi r20, 0xF0 ; 240
60c: 5f 4f sbci r21, 0xFF ; 255
60e: 55 95 asr r21
610: 47 95 ror r20
612: 55 95 asr r21
614: 47 95 ror r20
616: 55 95 asr r21
618: 47 95 ror r20
61a: 55 95 asr r21
61c: 47 95 ror r20
61e: 55 95 asr r21
620: 47 95 ror r20
622: 48 0f add r20, r24
624: 59 1f adc r21, r25
626: 80 91 af 03 lds r24, 0x03AF
62a: 90 91 b0 03 lds r25, 0x03B0
62e: e8 9f mul r30, r24
630: b0 01 movw r22, r0
632: e9 9f mul r30, r25
634: 70 0d add r23, r0
636: 11 24 eor r1, r1
638: 46 1b sub r20, r22
63a: 57 0b sbc r21, r23
63c: 66 27 eor r22, r22
63e: 57 fd sbrc r21, 7
640: 60 95 com r22
642: 76 2f mov r23, r22
644: 80 91 ab 03 lds r24, 0x03AB
648: 90 91 ac 03 lds r25, 0x03AC
64c: a0 91 ad 03 lds r26, 0x03AD
650: b0 91 ae 03 lds r27, 0x03AE
654: 84 0f add r24, r20
656: 95 1f adc r25, r21
658: a6 1f adc r26, r22
65a: b7 1f adc r27, r23
if (u_stell_l > (MAX_U_STELL << 5))
65c: 81 30 cpi r24, 0x01 ; 1
65e: 4d e7 ldi r20, 0x7D ; 125
660: 94 07 cpc r25, r20
662: a1 05 cpc r26, r1
664: b1 05 cpc r27, r1
666: 6c f0 brlt .+26 ; 0x682 <int16_pi_regler+0xac>
u_stell_l = MAX_U_STELL << 5;
668: 80 e0 ldi r24, 0x00 ; 0
66a: 9d e7 ldi r25, 0x7D ; 125
66c: a0 e0 ldi r26, 0x00 ; 0
66e: b0 e0 ldi r27, 0x00 ; 0
670: 80 93 ab 03 sts 0x03AB, r24
674: 90 93 ac 03 sts 0x03AC, r25
678: a0 93 ad 03 sts 0x03AD, r26
67c: b0 93 ae 03 sts 0x03AE, r27
680: 1c c0 rjmp .+56 ; 0x6ba <int16_pi_regler+0xe4>
else if (u_stell_l < -(MAX_U_STELL << 5))
682: 81 15 cp r24, r1
684: 43 e8 ldi r20, 0x83 ; 131
686: 94 07 cpc r25, r20
688: 4f ef ldi r20, 0xFF ; 255
68a: a4 07 cpc r26, r20
68c: b4 07 cpc r27, r20
68e: 4c f0 brlt .+18 ; 0x6a2 <int16_pi_regler+0xcc>
static int32_t u_stell_l = 0;
static int16_t reg_abw, reg_abw_old;
static uint8_t kp = 50, ki = 15;
reg_abw = (v_soll - v_ist);
// PI-Regeler Geschwindigkeitsalgorithmus
u_stell_l += reg_abw*kp + ((reg_abw*ki + 16) >> 5) - reg_abw_old*kp;
690: 80 93 ab 03 sts 0x03AB, r24
694: 90 93 ac 03 sts 0x03AC, r25
698: a0 93 ad 03 sts 0x03AD, r26
69c: b0 93 ae 03 sts 0x03AE, r27
6a0: 0c c0 rjmp .+24 ; 0x6ba <int16_pi_regler+0xe4>
if (u_stell_l > (MAX_U_STELL << 5))
u_stell_l = MAX_U_STELL << 5;
else if (u_stell_l < -(MAX_U_STELL << 5))
u_stell_l = -(MAX_U_STELL << 5);
6a2: 80 e0 ldi r24, 0x00 ; 0
6a4: 93 e8 ldi r25, 0x83 ; 131
6a6: af ef ldi r26, 0xFF ; 255
6a8: bf ef ldi r27, 0xFF ; 255
6aa: 80 93 ab 03 sts 0x03AB, r24
6ae: 90 93 ac 03 sts 0x03AC, r25
6b2: a0 93 ad 03 sts 0x03AD, r26
6b6: b0 93 ae 03 sts 0x03AE, r27
u_stell = u_stell_l >> 5;
6ba: 80 91 ab 03 lds r24, 0x03AB
6be: 90 91 ac 03 lds r25, 0x03AC
6c2: a0 91 ad 03 lds r26, 0x03AD
6c6: b0 91 ae 03 lds r27, 0x03AE
6ca: 68 94 set
6cc: 14 f8 bld r1, 4
6ce: b5 95 asr r27
6d0: a7 95 ror r26
6d2: 97 95 ror r25
6d4: 87 95 ror r24
6d6: 16 94 lsr r1
6d8: d1 f7 brne .-12 ; 0x6ce <int16_pi_regler+0xf8>
6da: 90 93 ba 03 sts 0x03BA, r25
6de: 80 93 b9 03 sts 0x03B9, r24
reg_abw_old = reg_abw;
6e2: 30 93 b0 03 sts 0x03B0, r19
6e6: 20 93 af 03 sts 0x03AF, r18
6ea: 08 95 ret
000006ec <PrintString>:
static void PrintString(char* str) {
#ifndef __IAR_SYSTEMS_ICC__
#ifndef CODE_VISION
const char *c;
for(c = str; *c; c++)
6ec: fc 01 movw r30, r24
6ee: 20 81 ld r18, Z
6f0: 22 23 and r18, r18
6f2: 29 f0 breq .+10 ; 0x6fe <PrintString+0x12>
6f4: 31 96 adiw r30, 0x01 ; 1
special_output_port = *c;
6f6: 20 bb out 0x10, r18 ; 16
static void PrintString(char* str) {
#ifndef __IAR_SYSTEMS_ICC__
#ifndef CODE_VISION
const char *c;
for(c = str; *c; c++)
6f8: 21 91 ld r18, Z+
6fa: 21 11 cpse r18, r1
6fc: fc cf rjmp .-8 ; 0x6f6 <PrintString+0xa>
6fe: 08 95 ret
00000700 <PrintSignedShortFormated>:
xvprintf(fmt, arp);
va_end(arp);
}
static void PrintSignedShortFormated(signed short value) {
700: 1f 93 push r17
702: cf 93 push r28
704: df 93 push r29
706: cd b7 in r28, 0x3d ; 61
708: de b7 in r29, 0x3e ; 62
70a: 27 97 sbiw r28, 0x07 ; 7
70c: 0f b6 in r0, 0x3f ; 63
70e: f8 94 cli
710: de bf out 0x3e, r29 ; 62
712: 0f be out 0x3f, r0 ; 63
714: cd bf out 0x3d, r28 ; 61
unsigned char *sBuf = &sBuf0[6];
unsigned char minus;
unsigned short valueAlt; // Alte Wert für schneller % 10 Berechnung
unsigned short valueCalc; // muss unsigned weil signed short kann kein 32768
*sBuf = 0; // String Terminierung
716: 1f 82 std Y+7, r1 ; 0x07
if (value < 0) { // Vorzeichen behandeln
718: 99 23 and r25, r25
71a: 34 f4 brge .+12 ; 0x728 <PrintSignedShortFormated+0x28>
minus = '-';
valueCalc = -value;
71c: 44 27 eor r20, r20
71e: 55 27 eor r21, r21
720: 48 1b sub r20, r24
722: 59 0b sbc r21, r25
unsigned short valueAlt; // Alte Wert für schneller % 10 Berechnung
unsigned short valueCalc; // muss unsigned weil signed short kann kein 32768
*sBuf = 0; // String Terminierung
if (value < 0) { // Vorzeichen behandeln
minus = '-';
724: 1d e2 ldi r17, 0x2D ; 45
726: 02 c0 rjmp .+4 ; 0x72c <PrintSignedShortFormated+0x2c>
valueCalc = -value;
} else {
minus = ' ';
valueCalc = value;
728: ac 01 movw r20, r24