J!NX Forums
J!NX Forums
Home | Forum Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
This username differs from J!NX login...
Save Password
Forgot your Password?

 All Forums
 TechSpeak
 Newbies Here
 Assembly n00bs
 New Topic  Reply to Topic
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 2

Sean
l4m3r

Australia
1428 Posts

Posted - 01/15/2005 :  6:12:38 PM  Show Profile  Reply with Quote
Hi, i think this is a real good site for ya, if you wanna learn the good old dos ASM? http://users.easystreet.com/jkirwan/new/x86lrn.html also i find mASM very shit so dont bother! there are LOTS of assembly compilers around but i would recommend..
1: nasm
2: tasm <-Pay for it... Or find cracked on google
3: a86 <-Is what i mostly use and it RULES! but isnt free, who cares, works with tASM too.
4: My best free compiler that i love 100% is the good old Debug in Dos prompt... Sure its old an stuff but its really easy.. Make a few batch files to do all the work for ya and your away, w00t

Anyways to mASM... The best thing about it is the example code, there are shit loads of it to get ya started! Fuck the GUI tho i hate that too Fuck the debug shit, do it yourself!

C++ is good yeh but how often do you whish you could just get rid of that stupid nag screen in that
shareware app you use? Knowing a high-level language wont get you very far when you
open the **** up in your decompiler and see something like CMP EAX, 7C0A!

If anyone needs tASM drop me a mail But i never seem to use it.

Ok i just confused myself bye

EDIT // Links:
Tuts an ****:
http://www.cesis.lv/learn/asm/
http://webster.cs.ucr.edu/
http://webster.cs.ucr.edu/AsmTools/HLA/HLADoc/HLARef/HLARef7.html
http://www.onlamp.com/pub/a/onlamp/2004/05/06/writegreatcode.html
http://www.programmersheaven.com/search/LinkDetail.asp?Typ=2&ID=9004
http://en.wikibooks.org/wiki/Programming:Assembly

Compilers:
http://www.compilers.net/Dir/Free/Compilers/Asm.htm
http://www.thefreecountry.com/compilers/assemblers.shtml
FUK YOU TO BITCH!

Edited by - Sean on 01/15/2005 6:21:02 PM

RemoteC-2
Omega Member

has been the Prince of Darkness since 1979!
308 Posts

Posted - 01/15/2005 :  6:21:13 PM  Show Profile  Reply with Quote
Constructive Critisism Sequence Intiated
i dont know why anyone 1 would even want to spend their time learning assembler. they should learn something that would actully be worth their time like c++ or c-script.
Constructive Critisism Sequence Ended

My Forum Help Build
Go to Top of Page

iamtheevil1
Omega Member

241 Posts

Posted - 01/15/2005 :  6:34:09 PM  Show Profile  Visit iamtheevil1's Homepage  Send iamtheevil1 a Yahoo! Message  Reply with Quote
quote:
Originally posted by RemoteC-2

Constructive Critisism Sequence Intiated
i dont know why anyone 1 would even want to spend their time learning assembler. they should learn something that would actully be worth their time like c++ or c-script.
Constructive Critisism Sequence Ended

My Forum Help Build


Low level languages (in this case ASM) in my opinion, give you more control over your application development. As a matter of fact, i aslo found it easier to compile, and find Buffer over-flow exploits after i knew some assembly. I know people who still code in assembly. Masm (macro assembler) for example just came out with a new compiler a few months ago, so ASM is still far from a waste of time.

