Question

.Assume: We are using a CPU12 as a coffee maker controller. An ADC provides the temperature of the water in °C at memory loca

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Answer :- The CPU12 assembly code can be written as-

Loop_Main : ; label named as Loop_Main

LDAA $0067 ; register A = temperature value from ADC

LDAB #$5A ; register B = 0x5A = 90

CBA ; compare A and B register value

BLT Make_ON ; if temperature less than 900, goto label named as Make_ON

LDAB #$64 ; register B = 0x64 = 100

CBA ; compare A and B register value

BGE Make_OFF ; if temperature greater than equal to1000, goto label named as Make_OFF

JMP Loop_Main ; do infinite looping of this code

Make_ON : ; label named as Make_ON

LDAA #$01 ; register A = 0x01

STAA $0068 ; write the value in memory location 0x0068 to make machine ON

JMP Loop_main ; go to label named as Loop_main

Make_OFF : ; label named as Make_OFF

LDAA #$00 ; register A = 0x00

STAA $0068 ; write the value in memory location 0x0068 to make machine OFF

JMP Loop_main ; go to label named as Loop_main

Add a comment
Know the answer?
Add Answer to:
.Assume: We are using a CPU12 as a coffee maker controller. An ADC provides the temperature of the water in °C at memory location $0067. Writing $01 to memory location $0068 turns the coffee maker he...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT