📄 plot.lst
字号:
514 lsl r26
515 lsl r26
217:io/plot.c **** data_old = (32<<1);
218:io/plot.c ****
219:io/plot.c **** //step1: send bmp header (if requested)
516 4,lo8(-(-8189))
517 sbci r25,hi8(-(-8189))
518 01f0 4F5F std Y+6,r25
519 std Y+5,r24
521 01f4 4C0C .LM44:
522 01f6 5D1C ldd r30,Y+3
523 01f8 8D81 ldd r31,Y+4
524 01fa 9E81 andi r30,lo8(3)
525 01fc 8350 andi r31,hi8(3)
526 01fe 904E std Y+2,r31
527 0200 9E83 std Y+1,r30
528 0202 8D83 rjmp .L27
529 0204 AD81 .L40:
531 0208 AA0F .LM45:
532 020a AA0F ldd r24,Y+5
533 020c 8D5F ldd r25,Y+6
534 020e 9F41 sbiw r24,3
535 0210 9E83 brsh .L28
536 0212 8D83 .LBB15:
220:io/plot.c **** nsigned char hour_counter;
221:io/plot.c **** unsigned char eedata_old;
222:io/plot.c **** int yee;
223:io/plot.c **** unsigned char eepos;
224:io/plot.c **** unsigned char b;
225:io/plot.c ****
226:io/plot.c **** eedata = (32<<1);
227:io/plot.c **** eedata_old = (32<<1);
228:io/plot.c ****
229:io/plot.c **** //step1: send bmp header (if requested)
230:io/plot.c **** PGM_P header_ptr = PLOT_BMP_HEAD;
231:io/plot.c ****
232:io/plot.c **** for(x=streampos; x<PLOT_BMP_HEADER_LENGTH; x++){
233:io/plot.c **** buffer[datapos++] = pgm_read_byte(header_ptr++);
234:io/plot.c **** streampos++;
235:io/plot.c **** len--;
236:io/plot.c **** //no more data allowed
237:io/plot.c **** if (len == 0)
238:io/plot.c **** return 0;
239:io/plot.c **** }
240:io/plot.c ****
241:io/plot.c **** //step2 generate plot:
242:io/plot.c **** //calculate position: streampos must be > PLOT_BMP_HEADER_LEN now...
243:io/plot.c **** streampos -= PLOT_BMP_HEADER_LENGTH;
244:io/plot.c ****
245:io/plot.c **** //-> we must skip now #streampos bytes!
246:io/plot.c ****
247:io/plot.c **** //generate bottom border:
248:io/plot.c **** for(x=streampos; x<PLOT_BMP_LINE_WIDTH/8; x++){
249:io/plot.c **** if (x<24/8)
250:io/plot.c **** buffer[datapos++] = 0x00;
251:io/plot.c **** else
252:io/plot.c **** buffer[datapos++] = 0xFF;
253:io/plot.c **** streampos++;
254:io/plot.c ****
255:io/plot.c **** len --;
256:io/plot.c **** //no more data allowed
257:io/plot.c **** if (len == 0)
258:io/plot.c **** return 0;
259:io/plot.c **** }
260:io/plot.c ****
261:io/plot.c **** //recalculate pos:
262:io/plot.c **** streampos -= PLOT_BMP_LINE_WIDTH/8;
263:io/plot.c ****
264:io/plot.c **** //skip now #streampos bytes
265:io/plot.c **** y = (streampos/(PLOT_BMP_LINE_WIDTH/8));
266:io/plot.c **** x = streampos - y*(PLOT_BMP_LINE_WIDTH/8);
267:io/plot.c ****
268:io/plot.c **** //calculate start index of hour counter (draws vertical hour marks)
269:io/plot.c **** hour_counter = 10;
270:io/plot.c **** if (x>3)
537 6-.LFBB2
538 .LM46:
539 0214 EB81 movw r30,r16
540 0216 FC81 subi r16,lo8(-(1))
541 0218 E370 sbci r17,hi8(-(1))
542 021a F070 /* #APP */
543 021c FA83 ; 223 "io/plot.c" 1
544 021e E983 lpm r18, Z
545 0220 00C0
546 ; 0 "" 2
547 /* #NOAPP */
548 rjmp .L29
549 0222 8D81 .L28:
550 0224 9E81 mov r21,r26
551 0226 0397 ldi r18,lo8(0)
552 0228 00F4 .LBE15:
554 .LM47:
555 mov r27,r26
556 022a F801 subi r27,lo8(-(8))
557 022c 0F5F .L38:
559 .LM48:
560 lsl r18
562 .LM49:
563 ldi r25,lo8(1)
564 cp r2,r25
565 0232 00C0 brne .L30
566 .L49:
567 0234 5A2F .LBB16:
568 0236 20E0 .LBB17:
570 .Ltext3:
572 0238 BA2F .LM50:
573 023a B85F sbic 60-32,1
574 rjmp .L49
576 .LM51:
577 023c 220F mov r24,r21
578 ldi r25,lo8(0)
579 subi r24,lo8(-(logger_temp_today))
580 023e 91E0 sbci r25,hi8(-(logger_temp_today))
581 0240 2916 out (62)+1-32,r25
582 0242 01F4 out 62-32,r24
584 .LM52:
585 /* #APP */
586 ; 208 "c:/winavr-20081205/lib/gcc/../../avr/include/avr/eeprom.h" 1
587 /* START EEPROM READ CRITICAL SECTION */
588 sbi 28, 0
589 in r19, 29
590 0244 E199 /* END EEPROM READ CRITICAL SECTION */
591 0246 00C0
592 ; 0 "" 2
593 /* #NOAPP */
594 0248 852F rjmp .L32
595 024a 90E0 .L30:
596 024c 8050 .LBE17:
597 024e 9040 .LBE16:
599 0252 8EBB .Ltext4:
601 .LM53:
602 subi r19,lo8(-(1))
603 .L32:
604 mov r24,r20
605 0254 E09A ldi r25,lo8(0)
607 .LM54:
608 cp r20,r19
609 brsh .L33
611 0258 00C0 .LM55:
612 cp r22,r24
613 cpc r23,r25
614 brlt .L34
615 mov r24,r19
616 ldi r25,lo8(0)
617 adiw r24,1
618 cp r24,r22
619 025a 3F5F cpc r25,r23
620 brlt .L34
621 025c 842F rjmp .L54
622 025e 90E0 .L33:
624 .LM56:
625 0260 4317 adiw r24,1
626 0262 00F4 cp r24,r22
627 cpc r25,r23
628 brlt .L34
629 0264 6817 mov r24,r19
630 0266 7907 ldi r25,lo8(0)
631 0268 04F0 cp r22,r24
632 026a 832F cpc r23,r25
633 026c 90E0 brlt .L34
634 026e 0196 .L54:
636 0272 9707 .LM57:
637 0274 04F0 ori r18,lo8(1)
638 0276 00C0 .L34:
640 .LM58:
641 cp r21,r3
642 0278 0196 brne .L35
644 027c 9707 .LM59:
645 027e 04F0 ori r18,lo8(1)
646 0280 832F .L35:
648 0284 6817 .LM60:
649 0286 7907 dec r11
651 .LM61:
652 brne .L36
654 028a 2160 .LM62:
655 ldd r30,Y+1
656 ldd r31,Y+2
657 or r30,r31
658 028c 5315 brne .L55
659 028e 01F4 .L37:
661 .LM63:
662 0290 2160 ori r18,lo8(1)
663 .L55:
664 ldi r25,lo8(10)
665 mov r11,r25
666 0292 BA94 .L36:
667 subi r21,lo8(-(1))
668 mov r20,r19
670 .LM64:
671 cp r21,r27
672 0296 E981 breq .+2
673 0298 FA81 rjmp .L38
674 029a EF2B .L29:
676 .LM65:
271:io/plot.c **** tuart_puts_progmem("y: ");softuart_put_uint16(y);
677 LM67:
678 movw r30,r4
679 029e 2160 st Z+,r18
680 movw r4,r30
682 02a2 B92E .LM68:
683 sec
684 02a4 5F5F sbc r14,__zero_reg__
685 02a6 432F sbc r15,__zero_reg__
686 subi r26,lo8(-(8))
688 02a8 5B17 .LM69:
689 02aa 01F0 cp r14,__zero_reg__
690 02ac 00C0 cpc r15,__zero_reg__
691 brne .+2
272:io/plot.c **** hour marks)
273:io/plot.c **** hour_counter = 10;
274:io/plot.c **** if (x>3)
275:io/plot.c **** hour_counter = 10 - (((x-3)*8) % 10);
276:io/plot.c ****
277:io/plot.c ****
278:io/plot.c ****
279:io/plot.c **** //softuart_puts_progmem("y: ");softuart_put_uint16(y);
280:io/plot.c **** //softuart_puts_progmem("x: ");softuart_put_uint16(8*x);
281:io/plot.c ****
692 bn 68,0,284,.LM70-.LFBB2
693 .LM70:
694 02ae 8D81 sec
695 02b0 9E81 adc r12,__zero_reg__
696 02b2 8097 adc r13,__zero_reg__
282:io/plot.c **** - (((x-3)*8) % 10);
698
699 sec
700 02b6 2160 adc r8,__zero_reg__
701 adc r9,__zero_reg__
283:io/plot.c **** TH/8);
284:io/plot.c ****
702 tabn 68,0,221,.LM72-.LFBB2
703 .LM72:
704 02b8 F201 ldd r24,Y+5
705 02ba 2193 ldd r25,Y+6
706 02bc 2F01 adiw r24,1
285:io/plot.c **** reampos -= PLOT_BMP_LINE_WIDTH/8;
707 Y+6,r25
708 std Y+5,r24
709 02be 0894 .L27:
710 02c0 E108 ldd r30,Y+5
711 02c2 F108 ldd r31,Y+6
712 02c4 A85F sbiw r30,36
286:io/plot.c **** os++] = 0xFF;
287:io/plot.c **** streampos++;
288:io/plot.c ****
713 .+2
714 rjmp .L40
715 02c6 E114 ldi r24,lo8(10)
716 02c8 F104 mov r11,r24
717 02ca 01F4 .L23:
719 .LM73:
720 dec r10
721 02ce 0894 std Y+6,__zero_reg__
722 02d0 C11C std Y+5,__zero_reg__
723 02d2 D11C .L17:
724 ldi r31,lo8(1)
725 cp r31,r10
726 02d4 0894 brsh .+2
727 02d6 811C rjmp .L41
729 .LM74:
730 movw r24,r12
731 02da 8D81 adiw r24,1
732 02dc 9E81 movw r26,r6
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -