.file "userapp.c" .arch msp430x149 /* Hardware multiplier registers: */ __MPY=0x130 __MPYS=0x132 __MAC=0x134 __MACS=0x136 __OP2=0x138 __RESLO=0x13a __RESHI=0x13c __SUMEXT=0x13e .global userappEnd .section .userappdata,"a",@progbits .p2align 1,0 .type userappEnd,@object .size userappEnd,2 userappEnd: .short __userapp_end .global userappRamEnd .p2align 1,0 .type userappRamEnd,@object .size userappRamEnd,2 userappRamEnd: .short __userapp_ram_end .global userappVersion .p2align 1,0 .type userappVersion,@object .size userappVersion,2 userappVersion: .short 1 .text .LC0: .string "Start user application\r\n" .LC1: .string "\r\n" .LC2: .string "Stop user application\r\n" .LC3: .string "Ergebnisliste:\r\n" .LC4: .string "Notenverteilung:\r\n" .LC5: .string "\t" .section .userappinit,"ax",@progbits .p2align 1,0 .global userappInit .type userappInit,@function /*********************** * Function `userappInit' ***********************/ userappInit: /* prologue: frame size = 6 */ .L__FrameSize_userappInit=0x6 .L__FrameOffset_userappInit=0xe push r11 push r10 push r5 push r4 mov r1, r5 add #10, r5 sub #6, r1 ; 6, fpn 1 mov r1,r4 /* prologue end (size=10) */ call #stopWatchdog call #initSensors /********************************** Beginn des Hauptprogramms **********************************/ .comm list,24 ; Speicherplatz fuer Notenliste .comm spiegel,20 ; Speicherplatz fuer Notenspiegel mov #list,r10 ; Liste initialisieren mov #16215,0(r10) mov #3,2(r10) mov #16216,4(r10) mov #5,6(r10) mov #16220,8(r10) mov #2,10(r10) mov #16227,12(r10) mov #3,14(r10) mov #16230,16(r10) mov #2,18(r10) mov #16245,20(r10) mov #1,22(r10) mov #.LC3,r15 ; Liste ausgeben call #sendRS232String mov #list,r10 mov #6,r11 call #printArray lab1: mov #list,r10 mov #6,r11 ; Notenspiegel berechnen mov #spiegel,r12 call #notsp mov #.LC4,r15 ; Notenspiegel ausgeben call #sendRS232String mov #spiegel,r10 mov #5,r11 call #printArray /********************************** Ende des Hauptprogramms **********************************/ /* epilogue: frame size=6 */ epil: add #6, r1 pop r4 pop r5 pop r10 pop r11 ret /********************************** * Function 'notsp' hier einfuegen **********************************/ /* Ende Function 'notsp' */ /*********************** * Function 'printArray' ***********************/ printArray: push r10 ; Registerinhalte retten push r12 push r14 push r15 clr r12 lab0: mov r11,r14 sub r12,r14 jz labend mov 0(r10),r15 ; 0(r10) schreiben call #sendRS232Address mov #.LC5,r15 ; tab schreiben call #sendRS232String mov 2(r10),r15 ; 2(r10) schreiben call #sendRS232Address mov #.LC1,r15 ; newline schreiben call #sendRS232String add #4,r10 ; zum naechsten Arrayeintrag springen add #1,r12 ; Zaehlvariable inkrementieren jmp lab0 labend: mov #.LC1,r15 call #sendRS232String pop r15 ; Registerinhalte wiederherstellen pop r14 pop r12 pop r10 ret /* epilogue end (size=7) */ /* function userappInit size 66 (49) */ .Lfe1: .size userappInit,.Lfe1-userappInit /********* End of function ******/ .comm newADValues,1 .comm firmwareVersion,2,2 .comm sCounter,2,2 .comm cCounter,1 /********************************************************************* * File src/userapp.c: code size: 66 words (0x42) * incl. words in prologues: 10, epilogues: 7 *********************************************************************/