El Fubu

Welcome to a low in KB page (Except for Video Thumbnails)

Understanding asMSX Volume 2: lex.l - 2016-08-19 23:27:42

Welcome back to the mystery machine!

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.

Akiko Yano: Rhythm by time - 2016-08-18 22:50:42

From ramen to salvation.

ラーメンたべたい: YouTube
        Link

Click to watch in YouTube (New tab)

終りの季節: YouTube
        Link

Click to watch in YouTube (New tab)

Understanding asMSX Volume 1: Understanding the structure of the code - 2016-08-16 23:00:08

Hello!

Welcome to another trip into another dark cave. Today we meet asMSX, an assembler for MSX’s Z80 made by Pitpan and bought and released with GPL license by cjv99 (Thanks!).

Motivation

It’s known that this assembler has some bugs, e.g. skipping IFDEFs when using MegaROM so there is an interest on knowing the internals of the code in order to fix this kind of bugs. My goal is not directly fixing bugs of this code but to provide more information about the code so all the people from the community may get themselves the code and fix it if there are any new bugs.

On R and parallelism - 2016-03-24 01:20:01

R, that language that is has gained its momentum due to the people discovering the need of analyzing data. There are other several alternatives but this is my poison (or poisson!) of choice. In this post we will try to cover how to parallelize your R code with the package parallel.

Why bother?

One of my main concerns when I was starting with R is that WOW! Everything runs in one thread!. I was amazed by the fact that the language was still being used with that issue inside. How fool I was! Parallelism is doable in R. But, why must we bother about it? If we were still living in the era where we only had one core inside the CPU it won’t be an issue, but some smart guys thought that there was an issue when trying to set higher frequencies to the CPUs (power consumption mainly) and they decided to put more CPUs in a chip instead of going to a single faster core. That has been our paradigm for a couple of years and it appears to be working, right?

New horizon - 2016-03-23 23:37:28

Well…

Hello. What is expected of the first post of a blog? Well, actually it’s not the first post as this blog was created by $ADMIN for me to put my webcomic on it and I had 3 posts with test for automatic music play in loop (vital for my comics). But I was lazy. Very lazy.

¯_(ツ)_/¯

Whatever. Welcome to the captain’s log on the spaceship to amazing knowledge and Nutella.