-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompile.sh
More file actions
executable file
·57 lines (53 loc) · 901 Bytes
/
Copy pathcompile.sh
File metadata and controls
executable file
·57 lines (53 loc) · 901 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/bin/bash
RETCODE=0
if [ "$#" -lt 2 ]
then
echo "Usage: $0 INPUT_BASIC OUTPUT_FILE"
exit 1
fi
./update.sh
./cute-basic/CB2Macro/CB2M.PY "$1" "out-macro"
RETCODE=$?
if [ $RETCODE -ne 0 ]
then
echo "Incorrect CUTE BASIC:"
echo ""
cat $1
exit 1
fi
./macro-assembler/NKMacroASM.py "out-macro" "out-lrasm"
RETCODE=$?
if [ $RETCODE -ne 0 ]
then
echo "Incorrect macro assembly:"
echo ""
cat out-macro
exit 1
fi
./label-replacer/lr4.py label-replacer/examples/deffiles/standard.def "out-lrasm" "out-llasm"
RETCODE=$?
if [ $RETCODE -ne 0 ]
then
echo "Incorrect assembly:"
echo ""
cat out-lrasm
exit 1
fi
./cpu-assembler/as4 "out-llasm" "$2"
RETCODE=$?
if [ $RETCODE -ne 0 ]
then
if [ $RETCODE -gt 128 ]
then
cd cpu-assembler
make clean
make debug
cd ..
gdb --args ./cpu-assembler/as4 "out-llasm" "$2"
exit
fi
echo "Incorrect assembly:"
echo ""
cat out-llasm
exit 1
fi