Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
28 lines (21 sloc) 672 Bytes
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
char *message = NULL;
int main()
{
message = (char*) malloc(20);
strcpy(message, "Hello world!");
puts(message);
__asm__ __volatile__(
"ldr r1, %0 @ adresa retezce \n\t"
"mov r2, #'*' @ zapisovany znak \n\t"
"strb r2, [r1,#4] @ prepis jednoho 'o' \n\t"
"strb r2, [r1,#7] @ prepis druheho 'o' \n\t"
: /* zadne vystupni operandy */
: "m" (message) /* vstupni operandy */
: "r1", "r2" /* registry pouzivane uvnitr kodu */
);
puts(message);
return 0;
}