% Mr. M

% December 15, 2000

% Graphical binary counter

setscreen("graphics:vga")

var x,quotient,remainder:int

x:=89

drawbox(23,210,617,270,13)

for counter:1..8

drawoval(x,240,15,15,14)

x:=x+66

end for

 

for counter:0..255

x:=551

quotient:=counter

for light:1..8

remainder:=quotient mod 2

if remainder = 1 then

drawfill(x,240,4,14)

else

drawfill(x,240,0,14)

end if

quotient:=quotient div 2

x:=x-66

delay(100)

end for

end for

Hosted by www.Geocities.ws

1