![]() |
![]() |
![]() |
|
|
|||||||
| Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc. |
|
|
Thread Tools | Display Modes |
|
|
(permalink) |
|
Hello..
I need to use assembly language to finish my project.I want to ask whether there are method to make a queue (list) in program.For example, when button 1 pressed first, it appears on top of the list.The next pressed button appears second and so on.when we press button 1 again, it will disappear and button 2 come to the top list.I just want to display the top list on seven segment.How to make it? |
|
|
|
|
|
|
(permalink) |
|
Could you use a "Circular Buffer" with a Read_Pointer and a Write_Pointer? The Circular buffer is full when Write_Pointer+1 = Read_Pointer and the buffer is empty when Write_Pointer = Read_Pointer. You'll have two functions, a "Load Buffer" function which places data in the buffer at the Write_Pointer then increments the Write_Pointer, and an "Unload Buffer" function which pulls data from the buffer at the Read_Pointer then increments the Read_Pointer.
Do you need to see a code example? Mike |
|
|
|
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Latest |
| program for writing and testing circuits | luca-deltodesco | General Electronics Chat | 3 | 13th August 2006 10:17 AM |
| little help with my program please - simple count loop | kud0s | Micro Controllers | 5 | 7th July 2005 09:40 PM |
| Tough assembly program for the PIC16F84 | asmpic | Micro Controllers | 34 | 3rd December 2004 06:50 PM |
| PicBasic Keypad program | Sora | Micro Controllers | 0 | 20th April 2004 07:01 PM |
| Program Verify on JMD with ic-prog | monkeyxp | Micro Controllers | 2 | 2nd November 2003 11:56 AM |