MICROPROCESSOR/ASSEMBLY/DEBUGGER QUESTIONS You will need to look at the .LST fil
ID: 1715682 • Letter: M
Question
MICROPROCESSOR/ASSEMBLY/DEBUGGER QUESTIONS
You will need to look at the .LST files, to use the debugger, and to read the book for the answers.
1) What does .MODEL do?
2) What does a TINY model imply? What about MEDIUM?
3) What do .DATA, .CODE and .STACK do?
4) Why the second program doesn’t use them?
5) Where is the STACK for the first program?
6) What does .STARTUP do in each case? Why are they different?
7) What is the function of the ASCII character $ ? (Try to remove it and see what happens)
8) What does .EXIT do?
Explanation / Answer
1) .MODEL SMALL
Assembler directive that defines the memory model to use in the program
2) TINY model:
Tiny-model programs run only under MS-DOS. Tiny model places all data and code in a single segment. Therefore, the total program file size can occupy no more than 64K.
Since the assembler provides no direct support for this feature, huge model is essentially the same as large model.
MEDIUM model supports multiple code and single data segments
3) The .DATA and .CODE statements do not require any separate statements to define the end of a segment.
.DATA and .CODE close the preceding segment and then open a new segment.
.CODE
Assembler directive that defines the program instructions
.STACK
Assembler directive that reserves a memory space for program instructions in the stack
5) The stack is the section of memory used for pushing or popping registers and storing the return address when a subroutine is called. The stack often holds temporary and local variables. If your main module is written in a high-level language, that language handles the details of creating a stack.
Use the .STACK directive only when writing a main module in assembly language.
6) .STARTUP directives are available only in 16-bit addressing modes
put your main application code here in this directive
7) $ is used for defining string variables and also for defining hexadecimal constants
8) .EXIT directives are available only in 16-bit addressing modes. it generates termination code
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.