Question

Write an Assembly language program to: A- Store the following text Welcome to Assembly Language in the ROM at 200H B- Find

0 0
Add a comment Improve this question Transcribed image text
Answer #1

A- DATA SEGMENT

MESSAGE DB " Welcome to Assembly Language "

ENDS

CODE SEGMENT

ASSUME DS : DATA CS : CODE

START:

MOV AX , DATA

MOV DS , AX

LEA DX , MESSAGE

MOV AH , 9

INT 200H

MOV AH , 4CH

INT 200H

ENDS

END START

‐-‐‐--‐---------‐----------------------------------------------------

B- DATA SEGMENT

MSG1 DB "ENTER THE STRING : $"

MSG2 DB " NO OF OCCURRENCES OF e : $"

NEWLINE DB 10,13, '$'

STR1 DB 80 DUP('$')

CNT DB 0

DATA ENDS

CODE SEGMENT

ASSUME DS : DATA ,CS: CODE

START :

MOV AX, DATA

MOV DS,AX

MOV AH,09H

LEA DX, MSG1

INT 40H

MOV AH, OAH

LEA DX,STR1

INT 40H

MOV AH, 09H

LEA DX,NEWLINE

INT 40H

LEA SI,STR1+1

MOV CL,BYTE PTR[SI]

MOV CH,00H

L1 : INC SI

CMP BYTE PTR [SI], 'e'

JNZ L2

INC CNT

L2 : LOOP L1

ADD CNT , '0'

MOV AH, 09H

LEA DX, MSG2

INT 40H

MOV AH,02H

MOV DH,00H

MOV DL,CNT

INT 40H

MOV AH,4CH

INT 40H

CODE ENDS

END START

-----------------------------------------‐-----------

OUTPUT

ENTER THE STRING: Welcome to Assembly Language

NO OF OCCURRENCES OF e : 3

  

Add a comment
Know the answer?
Add Answer to:
Write an Assembly language program to: A- Store the following text " Welcome to Assembly Language" in the ROM a...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • can someone solve this question using registers A, B, and R0.. and using basic coded don't use CMP and LEA. thank yo...

    can someone solve this question using registers A, B, and R0.. and using basic coded don't use CMP and LEA. thank you Write an Assembly language program to: A) Store the following text " Welcome to Assembly Language" in the ROM at 200H B) Find how many e letters in this word and store the count in the RAM in location 40H.

  • 2. Searching a String: Write a MIPS assembly language program to do the following: Read a...

    2. Searching a String: Write a MIPS assembly language program to do the following: Read a string and store it in memory. Limit the string length to 100 characters. Then, ask the user to enter a character. Search and count the number of occurrences of the character in the string. The search is not case sensitive. Lowercase and uppercase letters should be equal. Then ask the user to enter a string of two characters. Search and count the number of...

  • In this problem, you will write an assembly program (LC-3 assembly language) to process a string ...

    In this problem, you will write an assembly program (LC-3 assembly language) to process a string starting at memory location x5000, and is terminated by a ‘\0’ character (ASCII value = 0). For a given string beginning atmemory location x5000, convert all the upper-case English letters (A-Z) to lower-case, and all the lower case (a-z) to upper case. For example, if the string is “iLOVEComputerScience252”, the string after the processing should be: “IlovecOMPUTERsCIENCE252”. Store the string after the processing to...

  • In this problem, you will write an assembly program (LC-3 assembly language) to process a string...

    In this problem, you will write an assembly program (LC-3 assembly language) to process a string starting at memory location x5000, and is terminated by a ‘\0’ character (ASCII value = 0). For a given string beginning at memory location x5000, convert all the upper-case English letters (A-Z) to lower-case, and all the lower case (a-z) to upper case. For example, if the string is “iLOVEComputerScience252”, the string after the processing should be: “IlovecOMPUTERsCIENCE252”. Store the string after the processing...

  • Question: WRITE A PROGRAM IN LC-3 ASSEMBLY LANGUAGE. DO NOT ... WRITE A PROGRAM IN LC-3...

    Question: WRITE A PROGRAM IN LC-3 ASSEMBLY LANGUAGE. DO NOT ... WRITE A PROGRAM IN LC-3 ASSEMBLY LANGUAGE. DO NOT USE PYTHON, JAVA, C or C++ or OTHERS. Your task is to write a program that counts the number of 1 bits of the value stored at location given by Datal. Your program should print the count (in hexadecimal, as it is easier) along with an appropriate heading. Test your program with the following values stored in Datal: a xFFFE...

  • Write an assembly language 32 bit program that reads in lines of text by a .txt...

    Write an assembly language 32 bit program that reads in lines of text by a .txt file and read in from the user and prints them diagonally. Using good commenting.

  • Convert the following assembly language program into a C program: *Update: The variables are initialized, in...

    Convert the following assembly language program into a C program: *Update: The variables are initialized, in lines 4 & 6 of the red assembly language code. Convert the following assembly language program into a C program: *Update: The variables are initialized, in lines 4 & 6 of the red assembly language code. include "p24Hxxxx.inc" global__reset bss: Uninitialized data section: Variables start at location 0x0800 x: .space 2: Allocating space (two bytes) to variable. y: .space 2;Allocating space (two bytes) to...

  • Write a program in assembly language that loads register R2 with the word in memory location...

    Write a program in assembly language that loads register R2 with the word in memory location which is 10 bytes above the address in R0; and loads register R3 with the word in memory location which is 10 bytes below the address in R1. Your program must compare the two numbers in R2 and R3. If number in R2 is less than or equal to the number in R3 it must add the two numbers and save the result in...

  • please write a program in assembly language and in C language to run under Microcontroller 8051.Indicate comments. T...

    please write a program in assembly language and in C language to run under Microcontroller 8051.Indicate comments. Thanks #Welcome #assembly #proteus Automatic Traffic Light controller using 8051 microcontroller | Full [Code+circuit] traffic light 6.8K views #Welcome #assembly #proteus Automatic Traffic Light controller using 8051 microcontroller | Full [Code+circuit] traffic light 6.8K views

  • Programming: Write a SPIM assembly language program num-vowel.s based on the hardware implementation method in the...

    Programming: Write a SPIM assembly language program num-vowel.s based on the hardware implementation method in the lab notes and the above practice. The program will do the following: Prompt the user to enter a string. The program will call the procedure vowelp to check if a character entered in the string is a vowel or not. Count how many vowels and how many non-vowels are in the string. Print out the calculated results with appropriate message. Hint: A loop is...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT