Posts

Showing posts from October, 2022

LAB - 3 NUMBER GUESSER GAME

Image
 LAB 3 I am writing a Lab 3 for my course SPO600. This Lab is about the Math and Strings in 6502 assembly language. This lab was about the graphical output using bitmap screen, text input using keyboard, and text output.  Requirements for this lab was to write a program which should work in 6502 emulator. This program should output on character screen as well as on bitmap screen. User input from keyboard is mandatory for this lab in some form.  For this lab I thought to make a Number Guessing game.  A simple game in which a random number is generated. User will guess the number using hit and trial method. When user will be enter smaller number or larger number than the guess, system will notify the user. By doing this in this game user has to guess the number in shortest number of attempts.  I decided to make this game simple by choosing to guess number between 0-9, only. The user can only input a one digit number. User can use backspace to edit the number entered and user can press en

Lab 2 - Assembly Language Lab

Image
 I am writing a Lab 2 which is about the basics of the assembly language of 6502. For this lab I was given a piece of code, for which I have to modify the code or to calculate performance. First of all, I was given the following code: lda #$00 ; set a pointer in memory location $40 to point to $0200 sta $40 ; ... low byte ($00) goes in address $40 lda #$02 sta $41 ; ... high byte ($02) goes into address $41 lda #$07 ; colour number ldy #$00 ; set index to 0 loop: sta ($40),y ; set pixel colour at the address (pointer)+Y iny ; increment index bne loop ; continue until done the page (256 pixels) inc $41 ; increment the page ldx $41 ; get the current page number cpx #$06 ; compare with 6 bne loop ; continue until done all pages This code fills the bitmapped display with yellow color, each pixel of the display is showing yellow color. The result of code is: Calculating Performance: Our first task was to calculate performance of the code. Here is the analysis of the