Answered step by step
Verified Expert Solution
Question
1 Approved Answer
file 11222333 has a sample program in assembly language that counts the amount of E's in a string. I need the assignment in the other
file 11222333 has a sample program in assembly language that counts the amount of "E's" in a string. I need the assignment in the other .png that counts everything. I'm not exactly sure what to do. I need this by tonight or within 12 hours. Given the code in my pic, it shouldnt take very long, I am just unsure on how to change the code to read all.
10. include map 30 h" #define controlled include file 11 ORG OFF 00h. I AM THE MSP430 the string is placed on the stack 13. my Str DB HELLO TRORLD 14 the null character automatically added after the NAME main modul name 17 make the main label visible 18 PUBLIC main outside this module 20 OFFFEh ORG set reset vector to 'main' label DC16 main 22 RSEG CSTACK pre-declaration of segment 23 place program in CODE segment 24 RSEG CODE 25 26 main: MOV #SFE (C STACK) SP up stop watchdog timer 27 MOV.W NDT CTL 28 OFFh &P1DIR configure P 1.x output BIS.B Mov. tmyStr R4 load the starting address of the string 29 30 into the register R4 31 R5 register R5 will serve as a counter CLR.B get a new character 32. gnext MOV.B ER4 R6 33 is it a null character 34 end if yes, go to the end JEQ 35 R6 character CMP.B it an if not, go to the next next 37 R5 if yes, increment counter INC 38 go to the next character next 39 40. end MOV.B R5, &P Set all 1 pins 10UT 41 BIS.W ELPM4, SR LPM4 Required only for debugger 42 NOP 43 44 ENDStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started