482
|
1 ********************************************************************
|
|
2 * Inkey - Key detect subroutine
|
|
3 *
|
|
4 * $Id$
|
|
5 *
|
1326
|
6 * Edt/Rev YYYY/MM/DD Modified by
|
|
7 * Comment
|
482
|
8 * ------------------------------------------------------------------
|
1326
|
9 * ????/??/??
|
|
10 * From Tandy OS-9 Level One VR 02.00.00.
|
|
11 *
|
|
12 * 1 1998/10/26 Boisy G. Pitre
|
|
13 * Put a proper edition number after the name.
|
482
|
14
|
|
15 nam Inkey
|
|
16 ttl Key detect subroutine
|
|
17
|
|
18 * Disassembled 98/09/11 11:55:29 by Disasm v1.6 (C) 1988 by RML
|
|
19
|
|
20 ifp1
|
|
21 use defsfile
|
|
22 endc
|
|
23
|
|
24 tylg set Sbrtn+Objct
|
|
25 atrv set ReEnt+rev
|
1326
|
26 rev set $00
|
482
|
27 edition set 1
|
|
28
|
|
29 mod eom,name,tylg,atrv,start,size
|
|
30
|
|
31 u0000 rmb 0
|
|
32 size equ .
|
|
33
|
|
34 name fcs /Inkey/
|
|
35 fcb edition
|
|
36
|
|
37 start leax $04,s
|
|
38 ldd $02,s
|
|
39 cmpd #$0001
|
|
40 beq L0033
|
|
41 cmpd #$0002
|
|
42 bne L0057
|
|
43 ldd [<$04,s]
|
|
44 ldx $06,s
|
|
45 leax -$01,x
|
|
46 beq L0031
|
|
47 leax -$01,x
|
|
48 bne L0057
|
|
49 tfr b,a
|
|
50 L0031 leax $08,s
|
|
51 L0033 ldu $02,x
|
|
52 ldx ,x
|
|
53 ldb #$FF
|
|
54 stb ,x
|
|
55 cmpu #$0002
|
|
56 bcs L0043
|
|
57 stb $01,x
|
|
58 L0043 ldb #SS.Ready
|
|
59 os9 I$GetStt
|
|
60 bcs L0052
|
|
61 ldy #0001
|
|
62 os9 I$Read
|
|
63 rts
|
|
64 L0052 cmpb #E$NotRdy
|
|
65 bne L0059
|
|
66 rts
|
|
67 L0057 ldb #E$ParmEr
|
|
68 L0059 coma
|
|
69 rts
|
|
70
|
|
71 emod
|
|
72 eom equ *
|
|
73 end
|
|
74
|