Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rochester!pt.cs.cmu.edu!b.gp.cs.cmu.edu!ralf From: ralf@b.gp.cs.cmu.edu (Ralf Brown) Newsgroups: comp.sys.ibm.pc Subject: Re: Parameter Ram Backup Needed Message-ID: <16@b.gp.cs.cmu.edu> Date: Sun, 15-Mar-87 14:49:34 EST Article-I.D.: b.16 Posted: Sun Mar 15 14:49:34 1987 Date-Received: Mon, 16-Mar-87 04:03:14 EST Distribution: comp Organization: Carnegie-Mellon University, CS/RI Lines: 66 I tried to mail this message, but lanl.arpa complained "user unknown" given the address . Others might also be interested in the two small programs contained herein. Date: Sun, 15 Mar 1987 14:21-EDT From: Ralf.Brown@b.gp.cs.cmu.edu To: ihnp4!riccb!hropus!spj@lanl.arpa Subject: Re: Parameter Ram Backup Needed Message-ID: <542834530/Ralf.Brown@b.gp.cs.cmu.edu> In-Reply-To: <910@hropus.UUCP> I too have an AT clone with 4 penlight batteries for the clock. Here are two small BASIC programs I hacked up a few months ago: the first reads the NV-RAM and displays its contents on the screen, and the second restores the contents from DATA statements in the program (which you would put in according to the values displayed by the first program). The first program displays three columns of three numbers on the screen. For each group of three numbers, the first is the address (in hex), the second and third are the value in hex and in decimal. ------------------------------ 10 FOR X = 0 TO 63 20 OUT &H70,X+128 30 Y=INP( &H71 ) 40 IF X < 16 THEN PRINT "0"; 50 PRINT HEX$(X);" "; 60 IF Y < 16 THEN PRINT "0"; 70 PRINT HEX$(Y);" "; 80 PRINT RIGHT$(" "+STR$(Y),3); 90 IF X MOD 3 = 2 THEN PRINT ELSE PRINT ,, 100 NEXT 110 END 1000 CLS 1010 FOR X = 1 TO 2500:LOCATE 1,1 1020 OUT &H70,128 1030 Y=INP( &H71 ) 1060 IF Y < 16 THEN PRINT "0"; 1070 PRINT HEX$(Y);" "; 1080 PRINT RIGHT$(" "+STR$(Y),3); 1090 NEXT ------------------------------------------ change the DATA statement in the following to contain the values displayed by the previous program for locations 0E to 32 (hex) inclusive. ------------------------------------------ 10 FOR X = 14 TO 50: READ Y: OUT &H70,X:OUT &H71,Y:NEXT 20 DATA 0,0,16,0,240,0,49,128,2,128,1,17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,69,128,1,25 +=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=+ | ARPA: RALF@B.GP.CS.CMU.EDU "Teaching COBOL ought to be | | AT&T: (412) 268-3053 (school) regarded as a criminal act" | | Snail: Ralf Brown --- Edsger Dijkstra | | Computer Science Department | | Carnegie-Mellon University DISCLAIMER? Who ever said I claimed | | Pittsburgh, PA 15213 anything? | +=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=+ -- +=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=+ | ARPA: RALF@B.GP.CS.CMU.EDU "Teaching COBOL ought to be | | AT&T: (412) 268-3053 (school) regarded as a criminal act" | | Snail: Ralf Brown --- Edsger Dijkstra | | Computer Science Department | | Carnegie-Mellon University DISCLAIMER? Who ever said I claimed | | Pittsburgh, PA 15213 anything? | +=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=+