1523
|
1 ********************************************************************
|
|
2 * mpi - Determines if a Multi-Pak Interface is present
|
|
3 *
|
|
4 * $Id$
|
|
5 *
|
|
6 * Edt/Rev YYYY/MM/DD Modified by
|
|
7 * Comment
|
|
8 * ------------------------------------------------------------------
|
|
9 * 1 2004/03/16 Rodney Hamilton
|
|
10 * Created.
|
1552
|
11 *
|
|
12 * 1r1 2004/05/08 Boisy G. Pitre
|
|
13 * Fixed a problem where wrong message was being reported due to buggy
|
|
14 * code, placed there by me :(
|
1523
|
15
|
|
16 nam mpi
|
|
17 ttl Determines if a Multi-Pak is present
|
|
18
|
|
19 ifp1
|
|
20 use defsfile
|
|
21 endc
|
|
22
|
|
23 tylg set Prgrm+Objct
|
|
24 atrv set ReEnt+rev
|
1552
|
25 rev set $01
|
1523
|
26 edition set 1
|
|
27
|
|
28 mod eom,name,tylg,atrv,start,size
|
|
29
|
|
30 org 0
|
|
31 rmb 200
|
|
32 size equ .
|
|
33
|
|
34 name fcs /mpi/
|
|
35 fcb edition
|
|
36
|
|
37 no fcc "No "
|
|
38 mpi fcc "MPI found"
|
|
39 fcb C$CR
|
|
40
|
|
41 start equ *
|
1552
|
42 tfr cc,b save CC into B
|
|
43 ldx #$FF7F get MPI slot sel reg contents
|
|
44 lda #$CC load A with %11001100
|
|
45 orcc #IntMasks mask interrupts from this point on
|
|
46 eora ,x XOR with MPI slot sel reg contents
|
|
47 sta ,x and save...
|
|
48 cmpa ,x same?
|
|
49 beq is_mpi branch if so
|
|
50 leax <no,pc else point to "no"...
|
|
51 bra doit and DO IT!
|
|
52 is_mpi leax <mpi,pc or point to "yes"...
|
|
53 doit tfr b,cc restore original CC
|
1523
|
54 ldy #100
|
|
55 lda #$01
|
1552
|
56 os9 I$WritLn write the message at ,X
|
1523
|
57 bcs L001C
|
|
58 clrb
|
1552
|
59 L001C os9 F$Exit exit...
|
1523
|
60
|
|
61 emod
|
|
62 eom equ *
|
|
63 end
|