博文

目前显示的是 九月, 2024的博文

lab2

 This blog is mainly focus on the lab2 which has provided the original code of a sharp with blue color  move diagonal in the image. And in the class, we use the mob programming to finish the work. Me as the presenter who just watch and give suggestion to the driver who shared their screen and modify the orginal code. We have three tasks for this lab. The first one is selecting a starting position for X and Y with different position. This is quite easily to solve. We have just changed the line of code  LDA #$00 STA XPOS STA YPOS  to   LDA #$05         STA XPOS         LDA #$0A       STA YPOS This allow us to change the X position to 5 and Y position to 10. And the next question is selecting a X increment that is -1 or +1 and Y increment that is -1 or 1. This question is also not difficult. We can first define the x increment and y increment at top of the code like define X_INCREMENT $...

lab1

This blog is about the lab1 in spo600, in week 2, the lecture have introduced me the basic of  a ssembly language in term of using the assembly language to perform basic task like fill the page with color, optimazion of the code to improve the performance, changing the code for different color, implement different colors for different pages and get random color for thhe pixels in the pages. Now I would like to perform my work for the lab1 I have calculate the total time for the code that lab 1 has provided for me by checking the instruction set and excel, also, by looking at the bytes for each instruction, it is easy to find out the total memory for the whole program. For the initialization part which is from lda #$00 to ldy #$00, the total cycle would be 14 cycles, in the main loop, the loop has been executed 256 time for each 4 pages. So for the bne loop, if it is in the same page, the cycle will be 3 and in the other page, it will be 2. Hence the total main loop will b...