Subversion Repositories NedoOS

Rev

Rev 73 | Rev 170 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download

  1. getkey
  2. ;TODO ўхЁхч OS_GETKEYMATRIX
  3. ;out: c=%???lrduf (0=эрцрЄю)
  4.         ld c,#ff
  5.         ld a,#ef
  6.         in a,(#fe) ;'0'..'6'
  7.         rra ;'0'
  8.         jr c,$+4
  9.         res 0,c ;f
  10.         rra
  11.         rra ;'8'
  12.         jr c,$+4
  13.         res 3,c ;r
  14.         rra ;'7'
  15.         jr c,$+4
  16.         res 1,c ;u
  17.         rra ;'6'
  18.         jr c,$+4
  19.         res 2,c ;d
  20.         ld a,#f7
  21.         in a,(#fe) ;'1'..'5'
  22.         bit 4,a ;'5'
  23.         jr nz,$+4
  24.         res 4,c ;l
  25.         ld a,#7f
  26.         in a,(#fe) ;
  27.         rra ;' '
  28.         ret c
  29.         res 0,c ;f
  30.         ret
  31.      
  32.