Question

From this topic Is it possible to program in binary? and many other topics about binary programming , I see that most of the people reccommend to use hexeditor to program in binary.

But I have a few Ideas.

In notepad you can save output file as any format. Like .html , .php , .bat.

How about ".exe" Can we use somekind of code to write in notepad and save it out as .exe file for it to work. I think the most possible way is to use binary codes. But if that is impossible , is there any other coding ways tocode in notepad?

Thanks in advance

Was it helpful?

Solution

The difficulty is not in saving the file with a different extension, since you could always rename it in Explorer anyway.

The difficulty lies in inserting arbitrary binary data into the file. Notepad is a text editor and i'ts not easy to use it for placing any bytes you want into a file.

In any case, programming in binary is not really a good idea, unless you think servicing your car with a fish is a good idea. Or writing an accounting package in BCPL, or an operating system in COBOL, or anything in Pascal :-)

Yes, we had to do it by flipping toggle switches in the early days of the PC world but I think you'll find it a lot easier to pick up one of the free assemblers (nasm, yasm, gas, etc) and program in assembly language. You can do that in Notepad quite easily, and then pass it through the assembler of choice to produce an executable.

OTHER TIPS

First you getcha an 8-bit ASCII table:

-    DEC  HEX  Symbol  HTML  
-    0    00   NUL     �
-    1    01   SOH     
-    2    02   STX     
-    3    03   ETX     
-    ...
-    253  FD   ý       ý ý
-    254  FE   þ       þ þ 
-    255  FF   ÿ       ÿ ÿ  

If you can't figure out how to type a particular character, there are keyboard strokes to insert arbitrary codes. Or just copy and paste from your table. Save file, rename to whatever.exe

Now the big question be Why. And after something like 40 years of bein' an electrical engineer, I can say definitely that you might want to do exactly this some day. I think I've done everything else. Having all the sweet tools is mighty fine, but some days your pennypinching customer won't spring for 'em.

The Download data rate for MRO was designed from a chart I made using Turbo Pascal, putting the screen in DOS graphics mode, plotting the graph and doing a screen capture. The alternative was to spend a week scouring the internet for a better solution, or making a graph with pencil & paper.

(When Mars is near the sun you can't hardly get any bits across so you run real slow; when it's close to the earth you can rip. And there were exactly three crystal oscillators on the spacecraft, so we wanted to see what data rates could be jumpered together)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top