View the step-by-step solution to: i have the following four questions to sovle reply me

i have the following four questions to s...
i have the following four questions to sovle reply me soon


1. Using only MOV, ADD, SUB, INC, DEC and NEG, translate the following high-level statements into assembly language. A, B and C are word variables:

a. A = B – A
b. A = -(A+1)
c. C = A + B
d. B = 3-B+7
e. A = 5-A

2. Which of the following names are legal in IBM PC assembly language?
a. TWO_WORDS
b. ?1
c. Two Words
d. .@?
e. $145
f. LET’S_GO
g. T =

3. Which of the following are legal numbers? If they are legal, tell whether they are binary, decimal, or hex numbers
a. 246
b. 246h
c. 1001
d. 1,101
e. 243h
f. FFEEh

3. Tell whether each of the following instructions is legal or illegal. W1 and W2 are word variables, and B1 and B2 are byte variables.
a. Mov DS,AX
b. Mov DS,1000h
c. Mov CS,ES
d. Mov W1,DS
e. XCHG W1,W2
f. SUB 5, B1
g. ADD B1, B2
h. ADD Al, 256
i. Mov W1,B1
4. Write instructions (not a complete program) to do the following:
a. Read a character, and display it at the same position on the same line.
b. Take two hex values, store them in two variables and exchange the values of two variables.
1.doc

1. Using only MOV, ADD, SUB, INC, DEC and NEG, translate the following
high-level statements into assembly language. A, B and C are word
variables:
a.
b.
c.
d.
e.

A=BA
A = -(A+1)
C=A+B
B = 3-B+7
A = 5-A

2. Which of the following names are legal in IBM PC assembly language?
a. TWO_WORDS
b. ?1
c. Two Words
d. .@?
e. $145
f. LETS_GO
g. T =
3. Which of the following are legal numbers? If they are legal, tell whether
they are binary, decimal, or hex numbers
a. 246
b. 246h
c. 1001
d. 1,101
e. 243h
f. FFEEh
3. Tell whether each of the following instructions is legal or illegal. W1 and
W2 are word variables, and B1 and B2 are byte variables.
a. Mov DS,AX
b. Mov DS,1000h
c. Mov CS,ES
d. Mov W1,DS
e. XCHG W1,W2
f. SUB 5, B1
g. ADD B1, B2
h. ADD Al, 256
i. Mov W1,B1
4. Write instructions (not a complete program) to do the following:
a. Read a character, and display it at the same position on the same line.
b. Take two hex values, store them in two variables and exchange the
values of two variables.

10

Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors and customizable flashcards—available anywhere, anytime.

-

Educational Resources
  • -

    Study Documents

    Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access or to earn money with our Marketplace.

    Browse Documents
  • 890,990,898

    Question & Answers

    Get one-on-one homework help from our expert tutors—available online 24/7. Ask your own questions or browse existing Q&A threads. Satisfaction guaranteed!

    Ask a Question
  • 890,990,898

    Flashcards

    Browse existing sets or create your own using our digital flashcard system. A simple yet effective studying tool to help you earn the grade that you want!

    Browse Flashcards