Assembly Language Assignment


Assembly Language-part1

Please refer to slides and Primer boards lessons

  1. If the switch S7 of the input PORT0 connected to the data line D7 is at logic 1 and the other switches are at logic 0, specify the contents of the accumulator when the instruction IN PORT0 is executed.

MVI A,9FH

IN PORT0

MOV B,A

OUT PORT1

HLT

  1. Specify the output at PORT1 and the contents of the register B after executing the instructions in Problem #1.

 

  1. Specify the register contents and the flag status as the following instructions are executed.
  A C S Z CY
  XX XX 0 0 0
MVI A,5EH          
ADI A2H          
MOV C,A          

 

  1. Specify the register contents and the flag status as the following instructions are executed.
  A B S Z CY
  XX XX X X X
SUB A          
MOV B,A          
DCR B          
INR B          
SUI 01H          
  1. Write a program to
    1. clear the accumulator
    2. add 47H (use ADI instruction)
    3. subtract 92H
    4. add 64H
    5. display the results after subtracting 92H and after adding 64H

 

  1. Specify the register contents and the flag status as the following instructions are executed
  A B S Z CY
  XX XX 0 0 0
XRA A          
MVI B,4AH          
SUI 4FH          
ANA B          

 

 

  1. What is the output at PORT1 when the following instructions are executed?

MVI A,8FH

ADI 72H

JC DSPLAY

OUT PORT1

HLT

DSPLAY:  XRA A

OUT PORT1

HLT

 

Answers.

  1. The data on A after the instruction IN PORT0 is executed will be the same as the data read on PORT0. Thus, the data on A will be equal to 80H.
  2. The data on register A will be copied to register B. So, the data on register B will be 80H. After the instruction OUT PORT1, the data on Register A will be outputted in PORT1. Thus, PORT1 would also show 80H or 1000 0000.

 

 

 

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

 

  A B S Z CY
  XX XX X X X
SUB A 00H XX 0 1 0
MOV B,A 00H 00H 0 1 0
DCR B 00H FFH 1 0 1
INR B 00H 00H 0 1 0
SUI 01H FFH 00H 1 0 1

SUB A

ADI 47H

SUI 92H

OUT PORT0

ADI 64H

OUT PORT0

HLT

 

 

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

 

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

    Get professional assignment help cheaply

    Are you busy and do not have time to handle your assignment? Are you scared that your paper will not make the grade? Do you have responsibilities that may hinder you from turning in your assignment on time? Are you tired and can barely handle your assignment? Are your grades inconsistent?

    Whichever your reason may is, it is valid! You can get professional academic help from our service at affordable rates. We have a team of professional academic writers who can handle all your assignments.

    Our essay writers are graduates with diplomas, bachelor, masters, Ph.D., and doctorate degrees in various subjects. The minimum requirement to be an essay writer with our essay writing service is to have a college diploma. When assigning your order, we match the paper subject with the area of specialization of the writer.

    Why choose our academic writing service?

    • Plagiarism free papers
    • Timely delivery
    • Any deadline
    • Skilled, Experienced Native English Writers
    • Subject-relevant academic writer
    • Adherence to paper instructions
    • Ability to tackle bulk assignments
    • Reasonable prices
    • 24/7 Customer Support
    • Get superb grades consistently

     

     


 

smile and order essaysmile and order essayPLACE THIS ORDER OR A SIMILAR ORDER WITH GRADE VALLEY TODAY AND GET AN AMAZING DISCOUNT

order custom essay paper


Private and Confidential

Yours all information is private and confidential; it is not shared with any other party. So, no one will know that you have taken help for your Academic paper from us.



This essay is written by:

Prof. SirMojo Verified writer

Finished papers: 435

Proficient in:

English, History, Business and Entrepreneurship, Nursing, Psychology, Management

You can get writing help to write an essay on these topics
100% plagiarism-free

Hire This Writer
© 2017 theacademicessays. All Rights Reserved. Design & Developed by theacademicessays.

Ask Your Homework Today!

We have over 1000 academic writers ready and waiting to help you achieve academic success

Need Help? Chat with us
Loading...