From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Thread: fdd80,5cdb0c1dbaceb85b X-Google-NewGroupId: yes X-Google-Thread: ffc31,5cdb0c1dbaceb85b X-Google-NewGroupId: yes X-Google-Thread: 1164f8,5cdb0c1dbaceb85b X-Google-NewGroupId: yes X-Google-Attributes: gide311f70d09,gidf4c4f7386e,gidd180ab3bd8,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.189.72 with SMTP id gg8mr1676980pbc.4.1326893199017; Wed, 18 Jan 2012 05:26:39 -0800 (PST) Path: lh20ni196097pbb.0!nntp.google.com!news1.google.com!news3.google.com!feeder2.cambriumusenet.nl!feed.tweaknews.nl!192.87.166.28.MISMATCH!tudelft.nl!txtfeed1.tudelft.nl!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!cs.uu.nl!news.stack.nl!newsfeed.Update.UU.SE!news.Update.UU.SE!not-for-mail From: Johnny Billquist Newsgroups: alt.sys.pdp11,vmsnet.pdp-11,comp.sys.dec Subject: Re: PDP11 Values from MFPT Date: Wed, 18 Jan 2012 14:26:36 +0100 Organization: Update Computer Club Message-ID: References: <4f12e49d$0$295$14726298@news.sunsite.dk> <4f175c07.15409279@nntp.aioe.org> NNTP-Posting-Host: 178-83-31-172.dynamic.hispeed.ch Mime-Version: 1.0 X-Trace: Iltempo.Update.UU.SE 1326893198 32700 178.83.31.172 (18 Jan 2012 13:26:38 GMT) X-Complaints-To: newsmaster@Update.UU.SE NNTP-Posting-Date: Wed, 18 Jan 2012 13:26:38 +0000 (UTC) User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:8.0) Gecko/20111105 Thunderbird/8.0 In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit On 2012-01-18 14:05, glen herrmannsfeldt wrote: > In vmsnet.pdp-11 Johnny Billquist wrote: > > (snip, someone wrote) >>>> I have been looking at the results for the program RESORC.SAV in RT-11 >>>> with respect the MFPT instruction. When the J11 chip is used, the value >>>> is 5 and the Maintenance Register at 177750 seems to determine what the >>>> rest of the actual hardware supports. > > (snip, someone else wrote) >>> Modifying the MFPT instruction is not the right way to go. CPU >>> software detection is a delicate business and that process should not >>> be interfered with directly. > >>> In any case, an emulator is not equivalent to a processor type since >>> SimH and E11 support a range of PDP-11 CPUs. > >> Also right. And each CPU behaves differently, and the emulator needs to >> follow that, or it is broken. > > Or, the emulator can emulate a CPU model different from any previously > built. That usually at least happens in that the emulator runs at a > different speed than any real processor. Right. And yes, that could definitely be done, at which point I think a new value returned by MFPT would be reasonable. >>> Some CPU software detection is handled by examining CPU behavior. The >>> same process can be used to detect an emulator and to determine which >>> emulator is being used. > >> Right. I just posted an outline of how RSX-11M+ detects system type. >> It's a combination of available information as well as CPU behavior in >> very weird and possibly not documented ways. > > I have seen the rules for detecting different x86 CPUs, from 8086 and > 8088 on up. Some are pretty strange, though usually documented at least > as needed for detection. The "problem" with the PDP-11 is that they obviously didn't anticipate this beforehand, and so there are no straight and easy rules for figuring it out. I wouldn't even be surprised if different DEC OSes use different tricks to figure it out. Not sure there is a canonical algorithm. They even use some rather undocumented (atleast to the outside world) diagnostics instructions to help figure out what CPU is executing. Example, the 11/60 check in M+: ; ; TEST FOR 11/60 ; T3: MOV #60.,R4 ;;;ASSUME 11/60 CLC ;;;CLEAR CARRY .WORD 076600 ;;;FIRST HALF OF AN 11/60 MED ;;;INSTRUCTION. IF THIS IS AN 11/60 ;;;PROCESSOR, THEN THIS SUBCODE CAUSES ;;;A CPU INTERNAL REGISTER TO BE READ ;;;INTO R0. IF NOT AN 11/60, THE ILLEGAL ;;;INSTRUCTION TRAP CATCHER WILL RETURN TO ;;;THE SECOND HALF OF THE INSTRUCTION WITH ;;;THE C-BIT SET. THE 400 WILL THEN BE ;;;EXECUTED AS A: .WORD 000400 ;;; BR .+2 ;;;WHICH IS EFFECTIVELY A NOP. BCC CPOK ;;;IF CC IT'S A 11/60 ; Johnny -- Johnny Billquist || "I'm on a bus || on a psychedelic trip email: bqt@softjar.se || Reading murder books pdp is alive! || tryin' to stay hip" - B. Idol