> compile NEMU

ysyx_22040000 李心杨
Linux calcite 6.6.19 #1-NixOS SMP PREEMPT_DYNAMIC Fri Mar  1 12:35:11 UTC 2024 x86_64 GNU/Linux
 16:26:21  up 4 days  3:32,  2 users,  load average: 0.85, 0.91, 0.95
This commit is contained in:
tracer-ysyx 2024-03-24 16:26:21 +08:00 committed by xinyangli
parent a210694e82
commit d08c2860da
415 changed files with 44314 additions and 11 deletions

View file

@ -0,0 +1,3 @@
NAME = hello
SRCS = hello.c
include $(AM_HOME)/Makefile

View file

@ -0,0 +1,13 @@
#include <am.h>
#include <klib-macros.h>
int main(const char *args) {
const char *fmt =
"Hello, AbstractMachine!\n"
"mainargs = '%'.\n";
for (const char *p = fmt; *p; p++) {
(*p == '%') ? putstr(args) : putch(*p);
}
return 0;
}