Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!tut.cis.ohio-state.edu!rutgers!mcnc!rti!sunpix!matthew From: matthew@sunpix.UUCP ( Sun Visualization Products) Newsgroups: comp.sys.apple Subject: Re: Need help with P8 GET_TIME, protecting hires screen Message-ID: <1028@friar-taac.UUCP> Date: 9 Dec 89 18:11:07 GMT References: <1989Dec5.184730.18783@iisat.uucp> Reply-To: matthew@friar-taac.UUCP (Matthew Stier - Sun Visualization Products) Organization: Sun Microsystems, RTP, NC Lines: 43 In article <1989Dec5.184730.18783@iisat.uucp> mackay@iisat.uucp (Daniel MacKay) writes: }Hello! } } [Article about getting ProDOS8 time from AppleSoft program. shortened.] } }So I need help with one of two things: either instructions on protecting }my hires screen from ProDOS (I tried setting all the bits in the memory }bitmap for the hires screen, $BF5C-F, but it didn't help- still got }walked on), or calling GET_TIME (P8 $82) somehow, which is really a more }correct solution. } }My _BASIC Programming With ProDOS_ book mentions this great vector to }the routine DATETIME, at $BF06, but when called from AppleSloth, (or }the monitor, for that matter) it doesn't do what I expect, namely }drop the time into the appropriate date & time bytes, $BF90-2. In }fact, it crashes in unusual and unpleasant ways. } }Any help with this hires problem, or time problem, would be appreciated. }Thanks in advance. -daniel }-- There is a jmp vector within the ProDOS global page for calling the clock driver, but it is for the kernels use only. The correct way to do it from AppleSoft, is to poke the following 6 byte machine language route into memory, and call it when needed. This is the MLI call needed to read the clock, and update the ProDOS global page. 0300: 20 00 BF JSR $BF00 0303: 82 DFB $82 0304: 00 00 DW $0000 0305: 60 RTS -- Matthew Lee Stier | Sun Microsystems --- RTP, NC 27709-3447 | "Wisconsin Escapee" uucp: sun!mstier or mcnc!rti!sunpix!matthew | phone: (919) 469-8300 fax: (919) 460-8355 |