=== page 1 === TOSHIBA TLCS-900/H CPU HALT < Halt CPU > Operation : CPUhalt Description : Halts the instruction execution. To resume, an interrupt must de received. Details : Mnemonic Code Flags : S Z H V N C S = Nochange Z = Nochange H = Nochange V = Nochange N = Nochange C = Nochange CPU900H-82 2001-03-16 === page 2 === TOSHIBA TLCS-900/H CPU INC num, dst < Increment > Operation : dst #3,(mem) ~— [a [m0] z|m_m mm Note: #3 in operands indicates from 1 to 8 and object codes correspond from 1 to 7,0. Flags : S Z H V N C S = MSB value of the result is set. Z = lissetifthe result is 0, otherwise 0. H = 1 is set if a carry occurs from bit 3 to bit 4 as a result of the operation, otherwise 0. V = 1issetif an overflow occurs as a result of the operation, otherwise 0. N = Cleared to zero. C = Nochange Note: With the INC #3,r instruction, if the operand is a word or a long word, no flags change. Execution exampl : INC 5,WA When the WA register = 1234H, execution sets the WA register to 1239H. CPU900H-83 2001-03-16 === page 3 === TOSHIBA TLCS-900/H CPU < Increment Register File Pointer > Operation : RFP<2:0> <-—RFP<2:0>+1 Description : Increments the contents of RFP<2:0> in the status register by 1. RFP2 is fixed to 0. Details : Mnemonic Code INCE Flags : S Z H V N C S = Nochange Z = Nochange H = Nochange V = Nochange N = Nochange C = Nochange Execution example: INCF When the contents of RFP<2:0> = 2, execution sets the contents of RFP <2:0> to3. CPU900H-84 2001-03-16 === page 4 === TOSHIBA TLCS-900/H CPU JP condition, dst < Jump > Operation : Ifccis true, then PC < dst. Description : Ifthe operand condition is true, jumps to the program address specified by dst. Details : Mnemonic Code ep #16 sp #2 JP ee,] mem Flags : S Z H V N C S = Nochange Z = Nochange H = Nochange V = Nochange N = Nochange C = Nochange Execution example: JP 2000H Execution jumps unconditionally to address 2000H. JP C,XIX+2 When the carry flag = 1, execution jumps to address 123458H. Condition: Register XIX = 00123456H CPU900H-85 2001-03-16 === page 5 === TOSHIBA TLCS-900/H CPU JR condition, dst < Jump Relative > Operation : Ifccis true, then PC < dst. Description : If the operand condition is true, makes a relative jump to the program address specified by dst. Details : Mnemonic Code FR feo) $+2-+d8 IRL [eo] $+3+416 Flags : S Z H V N C S = Nochange Z = Nochange H = Nochange V = Nochange N = Nochange C = Nochange Execution example: JR 2078H When this instruction is executed at memory address 2000H, execution relative jumps unconditionally to address 2078H. The object code of the instruction is 68H : 76H. Memory | 6 8 | Address 2000H (Op code) Address 2001H (displacement) -—— ___] Address 2078H LS CPU900H-86 2001-03-16 === page 6 === TOSHIBA TLCS-900/H CPU LD dst, sre < Load > Operation : dst we,# —— [o,0,0,0,1,0[z]o] CPU900H-87 2001-03-16 === page 7 === TOSHIBA TLCS-900/H CPU Size Mnemonic Code Byte Word Long word 0 0 x LD mem, # = [TJ] A Jom m mmm ro,0,0,0,0,0]2[0| O O x LD = (#16), (mem) |1|m|0|z|m,m,m,m| O O x LD (mem), (#16) |1|m[1,1]m,m,m,m| (0 ,0,0,1,0,1]z Jo, S = Nochange Z = Nochange H = Nochange V = Nochange N = Nochange C = Nochange Execution example: LD IX, DE When the DE register = 4567H, execution sets the IX register to 4567H. 4 5 6 7}| DEregister Loads 4 5 6 7} iXregister CPU900H-88 2001-03-16 === page 8 === TOSHIBA TLCS-900/H CPU LDA dst, sre < Load Address > Operation : dst Operation : dst Operation : dst Operation : CY Description : Loads the contents of bit num of src to the carry flag. Details : Size Mnemonic Code Byte Word Long word O Ox LDCR #42 pls | O OO x LDCR As ERretes Ea eri O x x Laer #8,(mem) [Jem], [mem mm O x x EDCR —Asmem) [fn 1 nom Notes : When bit num is specified by the A register, the value of the lower 4 bits of the A register is used as bit num. When the operand is a byte and the value of the lower A bits of bit num is from 8 to 15, the value of the carry flag is undefined. Flags : S Z H V N C S = Nochange Z = Nochange H = Nochange V = Nochange N = Nochange C = Contents of bit num of src is set. Execution example: LDCF 6, (100H) When the contents of memoryad address 100 = 01000000B (binary), execution sets the carry flag to 1. 0 4 t foj1f/ojojojojojo Address 100 1 Carry flag CPU900H-92 2001-03-16 === page 12 === TOSHIBA TLCS-900/H CPU LDD dst, sre < Load Decrement > Operation : dst [XDE~), KHL], 0,0] 2]0 01,3] O OO x — Lop aix-),cry-) [ojo]e [0,707] * Coding in square brackets [ ] can be omitted. Flags : S Z H V N C |-|-J|o]*lo]-| S = Nochange Z = Nochange H = Cleared to 0. V = Oissetifthe BC register value is 0 after execution, otherwise 1. N = Cleared to zero. C = Nochange Execution example: LDD (XIX-—),(XIY—) When the XIX register = 00123456H, the XIY register = 00335577H, and the BC register = 0700H, the results of the execution are as follows: Loads the contents of address 335577H to 123456H. Sets the XIX register to 00123456H. Sets the XIY register to 00335576H. Sets the BC register to O6FFH. CPU900H-93 2001-03-16 === page 13 === TOSHIBA TLCS-900/H CPU LDDR dst, src < Load Decrement Repeat > Operation : dst[(XDE—),(XHL—)]}1,0,0]|z{0,0,1,1| O O x LDDR (XIX-),(XIY-) |1,0,0]2]0,1,0,1| * Coding in square brackets [ ] can be omitted. Note : Interrupt requests are sampled every time 1 item of data is loaded. S = Nochange Z = Nochange H = Cleared to zero. V = Cleared to zero. N = Cleared to zero. C = Nochange Execution example: LDDR (XIX-—), (XIY—) When the XIX register = 00123456H, the XIY register = 00335577H, and the BC register = 0003H, the results of the execution are as follows: Loads the contents of address 335577H to 123456H. Loads the contents of address 335576H to 123455H. Loads the contents of address 335575H to 123454H. Sets the XIX register to 00123453H. Sets the XIY register to 00335574H. Sets the BC register to 0000H. CPU900H-94 2001-03-16 === page 14 === TOSHIBA TLCS-900/H CPU LDF num < Load Register File Pointer > Operation : RFP<2:0> in status register. RFP2 is fixed to 0. Details : Mnemonic Code LDF #8 Note : In minimum mode, the operand value can be specified from 0 to 7; in maximum mode, from 0 to 3. Flags : S Z H V N C S = Nochange Z = Nochange H = Nochange V = Nochange N = Nochange C = Nochange CPU900H-95 2001-03-16 === page 15 === TOSHIBA TLCS-900/H CPU LDI dst, sre < Load Increment > Operation : dst [(XDE+), (KHL+)]}1,0,0[z[0,0,1,1) O O x LDI (XIX+),(XIY+) [1,0,0[z|0,1,0,1| * Coding in square brackets [ ] can be omitted. Flags : S Z H V N C |-|-[o]*]o]-| S = Nochange Z = Nochange H = Cleared to zero. V = Oisset when the BC register value is 0 after execution, otherwise 1. N = Cleared to zero. C = Nochange Execution example: LDI (XIX+), (XIY+) When the XIX register = 00123456H, the XIY register = 00335577H, and the BC register =0700H, execution results as follows: Loads the contents of address 335577H to 123456H. Sets the XIX register to 00123457H. Sets the XIY register to 00335578H. Sets the BC register to O6FFH. CPU900H-96 2001-03-16 === page 16 === TOSHIBA TLCS-900/H CPU LDIR_ dst, sre < Load Increment Repeat > Operation: dst[(XDE+),(XHL+)]}1,0,0|2z[0,0,1,1) O O x LDIR (XIX+),(XIY+) [1,0,0]2]0,1,0,1) * Coding in square brackets [ ] can be omitted. Note : Interrupt requests are sampled every time 1 item of data is loaded. Flags : S Z H V N C S = Nochange Z = Nochange H = Cleared to zero. V = Cleared to zero. N = Cleared to zero. C = Nochange Execution example: LDIR (XIX+), (XIY+) When the XIX register = 00123456H, the XIY register = 00335577H, and the BC register = 0003H, execution results as follows: Loads the contents of address 335577H to 123456H. Loads the contents of address 335578H to 123457H. Loads the contents of address 335579H to 123458H. Sets the XIX register to 00123459H. Sets the XIY register to 0033557AH. Sets the BC register to 0000H. CPU900H-97 2001-03-16 === page 17 === TOSHIBA TLCS-900/H CPU LDX dst, sre < Load eXtract > Operation : dst Operation : (—XSP) 23CH: Operation : if (dstmodnum) =0 then dst < Operation : if (dstmodnum) =0 then dst Operation : if (dst mod num)=0 then dst Operation : if (dstmod num) = (num—1) then dst Operation : if (dstmod num) = (num—2) then dst <—dst— (num—2) else dst —dst+2. Description : When the modulo num of dst isnum-—2, decrements dst by num—2. Otherwise, increments dst by 2. Used to operate pointers for cyclic memory table. Details : Size Mnemonic Code Byte Word Long word x Ox MING? Note : Theoperand # must be 2 to the nth power. (n = 2 to 15) Flags : S Z H V N C S = Nochange Z = Nochange H = Nochange V = Nochange N = Nochange C = Nochange Execution example: Increments the IX register by cycling from 1230H to 1237H. MINC2 8,IX When the IX register = 1234H, execution sets the IX register to 1236H. Further execution decrements the IX register by 8—2 and sets the IX Register to 1230H, since the IX register modulo 8 = 8-2. | | ——=*|:« Address 1230H |__| Address 1237H -—~_ CPU900H-105 2001-03-16 === page 25 === TOSHIBA TLCS-900/H CPU MINC4 num, dst < Modulo Increment 4 > Operation : if (dst mod num) = (num—4) then dst Operation : dst Description : Mirror-exchanges the contents of dst using the bit pattern image. Details : Size Mnemonic Code Byte Word Long word x Ox MIRE Flags : S Z H V N C S = Nochange Z = Nochange H = Nochange V = Nochange N = Nochange C = Nochange Execution example: MIRR HL When the HL register = 0001 0010 0011 0100B (binary), execution sets the HL register to 0010 1100 0100 1000B (binary). f 0) 0 8 6 4 0 fofolol{ijofloji{olojo}1{1{o]1jofo| HL register (before execution) fo[o{i1jo{1]{1jo{ofjo|1]{o]o{1{o]0]0]| Htregister (after execution) CPU900H-107 2001-03-16 === page 27 === TOSHIBA TLCS-900/H CPU MUL dst, sre < Multiply > Operation : dst Xsrc (unsigned) Description : Multiplies unsigned the contents of lower half of dst by those of src and loads the result to dst. Details : Size Mnemonic Code Byte Word Long word O 0 x MUL RRF mee py ys | fo.t,0,0,0/ ,R, | Oo OO x“ MUL m# TP hy, | O 0 x MUL RR mem) [Fm] [in mm am o,1,0,0,0] ,R, | Note : When the operation is in bytes, dst (word) < dst (byte) X src (byte). When the operation is in words, dst (long word) < dst (word) X sre (word). Match coding of the operand dst with the size of the result. Flags : S Z H V N C S = Nochange Z = Nochange H = Nochange V = Nochange N = Nochange C = Nochange Execution example: MUL XIX,IY When the IX register = 1234H and the IY register = 89ABH, execution multiplies unsigned the contents of the IX register by those of the IY register and sets the XIX register to O9C9FCBCH. CPU900H-108 2001-03-16 === page 28 === TOSHIBA TLCS-900/H CPU Note : “RR” forthe MUL RR,r and MUL RR,(mem) instructions is as listed below: Operation size in bytes Operation size in words (16 bits < 8 bits x 8 bits) (32 bits — 16 bits x 16 bits) [ae code [ae code WA 001 XWA 000 BC 011 XBC 001 DE 101 XDE 010 HL 111 XHL 011 IX XIX 100 IY specifica- XlY 101 ion no IZ possible! XIZ 110 SP XSP 111 “rr” for the MUL rr,# instruction is as listed below. Operation size in bytes Operation size in words (16 bits — 8 bits x 8 bits) (32 bits — 16 bits x 16 bits) a WA 001 XWA 000 BC 011 XBC 001 DE 101 XDE 010 IX C7H : FOH XIX 100 IY C7H : F4H XIY 101 IZ C7H : F8H XIZ 110 sP C7H : FCH xSP 111 Istbyte 2nd byte Note: Any other long word registers can be Note: Any other word registers can be specified in the extension coding. specified in the same extension coding as those for IX to SP. CPU900H-109 2001-03-16 === page 29 === TOSHIBA TLCS-900/H CPU MULA dst < Multiply and Add > Operation : dst Operation : dst Xsrc (signed) Description : Multiplies signed the contents of the lower half of dst by those of sre and loads the result to dst. Details : Size Mnemonic Code Byte Word Long word O O x MULS RR? Geer) es ere o.t,0,0,1] \R, | O O x MULS = mé Thy | O O x MULS RR, (mem) fifm]o]z {mm m)m o,1,0,0,1] ,R, | Note : When the operation is in bytes, dst(word) < dst (byte) X src (byte). When the operation is in words, dst (long word) < dst (word) X src (word). Match coding of the operand dst with the size of the result. Flags : S Z H V N C S = Nochange Z = Nochange H = Nochange V = Nochange N = Nochange C = Nochange Execution example: MULS XIX,IY When the IX register = 1234H and the IY register = 89ABH, execution multiplies signed the contents of the IX register by those of the IY register and sets the XIX register to F795FCBCH. CPU900H-111 2001-03-16 === page 31 === TOSHIBA TLCS-900/H CPU Note: “RR” for the MULS RR,r and MULS RR,(mem) instructions is as listed below: Operation size in bytes Operation size in words (16 bits<8 bits x 8 bits) (32 bits<-16 bits x 16 bits) [ae code [ae code WA 001 XWA 000 BC 011 XBC 001 DE 101 XDE 010 HL 111 XHL 011 IY \ uses xIY 101 tion not IZ possible! XIZ 110 SP XSP 111 “rr” for the MULS rr,# instruction is as listed below. Operation size in bytes Operation size in words (16 bits8 bits x 8 bits) (32 bits—16 bits x 16 bits) ee WA 001 XWA 000 BC 011 XBC 001 DE 101 XDE 010 HL 111 XHL 011 IY C7H : F4H XIY 101 IZ C7H : F8H XIZ 110 sP C7H : FCH XSP 111 ist byte 2nd byte *1 Any other word registers can be *2 Any other long word registers can be specified in the same extension specified in the extension coding. coding as those for IX to SP. CPU900H-112 2001-03-16 === page 32 === TOSHIBA TLCS-900/H CPU NEG dst < Negate > Operation : dst<0—dst Description : Decrements 0 by the contents of dst and loads the result to dst. (Twos complement) Details : Size Mnemonic Code Byte Word Long word Oo OO x NEG cee aT, | Flags : S Z H V N C Pete fete fade S = MSB value of the result is set. Z = 1isset when the result is 0, otherwise 0. H = 1isset when a borrow from bit 3 to bit 4 occurs as a result, otherwise 0. V = 1isset when an overflow occurs as a result, otherwise 0. N = lisset. C = 1isset when a borrow from the MSB occurs as a result, otherwise 0. Execution example: NEG IX When the IX register = 0002H, execution sets the IX register to FFFEH. 0000 (Fixed) © 0002 IX register IX register CPU900H-113 2001-03-16 === page 33 === TOSHIBA TLCS-900/H CPU Operation : None. Description : Does nothing but moves execution to the next instruction. The object code of this instruction is 00H. Details : Mnemonic Code NoP Flags : § Z H V N C S = Nochange Z = Nochange H = Nochange V = Nochange N = Nochange C = Nochange CPU900H-114 2001-03-16