That was a clever way to debug it. Watching how Basic characters are output, you can see which bit is broken in the ASCII chart. Why can you point to which bank is failing if a bit fails?
Finally some improvements on asMSX. At the start of this project JamQue told me that he had issues using ifs when the “.megarom” clause is active. The issue correction can be seen here in Github.
The problem was that when generating a byte (for example, an LD instruction) it checks if it is able to generate it if the condition established for this level allows it.
Original:
guardar_byte(b)
{
if ((!conditional_level)||(conditional[conditional_level]))
if (type!=MEGAROM)
{
...some code...
}
if (type==MEGAROM)
{
...some code...
}
The first if will only affect the if(type!=MEGAROM) as it doesn’t provide brackets to define a block, therefore it will get only the next sentence. Also instead of doing if(type==MEGAROM) I just did an else.
So, once again I tried to discover which genre of the song “Men of war”, which is part of the OST of Breath Of Fire IV (A quite nice PlayStation RPG :)).
I tried from tabla breaks to tabla dnb… couldn’t find it. Until now!
I found this video with a bunch of dnb indian stuff. It misses the tabla but it’s nice!
I’m learning how Bison and Flex work with an O’Reilly book and there can be found an example on how to build a calculator (which has an error on the code, probably there are more in the book, that’s why it has that kind of critics, but it works.).
I ended up making an extension on it just to test my forgotten grammar skills. The code is the following:
Today, the spooky lex.l. As we saw in the previous post this file is full with constants, but to be more precise this is the file where you tell how to treat every string found. In fact, constants are not defined in this file but in dura.y,
For example:
“ld return MNEMO_LD”: Whenever you find a string
that’s which characters ld, treat is as a token with value MNEMO_LD
(Mnemotechnic for Load instruction).
“0x[0-9a-f]+ yylval.val=(int)strtol(yytext,NULL,16);return
NUMERO;”: Whenever you find 0x followed by 1 or more characters from the
set {0-9a-f} (hence, hex), transform them to a long int (as strol can treat
hex values directly) and then to an int and set it to the yylvval, which is
the flex’s return value, and return that this token is a number.
So as you have seen, at least in this case, Flex is the one that is in charge of
understanding the meaning of each token as defined in this file.