Notes on FInal Exam:

2. Final Exam question:
        write a procedure in which arguments are
        passed on the stack, in which local variables
        are allocated on the stack, using EQU's to
        make these transparent...

        OUTLINE:

                xxx proc
                    arg1 equ word ptr [bp+8]
                    arg2 equ byte ptr [bp+6]
                    arg3 equ byte ptr [bp+4]
                    ;
                    var1 equ word ptr [bp-2]
                    var2 equ byte ptr [bp-4]
                    ;
                    push bp
                    mov bp,sp
                    sub sp,twice_no_local_vars
                    save <usual_suspects>
                    ...
                    restore <usual_suspects>
                    mov sp,bp
                    ret
                xxx endp
                ...

                    save <p1,p2,p3>
                    call xxx
                    add sp,6
                ...

3. Another debugger question:
        in the above outline for a procedure,
        replace
                sub sp,twice_no_local_var
        with
                add sp,twice_no_local_var
        (This was an error in my code, which
        took me a while to debug, but basically,
        I was lucky to have the procedure repeatedly
        called when it was supposed to be called only
        once -- this made me check the return address
        and thus look at sp,bp,etc.  But the debugger
        question must have some happy coincidence like
        this.  The example is my routine called "boxes"
        in vgabox3.asm)

4. Another question:
	write a procedure which, given a binary number in
	AX, prints its decimal representation on the screen.
		E.g. AX=0A7h will print '167'.

5. Write a mouse procedure to simulate texture on the
	screen: it calls random to jitter when you
	go over rough texture.  Moreover, there is
	no automatic connection between mouse
	and the mouse pointer (you could lose the
	mouse pointer if you run too fast).  To recapture,
	you need to press F1.


