Answer:
GLOBAL minRoutine
AREA MYCODE, CODE, READONLY
ENTRY
minRoutine
MOV r0, #0xA
MOV r1, #0x3
MOV r3, #0x8
CMP r0,r1
BLT less1Routine
CMP r1,r0
BLT less2Routine
MOV r4,r3
less1Routine
CMP r0,r3
BLT cond1
less2Routine
CMP r1,r3
BLT cond2
cond1
MOV r4,r0
cond2
MOV r4,r1
END
Explanation:
- Inside the minRoutine, move the essential values to the r0, r1 and r3 registers.
- Check if a is greater than b by comparing value in r0 with r1.
- Jump to less1Routine, if value of r0 is less than value of r1. Otherwise go to next instruction
.
- Check if b is greater than a by comparing value in r1 with r0.
- Jump to less2Routine, if value of r1 is less than value of r0. Otherwise go to next instruction
.
- Finally move result of r1 into r4 register.
Answer:
1. You want to use parameters
2. You don't want your program to run multiple times
3. You want to call that snippet of code throughout your program
hope this helped :D
Answer:
myConcerto can help clients envision, innovate, solution, deliver and support their transformation to an intelligent enterprise–providing the technology foundation to accelerate their journey and minimize risk along the way.
Hope it helps
Please mark me as the brainliest
Thank you
Answer:
cin.ignore function written as cin.ignore()
Explanation:
- As we know that cin is an object that is used to obtain the input entered by the user through the keyboard.
- cin.ignore() is a function which is used to ignore or skip one or more characters in the keyboard buffer.
- Keyboard buffer is a small storage area which is used to store keystrokes.
- When a key is pressed on the keyboard it is referred to as a keystroke.
- So before processing, these keystrokes are stored in keyboard buffer.
- So when we use cin to input a character from the user through the keyboard, the keyboard buffer must be empty. If that's not done then the character entered will be taken by the buffer of previous variable.
- Lets take an example of why we want to use cin.ignore() function.
- For example you want the employee (user) to enter his name and you are using cin to read this name from the user.
char empname[8];
cin>>empname;
- Now if the user types his name lets say Anonymous and press enter key this will be taken as new line character and it will store this newline character \n into the buffer.
- cin >> statement reads data from the buffer and stops reading when it reaches newline character.
- So Anonymous is read in and stored in empname variable but newline character is left in the keyboard buffer.
- Lets say after cin>>empname we write another statement that takes a character from user. A user wants to enter character "a".
char character;
character = cin.get();
- When cin.get finds the newline character \n in keyboard buffer, it uses it (as cin.get can read the newline character in the buffer) without waiting for the user to input "a".
- So cin.ignore() function is used to avoid such situation.
- We can specify the characters to be ignore within the cin.ignore() function such as cin.ignore(10,'\n') will ignore 10 characters in the buffer before taking new line or until a \n character comes.
- You can simply use cin.ignore() which will ignore the very next character just as \n in our example. In our example we can use cin.ignore() after the cin>>empname; and before using cin.get();
Answer:
False.
Explanation:
When we declare a variable as reference type we have to initialize that variable otherwise the compiler will give error that the reference variable is not initialized.You also cannot initialize the variable Foo& with NULL value because it is a reference variable and we have to initialize it.
On the other there is no need to initialize the variable Foo * since it is a pointer it can also store NULL value.
So the answer is only Foo* can store NULL value not Foo &.