!************ !* rl06s * !*24.jun.82* !************ !* reporting to dir task added !* unit 4 added %control 1 %begin %recordformat pf((%byteinteger service, reply %or %c %integer d), %integer a1, a2, a3) %recordformat rlf(%integer cs, ba, da, mp) %constrecord (rlf) %name rl == k'114400' %constintegername ps == k'117776' %constinteger rltop = 10239 %owninteger rl bot = k'77' %constinteger unit1 = k'020000' %constinteger rl int = -3; ! ???? %constintegerarray look up(0:1) = k'114', k'112' !! read (0) and write (1) commands for the rk05 %constinteger seek = 6 %record (pf)p, px %integer par, id, block, comm, bl, i, drive, retry %integer dar, comm2, mid, fault, reply %integer act, sector, track, diff, surface, des %owninteger last track = -1 %integerfn get status(%integer type) !! gets status from rl01 if type=1 !! type = k'13' does a reset drive rl_da = type rl_cs = 4!drive; ! get status %while rl_cs&k'200' = 0 %cycle; %repeat %result = rl_mp %end mid = getid linkin(3); ! main disc service linkin(28); ! unit 4 ser (mapped to unit 1) linkin(rl int); ! int service maphwr(4) p_service = 4; p_reply = 3; ! for unit 1 p_a1 = 10; ! top byte = drive = 0 p_a2 = 256; ! first user block p_a3 = 9199; ! last user block pon(p) ! 2nd part of reporting in p_a1 = 11; ! report in #2 p_a2 = 144; ! directory block p_a3 = 64; ! block list start pon(p) ! now for unit 4 (check for disc on-line ????) p_reply = 28; ! dirt does a consistency check on this p_a1 = 10!4<<8; ! unit = 4 p_a2 = 256 p_a3 = 9199 pon(p) p_a1 = 11!4<<8 p_a2 = 144 p_a3 = 64 pon(p) i = get status(k'13') %if rl_cs < 0 %start %finish %cycle p_service = 0 poff(p) fault = 0 id = p_reply; reply = p_service %if p_a2 = 0 %start rl bot = 0; fault = 9 %else drive = 0; ! normally drive 0 %if reply = 28 %then drive = k'400'; ! unit 4 -> drive 1 par = map abs(p_a2, 512, id) %if par = 0 %then fault = 1 %elsestart par = par+(p_a2&k'17777') >> 6 !! add in block disp comm2 = look up(p_a1&1) %if par >= k'2000' %start ! need to set 17&18th bits comm2 = comm2!(par&k'6000') >> 6 par = par&k'1777' %finish dar = 0 block = p_a3 %if block < rlbot %or block > rltop %then fault = 4 %c %elsestart comm =- (p_a1 >> 1) %if comm = 0 %then comm =- 256 sector = block track = 0 i = sector//20 track = i<<6 sector = sector-(i*20) track = track!(sector << 1) retry = 10 %if track&k'1777700' = last track %then ->no seek agn: %while rl_cs&k'200' = 0 %cycle; %repeat rl_cs = k'10'!drive; ! read headers %while rl_cs&k'200' = 0 %cycle; %repeat %if rl_cs < 0 %start %if get status(k'13') < 0 %then -> fltr -> agn %finish act = rl_mp&k'177700' %if act = track&k'177700' %then -> no seek act = act&k'177600' ! discard surface§or des = track&k'177600' surface = (track&k'100') >> 2 diff = act-des %if diff < 0 %start diff = (-diff)!4; ! move to higher cylinder addresses %finish diff = (diff+1)!surface rl_da = diff rl_cs = seek!drive %while rl_cs&k'200' = 0 %cycle; %repeat %if rl_cs < 0 %then ->fltr no seek: rl_mp = comm; ! set word count rl_da = track; ! set required disc address rl_ba = par << 6+p_a2&k'77' rl_cs = comm2!drive px_d = (rl int)&x'00ff' ! wait for disc interrupt poff(px) last track = track&k'1777700' %if rl_cs < 0 %start fltr: retry = retry-1 last track = -1 %if retry > 0 %start i = get status(k'13') -> agn %finish px_service = 7; px_reply = mid px_a1 = rl_cs; px_a3 = get status(1) ponoff(px) ! issue reset i = get status(k'13') fault = 5 %and -> flt %if px_a1 # 0 -> agn %finish %finish %finish flt: par = map abs(p_a2, 0, id); ! release seg %finish p_a1 = fault p_service = id; p_reply = reply pon(p) %repeat %endofprogram