COMPARE Example | Syntax |
' ========================================================================= ' ' File...... COMPARE.SXB ' Purpose... Demonstrates the use of the SX Comparator with COMPARE ' Author.... (c) Parallax, Inc. -- All Rights Reserved ' E-mail.... support@parallax.com ' Started... ' Updated... 05 JULY 2005 ' ' ========================================================================= ' ------------------------------------------------------------------------- ' Program Description ' ------------------------------------------------------------------------- ' ' Demonstrates the use of the SX comparator with COMPARE and the auto- ' matic control of the RB.0 output state. ' ------------------------------------------------------------------------- ' Device Settings ' ------------------------------------------------------------------------- DEVICE SX28, OSC4MHZ, TURBO, STACKX, OPTIONX FREQ 4_000_000 ID "COMPARE" ' ------------------------------------------------------------------------- ' Variables ' ------------------------------------------------------------------------- result VAR Bit ' ========================================================================= PROGRAM Start ' ========================================================================= ' ------------------------------------------------------------------------- ' Program Code ' ------------------------------------------------------------------------- Start: DO COMPARE 1, result ' test with output to RB.0 LOOP