Skip to content

Commit

Permalink
Merge pull request #112 from TG9541/e4thcom-0.6.3
Browse files Browse the repository at this point in the history
fixes #111 prepare release 2.2.20
  • Loading branch information
TG9541 authored Nov 11, 2017
2 parents 4307122 + 1439104 commit a3929ae
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ main.ihx: main.c $(MDEPS)
mkdir -p out/$(BOARD)/target
rm -f out/$(BOARD)/target/*
tools/genalias.awk -v target="out/$(BOARD)/target/" out/$(BOARD)/forth.rst
tools/genefr.awk out/$(BOARD)/forth.rst > out/$(BOARD)/FORTH.efr
tools/genconst.awk -v target="out/$(BOARD)/target/" out/$(BOARD)/forth.rst

forth.rel: forth.asm
mkdir -p out/$(BOARD)
Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 3 additions & 1 deletion tools/genalias.awk
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,9 @@ END {
}

function makeAlias(word,addr) {
print ": " word " [ $CC C, $" ALIASADDR[word] " , OVERT" > target word
filename = word
gsub("/", "_", filename) # replace "/" - it's forbidden in Linux filenames
print ": " word " [ $CC C, $" ALIASADDR[word] " , OVERT" > target filename
}

function result (text) {
Expand Down
19 changes: 19 additions & 0 deletions tools/genconst.awk
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/usr/bin/gawk -f
BEGIN {
if (!target) {
target = "target/"
}
}

$3!~/(LINK|RAMPOOL)/ && $4=="=" && $5~/(UPP|RAMPOOL)/ && $1~/^00/ {
if (split($0,b,"\"") == 3) {
symbol = b[2]
}
else {
symbol = $3
}
split($0,a,";");
addr = "$" substr($1,3)
comment = " \\ " a[2]
print addr " CONSTANT " symbol comment > target symbol
}

0 comments on commit a3929ae

Please sign in to comment.