Running Light in Assembly Language

By
Advertisement

Using assembly language, we were asked to do a basic running light (LEDs). The circuit was composed of 4 switches. The "Run Right" switch, which makes the light go from left to right; the "Run Left" switch which directs the light to run from right to left; the "Blink" switch, which will make all the LEDs go flashing; and the "Pause" switch, which holds the light in its current position.

Basically, you will use the ROR (rotate right) and ROL (rotate left) in this program. The value to rotate should have an initial value of 10000000b. That means that the first LED from the left lights upon execution. Whenever the light runs from a direction, if it is interrupted by another light direction, the light should run initially at the last value before the other direction was pressed, you should hold the last value of the rotated variable before going to the other procedure. Don't forget to make a delay procedure! In blinking command, you should make the output value from 0ffh to 00h.
Powered by Blogger.