Question: ASSEMBLY NEED ASAP WILL RATE RIGHT AWAY Currently this code successfully counts the number of lowercase characters in the hard coded string. Slightly modify the
include "nap4 30.h" MSG4 DB 10,13, 'Total Number of Changes : ORG OFF0Oh myStr DB "Welcome to MSP430 Assembly!" string placed on the stacik : null character automatically added after ' NAME PUBLIC mainlabel visible ORG DC16 main module nane OFFFEh main : set reset vector to 'main' label CSTACK : pre-declaration of segment CODE place program in 'CODE' segnent RSEG SFE (CSTACK), SP iset up stack configure Pi.x output : load the starting address of string into R4 ; Register 5 = counter :get nev character : is it null character : if yes go to end CLR.B R5 #0, R6 lend CMP CMP.B 'a',R6 JNE INC gnext R5 if no, go to next char if yes, increnent counter :Set al1 P1 pins LPM4 lend: MOV.B R5, &P1OUT #LPM , SR BIs.w NOP END
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
