Fixes end-of-file bug in as.c. Adds build script.
This commit is contained in:
parent
aadccaa37a
commit
dc6e35f825
2 changed files with 15 additions and 2 deletions
|
@ -165,7 +165,7 @@ void assemble()
|
|||
apply_modifiers(¤t);
|
||||
|
||||
int reqPatch = 0;
|
||||
if(tok != TOK_NEWLINE)
|
||||
if(tok != TOK_NEWLINE && tok != TOK_EOF)
|
||||
{
|
||||
switch(tok)
|
||||
{
|
||||
|
@ -291,7 +291,7 @@ int main(int argc, char **argv)
|
|||
{
|
||||
FILE *f = fopen(argv[index], "r");
|
||||
if(f == NULL) {
|
||||
fprintf(stderr, "%f not found.\n", optarg);
|
||||
fprintf(stderr, "%s not found.\n", argv[index]);
|
||||
abort();
|
||||
}
|
||||
yyrestart (f);
|
||||
|
|
13
libvm/bin/build
Normal file
13
libvm/bin/build
Normal file
|
@ -0,0 +1,13 @@
|
|||
#!/bin/sh
|
||||
|
||||
ASMFILE=$1.asm
|
||||
BINFILE=`echo $ASMFILE | sed "s|\.asm\$|\.bin|"`
|
||||
EXPFILE=`echo $BINFILE | sed "s|\.bin\$|\.exp|"`
|
||||
|
||||
echo $ASMFILE
|
||||
echo $BINFILE
|
||||
echo $EXPFILE
|
||||
|
||||
./bin/as -o $BINFILE $ASMFILE -Ls
|
||||
./bin/explink -o $EXPFILE -c $BINFILE
|
||||
rm $BINFILE
|
Loading…
Reference in a new issue