0 Members and 2 Guests are viewing this topic.
label: ;T-states IN A,($10) ;11 AND %10010000 ;7 JR NZ,label ;7/12;6 bytes, destroys A
label: IN A,($10) ;11 RLA ;4 JR C,label ;7/12;5 bytes, destroys A
LD C,$10 ;7label: IN (C),A ;12 JP M,label ;10;7 bytes, destroys A/C;If C is already equal to $10, you can skip the ;load instruction and save 2 bytes/7 T-states.;If you are okay with using undocumented;instructions, IN (C) would preserve A
#define DWAIT IN A, ($10) \ AND %10010000 \ JR NZ, $-4; Then where needed ld a, 07 out ($10), a DWAIT ld a, $20 out ($10), a DWAIT ld a, $BF out ($10), a
in a,(16) \ rla \ jr c,$-3
... by adding a delay to any instruction which reads from or writes to ports 10 or 11 ...
NOTE: The contents of this port should NOT be less than 0Ch or the LCD driver will no longer respond.
I'm not adding anything to the discussion, but I just wanted to drop in and say hello thePenguin77. It's nice to see you're still around(and lurking at least ).
(P.S. This is what I work on now. Also, I tend to go by bcov77 on other platforms if you feel like googling.)