{**********************************}
{ Command summary I332             }
{**********************************}

CONST
{********************************************************************}
{ Command Table                                                      }
{ numerical order                                                    }
{ units for datawords specifiing                                     }
{ - distances or paths : my (1/1000mm)                               }
{ - speeds: mm/min                                                   }
{ - accelerations/decelerations: mm/secý                             }
{********************************************************************}

{ commands related to axes: $aa00..$aa7F   }
{ aa = No of axis may be added to highword }

{ axis registers for interpolation: }
      icSetDist   = $0000; {W2 - set distance for next interpolation movement}
      icSetPos    = $0001; {W2 - set present position counter}
      icSetCP     = $0002; {W2 - set distance to center point (coordinates
                                 of center point relativ to starting point)}

      icGetPos    = $0081; {R2 - get present position counter}

      icSetSFDist = $0010; {W2 - set distance for next special function}
      icSetSFVCmd = $0011; {W2 - set speed for next special function}
      icSetSFV    = icSetSFVCmd;

      icGetRest   = $0083; {R2 - rest of distance of actual movement }
      icGetPos0   = $0085; {R2 - get present position counter (incl. axis lag) }

{ special functions $aa50..$aa5F: W1}
      { general datawords - special datawords may be added }
      { direction: }
        sfPos     = $0000; { positive direction }
        sfNeg     = $0080; { negative direction }
      { speed, may be added to sfPos or sfNeg: }
        sfStd     = $0000; { standard speed for desired function, i.e. apVRef for icSFRef }
        sfVCmd    = $0001; { speed is SFVCmd }
        sfVMax    = $0003; { speed is apVMax }
        sfVSS     = $0004; { speed is min (apVStart,apVStop) }

        sfBreak = $FFFF; { dataword to break any special function }

        sfLSOff   = $0010; { Limit switch results only in axis stop; stLSB will not be set }
        sfPotiOff = $0020; { Poti is not active for this special function }

      icSFRef     = $0050; {W1 - special function: moving to ref position}
        { special datawords for icSFRef (may be added to sfXXX): }
        rm      = $0F00; {general mode for reference movement}
        rmRef   = $1000; {also search refpuls and move to apRefOffs
                          (with I332-DC only)}
        rmPos   = $2000; {also set position counter as defined in
                          register SFDist at ref position,
                          otherwise set as defined in apRefPos}
        rmSWLS  = $4000; {set SW-LS, if defined (apLSDeltaM <> apLSDeltaP)}

      icSFAsync   = $0051; {W1 - special function: moving axis asynchronously }
        { special datawords for icSFAsync (may be added to sfXXX): }
        asAbs    =  $8000; {absolute position}

      icSFHand    = $0052; {W1 - special function: moving axis with desired
                                 speed until break}

      { available from V2.2.30: }
      icSFJoystick  = $0056; { W1 - special function: use ADC as Joystick-Input
                                    for desired axis; datword.high = ADC input no}
      icJSKennlinie = $0016; { W1 - dataword.high: Stützpunkt
                                    dataword.low: value = -128..+127 = -100%..+100% }

      icSFHandRad = $0054; { W1 - Highbyte Datenwort: DG-Nr }
                           {      0..7:  DC-Karte           }
                           {      $A,$B: I332               }
                           {      $E,$F: PC - Quasi-DG      }

      { Drehgeber-Faktor: Umsetzung der Pulse in Achsbewegung  }
      icSetDG_my  = $0012;  { W2 - 1000stel mm pro...       }
      icSetDG_pls = $0013;  { W2 - ...Anzahl Drehgeberpulse }

{ general axis registers for special functions }
      icGetSFDist = $0090; {R2 - get present position relative to
                                 start of current special function}
      icGetSFVCur = $0091; {R2 - get speed of axis}
      icGetSFV    = icGetSFVCur;

{ PID registers, only used by PID algorithm }
      icGetPIDCmdPos = $00A0; {R2 - PID controler: command position }
      icGetPIDCurPos = $00A1; {R2 - PID controler: current position counter}
      icGetPIDFErr   = $00A2; {R2 - PID controler: following error }

