home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 1B / DATAFILE_PDCD1B.iso / _pocketbk / pocketbook / 004 / aalarma_zi / AALARMA.TXT < prev    next >
Text File  |  1993-10-12  |  2KB  |  43 lines

  1. Some (brief) notes on new alarm services on the S3a
  2. ===================================================
  3.  
  4. See aalarma.opl for an (Opl) example.
  5.  
  6. The enclosed file hasrv.h gives the C interface.
  7. You may notice how the line
  8.     local t1&,t2&,snd$(8)  rem keep together
  9. in the Opl program matches the definition
  10.     typedef struct
  11.         {
  12.         ULONG absTime; /* Alarm time in seconds */
  13.         ULONG dueTime; /* Actual time alarm is due for */
  14.     SE_SND sound; /* The sound to play */
  15.     } AXDATA;
  16. in the header file.
  17.  
  18. Note: the zero_term field in the SE_SND struct is not used at the
  19. level of the interface to the alarm server ALM:.
  20.  
  21. To signal *other* WVE files to be used (other than those in the rom):
  22. ---------------------------------------------------------------------
  23. The files *must* be of the form \WVE\<name>.WVE on a local drive.
  24. Eg \WVE\SOUND.WVE.
  25. In this case, just put <name> into name[], and the length into the
  26. len field.
  27. In Opl, you might define, in this example,
  28.     sndname%(n)="SOUND"
  29. Note that the drive letter is omitted completely.
  30. The S3a alarm driver (more correctly, the S3a sound driver) hunts
  31. this down when the alarm goes off.
  32.  
  33. Brief comments on details of AALARMA.OPL
  34. ----------------------------------------
  35.  
  36. The +9 in the ioa line converts from S3 services to S3a services
  37. (because A_FUNTIMED_X is 9 more than A_FUNTIMED, etc).
  38.  
  39. The -1 in the call to bufcopy: takes account of the fact that the
  40. addr of a string gives the address of the leading byte count of the
  41. string, whereas Opl also sets aside a byte *before* this for the
  42. maximum length of the string.
  43.