tags:

views:

138

answers:

3

I'm a total beginner when it comes to computer languages, and was asked for a code to write .NET with assembler x86, and i'm stuck here at the moment. Any basic code lines would work, still couldn't find any on the web.

+7  A: 

Um, you don't. Whoever asked you to do this was pulling your leg - or was clueless. What's the context here?

Jon Skeet
Thanks for that, now i can stop struggling with this matter.
TotalStranger
+1  A: 

Warning: I'm giving this answer just because I can.

Technically, you could write .NET code using x86 assembly. However, you would be writing assembly code to call the .NET APIs to initialize the CLR and read in and execute IL from somewhere (or even generate the IL on the fly!).

That being said, I wouldn't wish such a task on anybody.

Adam Maras
Or code the IL as DB macros, i.e., macros that produce constant data to be executed as .NET bytecodes.
Loadmaster
<humor> True, in the same sense that given infinite time a monkey bashing at at a type writer will reproduce the works of Shakespear </humor>
Binary Worrier
Depending on what one means my writing .NET code, then any language can be used to integrate with .NET code ... I suspect the person who asked the question meant IL, perhaps they were looking for someone with deep CLR knowledge for whatever reason. You didn't deserve a -1.
Richard Hein
I even put a disclaimer on my joke answer :( some smart-asses don't even give warning!
Adam Maras
+7  A: 

.NET code runs under a virtual machine - as such you wouldn't program .NET code in assembler. You may have been asked to write .NET code in IL - which is the low-level instruction set that runs on the .NET virtual machine. In that case you could use ILASM to compile - but it's definitely not x86 assembler - the IL instructions are quite different (more high-level) than x86 assembler (or any assembly language for that matter).

It would help if you could clarify what kind of project work you are specifically being asked to do - because there's clearly some confusion or misscommunication happening based on what you're asking.

LBushkin