Question

In: Computer Science

Please show all work an explain to be upvoted. Write an assembly program to convert an...

Please show all work an explain to be upvoted.

Write an assembly program to convert an 8 character string from upper case to lower case.

Solutions

Expert Solution

.MODEL SMALL
        .DATA

                MSG DB 0DH,0AH, \' Enter the string :-----> : $\'
                MSG2 DB 0DH,0AH, \' Entered string is :-----> : $\'
                STR1 DB 255 DUP(?)
                ONE DB ?
                TWO DB ?
          .CODE

BEGIN:
          MOV AX,@DATA
          MOV DS,AX

          LEA DX,MSG
          MOV AH,09H
          INT 21H

          LEA SI,STR1
          MOV AH,01H

READ:
          INT 21H
          MOV BL,AL

          CMP AL,0DH
          JE DISPLAY

          XOR AL,20H
          MOV [SI],AL
          INC SI

          ;CMP BL,0DH
          JMP READ

DISPLAY:

          MOV AL,\'$\'
          MOV [SI],AL

          LEA DX,MSG2
          MOV AH,09H
          INT 21H


          LEA DX,STR1
          MOV AH,09H
          INT 21H

         ; MOV AH,4CH
         ; INT 21H
          .EXIT


Related Solutions

**Add comments to existing ARM code to explain steps** Write an ARM assembly program to convert...
**Add comments to existing ARM code to explain steps** Write an ARM assembly program to convert temperatures from Celsius to Fahrenheit or from Fahrenheit to Celsius. Here are the two formulas for your reference. Use variable to read and store values. C= 5* (F - 32) / 9 F = (9 * C / 5 ) + 32 My code below: TempConvert.s LDR R8,=temperature LDR R1,[R8] LDR R8,=unit LDRB R2,[R8] LDR R8,=celsius LDRB R3,[R8] LDR R8,=fahrenheit LDRB R4,[R8] MOV R6,#9...
write a assembly language program to convert GRAY to BCD code in 8051
write a assembly language program to convert GRAY to BCD code in 8051
Please write the following Python program. Also, show all output work. Computing the Fibonacci and Lucas...
Please write the following Python program. Also, show all output work. Computing the Fibonacci and Lucas Series¶ Goal:¶ The Fibonacci Series is a numeric series starting with the integers 0 and 1. In this series, the next integer is determined by summing the previous two. This gives us: 0, 1, 1, 2, 3, 5, 8, 13, ... We will write a function that computes this series – then generalize it. Step 1¶ Create a new module series.py in the session02...
Convert hexadecimal BEEF to base 2 and 8 using grouping (No mathematics). Please show all work.
Convert hexadecimal BEEF to base 2 and 8 using grouping (No mathematics). Please show all work.
Please answer the problem below for all parts. Please show all work and write clearly. Thanks....
Please answer the problem below for all parts. Please show all work and write clearly. Thanks. (Apply total probability and Bayes’ rules) A large industrial firm uses three local motels to provide overnight accommodations for its clients. From past experience it is known that 22% of the clients are assigned rooms at the Ramada Inn, 50% at the Sheraton, and 28% at the Lakeview Motor Lodge. If the plumbing is faulty in 5% of the rooms at the Ramada Inn,...
Write a program in "RISC-V" assembly to convert an ASCII string containing a positive or negative...
Write a program in "RISC-V" assembly to convert an ASCII string containing a positive or negative integer decimal string to an integer. ‘+’ and ‘-’ will appear optionally. And once they appear, they will only appear once in the first byte. If a non-digit character appears in the string, your program should stop and return -1.
Write a program in MIPS assembly language to convert an ASCII number string containing positive and...
Write a program in MIPS assembly language to convert an ASCII number string containing positive and negative integer decimal strings, to an integer. Your program should expect register $a0 to hold the address of a nullterminated string containing some combination of the digits 0 through 9. Your program should compute the integer value equivalent to this string of digits, then place the number in register $v0. If a non-digit character appears anywhere in the string, your program should stop with...
Show ALL work if it is required for the question and BASES 4. Convert the following...
Show ALL work if it is required for the question and BASES 4. Convert the following from Signed Binary to Decimal: (signed) a. 10011010 b. 01001101 5. 10000001 - 01100110 6. 80D3 + 74C2
Convert 1.8125 to IEEE-754 representation. Show all your work.
Convert 1.8125 to IEEE-754 representation. Show all your work.
Convert 1.8125 to IEEE-754 representation. Show all your work.
Convert 1.8125 to IEEE-754 representation. Show all your work.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT