1
0
mirror of synced 2026-01-11 23:42:44 +00:00

Cleaned up C example.

This commit is contained in:
Andras Tantos 2024-04-25 15:31:29 -07:00
parent 7c59c4bd02
commit 1b1ebb30b8
5 changed files with 36 additions and 11193 deletions

View File

@ -1,4 +1,8 @@
.PHONY: helloa
BINDIR=_bin
helloa:
$(MAKE) -C helloa $(MAKECMDGOALS)
all: $(BINDIR)/helloa $(BINDIR)/helloc
clean: all
build: all
$(BINDIR)/%: %
$(MAKE) -C $< $(MAKECMDGOALS)

View File

@ -33,7 +33,7 @@ $(OBJDIR)%.obj: %.cal
$(LIBCOS):
$(MAKE) -C $(LIBCOS_SRC) $(MAKECMDGOALS)
clean:
clean: $(LIBCOS)
rm -f $(OBJDIR)*.obj $(OBJDIR)*.lst
rm -f $(TARGET)

View File

@ -0,0 +1,28 @@
BINDIR = ../_bin/
LIBDIR = ../_lib/
OBJDIR = _obj/
CC = $(COS_BASE)ack
#ACK=$(shell which $(CC))
#var PLATFORMDIR={EM}/share/ack/cos
# set COS_BASE if tools are not in PATH
#COS_BASE =
TARGET = $(BINDIR)helloc.bin
SRCS = \
helloc.c
all: $(TARGET)
build: clean all
$(TARGET): $(SRCS)
-@mkdir -p $(BINDIR)
$(CC) -o $@ $<
clean:
rm -f $(TARGET)

File diff suppressed because it is too large Load Diff

View File

@ -1,27 +0,0 @@
entry @main
text: section code
@main: bss 0
lc a1,8
isub a1,a7,a1
isub a0,a5,a1
jap @estack
push a6
tr a6,b00
push a6
tr a6,a7
lba s1,D1
push s1
r @puts
inra a7
lc s7,0
tr a7,a6
pop a6
tr b00,a6
pop a6
j b00
rom: section data
D1: = w.*
con X'48656C6C6F20434F
con X'5320776F726C6421
con X'0A00000000000000
text: section code