Posts

Showing posts from February, 2025

Lab 4 - GCC Build Lab

Image
In this lab, we're learning how to build large software projects using tools like Make and Automake/Autotools. I'll be working on two servers, x86-001 and aarch64-002 . Task: On both servers, I'll download, build, and install the latest development version of the GCC compiler . Below are the steps to complete the lab! 1. Clone the GCC repository using the below command      git clone git://gcc.gnu.org/git/gcc.git 2. Configure the build      create a separate build directory to avoid building GCC in the source directory       mkdir ~/gcc-build-001        cd gcc-build-001 3. To  set up GCC to be installed in a specific location (e.g., gcc-test-001 ),  Run the configure    script with the preferred prefix for the installation path      ~/gcc/gcc/configure --prefix=$HOME/gcc-test-001 4. Build the source code using the below command      time make -j 24 |& tee build.lo...

Lab 3

Image
Introduction: This is a simple number guessing game written for the 6502 processor. The goal of the game is to guess a random number between 1 and 100. The player is prompted to input their guess, and the game provides feedback on whether the guess is too high, too low, or correct. Game Initialization The game starts by initializing important variables and generating a random target number. The INIT_GAME subroutine is responsible for setting things up, including clearing the screen and generating the target number. The CLEAR_SCREEN clears both the character display and bitmap display, while GENERATE_RANDOM produces a random target number between 1 and 100. The random number is stored in the memory location $10. Displaying the Prompt The game asks the user to guess a number between 1 and 100. This is done by the DISPLAY_PROMPT subroutine, which outputs the string "Guess a number (1-100):" to the screen. This subroutine breaks down the string into individual characters and sen...