Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Page 1 of 2 12 LastLast
Results 1 to 15 of 21
  1. #1
    New to the CF scene
    Join Date
    Jul 2014
    Location
    USA
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy Basic Programming Help!!



    HI! I usually stick to basic commands, using batch files, its all I need to code because I mainly use MS-DOS and also this Windows 2000 machine. The problem is, whenever I back up my files to some floppies, I never can trust them. I've had bad experiences, I save an important file to a floppy, and whoop! the floppy ends up failing! I have decided, as I have plenty of paper, to record data to paper. I will from there, go on to record the data to cassette tape, too. The only problem is, I don't know how to view the code of the programs. My plan is to write down the code, and then, when needed, enter the code back in, to restore the files/programs. Most of the programs I need to view the code of, have the ".com" extension. There are also some basic DOS applications, (.exe), that I need to view the code of as well. I realize this method has not been practiced for a very long time; but in my circumstances, it is necessary. I have attached a zipped folder of the files/programs I need to decode, because I realize the diagnosis may fluctuate. I also have access to a Windows 7 computer, if need be, for a specific program. I have tried notepad++, pe explorer, ida, among others, but they all just give me all this data that I don't know what to do with. It is very important that the program or method also has a way to re-enter the data, and have it work. I do not have any experience in coding "exe's" or "com's", so if someone does reply, please put it in layman's terms. Something a batch programmer could understand. :-)
    Thank you,
    Mitchello

    Attachments:
    EDIT.zip

  • #2
    Senior Coder
    Join Date
    Aug 2006
    Posts
    1,305
    Thanks
    11
    Thanked 283 Times in 282 Posts
    You win the award for the most curious post of 2014.

  • #3
    New to the CF scene
    Join Date
    Jul 2014
    Location
    USA
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by tracknut View Post
    You win the award for the most curious post of 2014.
    How very helpful. -.-

  • #4
    Senior Coder
    Join Date
    Aug 2006
    Posts
    1,305
    Thanks
    11
    Thanked 283 Times in 282 Posts
    Sorry, I just cannot imagine doing this. At a minimum you need a way to write down binary, and a way to type back in binary files. Neither of those is layman's work...

    I've been around an awfully long time, and "I realize this method has not been practiced for a very long time" is not true, at least in my history. Backups have *never* been done this way.

  • #5
    New to the CF scene
    Join Date
    Jul 2014
    Location
    USA
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    This method was used, although it was for batch files, which are written in a much simpler language. But, do you at least have a way to view the binary? You seem quite pessimistic on the subject, adapting the method from ".bat's" to ".com's" and ".exe's", though there would be a enormous amount of writing, should be possible! How are programs written? Couldn't that be reverse engineered? Again, I'm dealing with DOS Programs, which I assume would have less data to deal with than Windows programs. I guess my real question is, how do I view the code of com file? SPECIFICALLY A COM FILE. Com files are the ancestors of exe's, wouldn't that be easier?
    Thanks again,
    Mitchello

  • #6
    Senior Coder alykins's Avatar
    Join Date
    Apr 2011
    Posts
    1,776
    Thanks
    41
    Thanked 196 Times in 195 Posts
    I agree that this is nowhere's near a simple task, and as described I too would have no clue how to start- why can you not save off to flash?

    Regardless though of it being saved-stored... that IMO is the last of your worries- you essentially want to write a decompiler, which is not an easy feat. Are you sure you are asking the right question? Maybe we are misunderstanding you. If we are understanding this correctly, have you thought of different solutions? Also, I (and I'm sure others) won't download a random .zip file and open it up and see what is inside- can you upload that to some site where we can look at it safely?

    I code C hash-tag .Net
    Reference: W3C W3CWiki .Net Lib
    Validate: html CSS
    Debug: Chrome FireFox IE

  • #7
    New to the CF scene
    Join Date
    Jul 2014
    Location
    USA
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    DOS. D-O-S I'm using Disk operating system. No internet, no usb, no zip, no nothing. As I see it, this is a somewhat viable option as my floppy drive is failing. All the replies I'm getting just say basically "it's hard. It would require a lot of work, and you should give up, for these reasons...." Does anyone here even KNOW what a .com file is?! Let alone open them? I'm not talking about .exe's! Just plain, simple, old com files!

  • #8
    Senior Coder
    Join Date
    Aug 2006
    Posts
    1,305
    Thanks
    11
    Thanked 283 Times in 282 Posts
    Read this - COM file - Wikipedia, the free encyclopedia, it will get you started. You need some sort of hex editor to view the binary. That's the easy part. Then grab your pencil and write it all down. Creating the .com file back from your notes - I have no idea.

  • #9
    Senior Coder alykins's Avatar
    Join Date
    Apr 2011
    Posts
    1,776
    Thanks
    41
    Thanked 196 Times in 195 Posts
    Quote Originally Posted by mitchello_ View Post
    Does anyone here even KNOW what a .com file is?! Let alone open them? I'm not talking about .exe's! Just plain, simple, old com files!
    I can't speak for evryone else- but no- never heard of it before. And doing what you are trying to do is hard, and I can think of how I would begin to start approaching it (ie decompile the file, stream it in and then save it off in some manner) but aside from that little blurb- no idea other than it would be hard- and I think that is how most people are as well. While we *can* technically do it and figure it out- a vast majority probably will have never even thought of this- finding someone who has an idea on it will be like a needle in a haystack- so you're going to either have to do a lot of trail blazing, or hire someone. Generally when you get replies of "it's hard" even when you narrow down that you know it and yada yada yada- it probably means little to no one knows a simple-direct answer. The answers are going to be where we all start when we have a solution we haven't seen before- which is start at point #. You already know where you need to start- opening the files with extensions A,B,C- so now you need to figure out how to do so.

    I do hope I'm wrong, and someone sees this thread and is like oh- do this this and this- but I wouldn't hold my breath unfortunately

    I code C hash-tag .Net
    Reference: W3C W3CWiki .Net Lib
    Validate: html CSS
    Debug: Chrome FireFox IE

  • #10
    New Coder
    Join Date
    Aug 2013
    Posts
    37
    Thanks
    1
    Thanked 6 Times in 6 Posts
    1. Copy the files to a computer that can burn DVDs
    2. Burn the files to DVD
    3. Use the huge amount of time you saved to write a biography or something (optional)

  • #11
    Senior Coder alykins's Avatar
    Join Date
    Apr 2011
    Posts
    1,776
    Thanks
    41
    Thanked 196 Times in 195 Posts
    Quote Originally Posted by hBGl View Post
    1. Copy the files to a computer that can burn DVDs
    2. Burn the files to DVD
    3. Use the huge amount of time you saved to write a biography or something (optional)
    That made me lol-

    @OP, I guess to elaborate a little more on what I meant- or tried to mean- was this. We (coders in any community) are usually are able to help each other out because it is something that we commonly use, or have seen frequently used. eg connecting to a database, using events, threads, syntax off on a documented class object.

    What you are doing doesn't fall into this category, so it falls moreover into a category of a developed solution needed- which the reply would be hire someone- as you've said you are a programmer that would be counter intuitive- but the ground work is unfortunately going to be all you (or so it seems)

    I code C hash-tag .Net
    Reference: W3C W3CWiki .Net Lib
    Validate: html CSS
    Debug: Chrome FireFox IE

  • #12
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    26,184
    Thanks
    80
    Thanked 4,451 Times in 4,416 Posts
    A .com file is just an older form of a .exe file. They do the same thing and generally contain the same content.

    Generally, you can easily calculate that number of HEX two-digit numbers you would need to write down: Just double the size of the file. Will be very close to correct.

    So if you have a .COM file that is, say 100KB in size, that means you would need to write down, by hand, 200,000 hex numbers (0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F).

    200,000. And then, to restore the file, you would need to type back in those same 200,000 characters. Without making ONE SINGLE MISTAKE (else something horrible will happen when you run the restored program).

    Even back in the days when I was writing on a 32KB (yes,KB, not MB) computer, we would never have tried to do something like this (pardon me, but true) idiotic.

    GIVE IT UP. If you can't do anything else, buy another floppy drive. But better would be to transfer the needed files to a machine with a DVD writer and save them there.

    NOTE: I guess you could use a printer to output the hex characters, but you would still have to type them in by hand, with no errors. The EDIT.COM file you zipped for us is over 69,000 bytes in size, so you would need to type in over 138,000 hex characters without a single error. That is so nutso that if you really still intend to go down this path I can give you the name of a good psychiatrist.
    Last edited by Old Pedant; 07-22-2014 at 01:24 AM.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

  • #13
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    26,184
    Thanks
    80
    Thanked 4,451 Times in 4,416 Posts
    By the by: In comparison, .BAT (and similar) files are just text files. The code in them may be a bit obscure, but (a) it's just text that is for the most part readable and (b) it's usually at least two orders of magnitude smaller than even a small .COM file. (Real world example: The EDIT.COM you showed, at 69KB, is two orders of magnitude larger than a 700 character .BAT file.)

    Even the VERY FIRST personal computers didn't make you type in code by hand, as hex characters. (Exception: Some of them made you enter some "bootstrap" code--just enough to start reading from cassette or paper tape--but that usually wasn't more then 60 to 100 hex characters, often less than that.) The very first ones used a teletype with a papertape punch (to store programs) and papertape reader (to read in programs). We used to duplicate papertapes for various companies. For a short while, we even duplicated paper tape copies of Microsoft BASIC. And each of those paper tapes was on the order of 200 FEET long, about 36,000 typed in hex characters.

    So your assertion that typing things in is how things were done in the past is just pure nonsense.

    Oh, and to answer your question of how .COM files are created: Probably, they were originally written in either assembly language (look it up) or in the language "C". Can .COM files be decompiled? Yes, fairly easily into assembly language (fair warning: what takes 6 characters in hex code can easily take 20 or more characters in assembly language). Yes, with a lot more difficulty and less chance of ultimate success into "C".
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

  • #14
    New to the CF scene
    Join Date
    Jul 2014
    Location
    USA
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Cool

    Quote Originally Posted by alykins View Post
    I can't speak for evryone else- but no- never heard of it before. And doing what you are trying to do is hard, and I can think of how I would begin to start approaching it (ie decompile the file, stream it in and then save it off in some manner) but aside from that little blurb- no idea other than it would be hard- and I think that is how most people are as well. While we *can* technically do it and figure it out- a vast majority probably will have never even thought of this- finding someone who has an idea on it will be like a needle in a haystack- so you're going to either have to do a lot of trail blazing, or hire someone. Generally when you get replies of "it's hard" even when you narrow down that you know it and yada yada yada- it probably means little to no one knows a simple-direct answer. The answers are going to be where we all start when we have a solution we haven't seen before- which is start at point #. You already know where you need to start- opening the files with extensions A,B,C- so now you need to figure out how to do so.

    I do hope I'm wrong, and someone sees this thread and is like oh- do this this and this- but I wouldn't hold my breath unfortunately
    Dear horse person,
    You're reply to my thread was found very helpful. Little do you know that both of your posts fell under my summary of what all you pessimists are saying. I am willing to write the characters. You people are too lazy to type or write all the characters, you're busy telling me "Oh, I know a psychiatrist! I am so funny!" among other useless jabber. But I have found a way to read ALL the characters, and, when typed back in, restore them. I got this idea from the ONLY USEFUL PERSON, who recommended I use a "hex" program. I discovered one that allows me to read, and create, programs. It works with both exe's and com's, whether they were designed for Windows 2000 or DOS! So thank you only useful replier! (@tracknut) Wow. You people! Have some hope and happiness!

    Thank you! and goodnight!

    P.S. "Old Pendant" Little do you know, I do not flaunt my money! I'd rather write EVERY 1 and 0 that is on my hard drive than pay $200 dollars to back it up on some hard drive! By the way, you are a HORRIBLE comedian! And I do! intend to go "down this path"!

    Basic Programming Help!!-tumblr_lt2rfshhyv1r14o02o1_500.jpg

  • #15
    New to the CF scene
    Join Date
    Jul 2014
    Location
    USA
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by hBGl View Post
    1. Copy the files to a computer that can burn DVDs
    2. Burn the files to DVD
    3. Use the huge amount of time you saved to write a biography or something (optional)
    The F***ING FLOPPY DRIVE IS BROKEN. HOW AM I SUPPOSED TO TRANSFER?!


  •  
    Page 1 of 2 12 LastLast

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •