OESF Portables Forum

Model Specific Forums => Sharp Zaurus => Zaurus - pdaXrom => Topic started by: djtreble on December 27, 2004, 04:22:02 am

Title: Accumulator
Post by: djtreble 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...