0
|
1 ********************************************************************
|
|
2 * DMem - Dump memory from system
|
|
3 *
|
|
4 * $Id$
|
|
5 *
|
1255
|
6 * Edt/Rev YYYY/MM/DD Modified by
|
|
7 * Comment
|
0
|
8 * ------------------------------------------------------------------
|
1255
|
9 * 2 ????/??/?? Kevin Darling
|
|
10 * Started.
|
0
|
11
|
|
12 nam DMem
|
|
13 ttl Dump memory from system
|
|
14
|
|
15 * Disassembled 98/09/14 19:24:59 by Disasm v1.6 (C) 1988 by RML
|
|
16
|
|
17 ifp1
|
|
18 use defsfile
|
|
19 endc
|
|
20
|
|
21 tylg set Prgrm+Objct
|
|
22 atrv set ReEnt+rev
|
1255
|
23 rev set $00
|
0
|
24 edition set 2
|
|
25
|
|
26 mod eom,name,tylg,atrv,start,size
|
|
27
|
|
28 u0000 rmb 1
|
|
29 u0001 rmb 1
|
|
30 u0002 rmb 1
|
|
31 u0003 rmb 2
|
|
32 u0005 rmb 3
|
|
33 u0008 rmb 64
|
|
34 u0048 rmb 1
|
|
35 u0049 rmb 447
|
|
36 u0208 rmb 4296
|
|
37 size equ .
|
|
38
|
|
39 name fcs /DMem/
|
|
40 fcb edition
|
|
41
|
|
42 L0012 clr <u0000
|
|
43 clr <u0001
|
|
44 L0016 lda ,x+
|
|
45 cmpa #C$SPAC
|
|
46 beq L0046
|
|
47 cmpa #C$CR
|
|
48 beq L0046
|
|
49 suba #$30
|
|
50 cmpa #$0A
|
|
51 bcs L002A
|
|
52 anda #$07
|
|
53 adda #$09
|
|
54 L002A lsla
|
|
55 lsla
|
|
56 lsla
|
|
57 lsla
|
|
58 sta <u0002
|
|
59 ldd <u0000
|
|
60 rol <u0002
|
|
61 rolb
|
|
62 rola
|
|
63 rol <u0002
|
|
64 rolb
|
|
65 rola
|
|
66 rol <u0002
|
|
67 rolb
|
|
68 rola
|
|
69 rol <u0002
|
|
70 rolb
|
|
71 rola
|
|
72 std <u0000
|
|
73 bra L0016
|
|
74 L0046 leax -1,x
|
|
75 ldd <u0000
|
|
76 rts
|
|
77
|
|
78 start lbsr L0128
|
|
79 lbeq L0119
|
|
80 cmpa #'-
|
|
81 bne L006D
|
|
82 leax 1,x
|
|
83 bsr L0012
|
|
84 tfr b,a
|
|
85 pshs x
|
|
86 leax >u0008,u
|
|
87 os9 F$GPrDsc
|
|
88 lbcs L00BC
|
|
89 puls x
|
|
90 bra L0073
|
|
91 L006D bsr L0012
|
|
92 clr <u0048
|
|
93 stb <u0049
|
|
94 L0073 lbsr L0128
|
|
95 lbeq L0119
|
|
96 lbsr L0012
|
|
97 std <u0003
|
|
98 lbsr L0128
|
|
99 beq L0092
|
|
100 lbsr L0012
|
|
101 cmpd #$1000
|
|
102 bls L0095
|
|
103 ldd #$1000
|
|
104 bra L0095
|
|
105 L0092 ldd #$0100
|
|
106 L0095 std <u0005
|
|
107 leax >u0048,u
|
|
108 tfr x,d
|
|
109 ldy <u0005
|
|
110 ldx <u0003
|
|
111 pshs u
|
|
112 leau >u0208,u
|
|
113 os9 F$CpyMem
|
|
114 puls u
|
|
115 bcs L00BC
|
|
116 ldy <u0005
|
|
117 leax >u0208,u
|
|
118 lda #$01
|
|
119 os9 I$Write
|
|
120 L00BB clrb
|
|
121 L00BC os9 F$Exit
|
|
122
|
|
123 HelpTxt fcc "Use: DMem <block> <offset> [<length>] ! dump"
|
|
124 fcb C$LF
|
|
125 fcc " or: DMem -<id> <offset> [<length>] ! dump"
|
|
126 fcb C$CR
|
|
127 HelpTxtL equ *-HelpTxt
|
|
128
|
|
129 L0119 leax >HelpTxt,pcr
|
|
130 L011D ldy #HelpTxtL
|
|
131 lda #$02
|
|
132 os9 I$WritLn
|
|
133 bra L00BB
|
|
134 L0128 lda ,x+
|
|
135 cmpa #C$SPAC
|
|
136 beq L0128
|
|
137 leax -1,x
|
|
138 cmpa #C$CR
|
|
139 rts
|
|
140
|
|
141 emod
|
|
142 eom equ *
|
|
143 end
|