! Bad block adder, GDMR, 14/02/86
! Uses new administrative operation, code 8, param <block no.>
include "INC:FS.IMP"
string (15)fn hdx8(integer i)
! eight hexit version
string (15) s
integer j, k, n
s = ""
for n = 1, 1, 8 cycle
j = i // 16
k = i - 16 * j
s = tostring(k + '0') . s
i = j
repeat
result = s
end
begin
string (15) parameters
integer block, x
on 3, 9 start
if event_event = 3 start
printstring("Error: "); printstring(event_message)
newline
finish
stop
finish
prompt("Block: ")
cycle
read(block)
stop if block <= 0
parameters = "8," . hdx8(block)
! printstring("Sending "); printstring(parameters); newline
x = fcomm(']' << 8, parameters)
repeat
end of program