User Tools

Site Tools


keyscan-codes

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
keyscan-codes [2016/05/18 08:42] – created darkbytekeyscan-codes [2017/02/16 13:23] (current) darkbyte
Line 1: Line 1:
-==== return codes from keyscan $028e ====+====Return codes from keyscan $028e==== 
 + 
 +----
  
 <code z80> <code z80>
 keyscan call $028e keyscan call $028e
  ld a,e  ld a,e
- cp 'return code'+ cp "return code"
  jr z,key1  jr z,key1
- cp 'return code'+ cp "return code"
  jr z,key2  jr z,key2
  ....  ....
Line 20: Line 22:
 ;   A $26   S $1E   D $16   F $0E   G $06   H $01   J $09   K $11   L $19 ENT $21 ;   A $26   S $1E   D $16   F $0E   G $06   H $01   J $09   K $11   L $19 ENT $21
 ;  CS $27   Z $1F   X $17   C $0F   V $07   B $00   N $08   M $10  SS $18 SPC $20 ;  CS $27   Z $1F   X $17   C $0F   V $07   B $00   N $08   M $10  SS $18 SPC $20
 +;
 +;Other usage is INKEY$ with return code in ASCII
 +;input: none
 +;output: a = ASCII code of pressed key, or $00 if nothing was pressed or bad combination
 +
 +inkey call $028e
 + jr nz,iaa
 + call $031e
 + jr nc,iaa
 + dec d
 + ld e,a
 + call $0333
 + or a
 + db $06
 +iaa xor a
 + ret
 </code> </code>
  
-Navigation: [[general]] . [[math]] . [[graphic]] . [[sound]] . [[system]] . [[other]] . back to [[start]]+---- 
 + 
 +**Navigation: [[general]] . [[math]] . [[graphic]] . [[sound]] . [[system]] . [[other]] . back to [[start]]**
keyscan-codes.1463553757.txt.gz · Last modified: 2016/05/18 08:42 by darkbyte