From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Thread: fdd80,1f0ed186713c1bdb X-Google-NewGroupId: yes X-Google-Thread: 1164f8,1f0ed186713c1bdb X-Google-NewGroupId: yes X-Google-Thread: ffc31,1f0ed186713c1bdb X-Google-NewGroupId: yes X-Google-Attributes: gide311f70d09,gidd180ab3bd8,gidf4c4f7386e,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!goblin1!goblin.stu.neva.ru!eternal-september.org!feeder.eternal-september.org!newsfeed.Update.UU.SE!news.Update.UU.SE!not-for-mail From: Johnny Billquist Newsgroups: alt.sys.pdp11,comp.sys.dec,vmsnet.pdp-11 Subject: Re: Source for RT-11 TECO V36 Date: Mon, 13 Jun 2011 01:04:09 +0200 Organization: Update Computer Club Message-ID: References: <4df2176d$0$312$14726298@news.sunsite.dk> <3ab4c070-9402-4749-8dc7-49310abd7f29@g28g2000yqa.googlegroups.com> <9da7ce8b-1acb-40a0-a232-d73935cc9ffe@x3g2000yqj.googlegroups.com> NNTP-Posting-Host: 178-83-28-137.dynamic.hispeed.ch Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: Iltempo.Update.UU.SE 1307919850 1828 178.83.28.137 (12 Jun 2011 23:04:10 GMT) X-Complaints-To: newsmaster@Update.UU.SE NNTP-Posting-Date: Sun, 12 Jun 2011 23:04:10 +0000 (UTC) User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10 In-Reply-To: <9da7ce8b-1acb-40a0-a232-d73935cc9ffe@x3g2000yqj.googlegroups.com> Xref: g2news1.google.com alt.sys.pdp11:2258 comp.sys.dec:3523 vmsnet.pdp-11:636 On 2011-06-13 00.24, John Wallace wrote: > On Jun 12, 3:46 pm, Johnny Billquist wrote: >> On 2011-06-12 12.54, John Wallace wrote: >> >> >> >>> On Jun 11, 11:20 am, glen herrmannsfeldt >>> wrote: >>>> In vmsnet.pdp-11 Jerome H. Fine wrote: >> >>>>> [-- text/plain, encoding 7bit, charset: us-ascii, 40 lines --] >> >>>> (snip) >> >>>>> About a year ago, I found some source code for >>>>> TECO V36 which assembles to V36 when asked >>>>> via "EO=", but the TECO.SAV file is significantly >>>>> different from the version released with V04.00 of >>>>> RT-11 in 1980. The version based on the source >>>>> code that I found is 51 blocks long and it uses more >>>>> memory. The version from RT-11 V04.00 is just >>>>> 50 blocks long and has a much smaller root section. >>>>> Probably most of the code is the same, just that >>>>> some of the code that is in the root of the version >>>>> for which I have the source has been moved to an >>>>> overlay. >> >>>> I haven't thought about this for a while, but for an >>>> overlay isn't the source the same, but changes to the >>>> LINK command change the overlay, and so the SAV file? >> >>>> Or by source do you also mean the LINK command needed? >> >>>> -- glen >> >>> Sounds plausible to me. >> >>> In principle a suitable comparison tool comparing the two executables >>> could show up areas of common content (blocks of common code/data?) as >>> well as areas where the files are different. Afaik the standard DEC >>> file comparison tools aren't usable this way, because they like to >>> compare lines of text not binary files such as executables. Same for >>> the standard UNIX file comparison tools. >> >>> That doesn't mean there isn't a binary file comparison tool that uses >>> something like the well documented "longest common subsequence" >>> algorithm on words (or even bytes) though. In fact for reasons I won't >>> go into here I had to write something along those lines to compare >>> text files while ignoring line boundaries - I don't own the code, my >>> employer does, so I couldn't post it here even if it was directly >>> relevant, but the comparison core wasn't that difficult, someone with >>> sufficient motivation and expertise (and time) could do something >>> similar. >> >>> Interesting challenge. >> >> Another potential problem is that the same source might yield different >> executables because they are linked with system libraries, and those >> libraries might have changed. >> >> Comparing binary files is difficult because of the fact that binary >> files might be so many different things. For an executable for example, >> it might make more sense to report differences as related to load >> locations, and not file locations. But that requires understanding both >> the binary load format, and also understand overlay structures. And what >> if a difference is merely that the data is the same, but loaded at a >> slightly different address? That would mean all data are different, if >> you just look at the address, but in fact it's all the same except for >> the location. >> >> And you can easily come of with a whole number of different >> problems/schemes/issues with other binary files. So there is no general >> meaningful binary file comparison. You need one tool for each type of >> file and type of comparison you want to do. >> Text file comparison is actually just another special case of binary >> file comparison, for one specific type of binary files, and one specific >> type of comparisons. >> >> Johnny > > Quite possibly true in general, but when considering the particular > case of RT11 executables, as we were here, I believe matters are a bit > simpler than the general case. My recollection of RT11 executables > (not that I've checked recently, though it is documented) is that the > format is *very* very simple, which makes the comparison simpler and > potentially more meaningful. My recollection says there is an image > code/data area and a relocation bitmap and not a great deal else; I > may well have the detail wrong, but the general principle of "it's > very simple" applied to much of RT11. And what is an overlay but some > subroutines and some IO? > > Whether it's worth writing such a comparison tool is a different > question, especially when you add the possibility of disassembling the > RT11 executable using one of the various disassemblers on DECUS tapes > and the like. Disassessembling overlay calls might be "interesting". > > [Background: I have spent far too much time at work writing and > understanding assemblers and linkers and object and executable related > things; not for PDP11 as target, but sometimes using PDP11 or VMS as > host, and/or PDP11 or VMS file formats]. Well, the same source, compiled with different overlay structures - is that the same image? After all, all the binary executable as well as data, is the same, but loaded in different places, and with calls to the overlay loader sprinkled differently... I don't know how overlaid binaries looks on RT-11, but I bet there must be some kind of information in the binary header telling which parts to load at image activation, and which ones that should be untouched at that point. And the overlay loader must have a mapping table to help it read the proper parts from disk at a later point, and know where to write those parts to in memory. While the latter part can be placed in the image itself, the original loading must exclude (possibly a large) part of the file from actually loading at activation. Johnny