Question

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.

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

In 8086 architecture, a register is a memory location internal to the processor. we will generally have 4 registers namely


1. AX -primary accumulator used of input/output operations

2. BX - base register used for indexing addressing

3. CX - count register used for storing loop count


4. DX - data register

we will have different addressing modes

1. register addressing

2. immediate addressing

3. indirect addressing

now coming to the question

A) Assembly program:
section.data
msg dw 'Welcome to Assembly Language",0x200H   

section.text
global _start
_start: ;indicates the entry point
mov ax,msg
    

Explanation:
1.text section is the place where our actual code resides.
2.data section is the place where our program data resides.
  
msg dw "Welcome to Assembly Language",0x200H - through this statement we are declaring a memory location 0X200H which is named as msg and contents are "Welcome to Assembly Language"
here dw means "define word" means the size is 16bits 0r 2 bytes (in 32-bit system)

mov ax,msg - through this statement we are saying move the contents of memory location ( msg) to the register ax.

Add a comment
Know the answer?
Add Answer to:
can someone solve this question using registers A, B, and R0.. and using basic coded don't use CMP and LEA. thank yo...
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
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
Active Questions
ADVERTISEMENT