It's filling your screens memory with 0's since it doesn't actually check if there is something in the buffer.
I'm rusty on cpu, but I believe this should work.
Code:DATA; define key_buffer,67585; define key_off,67586; //Second byte of Keyboard Mem define con_off,65536; //First byte of Console Mem alloc charpos,0; //Counter used to determine postion of keys in Writer. CODE; CheckLoop: mov ebx,key_buffer; cmp #ebx,0; cg Write; jmp CheckLoop; Write: //General Write Function mov ebx,#key_off; //Move Key to ebx save to write back to buffer mov eax,con_off; //Set eax to start of console memory add eax,#charpos; //Add to eax the value of the counter (charpos) mov #eax,#key_off; //Move character into console inc eax; //Move to next cell over mov #eax,999; //Move charparam into cell mov #key_off,ebx; //Write char back to keyboard buffer add #charpos,2; //Move to next cell, ready to write ret; //Go back to key detection


LinkBack URL
About LinkBacks




Reply With Quote










Bookmarks