Author Topic: Accumulator  (Read 1694 times)

djtreble

  • Newbie
  • *
  • Posts: 28
    • View Profile
    • http://
Accumulator
« on: December 27, 2004, 04:22:02 am »
Bored of reverse engineering, I decided to muck about with the extra instructions intel added. Unfortunatly I get an illegal instruction, when executing this:

Code: [Select]
#include

unsigned int getAccLo ( void )
{
    unsigned int accHi;
    unsigned int accLo;
    
    asm
    (
  "MRA %0, %1, acc0"
  :"=r"(accLo),"=r"(accHi)
  :
    );
    
    return accLo;
}

int main (int argc, char *argv[])
{
    printf("lo : %d \n", getAccLo());
    
    return 1;
}

Probably needs the kernel to enable something. Downloading the pxa255 datasheets...