E556GB — 6.14.1 8-bit comparator

Examples 6.13.4 Copy two byte to sixteen 1-bit operands LD BM00.04 ;load contents of BM00.04-BM00.05 into accumulator C16T1 O00.00 ;copy contents of accu to addresses O00.00-O00.15 ;(BM00.04 to O00.00-O00.07, ; BM00.05 to O00.08-O00.15) 6.14 Comparator circuits 6.14.1 8-bit comparator The program in this example compares the contents of two 8-bit markers. The result (greater, smaller, or equal) is evaluated by conditional jumps (see jump operations). In this case, O00.00 is set if reference value 1 is greater than reference value 2. V1: reference value 1 BM00.00 V2: reference value 2 BM00.01 CO:

comparator output O00.00 BM00 00 V1 BM00.01 V2 CO O00.0 V1 > V2 comparator Program L BM00.00 ;compare V1 V BM00.01 ;with V2 JP> MARK1 ;jump if V1 greater than V2 L PL00.00 ;log. 0 JP MARK2 ;jump to CO MARK1 L PL00.01 ;logical 1 MARK2 = O00.00 ;CO 128