[A83] Re: Loop + Getkey
[Prev][Next][Index][Thread]
[A83] Re: Loop + Getkey
>
> Duhh, instead of increasing b,
> it pops the return address from the stack, and inreases it by one, and
> puts it back.... now if you do that, a lot of strange things happen..
>
> assuming you put bc in the stack, and called the routine,
> the routine should do:
>
> pop hl
> pop bc
> inc b
> push bc
> push hl
>
> instead of just
> pop bc
> inc b
> push bc
>
> get it....?
>
It'd be more elegant if he just never pushed bc.. there would be no need for
any of the poping/pushing. Poping registers from within a call can be
dangerous if you don't know what you're doing.
References: