streda 20. júla 2005

ASP.NET stránky písané v 80386 assembleri

Lately we have been swamped with Bill Gate's new .NET vision. Once again even respectable people are crying out that C++ and assembler programmers will become extinct dinosaurs. My reaction to that is: "It's not fair!" Why are they always picking on assembler programmers? We don't do a lot of harm! Just because we like to have total freedom and like to be close to our hardware doesn't make us bad people. Go pick on someone else (like LISP programmers. I don't like them).
<%@ page language="Asm80386" %>

<%
Str: DB "Testing...", 0

mov eax, -2
cmp eax, 2
jle Label1
xor eax, eax
Label1:
lea esi, Str
push esi
call "Response.Write(string)"
pop esi
%>

EAX: <%= eax %>
Yup, it's true. It's really the x86 (Intel 80386 actually) instruction set that gets compiled into IL. Literally it is an "80386 Assembler scripting Language" for ASP.NET.

[ASM to IL compiler]

Žiadne komentáre: