Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Other Discussions
  3. The Back Room
  4. Pretty stupid

Pretty stupid

Scheduled Pinned Locked Moved The Back Room
questionc++helpannouncementlounge
7 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    Brian Olej
    wrote on last edited by
    #1

    *not programming question* Today I was curious...:suss: I loaded up notepad typed in tons I mean TONS of 0's and 1's randomly then saved as an .exe... (you can see where this is going) I opened up the exe file got an error.. "16 bit ms dos subsystem: the NTVDM CPU has encountered an illegal intruction." then it goes on listing random number and letters and gives 2 choices close and ignore (I obviously clicked close not knowing what ignoring would do). Just how dangerous could doing things like this be to my system? So... anyways looks like I'm sticking with C++ apparently binary isnt my thing:laugh:. Have any of you tried doing that before? Or am I the only one that doesnt know binary:-0? *An update* I was able to catch a glimpse of what apears on the DOS prompt window that flashs! "Divide overflow". I must be a Binary Guru! ;p

    C M 2 Replies Last reply
    0
    • B Brian Olej

      *not programming question* Today I was curious...:suss: I loaded up notepad typed in tons I mean TONS of 0's and 1's randomly then saved as an .exe... (you can see where this is going) I opened up the exe file got an error.. "16 bit ms dos subsystem: the NTVDM CPU has encountered an illegal intruction." then it goes on listing random number and letters and gives 2 choices close and ignore (I obviously clicked close not knowing what ignoring would do). Just how dangerous could doing things like this be to my system? So... anyways looks like I'm sticking with C++ apparently binary isnt my thing:laugh:. Have any of you tried doing that before? Or am I the only one that doesnt know binary:-0? *An update* I was able to catch a glimpse of what apears on the DOS prompt window that flashs! "Divide overflow". I must be a Binary Guru! ;p

      C Offline
      C Offline
      ColinDavies
      wrote on last edited by
      #2

      ROTFLOL :-) :-) Binary sucks change to Hex as soon as they let you. But wouldn't your 0's and 1's be saved in ASCII text by notepad ? I guess though there is a really tiny chance that oneday you'll manage to do this and repeat an OS command like FDISK or PURGE etc. Regardz Colin J Davies

      Sonork ID 100.9197:Colin

      More about me :-)

      B 1 Reply Last reply
      0
      • C ColinDavies

        ROTFLOL :-) :-) Binary sucks change to Hex as soon as they let you. But wouldn't your 0's and 1's be saved in ASCII text by notepad ? I guess though there is a really tiny chance that oneday you'll manage to do this and repeat an OS command like FDISK or PURGE etc. Regardz Colin J Davies

        Sonork ID 100.9197:Colin

        More about me :-)

        B Offline
        B Offline
        Brian Olej
        wrote on last edited by
        #3

        I'm glad you enjoyed that, I knew someone would enjoy my sheer stupidity. Yah I just saved them as ASCII text in notepad with the .exe extension.:cool: Colin Davies wrote: Binary sucks change to Hex as soon as they let you. Who might they be? :confused:

        1 Reply Last reply
        0
        • B Brian Olej

          *not programming question* Today I was curious...:suss: I loaded up notepad typed in tons I mean TONS of 0's and 1's randomly then saved as an .exe... (you can see where this is going) I opened up the exe file got an error.. "16 bit ms dos subsystem: the NTVDM CPU has encountered an illegal intruction." then it goes on listing random number and letters and gives 2 choices close and ignore (I obviously clicked close not knowing what ignoring would do). Just how dangerous could doing things like this be to my system? So... anyways looks like I'm sticking with C++ apparently binary isnt my thing:laugh:. Have any of you tried doing that before? Or am I the only one that doesnt know binary:-0? *An update* I was able to catch a glimpse of what apears on the DOS prompt window that flashs! "Divide overflow". I must be a Binary Guru! ;p

          M Offline
          M Offline
          Michael Dunn
          wrote on last edited by
          #4

          As long as the first two bytes aren't 'MZ' or 'ZM' the OS thinks it's a COM file (regardless of the filename). COM files are real-mode machine language programs, so IP gets set to the beginning of the data and the CPU starts executing whatever's there as if it were code. Result: KABOOM! --Mike-- Just released - RightClick-Encrypt v1.3 - Adds fast & easy file encryption to Explorer My really out-of-date homepage Sonork-100.19012 Acid_Helm

          B C 2 Replies Last reply
          0
          • M Michael Dunn

            As long as the first two bytes aren't 'MZ' or 'ZM' the OS thinks it's a COM file (regardless of the filename). COM files are real-mode machine language programs, so IP gets set to the beginning of the data and the CPU starts executing whatever's there as if it were code. Result: KABOOM! --Mike-- Just released - RightClick-Encrypt v1.3 - Adds fast & easy file encryption to Explorer My really out-of-date homepage Sonork-100.19012 Acid_Helm

            B Offline
            B Offline
            Brian Olej
            wrote on last edited by
            #5

            Interesting... Thanks:), but what would happen if the first two bytes were 'MZ' or 'ZM'?

            N 1 Reply Last reply
            0
            • M Michael Dunn

              As long as the first two bytes aren't 'MZ' or 'ZM' the OS thinks it's a COM file (regardless of the filename). COM files are real-mode machine language programs, so IP gets set to the beginning of the data and the CPU starts executing whatever's there as if it were code. Result: KABOOM! --Mike-- Just released - RightClick-Encrypt v1.3 - Adds fast & easy file encryption to Explorer My really out-of-date homepage Sonork-100.19012 Acid_Helm

              C Offline
              C Offline
              ColinDavies
              wrote on last edited by
              #6

              I thought it was the first 3 bytes that identified it ? It's been a while. :-( Regardz Colin J Davies

              Sonork ID 100.9197:Colin

              More about me :-)

              1 Reply Last reply
              0
              • B Brian Olej

                Interesting... Thanks:), but what would happen if the first two bytes were 'MZ' or 'ZM'?

                N Offline
                N Offline
                Nish Nishant
                wrote on last edited by
                #7

                Brian 1415 wrote: but what would happen if the first two bytes were 'MZ' or 'ZM'? The file would be treated as a DOS 16 bit EXE file. Unlike COM files EXE files can be more than 64 Kb and can have separate segment registers. In COM files CS,DS,ES and SS are all in the same 64 Kb memory segment. EXE files are also relocatable unlike COM files which are binary images of the actual code. Nish


                Author of the romantic comedy Summer Love and Some more Cricket [New Win] Review by Shog9 Click here for review[NW]

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups