annotate 3rdparty/packages/subsim/presub.asm @ 1496:ae1f95eb053b

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