{###]`,`,`,`,>

Trying is the fist step to failure.

Edited by - iamtheevil1 on 01/15/2005 6:35:17 PM
Go to Top of Page

Sean
l4m3r

Australia
1428 Posts

Posted - 01/15/2005 :  6:50:04 PM  Show Profile  Reply with Quote
quote:
Originally posted by RemoteC-2

Constructive Critisism Sequence Intiated
i dont know why anyone 1 would even want to spend their time learning assembler. they should learn something that would actully be worth their time like c++ or c-script.
Constructive Critisism Sequence Ended

My Forum Help Build



If you ask someone these days what the advantage of assembly is, they will tell you it's
speed. That might have been true in the days of BASIC or Pascal, but today a C/C++
program compiled with an optimized compiler is as fast, or even faster than the same
algorithm in assembly. According to many people assembly is dead. So why bother
learning it?
1. Learning assembly will help you better understand just how a computer works.
2. If windows crashes, it usually returns the location/action that caused the error.
However, it doesn't return it in C/C++. Knowing assembly is the only way to track
down bugs/exploits and fix them.
3. Certain low level and hardware situations still require assembly
4. If you need precise control over what your program is doing, a high level language
is seldom powerful enough.
5. Anyway you put it, even the most optimized high level language compiler is still
just a general compiler, thus the code it produces is also general/slow code. If
you have a specific task, it will run faster in optimized assembly than in any other
language.
7. "Professional Assembly Programmer" looks damn good on a resume.
My personal reason why I think assembly is the best language is the fact that you're
in control. Yes all you C/C++/Pascal/Perl/etc coders out there, in all your fancy
high level languages you're still the passenger. The compiler and the language itself
limit you. In assembly you're only limited by the hardware you own. You control the
CPU and memory, not the otherway around.

As said by Ralph :p

FUK YOU TO BITCH!
Go to Top of Page

iamtheevil1
Omega Member

241 Posts

Posted - 01/15/2005 :  10:20:39 PM  Show Profile  Visit iamtheevil1's Homepage  Send iamtheevil1 a Yahoo! Message  Reply with Quote
I agree sean, asm for all!

{###]`,`,`,`,>

Trying is the fist step to failure.
Go to Top of Page

Sean
l4m3r

Australia
1428 Posts

Posted - 01/15/2005 :  10:38:43 PM  Show Profile  Reply with Quote
The hardest thing is finding the rite tuts for you, and the rite assembler! Iv used
nasm
fasm
a86
tasm
masm
But i just love the good old debug it anly create .com but ahh whatever turns you on

FUK YOU TO BITCH!
Go to Top of Page

razorwire_2k
Omega Member

373 Posts

Posted - 01/16/2005 :  08:16:49 AM  Show Profile  Send razorwire_2k a Yahoo! Message  Reply with Quote
quote:
Originally posted by RemoteC-2
i dont know why anyone 1 would even want to spend their time learning assembler.


Eh?

Assembler is the cornerstone of any good programming education. At least a mild grasp of it is required to become a good all-round coder.

I've used it almost daily in some form for the last year now.

Infiltrate, destroy, rebuild.
Go to Top of Page

Sean
l4m3r

Australia
1428 Posts

Posted - 01/16/2005 :  2:24:19 PM  Show Profile  Reply with Quote
quote:
Originally posted by razorwire_2k

quote:
Originally posted by RemoteC-2
i dont know why anyone 1 would even want to spend their time learning assembler.


Eh?

Assembler is the cornerstone of any good programming education. At least a mild grasp of it is required to become a good all-round coder.

I've used it almost daily in some form for the last year now.

Infiltrate, destroy, rebuild.




Assembly not Assembler, assembler is the tool you use to assemble your assembly code

FUK YOU TO BITCH!
Go to Top of Page

RemoteC-2
Omega Member

has been the Prince of Darkness since 1979!
308 Posts

Posted - 01/16/2005 :  8:45:16 PM  Show Profile  Reply with Quote
well ty 4 pointing that out to me

My Forum Help Build
Go to Top of Page

riluve
Omega Member

USA
354 Posts

Posted - 01/18/2005 :  10:17:10 AM  Show Profile  Reply with Quote
quote:
Originally posted by Sean
[brIf you ask someone these days what the advantage of assembly is, they will tell you it's speed. That might have been true in the days of BASIC or Pascal, but today a C/C++ program compiled with an optimized compiler is as fast, or even faster than the same algorithm in assembly. According to many people assembly is dead. So why bother learning it?


Sean - sorry, but this is so very wrong. First let me say the advantage of assembly has always been and will always be size. Code written in assembly is about 1/3th the size of the code written in C and from 1/10 or more the size of code written in C++.

The result of the smaller, more efficient code is that it basically runs faster because there is less overhead, shuffling of varibles, etc. Neither C nor C++ can ever be written smaller or exicuted faster then assembly, it is physically impossible. It's like haveing an apple smaller than an atom - considering an apple is made of atoms, it just won't work.

Now that processors run 100,000 times what they use to, the speed difference might not be noticable at all, it may be insignificant, but it will always be there. Modern hardware, however, can also eliminate some of the in-efficiencies introduced by C and C++. Pipelines and branch prediction can minimize the impact of inefficient code, but not eliminate it.

::...
local Baby Shyt expert

Edited by - riluve on 01/18/2005 10:21:00 AM
Go to Top of Page

riluve
Omega Member

USA
354 Posts

Posted - 01/18/2005 :  12:13:54 PM  Show Profile  Reply with Quote
I think you guys are confusing form and function. First of all, let me make a small correction, C and C++ do not compile to assembly, they compile to machine code (as does assembly). The advantage is obviously that assembly has nearly a 1 to 1 ratio of instruction to op code.

As to the gee-wiz-bang optimizations available for C and C++, you are forgetting, they are just programing languages that have received a lot of developmental attention. Anything you can do with C or C++ - ANY optimization – can also be done with assembly.

However, there are assembly optimizations which can not be done in C or C ++. Ergo, though you may be able to automate C optimizations and say it is more efficient then what was done by a person in assembly, its not a proper/fair comparison. If my 7 year old brother raced a ford against mario andretti in a Chevy – and Mario won – you could not say oh, hey Chevy's are better cars. Its an inappropriate claim with no logical foundation.

In essence, what you are saying is, so many people have put so much time into optimizing C and C++ code that in most cases it is impossible to make assembly more efficient. That doesn't mean that it can't be done or hasn't been done.

We have a large set of assembly libraries that are about 20 meg in source and can be as small as 256k when compiled. The same functionality in C is 1 meg or more when compiled. Never has there been a case where any C/C++ code has been even close to the size of our assembly. Granted though, our functionality is very simple in concept – but making efficient code is about breaking projects into simple concepts.

Here is the point: any tricks you do to optimize C or C++ can be done with assembly, but there are optimizations done in assembly that can not be done in C or C++. Ergo, if you have C or C++ code that is more efficient than some assembly equivalent, then it is due to an ability to program in C or an inability to program as well in assembly. Its not a function/limitation of assembly itself.

C/C++ gets more attention, has more publicity, has a stronger following, etc, so it usually comes with a better tool set. If you have the equivalent tool set and compare assembly and C/C++, it is impossible for C/C++ to be more efficient.

::...
local Baby Shyt expert

Edited by - riluve on 01/18/2005 12:14:36 PM
Go to Top of Page

riluve
Omega Member

USA
354 Posts

Posted - 01/18/2005 :  2:17:31 PM  Show Profile  Reply with Quote
You have missed the point entirely.

The ONLY thing a HLL is, is a symbolic layer on top of (in essence), assembly. If there is an aggregate optimization you want to apply to assembly, its a simple matter of adding an appropriate symbolic layer and cluing your compiler in. ANYTHING you do in a HLL can be done in assembly as the HLL and its compiler are built purely on the functionality of assembly.

The ONLY advantage of an HLL is that it can be applied to OTHER assembly languages on other platforms. An HLL doesn't need to know the details, thats left up to the compiler.

The “magic” is done in the compiler. Any “magic” applied to an HLL compiler can be applied to an assembly compiler – simply by adding a thin symbolic layer.

The ONLY thing an HLL does is provide a symbolic layer that is predefined so that the code can be moved from one system to another and be compiled for that system with little or no modification.

I really don't understand how you don't see that if a C compiler can be optimized, an assembly compiler can be optimized as well.
quote:
actually if you want to get technical, they "compile" to object source. and in most (if not all) instances, that object source IS one-part assembly, one-part relocation-information, one part symbolic tree. this process is where the optimizations occur that i speak of. resulting in assembly which is more efficient than could be done by hand. "assemblers" then take "assembly" to create unlinked machine source.

NO. A compiler, by definition, compiles source code into machine code. The source can be C or C++ or assembly or whatever. But the result is NOT assembly, it is machine code. Yes, you can have a compiler that compiles your code into an intermediate step such as an OBJ, but this is not a requirement (though it is a common practice).

For example, an x86 .COM file needs no linking information. You can compile from source directly to this format without ever creating an OBJ. You can do the same with small .EXE's.

You are correct that an OBJ contains more than just machine code as it is an intermediate step. It has the linking information so that the OBJs can be linked together to form then a final image, but the machine code as represented from the source is there as well. If you are using a compiler that has assembly as output, you should technically call it a cascader, not a compiler. The output of a compiler is machine code and any needed linking information. A cascader is a compiler that produces a language other than machine code.
quote:
not nearly...exactly. one instruction, one opcode (the only variance comes from class of opcode relating argument size information).

Did you notice that you said I was wrong, then before you were done with the sentence, you admitted I was right. By "nearly", it should be clear that I am saying that there is variance. If you agree that there is variance, you have no business insisting I am wrong.

Additionaly, when you write any sizable amount of assembly, then decompile it, you will notice there are a few things that are not exactly how you specified them, i.e. more variance.
quote:
really, can you backpipe assembly into a contextual state that can be understood at an aggregate level (ie. decompile with absolute realization of the parts that make up the whole)? the fact is that without a language to define such relationships - the assembler is left making optimizations of instructions; without any form of insight into "intent."
Yes, you can. This is where I hope to finally make some headway. To aggregate assembly all you need is a simple symbolic layer on top. This symbolic layer can be designed to perform any function done in an HLL.

The difference is, this symbolic language would be, like assembly itself, very specific to the hardware in question. Thus, unlike a true HLL it could only be used on the hardware it was designed for or hardware that had a very close scheme.

So, in assembly, with a thin symbolic layer, you could apply all HLL optimizations AND optimize for the hardware in question. In an HLL you can not effectively optimize for the hardware design as its specifics are unknown - even to the compiler.
quote:
no they can't. you cannot even create adequate representation of assembly to do half of the modern optimizations.
Think about it – the ONLY purpose of an HLL: representing assembly.
quote:
it's not a matter of being a limitation of assembly - it's a matter of human flaw that cannot conceive the enumerable possibilities of assembly output which would be _more_ feasible under an efficiency evaluation.
Assembly can be just as easily automated as C or C++. However, C and C++ are limited by their abstraction from the hardware. Assembly is not.
quote:
and yet, that's never going to happen - this is like saying you want to take a lossy compression, regain resolution and accuracy, and then recompress under a stronger algorythm. when the best you can do is iterate the current one.
Sigh. It has happened, it does happen. Don't assume that what you see is all there is. Oddly enough, your metaphor is better suited to my argument than yours.

::...
local Baby Shyt expert

Edited by - riluve on 01/18/2005 4:32:54 PM
Go to Top of Page

S3AN
Beta Member

91 Posts

Posted - 01/18/2005 :  3:32:21 PM  Show Profile  Reply with Quote
lol just keep going i dont care how fast it is, i just like the language.
Go to Top of Page

S3AN
Beta Member

91 Posts

Posted - 01/19/2005 :  03:17:00 AM  Show Profile  Reply with Quote
SHUT THE FUCK UP
lol, how do you people argu for so long? i would run outa words by now, and goto bed!
Go to Top of Page

iamtheevil1
Omega Member

241 Posts

Posted - 01/19/2005 :  03:42:46 AM  Show Profile  Visit iamtheevil1's Homepage  Send iamtheevil1 a Yahoo! Message  Reply with Quote
I pick years of practice. Did i win? what did i win?

{###]`,`,`,`,>

Trying is the fist step to failure.
Go to Top of Page

iamtheevil1
Omega Member

241 Posts

Posted - 01/19/2005 :  03:53:51 AM  Show Profile  Visit iamtheevil1's Homepage  Send iamtheevil1 a Yahoo! Message  Reply with Quote
quote:
Originally posted by droby10

a ferarri.


Bitchin

{###]`,`,`,`,>

Trying is the fist step to failure.
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Next Page
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
J!NX Forums © J!NX and Snitz Go To Top Of Page
Snitz Forums 2000