lam_stam.c revision b32f58018498ea2225959b0ba11c18f0c433deef
1/* LAM, STAM, load,store access multiple */
2#include <stdio.h>
3#include <unistd.h>
4
5char output[44];
6char input[44] = "0123456789\n"
7                 "0123456789\n"
8                 "0123456789\n"
9                 "0123456789\n";
10
11int main()
12{
13  asm volatile( "larl  1,input\n\t"
14                "larl  2,output\n\t"
15                "lam   3,13,0(1)\n\t"
16                "stam  3,13,0(2)\n\t":::"1", "2");
17
18  write(1, output, sizeof output);
19  return 0;
20}
21