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.