Msg: 6374 *Conference*
03-25-96 18:00:58
From: RON WIESEN
To : ANTHONY FEST
Subj: REPLY TO MSG #6371 (RAMPAC WOES)
ERR 6 is an Overflow error from BASIC. A typical example is where a very large number is divided by a very small number such that the result is so large that it can't be accurately expressed. ERL 22 is the line number which produced the error. So somewhere within line 22 an Overflow condition occurs. Just to be sure line 22 is intact, it should read as follows: 22 IFG(N,1)<128THEN36ELSEGOSUB126:SN=(SA+1034)\1024:PRINT@N," " Offhand without analysing the overall program, I'de say the expression (SA+1034)\1024 produces the overflow. The variable SA is set in line 126 and it appears to be a 16-bit address value that is read from the Rampac. Just to be sure line 126 is intact, it should read as follows: 126 OUT129,N:A="":FORK=1TO6:GOSUB128:NEXT:A=A+".":GOSUB128:GOSUB128:SA=INP(131)+256* INP(131):RETURN So I recommend you run N-DKTR.BA again and when you get the error, then type the following and note the result: CLS:?N;SA This interrogates the value of N and of SA. Write them down on paper. Then to see if the SA value is the offender which produces the Overflow error, you can type the following: CLS:?(SA+1034)\1024 Note the backslash character (\) is typed with the key combination of GRPH and minus keys. At any rate, backslash is the numeric operator for integer division. So the sum of SA and 1034 must fall within the range of values for an integer. That range is from -32768 to +32767. Given this range and the bias of +1034, it means that the value of SA must be between -33802 and +31733. If you find through interrogation of SA that its value is outside of this range, then it seems the subroutine at line 126 is receiving implausible low order and high order 8-bit portions of the 16-bit address. These are obtained from port #131 which is within the Rampac. After presetting a Rampac sector number via port #129 in the Rampac, a subroutine at line 128 is referenced 8 times by line 126 (6 for file name characters, 2 for file name extension characters) and then line 126 reads port #131 2 times to get the low order and high order portions of a 16-bit address. Or maybe it's a 16-bit file length. The exact format at the front of a 1024-byte Rampac sector escapes my memory right now but it's described completely in the Rampac documentation. My guess is that for one particular file in your Rampac (value of N tells which file), the high order portion is larger than 123 so Overflow occurs. This means you will have to manually patch the sector or just manually mark the sector as free by patching the "directory" sector (i.e., sector #0). Conversly, maybe the directory should have this sector marked as free but it doesn't and what's in the sector is then taken as format when in fact it's just left-over junk. Still the solution is to mark the sector free in the "directory" sector. Patching the "directory" sector must be done without introducing any more errors, lest more problems be made. Regarding the "checksum" you mentioned, I don't recall N-DKTR.BA having one but it's been years since I acquired it. I download the documentation and look for the "checksum" notation to refresh my memory. Keep in touch.