Create an object in its own file called “LED.asm” that draws a RED Led in the middle of the BITMAP Display. Make the LED your own design, but make sure that it looks like an LED.

Assumptions:

The Bitmap Display will be stored in the Heap starting at Address 0x10040000.
The Unit Width and Height in Pixels will be 8
The Display Width and Height will be 512 Pixels
The LED will be centered approximately in the middle
Your LED should have two instance variables. These are not global variables. The base address needs to be passed to the InitializeLED subroutine appropriately.

The Address of the BITMAP Display
The State of the LED (On or Off)
It should have 4 behaviors,

InitializeLED
TurnOnLED
TurnOffLED
ToggleLED
InitializeLED: This subroutine allocates memory in the heap to store the pixels for the LED. Make sure that this is the first memory allocated so that you can use the Base Address shown below (0x10040000). Also, make sure you document your program well so anyone that wants to use it will know to use the configuration shown below.

TurnONLED: Updates Memory so the LED shows as on. Updates the State.
TurnOFFLED: Updates Memory so the LED shows as off. Updates the State.
ToggleLED: Updates Memory so the LED toggles state. Updates the State.

  1. Appears to be homework, assignment or part of some course.
  2. You omitted the rest of the assignment with the code to test the system.
    See https://www.chegg.com/homework-help/questions-and-answers/mips-assembly-led-assignment-fall-2020-ledasm-create-object-file-called-ledasm-draws-red-l-q58176553
  3. By omitting the course in question I can't check if there were lessons that lead up to this assignment and offer any refresher ideas.

Advice: Go back over your coursework since it should have the information you need to work this assignment.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.