Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!spool.mu.edu!cs.umn.edu!talon.UCS.ORST.EDU!orstcs!!parkern From: parkern@ (Neil Parker) Newsgroups: comp.sys.apple2 Subject: Re: Applesoft memory help Message-ID: <1991May24.082033.27040@lynx.CS.ORST.EDU> Date: 24 May 91 08:20:33 GMT References: <26276@know.pws.bull.com> Sender: @lynx.CS.ORST.EDU Reply-To: parkern@jacobs.CS.ORST.EDU (Neil Parker) Organization: The Universal Society for the Prevention of Reality Lines: 46 Nntp-Posting-Host: jacobs.cs.orst.edu In article <26276@know.pws.bull.com> aq696@cleveland.Freenet.Edu (Charles Perlingiero) writes: > >I have a couple questions... > >First, the locations in ProDOS that contain the minute and the hour will >not change while a program is running, why? I wanted to have a clock >routine in my program, but these locations (49042=minute, 49043=hour) do not >update when the program is running. Also, does anyone know if there is >a second location? I'm sure ProDOS reads the clock continuously, but how >can I access it? ProDOS doesn't read the clock continuously. It reads the clock whenever it gets asked to do something for which a time might be necessary. You can force ProDOS to read the clock and update the time locations by calling the MLI routine GET_TIME from machine language: JSR $BF00 ;Call ProDOS MLI DFB $82 ;$82 = GET_TIME DW $0000 ;GET_TIME doesn't use a parameter list ... ;Your code continues here Thus, to read the clock from BASIC, first POKE the following machine language routine into memory (put it anywhere you have a few free bytes--it's relocatable): 32,0,191,130,0,0,96 Then, whenever you need to read the time, CALL the machine language routine, and PEEK the time out of the ProDOS global page. Of course, this won't work if you don't have a clock in your Apple. >Second, does anyone know if there is direct memory location that will send >a byte directly to slot 2 (modem)? And if there is one that will read the >buffer (like the keyboard scan)? Well...after you do a PRINT D$;"PR#2", everything you PRINT will go to the modem, and GET and INPUT will read from the modem (assuming your modem is in slot 2). - Neil Parker -- Neil Parker No cute ASCII art...no cute quote...no cute parkern@jacobs.cs.orst.edu disclaimer...no deposit, no return... parker@corona.uoregon.edu (This space intentionally left blank: )