Q. 12. Find the number of negative, zero and positive numbers. HLT ; Stop execution ngran1

icon
Related questions
Question
100%
Q. 12. Find the number of negative, zero and positive numbers.
Additional Data Transfer and 16-bit Arithmatic Instructions
JKZ SKIP
MOVA, C
SUI 06
; Subtract 6 to adjust decimal count
MOV D, A
MOVA, C
SKIP
OUT 05
: Send count on output port
CALL DELAY
; Wait to 0.5 seconds
DCR C
: Decrement count
MOVA, C
CPI FF
JNZ BACK
If not zero, report
HLT
; Stop execution
Duogr m:
Transcribed Image Text:Q. 12. Find the number of negative, zero and positive numbers. Additional Data Transfer and 16-bit Arithmatic Instructions JKZ SKIP MOVA, C SUI 06 ; Subtract 6 to adjust decimal count MOV D, A MOVA, C SKIP OUT 05 : Send count on output port CALL DELAY ; Wait to 0.5 seconds DCR C : Decrement count MOVA, C CPI FF JNZ BACK If not zero, report HLT ; Stop execution Duogr m:
Expert Solution
steps

Step by step

Solved in 2 steps with 2 images

Blurred answer