| ??? 03/30/01 09:49 Read: times |
#10418 - RE: Too many falg bits in the code |
Hi Gil,
it may be easier for you to give any state a separate flag, but the question was, if it was really needed. E.g.: MENU_FLAG BIT 40H ; FLAG TO INDICATE MENU OPTION BEING Some states are marked by the code, which actually executed. E.g. display a menu was marked, that you now execute the menu subroutine. And this routine may be finished by pressing a key. E.g.: BLANK_FLAG BIT 44H ; TO BLANK THE TENS DIGIT IF ZERO. It can be easier to test the value directly, than hold the zero state in a flag. Also some flags can be need only in subroutines, which not executed at the same time. So such flags can be overlayed. Also some flags can exclude each other, Then such states can be more effective divided by a number (8 bits = 256 different states). I see no problem to use only 6 of 16 bit addressable registers, since its far from the maximum. Have you made any plan, how the program works ? Yes, I know its lazy to start with "main(){ ... }" and fill it directly with your ideas. But this method tends to be bad maintainanble and wasting reccources, if the program grows more and more. If you made a plan, then the discussion can be more effective on using this plan. On the source code level its to hard and also often to late to make fundamental changes. Peter |
| Topic | Author | Date |
| Too many falg bits in the code | 01/01/70 00:00 | |
| RE: Too many flag bits in the code | 01/01/70 00:00 | |
| RE: Too many falg bits in the code | 01/01/70 00:00 | |
| RE: Too many falg bits in the code | 01/01/70 00:00 | |
| RE: Too many falg bits in the code | 01/01/70 00:00 | |
| RE: Too many falg bits in the code | 01/01/70 00:00 | |
| RE: Too many falg bits in the code | 01/01/70 00:00 | |
| RE: Too many falg bits in the code | 01/01/70 00:00 | |
| RE: Too many falg bits in the code | 01/01/70 00:00 | |
| RE: Too many falg bits in the code | 01/01/70 00:00 | |
| RE: Too many falg bits in the code | 01/01/70 00:00 | |
| RE: Too many falg bits in the code | 01/01/70 00:00 | |
| RE: Too many falg bits in the code | 01/01/70 00:00 | |
| RE: Too many falg bits in the code | 01/01/70 00:00 | |
RE: Too many falg bits in the code | 01/01/70 00:00 |



