"Write a sequence of instructions that use the Str_compare procedure to determine the larger of these two input strings and write it to the console window." Code Answer's
You're definitely familiar with the best coding language Whatever that developers use to develop their projects and they get all their queries like "Write a sequence of instructions that use the Str_compare procedure to determine the larger of these two input strings and write it to the console window." answered properly. Developers are finding an appropriate answer about Write a sequence of instructions that use the Str_compare procedure to determine the larger of these two input strings and write it to the console window. related to the Whatever coding language. By visiting this online portal developers get answers concerning Whatever codes question like Write a sequence of instructions that use the Str_compare procedure to determine the larger of these two input strings and write it to the console window.. Enter your desired code related query in the search bar and get every piece of information about Whatever code related question on Write a sequence of instructions that use the Str_compare procedure to determine the larger of these two input strings and write it to the console window..
Write a sequence of instructions that use the Str_compare procedure to determine the larger of these two input strings and write it to the console window.
INCLUDE io.h Cr EQU 0ah Lf EQU 0dh data SEGMENT p_str1 DB Cr, Lf, 'Enter 1st string: ',0 p_str2 DB Cr, Lf, 'Enter 2nd string: ',0 p_not1 DB Cr, Lf, 'The strings are not same because of different lengths',0 p_not2 DB Cr, Lf, 'The strings are not same because of different characters',0 p_same DB Cr, Lf, 'The strings are the same',0 str1 DB 100 DUP (?) str2 DB 100 DUP (?) data ENDS code SEGMENT ASSUME cs:code, ds:data start: mov ax, data mov ds, ax ;input str1 output p_str1 inputs str1, 100 mov bx, cx ;input str2 output p_str2 inputs str2, 100 ;compare lengths cmp bx, cx jne l_not1;if different length jump ;initialize lea si, str1 lea di, str2 ;iterate to compare characters nxt_chk:mov al, [si];copy the two bytes in ax mov ah, [di] cmp al, ah;compare the two bytes jne l_not2;if not (ah==al) inc si;increment the two bytes inc di dec cx;decrement the count(string length) jz l_same;if count=0 the strings are same jmp nxt_chk;else jump to ceck next byte l_not1: output p_not1 jmp quit l_not2: output p_not2 jmp quit l_same: output p_same quit: mov al, 00h mov ah, 4ch int 21h code ENDS END start
Source: www.chegg.com
All those coders who are working on the Whatever based application and are stuck on Write a sequence of instructions that use the Str_compare procedure to determine the larger of these two input strings and write it to the console window. can get a collection of related answers to their query. Programmers need to enter their query on Write a sequence of instructions that use the Str_compare procedure to determine the larger of these two input strings and write it to the console window. related to Whatever code and they'll get their ambiguities clear immediately. On our webpage, there are tutorials about Write a sequence of instructions that use the Str_compare procedure to determine the larger of these two input strings and write it to the console window. for the programmers working on Whatever code while coding their module. Coders are also allowed to rectify already present answers of Write a sequence of instructions that use the Str_compare procedure to determine the larger of these two input strings and write it to the console window. while working on the Whatever language code. Developers can add up suggestions if they deem fit any other answer relating to "Write a sequence of instructions that use the Str_compare procedure to determine the larger of these two input strings and write it to the console window.". Visit this developer's friendly online web community, CodeProZone, and get your queries like Write a sequence of instructions that use the Str_compare procedure to determine the larger of these two input strings and write it to the console window. resolved professionally and stay updated to the latest Whatever updates.