Posts

Showing posts from January, 2025

Lab 02 - Math Lab

 Lab 02 - Math Lab This lab helped me understand boundary checking to control the direction of a moving graphic. Managing pixel placement and position updates is crucial to ensure the graphic behaves as expected, bouncing off the edges of the bitmapped screen in both directions. Below is the original code that served as the foundation for this task: ; Zero-page variables define XPOS $20 define YPOS $21 START: ; Set up the width and height elements of the data structure LDA #$05 STA $12 ; IMAGE WIDTH STA $13 ; IMAGE HEIGHT ; Set initial position X=Y=0 LDA #$00 STA XPOS STA YPOS ; Main loop for diagonal animation MAINLOOP: ; Set pointer to the image ; Use G_O or G_X as desired ; The syntax #<LABEL returns the low byte of LABEL ; The syntax #>LABEL returns the high byte of LABEL LDA #<G_O STA $10 LDA #>G_O STA $11 ; Place the image on the screen LDA #$10 ; Address in zeropage of the data structure LDX XPOS ; X positio...

Importance of Assembly Language - What Have I Learned?!

 Assembly Language Why is this an important language to learn and how does this help in software optimization? If you're curious why learning Assembly Language in 2025 is no less important than learning all these modern high-level programming languages, you're right where you need to be. As you continue to read on this content, you will understand the reasons why I believe Assembly Language is worth learning! What is Assembly Language? Assembly Language is a machine-learning or a low-level programming language that allows you to write programs that can run directly to your Central Processing Unit (CPU); in other words, Assembly Language is just a human-readable mnemonical instructions that allows you to speak to your machine. Assembly language is platform-dependent, meaning instruction sets may differ depending on your computer's architecture. This language can give you direct access to memory, allowing a better control over your CPU. Take a look under the hood... Although...

Lab 01 - Experiments, Calculating Performance and Modifying Code

Image
LAB 01 - Experiments,  Calculating Performance and Modifying Code Hi there! Thank you for taking the time to check out my page.  This blog post will contain some insights derived from experiments and performance calculation outlined in our Software Portability and Optimization course.  Take Note... Just before we dig deep into the experiments and calculations here are the following definitions of the instructions used all throughout the experiment: lda ( Load Accumulator with Memory ): transfer data into the accumulator from memory sta ( Store Accumulator in Memory ): stores data from accumulator to memory ldy ( Load Index Register Y From Memory ): loads the index register Y from memory iny ( Increment Index Register Y By One ): adds 1 to current content in register Y bne loop ( Branch on Result Not Zero ): conditional branch that tests Z flag and loops if Z flag is not on. inc ( Increment Memory By One ): this adds 1 to content in the memory location ldx ( Load Inde...