Fill.Asm trouble

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Fill.Asm trouble

sjc725
My current code for fill.asm seems to work if I manually enter values in RAM[24576] and run it.  In other words, if the value is 0, the screen is filled black, while if the value is anything greater than 0, the screen is filled white.  I believe this is the expected outcome.

However, it doesn't seem to work in any other instance.  For example, when I load the fill.tst script, press the keyboard and hold a key, I don't see any result.  Furthermore, when I test against the FillAutomatic.tst, I get a comparison failure.  

In general, I'm not sure how pressing the keyboard button and then holding down a key would lead to filling the screen black in the first place.  If I understand correctly, when I press the keyboard button and then a key, the corresponding value should be passed to RAM[24576], which I reference in my fill.asm as @KBD.  But the program isn't initialized just by clicking and pressing keyboard keys, so how would it run through the necessary steps of my code?

I don't want to post any of my code here, but if someone could assist, I'd greatly appreciate it.  If you need me to clarify anything written above, please let me know.

Thanks
Sam
Reply | Threaded
Open this post in threaded view
|

Re: Fill.Asm trouble

WBahn
Administrator
It's impossible to tell, but it sounds like you've written a program that just does a single pass. You need to make it so that after you start your program, it continuously cycles through over and over so that if you start it and don't touch anything, the screen fills with one color, but after it fills it continues running and looking at the keyboard and if you then press and hold a key, it eventually fills with the other color and then keeps running and looking at the keyboard so that if you eventually release the key the screen eventually goes back to the original color. This continues forever until you kill the program.