Now I edited the pseudo code, and this is what it looks like now:
loop:
a=16384
loop1:
if a>24575:
goTo cont
RAM[a]=0000000000000000
a++
goTo loop1
cont:
i=KBD
if i=0:
goTo loop
else:
goTO PRESSED
PRESSED:
a=16384
loop2:
if a>24575:
goTo loop
RAM[a]=1111111111111111
a++
goTo loop2
And now the screen is going nuts.