Question: / * op shl: set * to * AA shifted by * CNT position to the left, and set the flags of CPU STZTE accordingly.

/*
op shl: set * to *AA shifted by *CNT position to the left, and set the flags
of CPU STZTE accordingly. *CNT is a l-byte unsigned integer.
RESTRICTIONS: You are allowed to use uint8 t and uint8 t* as types.
No other type is allowed. No call to external functions.
tARNING: Do NOT modify *CNT. Make a local copY. If you modify *CNT, the
tester will fail with a strange behavior.
FLIAGS:
OF: Becomes 1 if the two most significant bits of the starting value
of **A were different, 0 otherwise.
ZF: 1 if the final value of *A is zero, 0 otherwise.
SF: 1 if the final value of *A is negative, 0 otherwise.
*/
void op_shl (cpu_state_t* cpu_state, uint8_t size, uint8_t* cnt, uint8_t* a){
 /* op shl: set * to *AA shifted by *CNT position

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!