8: ADVANCED INSTRUCTIONS8-6 « FC4A MICRO SMART USER ’S MANUAL »Data Types for Advanced InstructionsWhen using the move, data comparison, and binary arithmetic instructions, data types can be selected from word (W) orinteger (I). For other advanced instructions, the data is processed in units of 16-bit word; except the coordinate conversioninstructions use the integer data type.Decimal Values and Hexadecimal StorageThe following table shows hexadecimal equivalents which are stored in the CPU, as a result of addition and subtraction ofthe decimal values shown:Discontinuity of Operand AreasEach operand area is discrete and does not continue, for example, from input to output or from output to internal relay. Inaddition, special internal relays M8000 through M8157 are in a separate area from internal relays M0 through M1277.Data registers D0 through D1299, expansion data registers D2000 through D7999, and special data registers D8000through D8199 are in separate areas and do not continue with each other.Advanced instructions execute operation only on the available operands in the valid area. If a user program syntax error isfound during programming, WindLDR rejects the program instruction and shows an error message.Data Type Symbol Bits Quantity of DataRegisters Used Range of Decimal ValuesWord (Unsigned 16 bits) W 16 bits 1 0 to 65,535Integer (Signed 15 bits) I 16 bits 1 –32,768 to 32,767Data Type Result of Addition Hexadecimal Storage Result of Subtraction Hexadecimal StorageWord0655351310710000FFFF(CY) FFFF655350–1–65535–65536FFFF0000(BW) FFFF(BW) 0001(BW) 0000Integer6553432768327670–1–32767–32768–32769–65535(CY) 7FFE(CY) 00007FFF0000FFFF80018000(CY) FFFF(CY) 80016553432768327670–1–32767–32768–32769–65535(BW) 7FFE(BW) 00007FFF0000FFFF80018000(BW) FFFF(BW) 8001The internal relay ends at M1277. Since the MOV (move) instructionreads 16 internal relays, the last internal relay exceeds the valid range,resulting in a user program syntax error.M8125REPS1 –M1270 D1 –D0MOV(W)This program results in a user program syntax error. The destina-tion of the DIV (division) instruction requires two data registersD1299 and D1300. Since D1300 exceeds the valid range, auser program syntax error occurs.I0REPS1 –D100 S2 –D200DIV(W) D1 –D1299The MOV (move) instruction sets data of data register D0 to 16 outputsQ290 through Q307 in the first repeat cycle. The destination of the sec-ond cycle is the next 16 outputs Q310 through Q327, which are invalid,resulting in a user program syntax error.For details about repeat operations of each advanced instruction, see thefollowing chapters.M8125REP2S1 –D0 D1 RQ290MOV(W)