-- WaferProbeControl.mesa
-- created by Haeberli:  7-Dec-81  4:00:29

DIRECTORY
  JaMFnsDefs,
  Storage,
  WaferProber;

WaferProbeControl: PROGRAM
  IMPORTS
    JaMFnsDefs, Storage, WaferProber
  =
  {
  OPEN JaMFnsDefs;

-- JaM Procedures
  h: WaferProber.Handle ← NIL;

  Open: PROCEDURE = {
    name: STRING = [256];
    PopString[name];
    h ← WaferProber.Open[name];
    };


  Close: PROCEDURE = {
    WaferProber.Close[@h];
    };


  Align: PROCEDURE = {
    WaferProber.Align[h];
    };


  GetDeviceCoordinate: PROCEDURE = {
    x: STRING ← NIL;
    y: STRING ← NIL;
    [x, y] ← WaferProber.GetDeviceCoordinate[h];
    PushString[x]; Storage.FreeString[x];
    PushString[y]; Storage.FreeString[y];
    };


  GoHide: PROCEDURE = {
    WaferProber.GoHide[h];
    };


  GoHome: PROCEDURE = {
    WaferProber.GoHome[h];
    };


  InitializeZ: PROCEDURE = {
    WaferProber.InitializeZ[h];
    };


  Load: PROCEDURE = {
    WaferProber.Load[h];
    };


  Seek: PROCEDURE = {
    x: STRING = [128];
    y: STRING = [128];
    PopString[y];
    PopString[x];
    WaferProber.Seek[h, x, y];
    };


  SetDeviceCoordinate: PROCEDURE = {
    x: STRING = [128];
    y: STRING = [128];
    PopString[y];
    PopString[x];
    WaferProber.SetDeviceCoordinate[h, x, y];
    };


  SetDieSize: PROCEDURE = {
    x: STRING = [128];
    y: STRING = [128];
    PopString[y];
    PopString[x];
    WaferProber.SetDieSize[h, x, y];
    };


  ToggleZ: PROCEDURE = {
    WaferProber.ToggleZ[h];
    };


  {
  Register["open", Open];
  Register["close", Close];

  Register["align", Align];
  Register["getdevicecoordinate", GetDeviceCoordinate];
  Register["gohide", GoHide];
  Register["gohome", GoHome];
  Register["initializez", InitializeZ];
  Register["load", Load];
  Register["seek", Seek];
  Register["setdevicecoordinate", SetDeviceCoordinate];
  Register["setdiesize", SetDieSize];
  Register["togglez", ToggleZ];
  };

  }.