Answer is as follows :
Answer 1 :
As in given instructions :
MOV A , #30 H // Data 30 H is moved to register A
PUSH A // Push value of register into stack , So TOP of stack contains 30 H i.e. location 8
LCALL 0500 H // The memory address 0500H is called and higher bits i.e. 00 H is stored on stack at memory location 9 and lower bits 05 H stored on stack at memory location 10.
So memory locations contains :
address 8 = 30 H
address 9 = 00 H
address 10 = 05 H
So these match with option B.
So correct option is B
Answer 2 :
If RET i.e return instruction is located at memory location 0500H than control get back at same instruction LCALL i.e. located at 0003 addressed. Than next instruction located on address 0006 is executed.
So statement is TRUE .
If there is any query please ask in comments..
2. After initialization a user executes the following instructions: ORGO 0000 MOV A, #30H 0002 PUSH...
LC-3 Programming Help!! The Stack Protocol The following outline is the protocol for passing arguments to a function and returning values. Everything is stored on the runtime stack so that space is used only when the function is executing. As a result the actual address of arguments and locals may change from call to call. However, the layout of the stack frame (activation record) is constant. Thus, the offests from the frame pointer (FP) to the parameters/locals are constant. All...