Thread: I remember when
View Single Post
  #32  
Old 08-18-2009
johndowe's Avatar
johndowe johndowe is offline
Senior Ladyboy Lover
 
Join Date: Nov 2008
Posts: 538
johndowe is infamous around these partsjohndowe is infamous around these partsjohndowe is infamous around these partsjohndowe is infamous around these parts
Default

Hi there.

Sesane, you seem to know a bit about ASM but you still have alot of mis-conceptions about it, all programs that are in .exe .dll and several others are in machine language for the processor to execute, the BIG difference between "C" and all its variants or Pascal and all its variants and ASM is that asm will ALWAYS be better programmed, so will an asm program "play nice" with other programs, the ansewer is yes, it will only not "play nice" with other programs if it is programmed to do so.

What i mean about asm is that it is very hard to program asm like an idiot, if you unassemble a program written in an "evolved" language you would see jumps that jump to the very next instruction in other words totally useless, the same for branches that branch to the very next instruction so it would go to the next instruction weather the branc is taken or not, also totally useless, and the program would be filled with such useless instructions. which take up both memory space and processor time, so what? 3-4 bytes here 8-10 clock cycles there who cares? Well if it was only once or twice a program, it wouldn't matter much, but it's not once or twice per program it's more like once every 10-20 bytes, it really adds up.

As an example i wrote a small (DOS/ASM) program that displayed the key codes from the keyboard, it displayed the ascii code, & the key code in hexadecimal and decimal, the program was also self explanatory if you typed it with a "/?", the whole program was about 1200 bytes, not that big is it? And i did all the hex and dec routines myself, then i borrowed a "c++" programing book, on the cd there was a keyboard scaner, like i the one i wrote, his didn't self explain it just wrote the letter and the scan code in decimal, mine was much more complete and functionnal, his was 33K's long programmed in "C++", mine was more functionnal gave more info, and was about 28 times smaller, and was MUCH faster, but since the program was waiting on keypresses the speed advantage was not visible, but it would have been at least 50 times faster, the same would be true for most programs, except for some of the more intricate graphics, size wize only, the speed might actually be even faster, because the graphic routines would be way more effective.

So a program is a program wheather(excuse my french) it is programmed in asm c or any other programing language, the thing is the one programmed in asm will be more much more compact will execute much faster, and wouldn't require "run time libraries" like many programs today.

But there a few dis-advantages to asm, 1'st it is as i first said, not for the faint of heart, second rate programmers can easily be weded out though, 2 it is easier to reverse engineer the code is usually quite clean, even if the programmer has a "spaghetti code" programing style, and 3, because of the symplicity and similarity of the instructions it can be easy to make logical errors that can be hard to find, but when you find them you feel like kicking yourself.

But i think the smaller program size and BLAZING speed greatly outweigh the dis-advantages, more so for operating systems and other computing intencive tasks.

JohnDowe.

Last edited by johndowe; 08-18-2009 at 11:36 PM. Reason: Incomplete
Reply With Quote