[net.micro.apple] system date under Pascal 1.2?

andrew@grkermi.UUCP (Andrew W. Rogers) (12/06/85)

Does anyone know how to retrieve the system date under Apple Pascal 1.2
(128K, Apple ][e and/or //c)?

I already know how to access memory locations via variant records, so
all I really need to know is a) where it is, and b) its format.

Thanks,

AWR

faubel@apollo.uucp (Ken Faubel) (12/12/85)

>Does anyone know how to retrieve the system date under Apple Pascal 1.2
>(128K, Apple ][e and/or //c)?

>I already know how to access memory locations via variant records, so
>all I really need to know is a) where it is, and b) its format.

I could not get through directly do I will post this. 

This stuff came from Call A.P.P.L.E. in their About Pascal book.  Since the
Pascal 1.2 locations were different I wrote a short program that used variant
records to scan memory for the date that I had set via the filer.  This is
the result and it has worked without a problem.  
  Pascal 1.3 is now available and once I get my update package I hope that it 
will be built in.  The new pascal 1.3 is supposed to have a 900+ page manual!

Good luck,
Ken Faubel

------------------------
CONST
  dateloc = -18342;

TYPE
  daterec = PACKED RECORD
              mm : 0..12;
              dd : 0..31;
              yy : 0..99;
            END;

  memdaterec = RECORD CASE INTEGER OF
                 1:(date:^daterec);
                 2:(loc : INTEGER);
               END;

VAR

  memdate : memdaterec;
  date    : daterec;

BEGIN
  memdate.loc := dateloc;
  memdate.date^ := date
END