In my second week, time was an issue. Therefore, I attempted to finish up more this week (my third week) so that I can cover the workload from week two. Generally, I am supposed to finish the opcodes by the end of this week. However, like 99% of the things with programming, it always ends up as an underestimation.

My biggest underestimation was the complexity of the opcodes. While generally there are some opcodes that are easy, those tougher ones definitely need more looking into than I expected. Currently, my current problem is how to handle the unsigned and signed integers because JavaScript handles everything as a single numeric type – float. During the process of testing certain functions, I have noticed that for JavaScript, even the simplest 0.2 + 0.1 === 0.3 will be evaluated as false. The floating part causes extra noise behind the long list of numbers behind the decimal. Lucky for me, float is not used as often. However, I still have to deal with the conversion of unsigned to signed and I haven’t figured out a more efficient way to do it.

Besides that, I another underestimation was my understanding of the architecture. As I was working on the single thread, I set out to work on the registers first because they were most important. Then I had to think about how to design the structure for decoding the instructions. I wanted to make use of whatever information I have and that caused quite a delay for me. Luckily, I have found out an efficient way to handle the decoding, read and writes, branching and shifting. I will be cleaning up the code to reflect this better solution.

Besides that, as this will be a web project, I have to put in deep thoughts about the abstraction of all the modules and their related functions in order to reduce bigger change in the future. While I have finished the basic structures, I have yet to check my code for errors. I will therefore run it with JSLint to see what kind of possible errors you have written on your code and you change it to a better solution.

A quick update on my progress:
I have finished about 70 opcodes and edited the two main files, and I have added aeMB.js for the simulation of aeMB. I will continue to finish up as many opcodes as possible and start working on the simulator designs, code clean up and encapsulations. I think by Sunday I will be able to finish up with the opcodes also the structures of the website.


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.