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

Re: News from the wooden hut (n/m with n < m)



Egan Ford wrote:
> On 11/6/12 9:07 AM, Benoit0123 wrote:
>> So give ZBRUN a try and provide feedback on this thread..
> 
> I am having problems with the following code:
> 
>          or      080h
>          push    bc
>          ld      c,2
>          rst     28h
>          pop     bc
> 
> This is my echo char code, it works fine if I comment out the push and 
> pop, however to be safe I need to preserve all my registers.
>
Thank you for your feedback...
At this time, may I suggest to test two options:
a) would you initialize SP at the begining of your program by inserting an
instruction LD SP,adress (highest adress of your stack memory area) where
you would have reserve at least 16 bytes (Stack Pointer decrements just like
the 6502 AFAIK)
b) would you replace the PUSH and POP with the EXX instruction and see if
that fixed the carsh for the time being?

I acknowledge that there might be a bug at the level of my bridge and will
provide you with a definitive fix once I can get my hand on a real system
(during the week end) and if needed. Actually you are my first beta tester
;-)...

Please would you advise me of the result?
Thank you,
Benoît