Re: A86: challenge


[Prev][Next][Index][Thread]

Re: A86: challenge



At 10:36 PM 9/20/97 -0400, you wrote:
>Content-Type: text/plain;
>	charset="iso-8859-1"
>X-MIME-Autoconverted: from 8bit to quoted-printable by
towerguard.unix.edu.sollentuna.se id EAB28588
>
>I have a big problem.  I have been working on this for over 2 hours trying
>to figure out what the problem is.  So I was wondering if you could help me
>out.  I wrote this program, and the only bug now seems to be that when I
>press the exit button it doesn't exit.  Instead it does some wierd stuff.
>Here is the code if you can see the problem let me know.  The attachment is
>the actual asm file.  Also if you have any other suggestions let me know.
>One last thing, I am only a beginner!!!  By the way all of the other buttons
>work fine.
>
>
>;my first bitmap
>;by Brian Thompson
>
>#include "asm86.h"
>#include "ti86asm.inc"
>
>.org _asm_exec_ram
>
>Start:
>     call _clrLCD
>     ld bc,$0500
>     ld (_curRow),bc
>     ld hl,Title
>     call _puts
>     ld bc,$0203
>     ld (_curRow),bc
>     ld hl,Author
>     call _puts
>     ld bc,$220D
>     ld (_penCol),bc
>     ld hl,Email
>     call _vputs
>    KeyST:
>     call GET_KEY
>     cp K_ENTER
>     jr nz,KeyST
>
>CursorST:
>     call _clrLCD
>     ld bc,$3232
>     ld ($CFAB), BC
>     push bc
>     ld de, Cursor
>     call DrawSprite
>     pop bc
>     pop bc
>

////////////////////////////
Why do you pop bc twice?  The return address used by the ret statement is
stored on the stack.  You just removed it, so it can't return!

I think that's the only thing wrong
///////////////////////////////




-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 Alan Bailey            mailto:bailela@charlie.cns.iit.edu
 IRC:Abalone              Web:http://www.iit.edu/~bailela/
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 


References: