Answer the question
In order to leave comments, you need to log in
How to pass variable to BSF/BCF commands?
I have the following task:
10) A line of LEDs (8 pcs.) Is connected to port D. A button is connected to port B. When the button is pressed, one light runs cyclically on the LEDs of port D. When the button is pressed again, two adjacent lights, etc. until the 8 LEDs are completely filled.
10.a After filling, with each press, the number of running lights decreases by 1.
----
Just before the session, I began to study this topic. I want to make a loop so that I have a variable that changes from 0 to 7 and from 7 to 0 (so that the light runs, as instructed). Spent, literally, the whole day on solving this simple problem. So I didn't decide. Ask for help from experts!
PS It will be nice if you help build the logic of the task itself as a whole, because after making the loop I have no idea what to do next, but if you tell me at least with a variable in these BSF / BCF - I will be very grateful!
Answer the question
In order to leave comments, you need to log in
tell me at least with a variable in these BSF / BCF
For bit-oriented instructions, ‘b’ represents a bit field designator
which selects the bit affected by the operation, while ‘f’ represents
the address of the file in which the bit is located.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question