1 Replies - 1162 Views - Last Post: 11 February 2010 - 12:28 AM

#1 mattlyons   User is offline

  • D.I.C Regular

Reputation: 6
  • View blog
  • Posts: 301
  • Joined: 10-September 09

conversion of pseudo instruction to real instruction

Posted 10 February 2010 - 02:05 PM

I am just starting out on assembly programming; only in the first couple weeks of class and beforehand I had never heard of this stuff. So I am just trying to get a grasp on this stuff. If I wanted to do a sequence of real instructions to implement the pseudo instruction:

li, $t0, 100



What would it be? Just trying to start off on the right foot here. I got a list of these I gotta do.

Is This A Good Question/Topic? 0
  • +

Replies To: conversion of pseudo instruction to real instruction

#2 Martyn.Rae   User is offline

  • The programming dinosaur
  • member icon

Reputation: 556
  • View blog
  • Posts: 1,436
  • Joined: 22-August 09

Re: conversion of pseudo instruction to real instruction

Posted 11 February 2010 - 12:28 AM

Assuming the li pseudo instruction means load immediate and the $t0 is a variable in memory (rather than some form of register), then this pseudo instruction reads load immediate into the variable $t0, the value of 100

In real x86 code, this would be

     ;  li,  $t0, 100

        mov  eax, 100
        mov  $t0, eax



Hope that helps.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1