博文

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

Project- Stage 1

  This blog is for the  SPO600 fall project. In this project, we will work on GCC. For the stage one, we are focus on how to build the GCC including the command to build the GCC from source code, and the time to build the whole project. The GCC is a complier that can translate the C++ code into machine code. There are so many lines of code in the GCC source files. Today I am going to write a blog about my research of the GCC  We are going to talk about the builde process of GCC. Unline many small program which just have hundreds or thousands lines of codes. GCC is a huge code base, hence it require a huge amount of time to complie it. First, we need to download the codebase into our machine, we can go to the website git under gcc/gnu to find the git command for downloading. The command is  git clone git://gcc.gnu.org/git/gcc.git SomeLocalDir. After downloading the codebase we need to configure the build. First we need to create a seperate directory that the file will...

lab04

 This is the blog for SPO600 lab 4. In this lab, we mainly focus on writing the loop to output some things like the number in  6502, x86_64, aarch64 assembler. This is quite new to me since  nowadays we use modern programming language like Python, C and Javascript. But for this lab, we will go into the assembler language to see how the programs work. This lab has two part, one is class part, which means that we will be seperated into group and there was a driver to share his screen and watchers would watch him to code. The program that out group has generated in the class was: .text .globl _start min = 0                         /* starting value of the loop idx. this is a symbol */ max = 10                        /* ending value of the loop idx. this is a symbol */ _start:         mov     x19, min    ...

lab3

 This lab is for the student to understand how to use the math and string in  6502  assembly language, including displaying output, getting input from users and perform some operatiion based on the users' input. For this lab, I have designed and implement simple add calculator that accept the two input from the users. Check the input if they are number and then perform the add instruction and display the add output for the users. The code: define SCINIT   $ff81  ; Initialize/clear screen define CHRIN    $ffcf  ; Input character from keyboard define CHROUT   $ffd2  ; Output character to screen define NUM1     = $01  ; Memory location for first number define NUM2     = $02  ; Memory location for second number define RESULT   = $03  ; Memory location for result START:        JSR SCINIT      ; Clear the screen         ...