Assembly Language-part1

Please check with slides and Primer boards classes

  1. If the swap S7 of the enter PORT0 related to the information line D7 is at logic 1 and the opposite switches are at logic zero, specify the contents of the accumulator when the instruction IN PORT0 is executed.

MVI A,9FH

IN PORT0

MOV B,A

OUT PORT1

HLT

  • Specify the output at PORT1 and the contents of the register B after executing the directions in Downside #1.
  • Specify the register contents and the flag standing as the next directions are executed.
 ACSZCY
 XXXXzerozerozero
MVI A,5EH     
ADI A2H     
MOV C,A     
  • Specify the register contents and the flag standing as the next directions are executed.
 ABSZCY
 XXXXXXX
SUB A     
MOV B,A     
DCR B     
INR B     
SUI 01H     
  • Write a program to
    • clear the accumulator
    • add 47H (use ADI instruction)
    • subtract 92H
    • add 64H
    • show the outcomes after subtracting 92H and after including 64H
  • Specify the register contents and the flag standing as the next directions are executed
 ABSZCY
 XXXXzerozerozero
XRA A     
MVI B,4AH     
SUI 4FH     
ANA B     
  • What's the output at PORT1 when the next directions are executed?

MVI A,8FH

ADI 72H

JC DSPLAY

OUT PORT1

HLT

DSPLAY:  XRA A

OUT PORT1

HLT

Solutions.

  1. The info on A after the instruction IN PORT0 is executed would be the identical as the information learn on PORT0. Thus, the information on A can be equal to 80H.
  2. The info on register A can be copied to register B. So, the information on register B can be 80H. After the instruction OUT PORT1, the information on Register A can be outputted in PORT1. Thus, PORT1 would additionally present 80H or 1000 0000.
  •  
 ACSZCY
 XXXXzerozerozero
MVI A,5EH5EHxxzerozerozero
ADI A2H00Hxxzero11
MOV C,A00H00Hzero11
  •  
 ABSZCY
 XXXXXXX
SUB A00HXXzero1zero
MOV B,A00H00Hzero1zero
DCR B00HFFH1zero1
INR B00H00Hzero1zero
SUI 01HFFH00H1zero1
  •  

                                SUB A

                                ADI 47H

                                SUI 92H

                                OUT PORT0

                                ADI 64H

                                OUT PORT0

                                HLT

  •  
 ABSZCY
 XXXXzerozerozero
XRA A00HXXzero1zero
MVI B,4AH00H4AHzero1zero
SUI 4FHC0H4AH1zero1
ANA B40H4AHzerozerozero
  • The Carry flag can be set after the instruction ADI 72H, so when the JC DISPLAY is executed it can soar to DISPLAY. XRA A will reset the accumulator. Thus, the output in PORT1 can be 00H.

Meeting Language-part1
Please check with slides and Primer boards classes
1. If the swap S7 of the enter PORT0 related to the information line D7 is at logic 1 and the opposite switches are at logic zero, specify the contents of the accumulator when the instruction IN PORT0 is executed.
MVI A,9FH
IN PORT0
MOV B,A
OUT PORT1
HLT
2. Specify the output at PORT1 and the contents of the register B after executing the directions in Downside #1.

three. Specify the register contents and the flag standing as the next directions are executed.
A C S Z CY
XX XX zero zero zero
MVI A,5EH
ADI A2H
MOV C,A

four. Specify the register contents and the flag standing as the next directions are executed.
A B S Z CY
XX XX X X X
SUB A
MOV B,A
DCR B
INR B
SUI 01H
5. Write a program to
a. clear the accumulator
b. add 47H (use ADI instruction)
c. subtract 92H
d. add 64H
e. show the outcomes after subtracting 92H and after including 64H

6. Specify the register contents and the flag standing as the next directions are executed
A B S Z CY
XX XX zero zero zero
XRA A
MVI B,4AH
SUI 4FH
ANA B

7. What's the output at PORT1 when the next directions are executed?
MVI A,8FH
ADI 72H
JC DSPLAY
OUT PORT1
HLT
DSPLAY: XRA A
OUT PORT1
HLT

Solutions.
1. The info on A after the instruction IN PORT0 is executed would be the identical as the information learn on PORT0. Thus, the information on A can be equal to 80H.
2. The info on register A can be copied to register B. So, the information on register B can be 80H. After the instruction OUT PORT1, the information on Register A can be outputted in PORT1. Thus, PORT1 would additionally present 80H or 1000 0000.

three.
A C S Z CY
XX XX zero zero zero
MVI A,5EH 5EH xx zero zero zero
ADI A2H 00H xx zero 1 1
MOV C,A 00H 00H zero 1 1

four.
A B S Z CY
XX XX X X X
SUB A 00H XX zero 1 zero
MOV B,A 00H 00H zero 1 zero
DCR B 00H FFH 1 zero 1
INR B 00H 00H zero 1 zero
SUI 01H FFH 00H 1 zero 1
5.
SUB A
ADI 47H
SUI 92H
OUT PORT0
ADI 64H
OUT PORT0
HLT

6.
A B S Z CY
XX XX zero zero zero
XRA A 00H XX zero 1 zero
MVI B,4AH 00H 4AH zero 1 zero
SUI 4FH C0H 4AH 1 zero 1
ANA B 40H 4AH zero zero zero

7. The Carry flag can be set after the instruction ADI 72H, so when the JC DISPLAY is executed it can soar to DISPLAY. XRA A will reset the accumulator. Thus, the output in PORT1 can be 00H.

Homework Ace Tutors
Calculate your paper price
Pages (550 words)
Approximate price: -

Why Work with Us

Top Quality and Well-Researched Papers

. Our system allows you to choose your academic level: high school, college/university or professional, and we will assign a writer who has a right qualification.

Professional and Experienced Academic Writers

We have a wide team of professional writers with experience in academic and formal business writing.

Free Unlimited Revisions

Ordering custom papers from us is customer friendly. You can do this yourself after logging into your personal account or by contacting our support through chat or via email.

Prompt Delivery and 100% Money-Back-Guarantee

We are familiar with various schools deadlines. As such, all papers are delivered on time to allow you time to review before submitting it. In case you cannot provide us with more time, a 100% refund is guaranteed.

Original & Confidential

We have mordernized our writing in accordance with current technologies. Our editors carefully review all quotations and references in the text. We also promise maximum privacy and confidentiality in all of our services.

24/7 Customer Support

Our professional support agents are available 24 - 7 days a week and committed to providing you with the best customer experience by answering all your queries.

Try it now!

Calculate the price of your order

Total price:
$0.00

How it works?

Follow these steps to get your essay paper done

Place your order

Fill all the order form sections by providing details of your assignment.

Proceed with the payment

Choose the payment model that suits you most.

Receive the final file of the done paper

Once your paper is ready, we will email it to you.

Our Services

No need to work on your paper when deadlines are closing at very late hours of the night. Sleep tight, we will cover your back. You can order any assignment.

Essays

Essay Writing Service

We work on all models of college papers within the set deadlines. We take care of all your paper needs and give a 24/7 customer care support system.

Admissions

Admission Essays & Business Writing Help

An admission essay is an application essay. You can rest assurred that through our service we will write the best admission essay for you.

Reviews

Editing Support

We format your document by correctly quoting the sources and creating reference lists in the formats APA, Harvard, MLA, Chicago / Turabian.

Reviews

Revision Support

If you think your paper could be improved, you can request a review.. You can use this option as many times as you see fit. This is free because we want you to be completely satisfied with the service offered.