{ axis parameter: }
      icSetAP     = $4000; {W2 - set parameter - base command}
      icGetAP     = $4080; {R2 - get parameter - base command}

      { following constants defining the parameter }
      { may be added to base command:              }
      {                    Description                Default}
        apVMax   = $0000; {maximum speed                 1000}
        apVStart = $0001; {start speed                    100}
        apVStop  = $0002; {stop speed                     100}
        apAcc    = $0003; {acceleration                   500}
        apDec    = $0004; {deceleration                   500}
        apMod    = $0005; {modulo in æm                     0}

        apStep   = $0006; {steps...                      1000}
        apmm     = $0007; {.....per mm                      1}

        apVRef   = $0008; {speed for reference movement   500}
        apVHys   = $0009; {speed to release limit switch  200}
        apVRefP  = $000A; {speed for searching Refpuls     20}

        apHys    = $000B; {hysteresis to limit switch    1000}
        apHysMax = $000C; {maximum distance to release limit switch 50000}

        apLS     = $000D;   {limit switch definitions,
                             bits set to 1 mean:            Default}
          lsPInB   =     0; {LS at ES+ input                      1}
          lsPInF   = 1 shl lsPInB;
          lsPPolB  =     1; {+LS active high                      0}
          lsPPolF  = 1 shl lsPPolB;
          lsPRefB  =     2; {+LS only active during ref movement! 0}
          lsPRefF  = 1 shl lsPRefB;
          lsPHDirB =     4; {+LS: releasing LS in neg. direction  1}
          lsPHDirF = 1 shl lsPHDirB;
          lsPRDirB =     5; {+LS: searching refpuls in neg. dir.  1}
          lsPRDirF = 1 shl lsPRDirB;

          lsMInB   =     8; {LS at ES- input                      1}
          lsMInF   = 1 shl lsMInB;
          lsMPolB  =     9; {-LS active high                      0}
          lsMPolF  = 1 shl lsMPolB;
          lsMRefB  =    10; {-LS only active during ref movement! 0}
          lsMRefF  = 1 shl lsMRefB;
          lsMHDirB =    12; {-LS: releasing LS in neg. direction  1}
          lsMHDirF = 1 shl lsMHDirB;
          lsMRDirB =    13; {-LS: searching refpuls in neg. dir.  1}
          lsMRDirF = 1 shl lsMRDirB;

          lsChgB   = 7;     { changing physical <-> logical LS relation   0}
          lsChgF   = 1 shl lsChgB;
          lsRefMB  = 15;    { Ref-mov in negative direction       0}
          lsRefMF  = 1 shl lsRefMB;

          { all flags for pos. or neg. direction: }
          lsDirF   = lsPInF+lsPPolF+lsPRefF+lsPHDirF+lsPRDirF
                   + lsMInF+lsMPolF+lsMRefF+lsMHDirF+lsMRDirF;

        {default summary = $0131 -->
         - both LS connected, polarity = active low (or open connection),
         - releasing LS and searching refpuls in opposite direction respectivly }

        apLSMax  = $000F; { max. LS braking distance,              0
                            0 --> normal deceleration ramp }

        apChar   = $0010; {axis characteristics,
                           bits set to 1 mean:            Default}
          acPathB = 0;    {axis defines path of movement    XYZ=1}
          acPathF = 1 shl acPathB;
          acSMB   = 8;    {machine: stepper motor               1}
          acSMF   = 1 shl acSMB;
          acDCB   = 9;    {machine: DC servomotor (PID-alg.)    0}
          acDCF   = 1 shl acDCB;
          acTypMsk = $00000003;
          acDrvMsk = $00000700;

        {default summary = $0101 for axes 0..2 (XYZ), $0100 axes 3..7:
         - axes XYZ define path of movement, speed related to this axes
         - all stepper motors}

        apSM     = $0011; {characteristics of SM axes,
                           bits set to 1 mean:         Default}
          smPlsPolB = 0;  {SM puls output active Low         1}
          smPlsPolF = 1 shl smPlsPolB;
          smDirPolB = 1;  {SM direction output active Low    0}
          smDirPolF = 1 shl smDirPolB;
        {default summary = $0001 for all axes:
         - puls output is active low
         - direction output is high for positiv direction}

        apDC     = $0012; {characteristics of DC axes,
                           I332-DC board required,
                           bits set to 1 mean:          Default}
          dcEnOutB  = 0;  {axis uses enable output            0}
          dcEnOutF  = 1 shl dcEnOutB;
          dcEnPolB  = 1;  {polarity of enable output          0}
          dcEnPolF  = 1 shl dcEnPolB;
          dcRdyInB  = 2;  {axis uses ready input              0}
          dcRdyInF  = 1 shl dcRdyInB;
          dcRdyPolB = 3;  {polarity of ready input            0}
          dcRdyPolF = 1 shl dcRdyPolB;
          dcRefInB  = 4;  {axis uses reference input          0}
          dcRefInF  = 1 shl dcRefInB;
          dcRefPolB = 5;  {polarity of reference input        0}
          dcRefPolF = 1 shl dcRefPolB;

          dcDGInvB  = 8;  { inverting evaluation of pos.counter  0}
          dcDGInvF  = 1 shl dcDGInvB;
          dcDACInvB = 9;  { inverting DAC output signal          0}
          dcDACInvF = 1 shl dcDACInvB;

        {default summary = $0000 for all axes}

        { parameters defining machine positions, will be set during
          reference movement; see also icSFRef }
        apLSDeltaM = $0014; { SW-LS: distance to left }
        apLSDeltaP = $0015; {        and right ref position }
        apRefOffs  = $0016; { offset: axis will be moved after searching
                              ref puls by that distance}
        apRefPos   = $0017; { position of ref puls / machine zero point
                              will be set after reference movement }

        {axis parameters for PID-algorithm (with I332-DC only):}
        apPFac   = $0018; {P-factor                  20}
        apIFac   = $0019; {I-factor                   0}
        apDFac   = $001A; {D-factor                   0}
        apVFac   = $001B; {V-factor                   0}

        apInPos  = $001C; {in position area          10}
        apFEMax  = $001D; {maximum following error 1600}
        ap0Off   = $001E; {zero offset for DAC        0}
        apAmpMax = $001F; {output limit to DAC    32000}

        apdFMax  = $0020; {similiarly as apFEMax controls differences in
                           command/current position this parameter will
                           control differences in subsequent current axis
                           speed values            1600}

