Mercurial > sos > sos
changeset 114:4187043a3e3a
Added a simple echo program
author | Jonathan Pevarnek <pevarnj@gmail.com> |
---|---|
date | Sat, 11 Jun 2011 15:35:44 -0400 |
parents | d971d4288a5a |
children | 4473e746fe5a |
files | Makefile src/prog/echo.c |
diffstat | 2 files changed, 16 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/Makefile Sat Jun 11 15:24:28 2011 -0400 +++ b/Makefile Sat Jun 11 15:35:44 2011 -0400 @@ -12,11 +12,12 @@ LDFLAGS=-m elf64_s390 OSBINS=shell -PROGBINS=hello ls +PROGBINS=hello ls echo shell_OBJS=src/os/shell.o src/os/std.o src/os/fs.o src/os/string.o src/os/stdio.o src/os/scall.o arch/arch.a hello_OBJS=src/prog/hello.o src/prog/std.o src/prog/string.o ls_OBJS=src/prog/ls.o +echo_OBJS=src/prog/echo.o src/prog/std.o src/prog/string.o sarpn_OBJS=src/sarpn.o src/std.o src/string.o src/prog/stack.o src/operations.o src/math.o arch/arch.a dynamic_OBJS=src/dynamic.o src/std.o src/string.o src/stack.o arch/arch.a @@ -35,6 +36,7 @@ rm -f $(shell_OBJS) rm -f $(hello_OBJS) rm -f $(ls_OBJS) + rm -f $(echo_OBJS) rm -f $(sarpn_OBJS) rm -f $(dynamic_OBJS) rm -f $(testFS_OBJS) @@ -53,6 +55,8 @@ $(LD) $(LDFLAGS) -T scripts/linkerProg.script -o $@ $^ ls: $(ls_OBJS) $(LD) $(LDFLAGS) -T scripts/linkerProg.script -o $@ $^ +echo: $(echo_OBJS) + $(LD) $(LDFLAGS) -T scripts/linkerProg.script -o $@ $^ sarpn: $(sarpn_OBJS) $(LD) $(LDFLAGS) -T scripts/linker.script -o $@ $^
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/prog/echo.c Sat Jun 11 15:35:44 2011 -0400 @@ -0,0 +1,11 @@ +#include <svcCalls.h> +#include <std.h> + +void start() //TODO: accept a command line argument of what to print +{ + char buffer[128]; + sGet(buffer, 128); + sPrint(buffer); + sPrint("\n"); + exit(); +}