Administrator
|
Use a toy screen and run your program by hand. Imagine that the screen memory still starts at 16384 but it only has 32 pixels (two RAM locations), placing the keyboard at 16386 instead of 24576.
By your reasoning, you countdown value would start at 3 (the difference between 16386 and 16383). Follow your program, step by step, and see what the last RAM location you write to would be. Is it 16386?
As for checking one number against another even though you can only test against zero, the key is to recognize that
A > B
is the same as
(A-B) > 0
But maintaining a separate counter like you are doing is perfectly reasonable.
|