' Winks LED on least significant bit of PORTB on and off.
' Register DDRB defines whether PORTB bits are inputs or outputs.  
' (A 1 configures as the corresponding bit as an output).  
' Illustrates use of RAMpoke to directly control registers.
' copyright, Peter H. Anderson, Baltimore, MD, Sept, '99

Sub Main()

   CONST PORTB as Byte = &H38
   CONST DDRB as Byte = &H37
   Call RAMpoke(&Hff, DDRB)	' make all of PORTB ouputs

   Do				' continually
      Call RAMpoke(1, PORTB)	' turn on least significant bit
      Call Sleep(0.1)
      Call RAMpoke(0, PORTB)
      Call Sleep(0.1)			

End Sub