x86 Assembly

Moderators: None (Apply to moderate this forum)
Number of threads: 4563
Number of posts: 16029

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Edit Report
Risc Assembly Language Posted by Cue on 5 Dec 2000 at 1:17 PM
Hiya...<br>
In the Uni we learn how to program in assembly under Sun.<br>
Is there a way to create a virtual enviroment (or something like) in my x86 computer so that i can practise at home?<br>
<br>
Sorry if it sounds stupid :(<br>
but i'm new in Assembly...<br>
Thanx in Advance


Edit Report
Re: Risc Assembly Language Posted by Darius on 5 Dec 2000 at 5:48 PM
: Hiya...<br>
: In the Uni we learn how to program in assembly under Sun.<br>
: Is there a way to create a virtual enviroment (or something like) in my x86 computer so that i can practise at home?<br>
: <br>
: Sorry if it sounds stupid :(<br>
: but i'm new in Assembly...<br>
: Thanx in Advance<br>
: <br>
<br>
Yes it's quite doable, however it's quite hard to do right/well. This is the basis of emulation technology.<br>
<br>
Conceptually, the idea is simple. All you need to do is read the input and do what it says and give the exact same output as the actual system would. In the case of CPUs you'd read the opcodes then perform their equivalent, then update a psuedo-system state. As long as all your functions behave exactly the same way as their actual counterparts everything is fine. <br>
<br>
Now, implementing this is quite difficult, actually technically it's in the realm of impossibility. You can't have it be EXACTLY the same, but usually you don't need everything to be the same. Your emulator will, for example, run slower than the actual machine would (speed is one of the other major difficulties, for certain uses). <br>
<br>
Your best bet would be to find an emulator already out there, however here's some psuedo-code for an emulator :P<br>
<br>
while(running){<br>
doOpcode(decodeOpcode(getOpcode());<br>
}<br>
<br>
I guess you could simplify this into a big jump table (taking out the decodeOpcode step), but that wouldn't be fun.





 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.