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

     

     


Get Professional Assignment Help Cheaply

fast coursework help

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's, 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

How It Works

1.      Place an order

You fill all the paper instructions in the order form. Make sure you include all the helpful materials so that our academic writers can deliver the perfect paper. It will also help to eliminate unnecessary revisions.

2.      Pay for the order

Proceed to pay for the paper so that it can be assigned to one of our expert academic writers. The paper subject is matched with the writer’s area of specialization.

3.      Track the progress

You communicate with the writer and know about the progress of the paper. The client can ask the writer for drafts of the paper. The client can upload extra material and include additional instructions from the lecturer. Receive a paper.

4.      Download the paper

The paper is sent to your email and uploaded to your personal account. You also get a plagiarism report attached to your paper.

 

smile and order essaysmile and order essayPLACE THIS ORDER OR A SIMILAR ORDER WITH SMART HOMEWORK HELP TODAY AND GET AN AMAZING DISCOUNT

order custom essay paper