[comp.sys.apple] Help! reading ProDos date

sja@swbatl.UUCP (9080) (03/14/89)

REPOST:  'wrong' .sig included ... sorry!

I'm trying to help a friend read system date/time of an A.E. 
TimeMaster card and Manx (Aztec) C compiler.  They don't have any 
ProDos manuals, Apple programming experience, etc., neither do I.  

Does anyone know where the date/time info is kept (system time) in 
memory with ProDos?  In other words, _where_ to read the clock?  The
date command with the Manx 'shell' returns everything but the seconds.
Is that all ProDos returns?  

Any/all help appreciated.

-- 
Bruce Davis - SWBT - Advanced Technology Laboratory ------------------------
1010 Pine St. - Room 502 - St. Louis. MO. 63101.    |    May the source    |
UUCP: { pyramid, uunet, bellcore }...!swbatl!bdd    |    be with you...    |
PHON: 314-235-0709 FAX: 314-235-5797		    |______________________|

Geva_Apple-Maniac_Patz@cup.portal.com (03/24/89)

ProDOS stores its date in a slightly odd format. You can either use a MLI
call to get it, or try your luck with reading the actual memory locations.
The MLI call is GET_TIME, $82, and has no parameter list. The  time is
stored with the hours in $BF93 (49043), and the minutes in $BF92 (49042).
Where things get just a little  stickier is in the system date, which is
Sostored over two consecutive memory locations,  $BF91 and $BF90 (49041 and
49040, respectively). It's stored as a 16-bit word in low-byte, high-byte
form, with the least significant 5 bits representing the day, the next
four bits representing the month, and the most significant seven bits
representing the  year, like this:

    $BF91           $BF90
 5 4 3 2 1 0
YYYYYYYYYYYYYYMMMMMMMMDDDDDDDDD

Hope this helps,

%%%%
 Geva
  %%%%