Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please convert this Assembly code into CCS. ; Subroutine to give delay of R12 0.1s Parameter is passed in R12 and destroyed ;R4 used for

Please convert this Assembly code into CCS.

image text in transcribed

; Subroutine to give delay of R12 0.1s Parameter is passed in R12 and destroyed ;R4 used for loop counter, stacked and restored DelayTenths: ; Stack R4: will be overwritten ; Start with test in case R120 push. R4 jmp mov.w #DELAYLOOPS , R4 dec.w R4 LoopTest OuterLoop: ; Initialize loop counter DelayLoop: [clock cycles in brackets] ; Decrement loop counter [11 ; Repeat loop if not zero [21 ;Decrement number of 0.1s delays DelayLoop nz dec.w R12 LoopTest: ; Finished number of 0.1s delays? #0,R12 OuterLoop R4 cmp.w No: go around delay loop again nz pop.w ret Yes: restore R4 before returning Return to caller ; Subroutine to give delay of R12 0.1s Parameter is passed in R12 and destroyed ;R4 used for loop counter, stacked and restored DelayTenths: ; Stack R4: will be overwritten ; Start with test in case R120 push. R4 jmp mov.w #DELAYLOOPS , R4 dec.w R4 LoopTest OuterLoop: ; Initialize loop counter DelayLoop: [clock cycles in brackets] ; Decrement loop counter [11 ; Repeat loop if not zero [21 ;Decrement number of 0.1s delays DelayLoop nz dec.w R12 LoopTest: ; Finished number of 0.1s delays? #0,R12 OuterLoop R4 cmp.w No: go around delay loop again nz pop.w ret Yes: restore R4 before returning Return to caller

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Semantics In Databases Second International Workshop Dagstuhl Castle Germany January 2001 Revised Papers Lncs 2582

Authors: Leopoldo Bertossi ,Gyula O.H. Katona ,Klaus-Dieter Schewe ,Bernhard Thalheim

2003rd Edition

3540009574, 978-3540009573

More Books

Students also viewed these Databases questions

Question

Identify the three sources of funds used to pay annuity benefits.

Answered: 1 week ago