[A83] Re: cant get code to work


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

[A83] Re: cant get code to work



In a message dated 05/10/2002 8:26:19 PM Eastern Daylight Time, 
joe@joepnet.com writes:


> Just in my opinion - It's bad coding to pop more words of the stack than
> you've pushed, especially within subroutines.  Try to think of a way you
> don't have to do that.  What is the 'inc b' for, BTW?
> - - Joe
>  
b is used in the loop which calls this routine.  'djnz' is used to loop it so 
when 2nd is pressed in the code I posted, the loop goes through one more 
time.  I push and pop bc for that use...  would it be better to use a user 
defined variable?  I don't know of another way to not push/pop bc, and on an 
earlier post, I was informed that to use the stack in a subroutine, I had to 
pop/push the memory address (hl).





Follow-Ups: