[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: WANTED: ][gs clock info.



dalloff@freenet.columbus.oh.us (Dave Althoff) writes:

>Okay, I know there is data  on this in an Apple tech manual, I'm sure, but
>unfortunately, I don't have it.

>Does anyone know how to get the date and time out of the IIgs on-board
>clock/calander?

>Please note the following conditions--
>o BASIC.SYSTEM is not present
>o PRODOS is not present

>I figure I ought to be able to get that info. from a memory location
>(PEEK) or at worst a ROM routine call.  Although I'm coding in Applesoft,
>I'm not opposed to writing a 6502-code driver (sorry, my assembler doesn't
>do 65C816 or even 65C02!).

Here's what you do. You will have to have 65816 code no matter how you do
it.

	clc
	xce
	rep	#$30
	pha
	pha
	pha
	pha
	ldx	#$0d03
	jsl	$e10000
	sec
	xce
	pla
; A=seconds
	pla
; A=minutes
	pla
; A=hour
	pla
; A=Year-1900
	pla
; A=day (0-30)
	pla
; A=month (0-11)
	pla
	pla
; A=weekday (1-7, 1=Sunday)

-Phil