home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PASCAL / EVENT.ZIP / ACTIONS.INC < prev    next >
Encoding:
Text File  |  1986-08-24  |  1.4 KB  |  37 lines

  1.  
  2. {                              Actions.inc              Version 1.0  86/08/19
  3.  
  4.  Author: Mike Babulic    Compuserve ID: 72307,314   FIDO: 134/1
  5.          3827 Charleswood Dr. N.W.
  6.          Calgary, Alberta,
  7.          CANADA
  8.          T2L 2C7
  9.  
  10.  This does the same thing as the ACTIONS procedure in EVENT.ENG. It takes
  11.  11 clock cycles less to execute, but adds 7 bytes/call. If you are truly
  12.  concerned about execution time, the best approach is to save the ActionPtr
  13.  returned in a variable and use the variable rather than calling the
  14.  "ActionArrayInside" function.
  15.  
  16.  Usually used with the "Event Engine" in a function of the form:
  17.  
  18.      function ActionsArrayInside: ActionPtr;
  19.        begin
  20.          (*$I ACTIONS.inc*)
  21.          include( >3         (* 3 events *)
  22.                  /proc1      (* do this on event #1 *)
  23.                  /proc2      (* do this on event #2 *)
  24.                  /proc3      (* do this on event #3 *)
  25.          );
  26.        end;
  27.  
  28.  Causes the function to return a pointer to the ActionArray that follows
  29.  this $include;
  30. }
  31. inline(   $89/$EC               { MOV SP,BP   ; TURBO return sequence    }
  32.          /$5D                   { POP BP                                 }
  33.          /$8C/$CA               { MOV DX,CS   ; Pointer result to DX:AX  }
  34.          /$B8/>*+5              { MOV AX,*+4  ;   start of ActionArray   }
  35.          /$C2/>4                { RET 4       ; return                   }
  36.       );
  37.