Fill.asm help --SOLVED--

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

Fill.asm help --SOLVED--

A_Random_Person
This post was updated on .
This is my pseudo code:

loop:
        i=KBD
        if i=0:
                goTo NOTPRESSED
        else:
                goTo PRESSED

PRESSED:
        a=16384
        loop1:
                RAM[a]=1111111111111111
                a++
                if a>24575:
                        goTo loop
                else:
                        goTo

NOTPRESSED:
        a=16384
        loop2:
                RAM[a]=0000000000000000
                a++
                if a>24575:
                        goTo loop
                else:
                        goTo loop2




When I turn it into Assembly language and ran it, for some reason only the first 16 pixels of the screeen changes. What's wrong?

Reply | Threaded
Open this post in threaded view
|

Re: Fill.asm help

ivant
Hint: loop1 and loop2 labels are there, but they are not used.
Reply | Threaded
Open this post in threaded view
|

Re: Fill.asm help

A_Random_Person
In the proram, I already did.
Reply | Threaded
Open this post in threaded view
|

Re: Fill.asm help

A_Random_Person
This post was updated on .
In reply to this post by ivant
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.