{ axis overlay: }
      icAxisOvl = $6000; {W0 - output of an desired axis (A) will also be
                               outputted to another motor (M) --> both
                               motors will move synchronously.
                               Same values of apStep/apmm is desired for
                               both axes. No of axis (A) may be added to
                               low byte, No of axis (M) may be added to
                               high byte, i.e. $6102 means output of
                               axis No 1 will be the same as programmed for
                               No 2, but not vice versa!!!
                               Programming (A) = (M) releases the overlay,
                               i.e. $6101}

{ miscellaneous commands: }

      icIPL       = $8000;
      icIPLlin    = $8001; {W0 - linear interpolation}
      icIPLcw     = $8002; {W1 - circular interpolation clockwise}
      icIPLccw    = $8003; {W1 - circular interpolation counter clockwise
                                 dataword: highbyte/lowbyte = No of axis
                                 defining X/Y-coordinates,
                                 path will be the defined circular arc,
                                 overriding path bits in apChar}
        {adding one of the following constants means:}
        iplModePos  = $0080; {positioning, speed = apVMax}
        iplModePath = $0000; {interpolation, speed = VCmd}

      icIPLWait   = $8004;  {W0 - wait a number of msec, specified as in icSetWait }

      icSetID     = $8400; {W2 - Ident-No. of interpolation moves}
      icGetID     = $8480; {R2 - Ident-No. of interpolation moves}

      icSetStdM   = $8410; {W2 - setting standard M functions, this command
                                 requires definition of mpSP_Ports
                                 highword / lowword: specifiing M func. at
                                 beginning / at the end of movement
                                 $0000 : no function
                                 $0001 : M03 (spindle clockwise)
                                 $0002 : M04 (spindle counter clockwise
                                 $0003 : M05 (spindle stop)}
        m03Beg    = $00010000;
        m04Beg    = $00020000;
        m05Beg    = $00030000;
        m03End    = $00000001;
        m04End    = $00000002;
        m05End    = $00000003;

      icGetStdMCur = $C885; {R1 - getting currently active standard M
                                  functions; bits as defined above}

      icSetWait   = $8401; {W2 - waiting time (in msec)      }
      icGetWait   = $8481; {R2 - waiting time left (in msec) }

      icSetAccFac = $8406; {W1 - acceleration factor, $8000 = 100%}
      icSetDecFac = $8407; {W1 - deceleartion factor, $8000 = 100%}

      icSetVCmd   = $9000; {W2 - Command speed for interpolation related
                                 to axes with apPathB set;
                                 will be used until written again }
      icGetVCmd   = $9080; {R2 - get interpolation command speed }
      icGetVCur   = $9081; {R2 - get current interpolation speed }

      icSetSCmd   = $9010; {W2 - spindle speed (rpm), using this feature requires
                                 definition of mpSP_Data and mpSP_SMax;
                                 speed will be always set at the beginning of
                                 movement }
      icGetSCmd   = $9090; {R2 - defined spindle speed }
      icGetSCur   = $9091; {R2 - current spindle speed }

      icSetOvr    = $9800; {W0 - poti override, a value of 1..$FF
                                 = 0.39%..200% may be added to lowbyte.
                                 This will override the speed poti
                                 connected to ADC0. A value of 0 will
                                 activate the poti.}

      icGetOvr   = $9084; {R2 - Highword: actual overide, $8000 = 100% }
      
      { machine data: defining base configuration of the machine }
      { base commands, number of machine data register may be added: }
      icSetMP     = $B000; {W2 - set machine data register }
      icGetMP     = $B080; {R2 - get machine data register }

      { machine data registers }
        mpCode       = $0008;  { identification number, 0..255 reserved }
        mpRAMSize    = $0010;  { on board RAM size }
        mpAxis       = $001F;  { no of axis        }

        mpPotiInit  = $005B;   { highword: OvrInit, lowword: Poti max.}

        { spindle data: }
        mpSP_Data   = $0030; { $00 | $00 | spType | spPort }
                             {spType 0: no spindle
                                     1: -SMax..+SMax = $8000..$7FFF
                                   $80: +SMax..-SMax = $8000..$7FFF
                              spPort : 0..7 = DC_X..DC_C
                             }
        mpSP_MPorts = $0031; { spindle switches:
                               highword: right/left (cw/ccw - M03/M04)
                               lowword:  on/off (M03,M04 / M05)
                                 lowbyte:  portno
                                 highbyte: Bit3..1 = port output for M05..M03}
        mpSP_SMax   = $0033; { max. speed (rpm)}

        { Initialization of I332 related ports }
        { changing output values will only take effect, if the ports
          are not related to their specific axis function }

        { SM-Ports, puls/dir outputs are related to bits 0/1..14/15: }
        mpSMOutDef   = $003C;  { Reset output value    }
        mpSMOutPAR   = $0040;  { Reset port assignment }

        { Enable port I332-DC, enable outputs are related to bits 16..23: }
        mpEnOutDef   = $003D;  { Reset output value    }
        mpEnOutPAR   = $0041;  { Reset port assignment }

        { Initialization of I332-IO card (ports $60..$7F): }
        mpIOOutDef   = $003F;  { Reset output value    }
        mpIOOutPAR   = $0043;  { Reset port assignment }
                               { both registers:
                                 lowword OUT17..32, highword OUT1..16!}

        { PID-Algorithm: }
        mpFEFatal   = $0049;   { fatal following error, 32000
                                 results in setting statusregister stFEB }

        { configuring emergency stop input: }
        mpEmStop    = $006F;   { Bit 15 = 1: activating emergency stop input
                                 Lowbyte   : configuring emergency routine: }
          emActiveB = 15; emActiveF = 1 shl emActiveB;                       
          emStop    =   $00;   { only clear stSSB and stSFB             }
          emBreak   =   $01;   { additionally clear all enable outputs  }

      icStatus    = $C000; {status word (bitregister):}
                           {constants brMode... may be added (see bottom)}
        { these status bits only can be read: }
        stLSB  = 0;   { limit switch stop, a restart command is necessary,
                        active limit switches may be read by command $D001}
        stLSF  = 1 shl stLSB;
        stErrB = 1;   { error occured, reset by reading ErrNo (icGetErrNo)}
        stErrF = 1 shl stErrB;
        stOVB  = 2;   { overflow: movement buffer full}
        stOVF  = 1 shl stOVB;
        stMVB  = 3;   { at least 1 axis is moving}
        stMVF  = 1 shl stMVB;
        stFEB  = 4;   { following error stop, following err > mpFEFatal,
                        enable outputs to amplifier are set to 0
                        a restart command is necessary! }
        stFEF  = 1 shl stFEB;
        stBNEB = 5;   { Buffer not empty (icGetBlockCnt = 0) }
        stBNEF = 1 shl stBNEB;
        stFEMaxB = 6; { max. following error ( > apFEMax)}
        stFEMaxF = 1 shl stFEMaxB;

        { these status bits may be read and written: }
        stSFB  =  8;  { start/stopbit for special functions}
        stSFF  = 1 shl stSFB;
        stSSB  = 12;  { start/stopbit for interpolation}
        stSSF  = 1 shl stSSB;
        stSCB  = 13;  { single step/contingous movement:
                        stSSB will be cleared after every
                        interpolation movement}
        stSCF  = 1 shl stSCB;

      icGetBlockCnt = $B100; {R2 - Number of IPL-blocks downloaded to I332
                                   and not yet executed }

      icGetErrNo  = $C100; {R1 - reading errno, resetting Status[stErrB]}
        ieROMChkSum  = $0001; {error in program memory}
        ieRefHys     = $0011; {ref movement: RefSwitch remains closed }
        ieEmergency  = $0041; {emergency stop input was active}
        ieEmergency0 = $0040; {emergency stop, mode 0}
        ieEmergency1 = $0041; {emergency stop, mode 1}
        iePID        = $0020; {timeout PID controler}
        ieIPL        = $0021; {timeout interpolation}
                              {other values report internal errors,
                               please refer to handbook or
                               contact your distributor}

      icGetPIDInfo= $C800; {R2 - informations from PID algorithm,
                                 valid for servo axes only:
                                 4 Bytes - Bit7..0 = axis7..0, Bit = 1 means:
                                 MSB: axis enabled (enable output to amplifier)
                                 .  : axis in position (refer to apInPos)
                                 .  : following error > apFEMax
                                 LSB: amplifier is ready}

      icGetRefInfo= $C883; {R1 - Lowbyte: Bit = 1: axis was referenced }
      icGetSFInfo = $C900; {R1 - informations about special function as
                                 bitflags.
                                 desired function (icSF...) may be added to
                                 lowbyte of command.
                                 Bitflags for the axes 0..7 mean:
                                 MSB : desired special function is active
                                 LSB : either special function is active
                                 if no function is specified (i.e. command
                                 low byte = 0), LSB is valid;
                                 LSB = 0: MSB also = 0, undefined otherwise }

      icSFBreak   = $C9FF; {R1 - breaks all active special functions
                                 gets all active functions as bitflags
                                 (LSB only).}

      icSetPIDEn  = $CC00; {W0 - Bitflags for the axes 0..7 may be added
                                 to lowbyte of command enabling
                                 the desired servo axes}

      {limit switch of axes 0..7: bits 0..7  representing +LS,
                                  bits 8..15 representing -LS}
      icGetLS     = $D000; {R1 - reading limit switch inputs directly}
      icGetLSAkt  = $D001; {R1 - active limit switches}
      icLSOff     = $D0FF; {W0 - toggles value of all LS inputs,
                                 should only be used for testing purposes!!!}

      { Base commands accessing port bits, access modes: }
      icMPorts  = $D200; { access synchronously to movement (a)             }
      icPorts   = $D100; { direct port access (b), port assignment register }

      { general constants accessing ports: }
      { accessing axis related ports will only take effect if there is no
        axis connected! }
        { constants accessing portgroups }
        pgIO1      = $0060; { I332-IO card IN/OUT01..16}
        pgIO2      = $0070; { I332-IO card IN/OUT17..32}
        pgSM       = $0000; { I332 SM-outputs Bits0..15: puls0/dir0..puls7/dir7 }
        pgLS       = $0010; { I332 LSM/LSP inputs }
        pgRef      = $0020; { I332-DC, Bits0..7: Ref inputs}
        pgEn       = $0020; { I332-DC, Bits0..7: enable outputs}
        pgRdy      = $0030; { I332-DC, Bits0..7: ready inputs}

        pmPut      = $0000; { setting port bits accordingly to dataword  }
        pmClr      = $0001; { clearing port bits accordingly to dataword }
        pmSet      = $0002; { setting port bits accordingly to dataword  }
        pmChg      = $0003; { changing port bits accordingly to dataword }
                            { (access mode b only)                       }

      { access mode a): additionally may be defined the effect of        }
      { port access at the beginning or the end of the movement          }
      icSetMPorts  = $D200; {W1 }
        psBeg      = $0000; { port access takes effect at the beginning  }
        psEnd      = $0008; { port access takes effect at the end        }

      { access mode b), defining port assignment registers (PAR), e.a.   }
      icSetPorts   = $D100; {W1 }
      icGetPorts   = $D180; {R1 }
        prOutBuf   = $0004; { accessing output buffer            }
        prOutPAR   = $0008; { accessing port assignment register }
        prPort     = $000C; { direct port access                 }

      icGetOutBuf  = icGetPorts+prOutBuf; {R1 - actual output      }
      icGetInPortC = icGetPorts+prPort;   {R1 - actual input       }
      icGetInPort  = icGetPorts+prPort;
      icSetOutBuf  = icSetPorts+prOutBuf; {W1 - writing output port via buffer  }
                                          { "OutBuf"; only takes effect if      }
                                          { corresponding bit of PAR = 1        }
      icSetOutPort = icSetPorts+prPort;   {W1 - writing output port directly    }
                                          { but will be overwritten immediately }
                                          { with OutBuf by I332...              }
      icSetMOutBuf = $D204;
      icGetMOutBuf = $D284;

      icSetOutPAR  = icSetPorts+prOutPAR; {W1 - writing PAR        }
      icGetOutPAR  = icGetPorts+prOutPAR; {W1 - reading PAR        }
                                          { Bit = 0/1: defining    }
                                          { accessmode a) / b)     }
      { other IO-Devices: }
      icGetDG    = $D880; { R1 - Reading counter-reg. on I332-DC card,  }
                          {      counter No may be added to low byte(!) }

      icSetDAC   = $D840; { W1 - Writing DAC on I332-DC card,           }
                          {      DAC No may be added to low byte(!)     }
      icGetDAC   = $D8C0; { R1 - Reading DAC on I332 card               }
                          {      DAC No may be added to low byte(!)     }

      icGetADC   = $D890; { R1 - Reading ADC on I332 card (10bit)       }
                          {      ADC No may be added to low byte(!)     }
                          {      ADC0 is reserved (poti-reg.)           }

      icGetVerNo  = $F000; {R2 - version/revision-no, BCD-coded vv.vv.rrrr}
      icGetVerDat = $F001; {R2 - date BCD-coded ddmmyyyy}

      icGetVerStr = $F100; {R1 - version message: ASCII-string,
                                 string index may be added to lowbyte;
                                 result of read1-operation are 2 ASCII chars
                                 in high/low order.
                                 to read the whole string increment lowbyte,
                                 until result.lowbyte = 0 (note: result.highbyte
                                 may contain the last valid char!}

      icAPEnd     = $FE00; {W0 - ends definition of axis parameters}

      icRestart0  = $FF00; {W0 - (nearly) complet reinitialising of
                                 I332 software}

      icRestart1  = $FF01; {W0 - resetting PID-algorithm, clearing movement
                                 buffer and position registers and all
                                 internal memory locations, except of the
                                 axis parameters, resets all outputs to
                                 their defaults as in apXXDef }
      icRestart2  = $FF02; {W0 - as icRestart1, present position counters
                                 stay unchanged}
      icRestart3  = $FF03; {W0 - as icRestart2, no initialisation of
                                 PID-algorithm}
      icRestart5  = $FF05; {W0 - as icRestart3, but clearing following errors}

      { the following reset commands will not reset any output }
      icRestart11 = $FF11; {W0 - as icRestart1  }
      icRestart12 = $FF12; {W0 - as icRestart5! }
      icRestart13 = $FF13; {W0 - as icRestart3  }

      icRestart14 = $FF14; {W0 - break interpolation and all special function    }
      icRestart15 = $FF15; {W0 - as icRestart14, also clear all follwoing errors }

      icClrFE     = $FF0A; {W0 - only clears all following erros }

      icInitMP    = $FF08; {W0 - ends definitions of machine data and
                                 axis parameters, internal reset similiar
                                 icRestart0 }

      icResetMP   = $FF0B; {W0 - resets all machine data to its defaults,
                                 but no internal initialisation is done,
                                 so an additionally icInitMP is required,
                                 even if no further command icSetMP or
                                 icSetAP is invoked }

{------------------------------------------------------------------------------}
{ constants specifiing bitregister commands (i.e. icStatus),
  defining this command as W0/W1/W2/R1/R2;
  this constants may be added to the command: }
      brModePutL = $0000;   {W1 - writing lowword of register}
      brModePutH = $0010;   {W1 - writing highword of register}
      brModePut  = $0001;   {W2 - writing high and lowword of register}
      brModeGetL = $0080;   {R1 - reading lowword of register}
      brModeGetH = $0090;   {R1 - reading highword of register}
      brModeGet  = $0081;   {R2 - reading high and lowword of register}

                            {clearing all bits in bitregister
                             cleared in dataword}
      brModeClrL = $0020;   {W1 - clearing bits in lowword}
      brModeClrH = $0030;   {W1 - clearing bits in highword}
      brModeClr  = $0021;   {W2 - clearing bits in high and lowword}

                            {setting all bits in bitregister
                             set to 1 in dataword}
      brModeSetL = $0040;   {W1 - setting bits in lowword}
      brModeSetH = $0050;   {W1 - setting bits in highword}
      brModeSet  = $0041;   {W2 - setting bits in high- and lowword}

                            {toggle all bits of bitregister
                             set to 1 in dataword}
      brModeChgL = $0060;   {W1 - toggle bits in Lowword}
      brModeChgH = $0070;   {W1 - toggle bits in highword}
      brModeChg  = $0061;   {W2 - toggle bits in high und lowword}

                            {changing single bits
                             Bitno may be added, specifiing bit 0..15 will
                             return lowword, specifiing bit 16..31 will
                             return highword of register}
      brModeClrB = $00A0;   {R1 - clearing single bit}
      brModeSetB = $00C0;   {R1 - setting single bit}
      brModeChgB = $00E0;   {R1 - toggle single bit}
{------------------------------------------------------------------------------}


