Everything was screwed up, RESULTS...!!!

ZXNet echo conference «real.speccy»

From Oleg Maxsimuk To All 21 November 2001

>-------------[ FINAL RELEASE]------------------------------------------

D0 - Left button
D1 - Right button
D2 - Middle button
D3 - Bottom button (reserved for the future extension)

D4 - 0 wheel rank
D5 - 1 wheel rank
D6 - 2 wheel rank
D7 - 3 digit wheels

>------------------------------------------------------------------------

_LISTING_

IN A,(PORT_KEY) ;New counter value
VAL LD B,0 ;Old counter value
LD (VAL+1),A ;Remember the new value
RRA ;Put it into a convenient form
RRA ;
RRA ;
RRA ;
AND 15 ;
SUB B ;We take the scale away from the new one
RET Z ;Nothing happened
JR C,WHILE_UP ;Value < 0, like the wheel was turned up
WHILE_DW CP 8 ;Checking for counter overflow
JR NC,WRONG_UP ;If the counter is overflowing, then go
WRONG_DW CALL Scroll the text down the number of lines in A
RET

WHILE_UP CPL ;Restore to normal form
INC A ;
CP 8 ;Check
JRNC,WRONG_DW
WRONG_UP CALL Scroll the text up by the number of lines in A
RET

>---------------------------------------------------------------------

_(C) 2001 Brest department of PHG standardization and meteorology._