Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1) What is the purpose of the INTO instruction? 2) What was the main purpose for

ID: 3639807 • Letter: 1

Question

1) What is the purpose of the INTO instruction?
2) What was the main purpose for the INTMUL instruction in this volume? What was it introduced before
the chapter on integer arithmetic?
3) Describe how to declare byte variables. Give several examples. What would you normally use byte variables
for in a program?
4) Describe how to declare word variables. Give several examples. Describe what you would use them for in
a program.
5) Repeat question 4 for double word variables.
6) What are qword and tbyte objects?
7) How does HLA differentiate string and character constants?
8) Explain the purpose of the TYPE section. Give several examples of its use.
9) What is a pointer variable?
10) How do you declare pointer variables in a program?
11) How do you access the object pointed at by a pointer. Give an example using 80x86 instructions.
12) What is the difference between a CONST object and a VAL object?
13) What is the “?” statement used for?
14) What is an enumerated data type?
15) Given the two literal string constants “Hello “ and “World”, provide two fundamentally different ways to
concatenate these string literal constants into a single string within an HLA source file.
16) What is the difference between a STRING constant and a TEXT constant?
17) What is a pointer constant? What is the limitation on a pointer constant?
18) What is a pointer expression? What are the limitations on pointer expressions?
19) What is a dangling pointer? How do you avoid the problem of dangling pointers in your programs?
20) What is a memory leak? What causes it? How can you avoid memory leaks in y our programs?
21) What is likely to happen if you use an uninitialized pointer?
22) What is a composite data type?
23) If you have a variable of type STRING, how many bytes in memory does this variable consume? What
value(s) appear in this variable?
24) What is the data format for HLA string data?
25) What is the difference between a length-prefixed and a zero terminated string? What are the advantages
and disadvantages of each?
26) Are HLA string zero terminated or length prefixed?
27) How do you directly obtain the length of an HLA string (i.e., w/o using the str.length function)?
28) What are the two pieces of length data maintained for each HLA string? What is the difference between
them?
29) Why would you want to use the
str.cpy
routine (which is slow) rather than simply copying the pointer data
from one string to another (which is fast)?

Explanation / Answer

(a)