From: "Arobase, Salle multimédia" Newsgroups: comp.os.cpm Subject: DUMPASC Utility Date: Fri, 21 Dec 2001 01:08:40 +0100 Organization: Wanadoo, l'internet avec France Telecom Lines: 152 Message-ID: <9vve4i$577$1@wanadoo.fr> NNTP-Posting-Host: apoitiers-102-2-1-63.abo.wanadoo.fr X-Trace: wanadoo.fr 1008942034 5351 193.253.213.63 (21 Dec 2001 13:40:34 GMT) X-Complaints-To: abuse@wanadoo.fr NNTP-Posting-Date: 21 Dec 2001 13:40:34 GMT X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Gasp! When leaving the cybercafe, I suddenly remembered that I had planned to "post" the following. I will be back in January. (Charles, this text is in 80 columns mode because of the dumps...) Merry Christmast, and a Happy New Year 2002! Yours Sincerely, "French Luser" DUMPASC.TXT by Emmanuel ROCHE ----------- In this memo, you will find a "silly little program" that I use very often under CP/M Plus. You have been given a disk with unknown programs (no doc, as usual) on it. What do you do? Personally, first I have a look to the messages to be found inside those files, to get a rough idea of what they do (if there is a message inside them, of course. I know of a few programs without any message, not even something like "DDT ver 1.4"!). So, we want to see the ASCII characters inside files. But which program would be the best at this job? DUMP version 1.4 and 2.0 displays only the hex values. DDT and SID display only 16 characters. ZAP is nice but its "type a file" option is for text, not COMmand files. Let us summarize what we want: we want a program, the simplest possible, for displaying the ASCII contents of files. ASCII characters are between 20H and 7EH (all other values should be represented by a "."). What is a file? A file is made of two parts: the directory entry, and the actual contents of the file, in records. Several cases can happen: there is not such a file in the directory, there is an entry in the directory but no records on the disk, there is a file in the directory and on the disk. Now, what kind of files are there under CP/M? Two kinds: COMmand files and other files. COMmand files always start at 0100H, other files may start at 0000H (this is true for PRL files, SPR files, etc). Armed with those specifications, off we go. The result of our efforts is shown below, thanks to CP/M Plus' PUT: M>dumpasc dummy.com ; File not existing on drive M File not found. ; (^G = beep) M>dumpasc empty.com ; Entry in DIR, but empty file No records exist (zero-length file). ; Understood? M>dump ascii.bin ; Let see the ASCII characters CP/M 3 DUMP - Version 3.0 0000: 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F ................ 0010: 10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F ................ 0020: 20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F !"#$%&'()*+,-./ 0030: 30 31 32 33 34 35 36 37 38 39 3A 3B 3C 3D 3E 3F 0123456789:;<=>? 0040: 40 41 42 43 44 45 46 47 48 49 4A 4B 4C 4D 4E 4F @ABCDEFGHIJKLMNO 0050: 50 51 52 53 54 55 56 57 58 59 5A 5B 5C 5D 5E 5F PQRSTUVWXYZ[\]^_ 0060: 60 61 62 63 64 65 66 67 68 69 6A 6B 6C 6D 6E 6F `abcdefghijklmno 0070: 70 71 72 73 74 75 76 77 78 79 7A 7B 7C 7D 7E 7F pqrstuvwxyz{|}~. 0080: 80 81 82 83 84 85 86 87 88 89 8A 8B 8C 8D 8E 8F ................ 0090: 90 91 92 93 94 95 96 97 98 99 9A 9B 9C 9D 9E 9F ................ 00A0: A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 AA AB AC AD AE AF ................ 00B0: B0 B1 B2 B3 B4 B5 B6 B7 B8 B9 BA BB BC BD BE BF ................ 00C0: C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 CA CB CC CD CE CF ................ 00D0: D0 D1 D2 D3 D4 D5 D6 D7 D8 D9 DA DB DC DD DE DF ................ 00E0: E0 E1 E2 E3 E4 E5 E6 E7 E8 E9 EA EB EC ED EE EF ................ 00F0: F0 F1 F2 F3 F4 F5 F6 F7 F8 F9 FA FB FC FD FE FF ................ M>dumpasc ascii.bin ; Do we get the same output? 0000: ................................ !"#$%&'()*+,-./0123456789:;<=>? 0040: @ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~. 0080: ................................................................ 00C0: ................................................................ M>dumpasc dumpasc.com ; Let us see how long this little gem is... 0100: ...DUMPASC by Emmanuel ROCHE!..9"..1...(....N..D........#.\....: 0140: }.....W........7.!e.~.C.n.#~.O.n.#~.M.n.!...q.!..>.2..........G} 0180: .?.............|...}...>:...> ...#x....v....*.......... ...>.... 01C0: ................._.......>....>.............0....7.............. 0200: .........:........5.....7._..<2..!...~...2|..\...........\...... 0240: .......File not found.$...No records exist (zero-length file).$. Finally, here you will find its HEX file: :10010000C31C0144554D5041534320627920456D35 :100110006D616E75656C20524F4348452100003972 :1001200022810231C302CD2802FEFFC24E011144DA :1001300002CD0302C3A9010E23115C00CD05003AD4 :100140007D00FE00C0115702CD0302C3A901CD37C7 :10015000012165007EFE43C26E01237EFE4FC26E0A :1001600001237EFE4DC26E01210001C371012100F9 :10017000003E80327F02E5CD0902E1DAA901477D28 :10018000E63FC2A101CDD901CDC0010FDAA9017CA2 :10019000CDF6017DCDF6013E3ACDCC013E20CDCC51 :1001A000012378CDB101C37601CDD9012A8102F9AD :1001B000C9FE7FD2BB01FE20D2BD013E2EC3CC01C1 :1001C000E5D5C50E0BCD0500C1D1E1C9E5D5C50EFC :1001D000025FCD0500C1D1E1C93E0DCDCC013E0A83 :1001E000CDCC01C9E60FFE0AD2F001C630C3F20140 :1001F000C637CDCC01C9F50F0F0F0FCDE401F1CDFE :10020000E401C90E09CD0500C93A7F02FE80C21A79 :1002100002CD3502B7CA1A0237C95F16003C327FD9 :1002200002218000197EB7C9AF327C00115C000E3C :100230000FCD0500C9E5D5C5115C000E14CD050034 :10024000C1D1E1C90D0A0746696C65206E6F742043 :10025000666F756E642E240D0A074E6F20726563FB :100260006F72647320657869737420287A65726F81 :0F0270002D6C656E6774682066696C65292E2495 :00010000FF Now that CP/M-86 Plus has been found, here is its 8086 version: :0400000300000000F9 :1B000081BB000003DC891E5901BC9B01E80B013CFF7520BA1C01E8D900E975B7 :1B001B8100B123BA5C00CDE0A07D003C007401C3BA2F01E8C100EB5EE8E6FF78 :1B003681BB65008A073C437513438A073C4F750C438A073C4D7505BB0001EB18 :1B00518103BB0000B080A2570153E899005B72308AE88AC3243F751EE852006B :1B006C81E83700D0C8721E8AC7E861008AC3E85C00B03AE82F00B020E82A00A3 :1B0087819F439E8AC5E80B00EBC9E82A00B100B200CDE03C7F73043C20730242 :1B00A281B02EEB0B535251B10BCDE0595A5BC3535251B1028AD0CDE0595A5B00 :1B00BD81C3B00DE8EEFFB00AE8E9FFC3240F3C0A73040430EB020437E8D9FFF9 :1B00D881C39F86C45086C4D0C8D0C8D0C8D0C8E8DFFF5886C49EE8D8FFC3B1AD :1B00F38109CDE0C3A057013C807509E826000AC07402F9C38AD0B600FEC0A24C :1B010E815701BB800003DA8A070AC0C332C0A27C00BA5C00B10FCDE0C35352CC :0C01298151BA5C00B114CDE0595A5BC39F :1B01008244554D504153432D383620627920456D6D616E75656C20524F43481F :1B011B82450D0A0746696C65206E6F7420666F756E642E240D0A074E6F2072F8 :1B01368265636F72647320657869737420287A65726F2D6C656E677468206622 :06015182696C65292E2471 :00000001FF "I am a poor lonesome hacker, and a long way from home..." EOF