2 / This program will send a RK05 image out the console port.
3 / The format of the data sent is 0xff (0377) or 0xfd if read error
4 / followed by 256 word of data for each sector.
5 / After the last sector a 0xfe (0376) is sent
6 / with a two byte checksum, low 8 bits first then upper 4.
7 / The words in a sector are sent as three bytes for each 2 words.
8 / 1 = low 8 bits first word
9 / 2 = upper 4 bits first and lower 4 bits second
10 / 3 = upper 8 bits second word
12 / The program (PC) receiving the data should be started before this program
14 / To run start at 0200.
15 / The SR should have the drive # is 9-11
16 / Should halt at label finish with number of recoverable errors in AC
17 / At normal exit hitting cont will restart the program
18 / The current location being read will be displayed in the AC
19 / while running. It is (cylinder * 16 + sector) / 2
21 / If a unrecoverable error occurs the program will halt with the error in
22 / the AC. Hit continue to dump more or comment out hlt, search for *****.
23 / The PC program will print out the bad location if an error occurs
32 INAD=030 / Address of serial input, 30 for console
40 OUTAD=040 / Address of serial output, 40 for console
49 ERRCNT, 7760 / Stop when err count = 0, init at startup
50 DRIVE, 0 / Drive # * 2
51 ERRCN2, 0 / Total # of errors
52 RETCNT, 200 / Max retries
58 CURBUF, 1000 / Address to read data into
59 LSTBUF, 1000 / Address to send data from
60 BUFORG, 1000 / First buffer address
88 CLA CLL OSR / Init variables changed during run
90 AND K6 / Clear out high bits such as 0200 start address
101 DUMP, JMS I READF / Start read operation
102 DMPLP, JMS CHKRD / Wait until done and check for errors
103 JMS INCTRK / Set read loc to next sector
105 JMP LAST / Last, send checksum
108 DCA LSTBUF / Save buffer data read into for dumping
109 TAD CURBUF / And setup to read into next buffer
114 JMS I READF / Start the read
115 JMS I SENDF / Send the last buffer
116 JMP DMPLP / And check read started etc
119 CLA CLL IAC / Recal drive, clear errors and set to cyl 0
141 LAST, CLA / Send FE and -checksum of all words
161 TAD ERRCN2 / Leave AC with # of errors
162 FINISH, HLT / Normal good halt
167 TAD FF / Set good read flag
169 CLA CLL / Display address reading in AC
181 TAD RETCNT / Reset error counter for next read
186 ERROR, ISZ ERRCN2 / Inc total # of errors
187 ISZ ERRCNT / To many errors?
189 DRST / Yes, leave error in AC and halt
190 / HLT / ********* Put in to halt on errors
193 TAD FD / Set bad read flag
195 TAD RETCNT / Reset error counter for next read
200 JMS RECAL / No, recal drive and try again
204 INCTRK, 0 / Increment track and exbit value for next sector
205 CLA CLL / AC non zero on return if done
227 CLA CLL IAC / Standard read from manual
236 TAD TRACK / Display address reading in AC
240 SEND, 0 / Send data, each sector starts with FF
241 CLA CLL / then 2 12 bit words in 3 bytes
251 TAD CHKSUM / Keep checksum of all words sent
257 RTL / Shift top 4 bits to low 4
283 / PLS / Punch for testing with emulator
284 TLS2 / Send out console
291 TSF2 /Wait until character sent