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=30 / Address of serial input, 30 for console
40 OUTAD=40 / 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
166 / HLT / Normal good halt
167 / JMP START / And restart if requested
175 TAD FF / Set good read flag
177 CLA CLL / Display address reading in AC
189 TAD RETCNT / Reset error counter for next read
194 ERROR, ISZ ERRCN2 / Inc total # of errors
195 ISZ ERRCNT / To many errors?
197 DRST / Yes, leave error in AC and halt
198 / HLT / ********* Put in to halt on errors
201 TAD FD / Set bad read flag
203 TAD RETCNT / Reset error counter for next read
208 JMS RECAL / No, recal drive and try again
212 INCTRK, 0 / Increment track and exbit value for next sector
213 CLA CLL / AC non zero on return if done
235 CLA CLL IAC / Standard read from manual
244 TAD TRACK / Display address reading in AC
248 SEND, 0 / Send data, each sector starts with FF
249 CLA CLL / then 2 12 bit words in 3 bytes
259 TAD CHKSUM / Keep checksum of all words sent
265 RTL / Shift top 4 bits to low 4
291 / PLS / Punch for testing with emulator
292 TLS2 / Send out console
299 TSF2 /Wait until character sent
303 / OLD ROUTINE, COLD RK05 REBOOT