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.


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: 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.
  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 developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.