int e l 7.1 SPECIAL FUNCTION OPERATORS The following operators directly manipulate the 8052AH's special function registers. Specific details of the operation of these registers is in the MICROCONTROLLER USERS HANDBOOK, available from INTEL. IE The IE operator is used to retrieve or assign a value to the 8052AH's special function register IE. Since the IE register on the 8052AH is a BYTE register, the value assigned to IE must be between 0 and 255. The IE register on the 8052AH contains an unused bit, BIT IE.6. Since this bit is "undefined," it may be read as a random one or zero, so the user may want to mask this bit when reading the IE register.
This can be done with a statement like A = IE.AND.0BFH. The only statements in MCS BASIC-52 that write to the IE register are the CLOCK0, CLOCK1, ONEX1, CLEAR, and CLEARI statements. EXAMPLES: IE = 81H and A = IE.AND.0BFH IP The IP operator is used to retrieve or assign a value to the 8052AH's special function register IP. Since the IP register on the 8052AH is a BYTE register, the value assigned to IP must be between 0 and 255. The IP register on the 8052AH contains two unused bits, BIT IP.6 and IP.7. Since these bits are "un- defined," they may be read as a random 1 or 0, so the user may want to mask these bits when reading the IP register.
This can be done with a statement such as B=IP.AND.3FH. MCS BASIC-52 does not write to the IP register during initialization, so user can establish whatever interrupt priorities are required in a given application. EXAMPLES: IP = 3 and A = IP.AND.3FH PORT1 The PORT1 operator is used to retrieve or assign a value to the 8052AH's P1 I/O port. Since P1 on the 8052AH is a BYTE wide register, the value assigned to P1 must be between 0 and 255 inclusive. Certain bits on P1 have pre-defined functions. If the user does not implement any of the hardware associated with these pre-defined functions, The PORT1 instruction can be used in any manner appropriate in the application. - 88 -