home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 3 / PDCD_3.iso / pocketbk / developmen / oplexamp / GETCLOCK.OPL < prev    next >
Text File  |  1992-12-30  |  2KB  |  51 lines

  1. /*      procedure to return the type of clock set       
  2.  
  3.         Author  DP      2/11/92
  4.  
  5.         The procedure uses a call to GenGetCountryData
  6.         which returns a structure listed below.  The 27th byte
  7.         of the structure is the clock type, it returns
  8.         0 Analog
  9.         1 Digital
  10.  
  11.         Given the structure included below it is possible to change
  12.         the procedure to return any or all of the values.
  13.  
  14. CDataEnt struc
  15. CDataCountryCode        dw    ?
  16. CDataGmtOffset            dw    ?
  17. CDataDateType            db    ?
  18. CDataTimeType            db    ?
  19. CDataCurrencySymbolPosition    db    ?
  20. CDataCurrencySpaceRequired    db    ?
  21. CDataCurrencyDecimalPlaces    db    ?
  22. CDataCurrencyNegativeInBrackets    db    ?
  23. CDataCurrencyTriadsAllowed    db    ?
  24. CDataThousandsSeparator        db    ?
  25. CDataDecimalSeparator        db    ?
  26. CDataDateSeparator        db    ?
  27. CDataTimeSeparator        db    ?
  28. CDataCurrencySymbol        db    9 dup(?)
  29. CDataStartOfWeek        db    ?
  30. CDataSummerTime            db    ?
  31. CDataClockType            db    ?
  32. CDataDayAbbreviation        db    ?
  33. CDataMonthAbbreviation        db    ?
  34. CDataWorkDays            db    ?
  35. CDataUnits            db    ?
  36. CDataSpare            db    9 dup(?)
  37. CDataEnt ends
  38.                                                          */
  39. proc clock:
  40.  
  41.         LOCAL   buf$(40)        /*   40 byte buffer to return structure    */          
  42.         LOCAL   clock%          /*   return the value of the clock type    */
  43.         
  44.         call($058b,(addr(buf$)+1))      /*   Call GenGetCountryData        */
  45.  
  46.         pokeb addr(buf$),40             /*   poke the length of the buffer */
  47.         clock% = peekb(addr(buf$)+27)      
  48.         print clock%                    /*   return the clock type         */
  49.         get
  50. ENDP
  51.