subject
Engineering, 17.02.2020 19:34 jumpgirll

The code that follows shows an example of branching on an enumerated type value in a switch statement. Recall that enumerated types in C are simply a way to introduce a set of names having associated integer values By default, the values assigned to the names go from zero upward. In our code, the actions associated with the different case labels have been omitted. Enunerated type creates sat of constants nusbered 0 and uprazd. typedef 2 enun {MOOLA, KODE-B, MODES, 190DE-D, MODE-E} node-t ; 4 long avitch3(long .pl, Long p2, modet action) long result- o switch (action) case HODE A 10 case MODE C 12 13 case MODED 15 16 default return result; The part of the generated assembly code implementing the different actions is shown in Figure 3.52. The annotations indicate the argument locations, the register values, and the case labels for the different jump destinations Fill in the missing parts of the C code. It contained one case that fell through to another - try to reconstruct this. pi in %rdi, p2 in %rsi, action in %edx 1.L8 MODE E $27, novl ret %eax ·L3 : movq movq movq ret (%rsi), %rax (%rdi), %rax %rdx, (Xrsi) ·L5: MODE B 10 11 12 novq addq movq ret (%rdi), %rax (%rsi), %rax %rax, (%rdi) L6 : 59, (%rsi), (%rdi) 15 16 novq novg ret %rax 18 "L7: 19 novq rsi), hrax NODE D movq nov! ret %rax ,(%rdi) $27,%eax L9 : default movl ret $12, %eax

ansver
Answers: 1

Another question on Engineering

question
Engineering, 04.07.2019 16:10
An electrical motor raises a 50kg load at a construct velencity .calculate the power of the motor, if it takes 40sec to raise the load through a height of 24m(take g =9.8n/g)
Answers: 2
question
Engineering, 04.07.2019 18:10
Coiled springs ought to be very strong and stiff. si3n4 is a strong, stiff material. would you select this material for a spring? explain.
Answers: 2
question
Engineering, 04.07.2019 18:10
Which of the following controllers anticipates the future from the slope of errors over time? a)-proportional b)-on/off c)-integral d)-derivative.
Answers: 2
question
Engineering, 04.07.2019 18:20
The characteristic roots of a dynamic system are: 1.7920 1.8160 i, -1.7920 1.8160 i, -0.4160 what is the order of this system? what are the settling time and damping ratio of the system?
Answers: 3
You know the right answer?
The code that follows shows an example of branching on an enumerated type value in a switch statemen...
Questions
question
Mathematics, 16.10.2019 22:00
Questions on the website: 13722367