Thread: Out of curiosity?

  1. #1
    Registered User
    Join Date
    Aug 2005
    Posts
    51

    Out of curiosity?

    Is there people out there who can actually program in binary code, and if so, do you think for whatever reason they would write programs like this? Would there be any advantages of writing in this form?

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    I take it you mean 'assembler' and not 'binary code'.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    Mayor of Awesometown Govtcheez's Avatar
    Join Date
    Aug 2001
    Location
    MI
    Posts
    8,823
    I had to program in binary once for a class (sort of), but I don't know why the hell you'd ever want to do that for an actual program.

    Basically it was like Salem said, though. We wrote the program in assembler and converted all the commands to opcodes, then to their binary equivalents.

  4. #4
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    I used to know how to toggle the boot code into a PDP-11 using the front panel key switches - does that count?
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  5. #5
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,793
    I once destroyed a team of man-killing setinels using only the power of my mind....oh no, hang on, that was Neo in the Matrix!


  6. #6
    5|-|1+|-|34|) ober's Avatar
    Join Date
    Aug 2001
    Posts
    4,429
    I don't use linkers and assemblers after I write my high-level language programs. I convert them and piece them together manually just for the challenge!
    EntropySink. You know you have to click it.

  7. #7
    Registered /usr
    Join Date
    Aug 2001
    Location
    Newport, South Wales, UK
    Posts
    1,273
    Quote Originally Posted by Salem
    I used to know how to toggle the boot code into a PDP-11 using the front panel key switches - does that count?
    Has your bus pass arrived in the post yet?

    Assembler is fun to use, if you can understand that there are some serious restrictions on register usage at times (8086 code is awkward) and you also have a good reference on the hardware interrupts of the computer you're programming.

    The main advantage of it in modern programming is size. A modern C/C++ compiler will optimise all but the most spaghetti-oh code so it runs as fast as its assembler equivalent. However, you do have to attach a few KB of C runtime to the program, or even C++ runtime (which is bigger). These may well contain routines that you aren't using in your code. Assembler eschews all that, but obviously if you need to do a lot of work with floating-point numbers, exception handling, etc. you may find yourself writing your own runtime library, which sort-of defeats the point.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. quick question of curiosity about return statements
    By bobthebullet990 in forum C Programming
    Replies: 1
    Last Post: 08-31-2007, 07:56 AM
  2. Curiosity question...
    By Raigne in forum C++ Programming
    Replies: 2
    Last Post: 04-05-2007, 09:49 PM
  3. Just out of curiosity
    By cunnus88 in forum C++ Programming
    Replies: 3
    Last Post: 12-01-2005, 05:37 PM
  4. Not important, only a curiosity...
    By BrownB in forum C Programming
    Replies: 35
    Last Post: 12-27-2004, 03:32 PM
  5. Curiosity Question
    By Eber Kain in forum C++ Programming
    Replies: 2
    Last Post: 10-10-2001, 03:24 PM