[A83] Re: LCD update freq and working with 16bit numbers on the Z80


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

[A83] Re: LCD update freq and working with 16bit numbers on the Z80




> Adding by 12 is easy, since there is a 16 bit add, but subtracting by 12 
> seems to be very complicated, the only solution I could have come up with 
> this far is this (which looks like it's waisting many clock cycles) :

I would use:

dechlby12:

ld b,12
dechlby12_loop:
dec hl
djnz dechlby12_loop

ret ; if you're gonna "call" it.


ofcourse this destroys b, so you'll have to store it if it's valuable.
BTW, I think your code is faster...

--Peter-Martijn


 
> ld a,l
> sub 12
> ld l,a
> ld a,h
> sbc a,0
> ld h,a
> 
> I guess I'm overlooking something, or is this the best way to do it?
> 
> My second question - does anyone know how many times per second you can 
> update the LCD using the _GRBUFCPY_V call? I mean, what 'FPS' is the 
> theoretical max, assuming that nothing else but the buffer copy is done?
> 
> /Andreas
> 
> _________________________________________________________________
> Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
> 
> 
> 





References: