5 ms·
Per the Internet Archive, this page is at least fifteen years old - it looked like this as of the first snapshot taken on February 1, 2001 (https://web.archive.
by nneonneo 10y ago
Per the Internet Archive, this page is at least fifteen years old - it looked like this as of the first snapshot taken on February 1, 2001 (https://web.archive.org/web/20010201152900/http://int80h.org/ https://web.archive.org/web/20010201152900/http://int80h.org...). A lot has changed in computing since then.
ARM became dominant in mobile computing, which was barely a glimmer back in 2001. x86-64 became commonplace. Just targeting Intel and ARM processors now necessitates writing code for four architectures: x86, x86-64, AArch32 and AArch64 for a full range of compatibility.
While MS-DOS syscall numbers were documented and often _required_ assembly to use, the opposite is true on modern Windows - Windows system call numbers are undocumented and change from release to release, requiring programmers to link against Kernel32.dll or equivalent to stably call into the OS.
Compiler technology has advanced significantly, and processor manufacturers now often optimize towards patterns employed by compilers rather than by humans (case-in-point: the x86 "loop" instruction, while extremely convenient for handwritten code, is significantly less performant than a cmp-jmp loop).
Code has gotten more and more complex. Whether this is a good thing or bad, the reality is that hundreds of millions of lines of assembly would be required to replicate complex modern programs like web browsers - projects of that scale will always require powerful HLLs to manage abstraction, something that assembly does not and cannot provide on its own.
View this page as what it is - a historical artifact. Although assembly programming definitely still has its uses, the arguments this page makes in favor of it are largely no longer relevant.
- m0skit0 10y agoI think programming in assembly really teaches you how a computer work. That's its main benefit imho.
- _c_ 10y agoMS-DOS was written for only one processor. UNIX kernels could run on a variety of processors, including ARM; UNIX was a relative latecomer to x86. As for Windows kernels, both then and now, UNIX kernels are open source and do not deliberately obscure system calls. It's not unreasonable for someone to argue the benefits in writing programs for UNIX. "View this page as what it is..." It's one of the few pages written about UNIX assembly. That's how I view it. Years later it was put into The FreeBSD Handbook.
- saynsedit 10y agoPerformant is not a word. Use a word more specific to your meaning, perhaps "efficient" in this context.
- emn13 10y agoWell, what once was not, certainly now appears to be. It's been used so much, I think it's fair to say it has become a word. Moans and koans to contrary will be accepted, however. And hey, if you're lucky its existence will be short-lived.
- GFK_of_xmaspast 10y ago"Performant" is a perfectly fine word. You might even call it cromulent.
- p1esk 10y agoNice!
- jagger27 10y agoI found my self thinking that performant is definitely a word, and it is, in French.
- dalke 10y agoPerformant is a perfectly valid word which has been part of software engineering since at least the 1990s. "... aiming to provide performant tools ..." (1995) - https://books.google.com/books?id=uZjYdk4bQgkC&pg=PA1&dq=performant&hl=en&sa=X&redir_esc=y#v=onepage&q=performant&f=false https://books.google.com/books?id=uZjYdk4bQgkC&pg=PA1&dq=per... definitions for different aspects of 'peformant' (1998) - https://books.google.se/books?id=FYkmwYKBoCwC&pg=PA235&dq=%22performant%22&hl=en&sa=X&ei=CG4XVIydJ4XUiwKM1IDQBg&redir_esc=y#v=onepage&q=%22performant%22&f=false https://books.google.se/books?id=FYkmwYKBoCwC&pg=PA235&dq=%2... "The network and hierarchical data models, introduced in the 1960's, provide a very performant data organization for well-defined, update-intensive transaction processing of large volumes of data at the cost of conceptual complexity" (1993) - https://books.google.com/books?id=Ro3zjjTNE9UC&pg=PA327&dq=performant&hl=en&sa=X&redir_esc=y#v=onepage&q&f=false https://books.google.com/books?id=Ro3zjjTNE9UC&pg=PA327&dq=p... Here's the n-grams trend. https://books.google.com/ngrams/graph?content=performant&year_start=1800&year_end=2010&corpus=15&smoothing=3&share=&direct_url=t1%3B%2Cperformant%3B%2Cc0 https://books.google.com/ngrams/graph?content=performant&yea... . There are many domain-specific terms which have not yet made it to general dictionaries. For example, from your comments, I see you used the word 'multicast', This is not in Merriam-Webster, at http://www.merriam-webster.com/dictionary/suggestions/multicast http://www.merriam-webster.com/dictionary/suggestions/multic... . What makes it a word but not performant? Is "zero-copy" a word? "smarthost"? "type-punning"? "upstream"?
- userbinator 10y agoWhether this is a good thing or bad, the reality is that hundreds of millions of lines of assembly would be required to replicate complex modern programs like web browsers - projects of that scale will always require powerful HLLs to manage abstraction, something that assembly does not and cannot provide on its own. On the other hand, when using Asm you can often leverage techniques not possible in HLLs to avoid complexity and abstraction. This is a fact which seems not commonly known, even in CS courses involving Asm, as those tend to be more about inspecting compiler output and the few "write in Asm" exercises are mimicing code that a compiler would generate, which IMHO misses the whole point of writing in Asm. Here is an operating system containing many nontrivial applications, all written in 100% Asm: http://www.menuetos.net/ http://www.menuetos.net/ Among other things, it contains a minimal yet functional web browser (around the same level of minimalism as Dillo or NetSurf, i.e. no JS or fancy CSS), and the whole package fits on a single floppy disk. An entire OS with kernel, drivers, and applications in total can be smaller than a "Hello World" application in a "modern" programming language (which depends on countless other external libraries too, including an OS several GB or more.) It really makes you think.
- TazeTSchnitzel 10y agoMenuet OS could be the same size if it was written in C or C++. It's small because it's minimal and uses few dependencies.
- pcwalton 10y ago> Here is an operating system containing many nontrivial applications, all written in 100% Asm: Here's a small snippet I found from draw.asm: add r9 , [copyxe] add r9 , [copyxe] add r9 , [copyxe] sub r9 , [copyx] sub r9 , [copyx] sub r9 , [copyx] add r10 , [sizex] add r10 , [sizex] add r10 , [sizex] add r14 , 1 72 bytes. Here's what GCC generates with -Os for the same code: imul rax,qword ptr [copyxe],3 inc r14 add r9,rax imul rax,qword ptr [sizex],3 add r10,rax imul rax,qword ptr [copyx],-3 add r9,rax 36 bytes. As a bonus, GCC with -O2: mov rax,[copyxe] add r14,1 lea rax,[rax+rax*2] add r9,rax mov rax,[sizex] lea rax,[rax+rax*2] add r10,rax mov rax,[copyx] mov rcx,rax neg rcx lea rax,[rax+rcx*4] ; clever! add r9,rax 52 bytes. So, not only does GCC hugely beat this snippet of handwritten Menuet assembly in code size, it can even do so handily while folding all the repeated additions into LEA and eliminating most of the loads. This is an excellent example of why you shouldn't write in assembler.