Last active
August 19, 2016 14:40
-
-
Save annezao/36032613dbafa7941065a5489fc9ce0a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int op, saida; | |
void main( ) | |
{ | |
saida = 0; | |
op = 192; // 11000000 | |
asm(".intel_syntax noprefix"); | |
asm ("mov %al, op"); // move op para registrador al | |
asm ("ror %al, 2"); // rotaciona al duas vezes | |
asm("mov saida, %al"); // saida = 00110000 | |
asm(".att_syntax noprefix"); | |
printf("Valor de saida: %u \n", saida); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment