Skip to content

Commit

Permalink
Update to v0.81
Browse files Browse the repository at this point in the history
  • Loading branch information
Édouard BERGÉ authored and mkoloberdin committed Apr 5, 2018
1 parent 76a7e8b commit e49aee1
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 5 deletions.
22 changes: 17 additions & 5 deletions rasm.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#define PROGRAM_NAME "RASM"
#define PROGRAM_VERSION "0.80"
#define PROGRAM_VERSION "0.81"
#define PROGRAM_DATE "xx/04/2018"
#define PROGRAM_COPYRIGHT "© 2017 BERGE Edouard (roudoudou) "

Expand Down Expand Up @@ -556,6 +556,7 @@ struct s_assenv {
int nbedskwrapper,maxedskwrapper;
int edskoverwrite;
int checkmode;
int stop;
};

struct s_asm_keyword {
Expand Down Expand Up @@ -2444,20 +2445,28 @@ printf("---- token stack ------\n");
printf("----------\n");
#endif

/* no priority with maxam */
/* maxam HAS priorities */
if (ae->maxam) {
for (itoken=0;itoken<nbtokenstack;itoken++) {
switch (tokenstack[itoken].operator) {
case E_COMPUTE_OPERATION_OPEN:
case E_COMPUTE_OPERATION_CLOSE:
/* keep highest priority */
break;
case E_COMPUTE_OPERATION_BAND:
case E_COMPUTE_OPERATION_BOR:
tokenstack[itoken].priority=6128;
break;
case E_COMPUTE_OPERATION_LOWER:
case E_COMPUTE_OPERATION_GREATER:
case E_COMPUTE_OPERATION_EQUAL:
case E_COMPUTE_OPERATION_NOTEQUAL:
case E_COMPUTE_OPERATION_LOWEREQ:
case E_COMPUTE_OPERATION_GREATEREQ:
tokenstack[itoken].priority=666;
tokenstack[itoken].priority=664;
break;
default:
tokenstack[itoken].priority=0;
tokenstack[itoken].priority=464;
break;
}
}
Expand Down Expand Up @@ -7272,6 +7281,7 @@ void __STOP(struct s_assenv *ae) {
rasm_printf(ae,"stop assembling as requested\n");
while (ae->wl[ae->idx].t!=2) ae->idx++;
ae->idx--;
ae->stop=1;
}

void __PRINT(struct s_assenv *ae) {
Expand Down Expand Up @@ -9017,7 +9027,9 @@ int Assemble(struct s_assenv *ae, unsigned char **dataout, int *lenout)
}
}
if (maxmem-minmem<=0) {
rasm_printf(ae,"Warning: Not a single byte to output\n");
if (!ae->stop) {
rasm_printf(ae,"Warning: Not a single byte to output\n");
}
} else {
if (!ae->flux) {
rasm_printf(ae,"Write binary file %s (%d byte%s)\n",TMP_filename,maxmem-minmem,maxmem-minmem>1?"s":"");
Expand Down
3 changes: 3 additions & 0 deletions updates.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
update v0.81
- added special maxam priorities for parenthesis and boolean operators

update v0.80
- bugfix operator > and >=
- bugfix Maxam priorities
Expand Down

0 comments on commit e49aee1

Please sign in to comment.