Skip to content

Commit

Permalink
Merge pull request #121 from TG9541/mmahlow2
Browse files Browse the repository at this point in the history
Mmahlow2
  • Loading branch information
TG9541 authored Nov 24, 2017
2 parents dc04a0e + b19ba4e commit ec994c3
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 9 deletions.
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ deploy:
provider: releases
api_key:
secure: uKmcc+O/sEYVRFPdFJzlgZEwXugAGYZOIsBksvc/HLLYrSmMmA9oIKCcXJFwkxPhHcc3jrzU2y1cZRI33Eftajj8wiTLW5kPt6A3hcDDxkIBgqgImx6u5eIWrRSk4mFcdMW00NvA4WbyTeuM/PFWP8eWP2IlUT8uM+AUJbaIP525K1RwhnjGTpE3vIIjF1s3fMPSztJcCd56inGnEXfh4ZwVLny1dfJZDVo/RSYbbVsukmqMMVGV9L+/mbv92NUX5c8owDGvwOvyTfJ+6YSiMUH1NkyT9LqbDHnnmdvVxpAiG9nwAW0Pl34QbccAmY1lshhnIq/m4IY+xm8KdhG86Nc1NrXzMS2CzjE+0kVTGMiF5eEZX5qvf0AjavGcWYJWk3mwkky4wtxuVX0CGz5Hf749UWQZj7II4XjMM/bWLuia77JuGWJNM41T5q08eMKJ62oXv94F2ma2Bv0W95kdel9d4OFchTI+wwMS3Njpc9aUrNHZcxaO6BSbFivJzODbEoaxpu/ZtGrRT5EIoQnDy/nZhSurDtpdRv5c9xTACqlaI3TCA8qfZeUbanSTAnkTzyFvkqpAcmLNkcJHcUEAWBe6Nusnrenjp1y4e/4xWBfhR3fSeoKiv/iwOszzdTagUv3dae2xAFOs2K/sXcf2FamGPamqAkaCBeaK4uojbWY=
file: out/stm8ef-bin.zip
file:
- "out/stm8ef-bin.zip"
- "out/stm8ef-bin.tgz"
skip_cleanup: true
on:
tags: true
Expand Down
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@

ifeq ($(BOARD),)

all: zip
all: zip tgz

zip: build
find out/ -name "*.ihx" -print | zip -r out/stm8ef-bin docs/words.md mcu/* lib/* -@
find out/ -name "forth.rst" -print | zip -r out/stm8ef-bin tools/* -@
find out/ -name "target" -print | zip -r out/stm8ef-bin -@

tgz: build
( find out/ -path "*target/*" -print0 ; find out/ -name "*.ihx" -type f -print0 ; find out/ -name "forth.rst" -type f -print0 ) | tar -czvf out/stm8ef-bin.tgz docs/words.md mcu lib tools --null -T -

build: words
make BOARD=CORE
make BOARD=XH-M188
Expand Down
2 changes: 1 addition & 1 deletion forth.asm
Original file line number Diff line number Diff line change
Expand Up @@ -3813,7 +3813,7 @@ CREAT:
; CONSTANT ( "name" n -- )
; Create a named constant with state dependant action

HEADFLG CONST "CONSTANT" IMEDD
HEADER CONST "CONSTANT"
CONST:
CALL COLON
CALL COMPI
Expand Down
4 changes: 2 additions & 2 deletions tools/codeload.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,12 @@ def searchItem(item, CPATH):
searchRes = os.path.join(CWDPATH, item)
if not os.path.isfile(searchRes):
searchRes = os.path.join(CPATH, item)
if not os.path.isfile(searchRes):
searchRes = os.path.join(CWDPATH, 'lib', item)
if not os.path.isfile(searchRes):
searchRes = os.path.join(CWDPATH, 'mcu', item)
if not os.path.isfile(searchRes):
searchRes = os.path.join(CWDPATH, 'target', item)
if not os.path.isfile(searchRes):
searchRes = os.path.join(CWDPATH, 'lib', item)
if not os.path.isfile(searchRes):
searchRes = ''
return searchRes
Expand Down
22 changes: 18 additions & 4 deletions tools/genalias.awk
Original file line number Diff line number Diff line change
Expand Up @@ -39,21 +39,26 @@ BEGIN {
p = 1
wline = 0
label = 0
immediate = 0
word = $3

info("header found " word)
next
}

/(HEADER|HEADFLG)/ {
# /(HEADER|HEADFLG)/ && (cOneIsAddress || $2==";")

p = 2
for (i=1; i<=NF; i++)
for (i=1; i<=NF; i++) {
if (index($i,"HEAD")) {
label = $(i+1)
break
}
}

if (/IMEDD/) {
immediate = 1
}

info("header " word " for " label)
next
}
Expand Down Expand Up @@ -86,6 +91,7 @@ p == 3 && cOneIsAddress {
p = 0
addrstr = substr($1,3)
ALIASADDR[word] = addrstr
ALIASFLAG[word] = immediate
WORD[addrstr] = word
INDEX[windx++] = addrstr
result("alias " word)
Expand Down Expand Up @@ -121,8 +127,16 @@ END {

function makeAlias(word,addr) {
filename = word

if (ALIASFLAG[word] == 1) {
isImmediate = " IMMEDIATE"
}
else {
isImmediate = ""
}

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

function result (text) {
Expand Down

0 comments on commit ec994c3

Please sign in to comment.