{"id":150,"date":"2009-07-14T00:01:08","date_gmt":"2009-07-14T08:01:08","guid":{"rendered":"http:\/\/www.pagetable.com\/?p=150"},"modified":"2009-07-14T00:01:08","modified_gmt":"2009-07-14T08:01:08","slug":"this-is-copyright-1983-microsoft-not","status":"publish","type":"post","link":"https:\/\/www.pagetable.com\/?p=150","title":{"rendered":"This is Copyright 1983 Microsoft &#8211; NOT!"},"content":{"rendered":"<p>If you look at a hexdump of any version of the Logitech mouse driver for MS-DOS, you will see the following:<\/p>\n<p><cite>*** This is Copyright 1983 Microsoft ***<\/cite><\/p>\n<pre>\n000007c0                                       2a 2a 2a 20  |            *** |\n000007d0  54 68 69 73 20 69 73 20  43 6f 70 79 72 69 67 68  |This is Copyrigh|\n000007e0  74 20 31 39 38 33 20 4d  69 63 72 6f 73 6f 66 74  |t 1983 Microsoft|\n000007f0  20 2a 2a 2a                                       | ***            |\n<\/pre>\n<p>Microsoft introduced the mouse to MS-DOS, and they specified the mouse driver interface and implemented the first MS-DOS mouse driver. Did Logitech license their code? Or did they steal it? Let&#8217;s look closer:<\/p>\n<p><cite>This is a LOGITECH mouse driver, but some software expect here the following string:*** This is Copyright 1983 Microsoft ***<\/cite><\/p>\n<pre>\n00000770                           54 68 69 73 20 69 73 20  |        This is |\n00000780  61 20 4c 4f 47 49 54 45  43 48 20 6d 6f 75 73 65  |a LOGITECH mouse|\n00000790  20 64 72 69 76 65 72 2c  20 62 75 74 20 73 6f 6d  | driver, but som|\n000007a0  65 20 73 6f 66 74 77 61  72 65 20 65 78 70 65 63  |e software expec|\n000007b0  74 20 68 65 72 65 20 74  68 65 20 66 6f 6c 6c 6f  |t here the follo|\n000007c0  77 69 6e 67 20 73 74 72  69 6e 67 3a 2a 2a 2a 20  |wing string:*** |\n000007d0  54 68 69 73 20 69 73 20  43 6f 70 79 72 69 67 68  |This is Copyrigh|\n000007e0  74 20 31 39 38 33 20 4d  69 63 72 6f 73 6f 66 74  |t 1983 Microsoft|\n000007f0  20 2a 2a 2a                                       | ***            |\n<\/pre>\n<p>This string is located directly before the INT 0x33 API entry point, so it is easy to check for it. There&#8217;s a sucker born every minute, but this still makes you wonder what kind of programmer would really check for a string like this, even if some Microsoft API reference indeed suggested to do so. Maybe it was only Microsoft software to compare the string.<\/p>\n<p>In either case, this is a very bad and unfair practice. If you define an interface, don&#8217;t add a call to ask for the version (or even the vendor!), but add feature bits instead, so that an alternative implementation can choose to be compatible with parts of it (or extend the interface independently). And if you are a developer that uses an interface, use feature bits if they are there, and resist the temptation to check for the vendor, even if the API documentation tells you to do so.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you look at a hexdump of any version of the Logitech mouse driver for MS-DOS, you will see the following: *** This is Copyright 1983 Microsoft *** 000007c0 2a 2a 2a 20 | *** | 000007d0 54 68 69 73 20 69 73 20 43 6f 70 79 72 69 67 68 |This is &#8230; <a title=\"This is Copyright 1983 Microsoft &#8211; NOT!\" class=\"read-more\" href=\"https:\/\/www.pagetable.com\/?p=150\" aria-label=\"Read more about This is Copyright 1983 Microsoft &#8211; NOT!\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,11],"tags":[],"class_list":["post-150","post","type-post","status-publish","format-standard","hentry","category-archeology","category-dos"],"_links":{"self":[{"href":"https:\/\/www.pagetable.com\/index.php?rest_route=\/wp\/v2\/posts\/150","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.pagetable.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.pagetable.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.pagetable.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.pagetable.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=150"}],"version-history":[{"count":0,"href":"https:\/\/www.pagetable.com\/index.php?rest_route=\/wp\/v2\/posts\/150\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.pagetable.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=150"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.pagetable.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=150"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.pagetable.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=150"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}