Risc Assembly Language

Hiya...

In the Uni we learn how to program in assembly under Sun.

Is there a way to create a virtual enviroment (or something like) in my x86 computer so that i can practise at home?



Sorry if it sounds stupid :(

but i'm new in Assembly...

Thanx in Advance


Comments

  • : Hiya...

    : In the Uni we learn how to program in assembly under Sun.

    : Is there a way to create a virtual enviroment (or something like) in my x86 computer so that i can practise at home?

    :

    : Sorry if it sounds stupid :(

    : but i'm new in Assembly...

    : Thanx in Advance

    :



    Yes it's quite doable, however it's quite hard to do right/well. This is the basis of emulation technology.



    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.



    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).



    Your best bet would be to find an emulator already out there, however here's some psuedo-code for an emulator :P



    while(running){

    doOpcode(decodeOpcode(getOpcode());

    }



    I guess you could simplify this into a big jump table (taking out the decodeOpcode step), but that wouldn't be fun.


Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories