1067
|
1 ********************************************************************
|
|
2 * PRESUB - Sub Battle Simulator (autoex module)
|
|
3 *
|
|
4 * $Id$
|
|
5 *
|
1357
|
6 * Edt/Rev YYYY/MM/DD Modified by
|
|
7 * Comment
|
1067
|
8 * ------------------------------------------------------------------
|
1357
|
9 * 0 2003/01/12 Boisy G. Pitre
|
|
10 * Disassembly of original distribution.
|
1067
|
11
|
|
12 nam sub
|
|
13 ttl startup program
|
|
14
|
|
15 * Disassembled 03/01/12 10:22:39 by Disasm v1.5 (C) 1988 by RML
|
|
16
|
|
17 ifp1
|
|
18 use defsfile
|
|
19 endc
|
|
20
|
|
21 tylg set Prgrm+Objct
|
|
22 atrv set ReEnt+rev
|
|
23 rev set $01
|
|
24 edition set 1
|
|
25
|
|
26 mod eom,name,tylg,atrv,start,size
|
|
27
|
|
28 u0000 rmb 2
|
|
29 u0002 rmb 8
|
|
30 u000A rmb 3
|
|
31 u000D rmb 19
|
|
32 u0020 rmb 83
|
|
33 u0073 rmb 311
|
|
34 size equ .
|
|
35
|
|
36 name fcs /sub/
|
|
37 * fcb edition
|
|
38
|
|
39 start lds #$0080
|
|
40 leax >CurOff,pcr
|
|
41 lbsr WriteTxt turn cursor off
|
|
42 ShowMenu leax >Menu,pcr
|
|
43 lbsr WriteTxt show menu
|
|
44 lbsr Read1Chr read char
|
|
45 cmpa #'1 is it 1?
|
|
46 beq DoCMP branch if so
|
|
47 cmpa #'2 is it 2?
|
|
48 beq DoMONO branch if so
|
|
49 cmpa #'3 is it 3?
|
|
50 beq DoRGB branch if so
|
|
51 leax >Bell,pcr else ring bell
|
|
52 lbsr WriteTxt
|
|
53 bra ShowMenu and start over
|
|
54 DoCMP ldx #$0000 composite
|
|
55 bra SetMntr
|
|
56 DoMONO ldx #$0002 monochrome
|
|
57 bra SetMntr
|
|
58 DoRGB ldx #$0001 RGB
|
|
59 SetMntr ldd #($01*256)+SS.Montr
|
|
60 os9 I$SetStt set monitor type
|
|
61 leax >SwapDisk,pcr point to disk swap message
|
|
62 lbsr WriteTxt write text
|
|
63 lbsr Read1Chr read char
|
|
64 leax >CurOn,pcr
|
|
65 lbsr WriteTxt turn on cursor
|
|
66 leax >NewDir,pcr
|
|
67 lda #EXEC.
|
|
68 os9 I$ChgDir change directory
|
|
69 bcc L006C branch if successful
|
|
70 L0069 os9 F$Exit else exit
|
|
71 L006C ldb #$0C screen clear character
|
|
72 stb >$0186 store in buffer
|
|
73 ldx #$0186 point X to buffer
|
|
74 ldy #$0001 one byte
|
|
75 lda #$01 to stdout
|
|
76 os9 I$Write write it!
|
|
77 ldd #$1100
|
|
78 leax >SubPrg,pcr
|
|
79 ldy #$0000
|
|
80 ldu #$0082
|
|
81 os9 F$Chain chain to new program
|
|
82 bcs L0069 branch if error
|
|
83 ldd #$0000 code should never get here if chain worked!
|
|
84 os9 F$Exit
|
|
85
|
|
86 Read1Chr pshs y,x,b save regs
|
|
87 clra standard input
|
|
88 ldx #$0186 point to input buffer
|
|
89 ldy #$0001 get 1 char
|
|
90 os9 I$Read do it!
|
|
91 lda >$0186 get char at buffer ptr
|
|
92 puls pc,y,x,b and return
|
|
93
|
|
94 * Write string routine
|
|
95 * Note: terribly ineffecient
|
|
96 WriteTxt pshs y,b,a save registers
|
|
97 NextByte ldb ,x+ get byte at X
|
|
98 beq WritExit branch if zero
|
|
99 stb >$0186 else save
|
|
100 pshs x,b,a save registers again
|
|
101 ldx #$0186 point to buffer
|
|
102 ldy #$0001 1 char
|
|
103 lda #$01 to stdout
|
|
104 os9 I$Write write it
|
|
105 puls x,b,a pull registers
|
|
106 bra NextByte go get next char
|
|
107 WritExit puls pc,y,b,a return
|
|
108
|
|
109 CurOff fcb $05,$20,$00
|
|
110 CurOn fcb $05,$21,$00
|
|
111 Menu fcb $0c,$02,$20,$22
|
|
112 fcc /WHAT TYPE OF DISPLAY DO YOU HAVE/
|
|
113 fcb C$LF,C$CR,C$LF,C$CR
|
|
114 fcc / (1). Television/
|
|
115 fcb C$LF,C$CR,C$LF,C$CR
|
|
116 fcc / (2). Monochrome Monitor/
|
|
117 fcb C$LF,C$CR,C$LF,C$CR
|
|
118 fcc / (3). R.G.B. Monitor./
|
|
119 fcb 0
|
|
120 SwapDisk fcb $0C,$02,$23,$25
|
|
121 fcc /Insert side /
|
|
122 fcb $1f,$24,$32,$1f,$25
|
|
123 fcc / of diskette/
|
|
124 fcb C$LF,C$LF,C$CR
|
|
125 fcc / and press any key to continue/
|
|
126 fcb C$LF,C$LF,C$CR,00
|
|
127 Bell fcb C$BELL,$00
|
1341
|
128 NewDir fcc !/dd/cmds!
|
1067
|
129 fcb C$CR
|
|
130 SubPrg fcc /sub/
|
|
131 fcb C$CR
|
|
132
|
|
133 emod
|
|
134 eom equ *
|
|
135 end
|
|
136
|