********** * Program SIGN_1 (6811) * * Illustrates use of the sign flag. * * Fetches switches. * If most sig switch is zero; outputs pattern $0F. * Otherwise outputs $F0 * * Uses pseudo op EQU * * P. H. Anderson, MSU, 12 Sept 90; Checked 12 Sept 91; 19 Jan 93 ********** PSCT EQU $C000 PORTB EQU $1004 PORTC EQU $1003 DDRC EQU $1007 ORG PSCT CLR DDRC TOP LDAA PORTC * get switches BMI L1 * if ms bit is one LDAA #$0F * otherwise it is zero STAA PORTB * output $0F BRA TOP L1 LDAA #$F0 * if msb one output $F0 STAA PORTB BRA TOP