From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Thread: 3717dac89a,32247abf28da27d4 X-Google-Attributes: gid3717dac89a,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!feeder.news-service.com!border1.nntp.ams.giganews.com!nntp.giganews.com!goblin2!goblin.stu.neva.ru!news.net.uni-c.dk!dotsrc.org!filter.dotsrc.org!news.dotsrc.org!not-for-mail Date: Thu, 29 Apr 2010 15:53:06 -0400 From: "Jerome H. Fine" Organization: Just Sufficient User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.7.2) Gecko/20040804 Netscape/7.2 (ax) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: alt.sys.pdp11,comp.sys.dec,comp.os.vms Subject: Re: QBUS Prototyping References: <8265dgFs33U3@mid.individual.net> <4dff54d9-dfc7-4d90-9307-995e5d96e53f@y36g2000yqm.googlegroups.com> <4bd96b18$0$281$14726298@news.sunsite.dk> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <4bd9e3cc$0$274$14726298@news.sunsite.dk> NNTP-Posting-Host: 206.248.171.217 X-Trace: news.sunsite.dk DXC=JddBb[5XOa:N=S_a\VX>h;YSB=nbEKnk;E69fhHMIIl6PPfk^U[HX;?N1>V8bAJTI>3eOPKWXlde4Qa4_jgFW[9?DLjFRm^e1O?]01T`Rm1cH8 X-Complaints-To: staff@sunsite.dk Xref: g2news2.google.com alt.sys.pdp11:1522 comp.sys.dec:1983 comp.os.vms:30675 >glen herrmannsfeldt wrote: >>In alt.sys.pdp11 Jerome H. Fine wrote: >(snip related to Fortran and virtual arrays) > >>As for the compression algorithm itself, can anyone provide some >>information on just how that 128 KB table is accessed? >>READ ONLY? Random? Sequential? Same on decompression? >>It would make a big difference if the access was sequential, >>but somehow it would seem that it must be random access to >>that 128 KB table and maybe the table even gets altered as >>the algorithm progresses through the input file? >> >For compression, it generates a tree structure based on what >it has seen so far. Last time I looked into this was compress.c, >in the days before gzip. If I put compress.c into google, the >second hit, the one with actual source, comes from apple.com. >It is copyright University of California 1986, last changed in 1985. > >It seems I wasn't quite right on the 128K. The compression >table needs 2**BITS words, each of which holds a value between >-1 and 2**BITS-1, such that the usual implementation (with #ifdef) >uses (int) (16 bits on smaller machines in 1985) for BITS<16, >and (long int) for BITS==16. One might be able to do that with >a 65536 entry table of 16 bit integers, and a 65536 bit table >indicating which entries where -1 to save memory. > >There is even an #ifdef pdp11 which sets BITS to 12. > > I have made a suggestion which many may not appreciate for implementation using a PDP-11 instruction set which runs under the Erstaz-11 emulator, normally called E11 for short. The available memory is limited only by the physical memory on the system. Under RT-11 which has direct access to the IOPAGE registers, there is a DLL called EMEM.DLL which allows the user to directly access the PC memory. John Wilson wrote the original DLL which uses 4 IOPAGE registers to: (a) Mov @#CSR, R0 / Mov R0,@#CSR ;Access the PC memory (b) Mov @#CSR+2,R0 / Mov R0,@#CSR+2 ;Also auto-increment next 2 registers (c) Mov R0,@#CSR+4 ;Set up low 16 bits of PC memory address offset (d) Mov R1,@#CSR+6 ;Set up high 16 bits of PC memory address offset I have enhanced the DLL so that: INSTALL EMEM.DLL /SIZE:1024MB can run under Windows XP on a system with 3 GB of memory. Under Windows 98SE on a Pentium III with 768 MB of physical memory, it is possible to request up to 600 MB for EMEM.DLL to use. Not much left for anyone else at that point. It is also possible to use the MFPD and MTPD instructions which requires an extra instruction to load or unload the stack, but which allows the user all of the 64 KB for the current program and data, but direct access to the PC memory via the EMEM.DLL with the use of the 4 IOPAGE registers. The speed of the access is slower than using normal memory under E11, but mainly because E11 is slower with the use of the IOPAGE. The speed is mostly dependent on the L1 and L2 cache sizes. With a core 2 duo CPU (Intel 8200) with a 6 MB L2 cache, E11 seems to have little difficulty keeping almost all current code and data in L2 cache. If EMEM.DLL is instructed to request 1 GB of memory, the access time will be much slower than if the data fits into L2 cache, but still done at the speed of memory with no overhead needed for mapping as with a real DEC PDP-11 that is restricted to less than 4 MB. Most PDP-11 users are insistent that the code be at least able to run on a real DEC PDP-11. So the use of the EMEM.DLL would not be acceptable. But when I reach CPU speeds under E11 of 100 times a PDP-11/93 and disk I/O speeds of 200 times any fast SCSI or ESDI drive on a real DEC PDP-11, it is hard to resist running under E11. For example, while it takes me about 240 seconds to compare 2 RT-11 * 32 MB partitions on the DEC PDP-11/83 that I still run on occasion, under E11 it takes less than ONE SECOND. Even on a Pentium III which I still use, it takes only 6 seconds. And that is about the only difference, aside from the noise of the 3 fans I use to cool the 3 Hitachi 600 MB ESDI drives (DK515) on the PDP-11/83. And one other minor difference. There are 6 VT100 terminals on my desk for the PDP-11/83. With E11, the ALT/Fn key selects up to 12 terminals to be displayed. And since I can't look at more than one display at a time, it seems to work quite well with just the one monitor under E11. Sorry, I often get carried away. >>While I am not about to implement the code, it would help to >>know the characteristics of what is being discussed. >> >The basic idea is to build a tree structure based on substrings >previously seen. If you find one again, point to the tree entry, >otherwise add a new entry to the tree. Well, that isn't quite >right because the new entry, pointing to the previous substring, >is also added to the tree. I think that means that for each >character input you read one tree entry. When you find a >substring not previously seen, write one tree entry. > >For compression, there is not much reason not to use BITS==12. >The files will be a little larger, but the 16 bit decompression >program will still be able to decompress them. The 12 bit >decompression program, though, won't be able to decompress >files with BITS==16. > > It sounds like any one willing to make use of E11 can manage to implement the algorithm under RT-11 quite easily. I also wrote some F77 compatible subroutines which aid the user to read and write the PC memory. The subroutine substitutes in-line code for the CALL to the subroutine after the first use. Especially tricky to figure out was the subroutine which does a write to the PC memory since a normal F77 function CALL receives a value rather than doing a write. Jerome Fine