Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 25 lines (14 sloc) 0.439 kb
93a863b2 »
2010-10-17 turn a 2K memory dump data file into two 1024 byte tracks for the dis…
1 import sys
2
3
4 if len(sys.argv) != 2:
5 print 'Usage: %s file.dat' % sys.argv[0]
6 print 'Splits a 2K file.dat file into two 1K track files track0.dat and track1.dat'
7 sys.exit()
8
9
10
72cf763c »
2010-10-18 doh! binary mode :(
11 infile = open(sys.argv[1], 'rb')
93a863b2 »
2010-10-17 turn a 2K memory dump data file into two 1024 byte tracks for the dis…
12
72cf763c »
2010-10-18 doh! binary mode :(
13 track0file = open("track0.dat", 'wb')
14 track1file = open("track1.dat", 'wb')
93a863b2 »
2010-10-17 turn a 2K memory dump data file into two 1024 byte tracks for the dis…
15
16 t0dat = infile.read(1024)
17 t1dat = infile.read(1024)
18
19
20 track0file.write(t0dat)
21 track0file.close()
22
23 track1file.write(t1dat)
24 track1file.close()
Something went wrong with that request. Please try again.