How to execute ROL statement in Assembly inline?

1

Well, I have a problem with executing the instruction to scroll left in Assembly in a C code. All the sites I search show this way, but the compiler says there are many memory references to "ROL". I've tried to execute other instructions like MOV and ADD and they worked, only the one that I can not. Can anyone help?

#include <stdio.h>
int rolar(int a){
    __asm__("rol a, 1");
}
int main(void){
    int a;
    scanf("%d", &a);
    printf("%d\n", rolar(a));
    return 0;
}
    
asked by anonymous 24.11.2018 / 20:51

0 answers