Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

QUESTIONS FROM PAPER ARE BELOW THE PICTURE. NEED HELP CREATING ASSEMBLY CODE FOR

ID: 3840400 • Letter: Q

Question

QUESTIONS FROM PAPER ARE BELOW THE PICTURE. NEED HELP CREATING ASSEMBLY CODE FOR SDK-85

Problem #1: Write and run a Program that will display on the data field of your sdk-85, A counter MOD 10 (00-09) with the Following timing.
(A) The 10 digits will display one after the other in Ascending order, And the time between succesive digits should be 1/2 second. Therefore the display for the count will last 5 seconds, from the initital display 00 to the last 09.
(B) Repeat Part A for the case of 1 second and 10 seconds between digits.

Problem #2: Repeat problem #1 for the case of a down counter MOD 10 (Display : 09, 08, 07,....... 01, 00)

Problem #3 Create a 2 digit decimal up counter (From 00 - 99) with a 1 second display for each digit.

arsd ene 1st.x hq.ort,M,...4cpg .aunma'A45agree ty"-/14/14s i

Explanation / Answer

Problem 1:

LXI H 2000

XRA A

XX: MOV M A

STA 27F6

MVI B 00

PUSH H

CALL MODDT (06FA)

CALL DELAY

POP H

MOV A M

INR A

CPI 0A

JC XX

XRA A

JMP XX

HLT

DELAY: LXI D FFFF(Delay of 0.5 s)

CALL DELAY(03BC)

RET

(B) To get delay of 1 s and 10 s we only need to change the time delay in the delay function.

Problem 2:

The down counter program is given by:

LXI H 2000

MVI A 09

XX: MOV M A

STA 27F6

MVI B 00

PUSH H

CALL MODDT (06FA)

CALL DELAY

POP H

MOV A M

DCR A

CPI FF

JNZ XX

MVI A 09

JMP XX

HLT

DELAY: LXI D FFFF(Delay of 0.5 s)

CALL DELAY(03BC)

RET

Problem 3:

For the 00-99 decimal counter the code is:

LXI H 2000

XRA A

XX: MOV M A

STA 27F6

MVI B 00

PUSH H

CALL MODDT (06FA)

CALL DELAY

POP H

MOV A M

ADI 01

DAA

CPI 9A

JC XX

XRA A

JMP XX

HLT

DELAY: LXI D FFFF(Delay of 0.5 s)

CALL DELAY(03BC)

DELAY: LXI D FFFF(Delay of 0.5 s)

CALL DELAY(03BC)

RET