Skip to content

Commit 105d280

Browse files
committed
Build 0.10.7
Updated 7800basic & bB to latest versions
1 parent 0aa5f06 commit 105d280

File tree

129 files changed

+729
-525
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

129 files changed

+729
-525
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions

README.md

Lines changed: 2 additions & 2 deletions

hovers/7800basic.md

Lines changed: 1 addition & 1 deletion
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
#!/bin/sh
2+
# 7800asm.sh
3+
# this script skips the basic preprocessing and creation of the assembly file
4+
# and it just (re)assembles the 7800.asm file
5+
6+
# do some quick sanity checking...
7+
8+
if [ ! "$bas7800dir" ] ; then
9+
echo "### WARNING: the bas7800dir envionronment variable isn't set."
10+
fi
11+
12+
OSTYPE=$(uname -s)
13+
ARCH=$(uname -m)
14+
for EXT in "" .$OSTYPE.x64 .$OSTYPE.x86 .$OSTYPE.$ARCH .$OSTYPE ; do
15+
echo | 7800preprocess$EXT 2>/dev/null >&2 && break
16+
done
17+
18+
echo | 7800preprocess$EXT 2>/dev/null >&2 && break
19+
if [ ! $? = 0 ] ; then
20+
echo "### ERROR: couldn't find 7800basic binaries for $OSTYPE($ARCH). Exiting."
21+
exit 1
22+
fi
23+
24+
echo
25+
26+
echo Using \"$EXT\" flavored 7800basic binaries
27+
echo " "Location: $(which 7800preprocess$EXT | sed "s/7800preprocess$EXT//g" 2>/dev/null)
28+
BV=$(7800basic$EXT -v 2>/dev/null)
29+
echo " Version: $BV"
30+
31+
#do dasm separately, because it's distributed separately
32+
for DASMEXT in "" .$OSTYPE.x64 .$OSTYPE.x86 .$OSTYPE.$ARCH .$OSTYPE ; do
33+
dasm$DASMEXT 2>/dev/null >&2
34+
[ $? = 1 ] && break
35+
done
36+
dasm$DASMEXT 2>/dev/null >&2
37+
if [ ! $? = 1 ] ; then
38+
echo "### ERROR: couldn't find dasm binary for $OSTYPE($ARCH). Exiting."
39+
exit 1
40+
fi
41+
42+
echo Using \"$DASMEXT\" flavored dasm binary.
43+
echo " "Location: $(which dasm$DASMEXT)
44+
45+
DV=$(dasm$DASMEXT 2>/dev/null | grep ^DASM | head -n1)
46+
echo " Version: $DV"
47+
48+
if [ "$1" = "-v" ] ; then
49+
#this is just a version check. we already displayed the version earlier,
50+
#so just exit.
51+
exit
52+
fi
53+
54+
echo
55+
56+
echo "(re)assembling $1"
57+
58+
dasm$DASMEXT $1 -I"$bas7800dir/includes" -f3 -l"$1.list.txt" -p20 -s"$1.symbol.txt" -o"$1.bin" | 7800filter$EXT
59+
60+
exit 0

out/bin/compilers/7800basic/7800bas.c

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ extern int TIGHTPACKBORDER;
6363
extern int changedmaholescalled;
6464
int maxpasses = 2;
6565

66-
#define BASIC_VERSION_INFO "7800basic v0.34"
66+
#define BASIC_VERSION_INFO "7800basic v0.36"
6767

6868
int main (int argc, char *argv[])
6969
{
@@ -358,6 +358,8 @@ int main (int argc, char *argv[])
358358

359359
// preprocessing removed in favor of a simplistic lex-based preprocessor
360360

361+
// fprintf(stderr,"%s",code); // DEBUG
362+
361363
i = 0;
362364
j = 0;
363365
k = 0;
@@ -392,7 +394,7 @@ int main (int argc, char *argv[])
392394
sprintf (statement[0], "L0%d", unnamed++);
393395
}
394396
if (strncmp (statement[0], "end\0", 3))
395-
printf (".%s ;; %s\n", statement[0], displaycode); // printf(".%s ; %s\n",statement[0],code);
397+
printf (".%s ;;line %d;; %s\n", statement[0], line, displaycode);
396398
else
397399
doend ();
398400

@@ -426,11 +428,6 @@ int main (int argc, char *argv[])
426428
printf (" echo \"\"\n");
427429
printf (" echo \"######## ERROR: space overflow detected in\",[SPACEOVERFLOW]d,\"areas.\"\n");
428430
printf (" echo \"######## look above for areas with negative ROM space left.\"\n");
429-
printf (" echo \"######## Aborting assembly.\"\n");
430-
printf ("SPACEOVERFLOWPASS SET (SPACEOVERFLOWPASS + 1)\n");
431-
printf (" if SPACEOVERFLOWPASS > 0\n");
432-
printf (" ERR\n");
433-
printf (" endif\n");
434431
printf (" endif\n");
435432

436433
printf (" \n\n");
3.18 KB
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)