Is there ANY reason to write your programs in PURE BINARY ?
It must be hell to view a screen of just ones and zeroes.
Can you make your programs even smaller than us who
uses MASM32 ?






Regards

The SharK

http://home19.inet.tele.dk/assembler

:)
Posted on 2002-03-22 12:38:52 by The SharK
Is there ANY reason to write your programs in PURE BINARY ?


yes, in order to become real programmers :)
Posted on 2002-03-22 13:02:19 by Tola
All right Tola,

what's this code then:


Start:
0011010001100101010010101010010110100
1010101010101010101010110101000001010
1101111010101010110110101011010110101
0101010101010101010101101010010110101
1110101010110111101011010111010101010
end start
:grin:
Posted on 2002-03-22 13:16:00 by The SharK
Shark,

Apart from the problem that your example will not build, if you REALLY need to build a file at low level, do it in HEX, x86 processors use BYTE size data as their minimum and only do BIT data indirectly.

You don't need an assembler to write in hex, just some way to save the bytes to a file. This capacity tends to be useful when writing DOS headers and occasionally fixing damaged files.

Regards,

hutch@movsd.com
Posted on 2002-03-22 16:45:54 by hutch--
Start:
0011010001100101010010101010010110100
1010101010101010101010110101000001010
1101111010101010110110101011010110101
0101010101010101010101101010010110101
1110101010110111101011010111010101010
end start


Just for fun I tried converting this I got as far as
xor al, 065h
and then we have 4a wich isn't an instruction :)
Posted on 2002-03-22 17:28:30 by Quantum
In addition to what hutch said: "You should practice safe HEX" :grin:
Posted on 2002-03-22 17:36:56 by stryker
Simply put to answer your question. There is NO reason to code in hex/binary. Assembly language is a direct translation to hex/binary.
Posted on 2002-03-22 22:03:52 by Asm_Freak
What if you did not have a assembler, text editor?
:tongue:

However, it is nice to be able to hex edit a program.
Posted on 2002-03-22 23:09:13 by bdjames
Anyone who has wrote a dis-/assembler or debugged code for thousands of hours can easily read some hex. Personally, I think it demostrates a level of understanding that isn't appearant to the HLL programmer, or non-seasoned assembly language programmer. Trying to code a program for smallest size is a start - knowing the number of bytes produced by each instruction. Trying to code for best compression requires knowing what the actual bytes produced are. :)
Posted on 2002-03-23 00:18:19 by bitRAKE
I programmed in binary once; when I build a network of D-FF connected together with diode OR gates, 10k resistors, and DIP switches. A very good example of epileptic seizers (or death depending upon the program).
Posted on 2002-03-23 04:04:49 by eet_1024
Can you make your programs even smaller than us who uses MASM32

"Us who uses MASM32 " write very different code regarding both speed and size.
In DOS we use int and number of func and it wasn't a problem to memoryze them. So what's difference in memorizing opcode.
The only problem I see, coding in hex, to calculate labels.
I often forget how to spell some Api func, but I hardly be able to
forget what means D40A since I often use it as D409 or whatever else.
Posted on 2002-03-23 04:21:06 by The Svin
I wrote several programs, some of conciderable extent, for some early processors in the 8080/Z80 days when computing power was either frightfully expensive, or shamelessly simplistic.

The code was then hand assembled. True, I used HEX not binary, but that would only worry the most pedantic of observers.

Once I had a hex listing, I used the old toggle switches and a push button method to load the code into an EPROM, plug the programmed EPROM into a computer board, turn it on and watch the program run.

I still have fond memoried when I hacked apart a Sinclair computer, which in 4 chips came with CPU, 1K of RAM, a video driver, chicklett style keyboard, cassette tape drive for mass storage (you supply the cassette recoeder), and a video driver output on TV channel 2 or 3. All fot 100 bucks.

I hacked mine for extra memory, a fixed EPROM, a full feature keyboard, then added a EPROM burner to it to simplify burning these wonderful chips.

Still had no assembler, so I still hand assembled code. But it was nicer typing it in HEX, and of course, storing the listing for the next use too.

So yes, Virginia, real programmers really DO write in binary.
Posted on 2002-03-23 15:26:18 by Ernie
Hi Hutch
"useful when writing DOS headers and occasionally fixing damaged files"


I quite agree on that, when you need to repair some fileheader,
and stuff like that !



bitRAKE
"it demonstrates a level of understanding"

Yes, I think that one should have some understanding about
what's going on in a computer, file, harddisk and so on....!
It sure helps when you need to resolve computer problems.

;)
Posted on 2002-03-24 03:36:55 by The SharK