// Copyright Xerox Corporation 1979

// EtherBootMain.bcpl

//	Last modified January 2, 1978  3:37 PM

external
[
EtherBoot; SetupReadParam; ReadParam
MoveBlock; EnableInterrupts; Ws
]

let EtherBootMain() be
[
SetupReadParam()
let bfn = ReadParam($B,"Boot file number: ")
let host = ReadParam($B, "Boot server host number: ", 0, 0, true)
if host eq -1 then host = 0
let saveMem = vec #1400
let MyMoveBlock = MoveBlock  // Local copy because EtherBoot clobbers statics
MoveBlock(saveMem, 0, #1400)
EtherBoot(bfn, true, host)
MyMoveBlock(0, saveMem, #427)
MyMoveBlock(#431, saveMem+#431, #570-#431)
MyMoveBlock(#600, saveMem+#600, #1400-#600)
EnableInterrupts()
Ws("EtherBoot failed.")
]