概要
plunkerでjor1kやってみた。
linuxプログラミングしてみた。
サンプルコード
# include <stdio.h>
# include <stdlib.h>
int main(int argc, char * argv[])
{
int i;
for (i = 1; i < argc; i++)
{
printf("%s%s", (i == 1 ? "" : " "), argv[i]);
}
putchar('\n');
exit(0);
}
結果
コンパイルエラーとなる。
~ $ cat main.c
# include <stdio.h>
# include <stdlib.h>
int main(int argc, char * argv[])
{
int i;
for (i = 1; i < argc; i++)
{
printf("%s%s", (i == 1 ? "" : " "), argv[i]);
}
putchar('\n');
exit(0);
}
~ $ gcc main.c
/tmp/cccDMhHm.s: Assembler messages:
/tmp/cccDMhHm.s:61: Error: operand out of range (1073741797 not between -3355443
2 and 33554431)
~ $
~ $ uname -a
Linux openrisc 4.16.0+ #10 Fri Jun 1 12:21:48 UTC 2018 openrisc GNU/Linux
調査
こちらだと、成功する。https://cs-education.github.io/sys/#VM
以上。