SOLUTION TO HW4:

PART A (Written Part):

We expected you to write a program containing all the instructions and see what happens!
(1) All are legal except for (a) and (d).
(2) CMPSW compiles to 1 byte (you can see this under the CPU Window of Turbo Debugger).
(3) There are two ways to see the "user screen":
i. One can either hit ALT-F5 on the keyboard.
ii. One can go under the Windows pulldown menu and select "User Screen".
To return to TD, you can either hit a key on the keyboard or click the mouse button.
(4) The error is caused by the repetition of the macro label just before the `endm' pseudo-instruction. This is unlike the `endp' pseudo-instruction for procedure definition. If compiled, the assembler error message is - ``Fatal -- Unexpected end of file encountered''.

NOTE: We want to alert you to this error because even if you had used the ``/z'' switch for TASM, the error message will not tell you the line which is causing this problem! (Actually, the error message says the offending line is the last line of your file!) If this error is in a macro in an included file, it may be particularly hard to find.

PART B (Programming Part):

Click here for the files.