7 void dumpDMB (File fl
) {
8 auto sign
= fl
.readNum
!uint();
9 if (sign
!= 0x30424D44u
&& sign
!= 0x31424D44u
) throw new Exception("invalid signature");
10 bool v1
= (((sign
>>24)&0xff) == 0x31);
11 auto pc
= fl
.readNum
!ushort();
12 if (pc
) writefln("run from: #%04x (%s)", pc
, pc
);
14 auto clr
= fl
.readNum
!ushort();
15 if (clr
) writefln("CLEAR #%04x (%s)", clr
, clr
);
17 auto count
= fl
.readNum
!ushort();
19 auto size
= fl
.readNum
!ushort();
20 auto addr
= fl
.readNum
!ushort();
22 writefln("#%04x %s (%s)", addr
, size
, addr
);
24 addr
= fl
.readNum
!ushort();
25 auto page
= fl
.readNum
!ubyte();
26 writefln("%02s #%04x %s (%s)", page
, addr
, size
, addr
);
28 fl
.seek(size
, SEEK_CUR
);
33 void main (string
[] args
) {
34 foreach (auto fn
; args
[1..$]) {
35 writeln("=== ", fn
, " ===");