Regarding the change of names mentioned in the document, such as Mitsubishi Electric and Mitsubishi XX, to Renesas Technology Corp.

Size: px
Start display at page:

Download "Regarding the change of names mentioned in the document, such as Mitsubishi Electric and Mitsubishi XX, to Renesas Technology Corp."

Transcription

1 To all our customers Regarding the change of names mentioned in the document, such as Mitsubishi Electric and Mitsubishi XX, to Renesas Technology Corp. The semiconductor operations of Hitachi and Mitsubishi Electric were transferred to Renesas Technology Corporation on April st 00. These operations include microcomputer, logic, analog and discrete devices, and memory chips other than DRAMs (flash memory, SRAMs etc.) Accordingly, although Mitsubishi Electric, Mitsubishi Electric Corporation, Mitsubishi Semiconductors, and other Mitsubishi brand names are mentioned in the document, these names have in fact all been changed to Renesas Technology Corp. Thank you for your understanding. Except for our corporate trademark, logo and corporate statement, no changes whatsoever have been made to the contents of the document, and these changes do not constitute any alteration to the contents of the document itself. Note : Mitsubishi Electric will continue the business operations of high frequency & optical devices and power devices. Renesas Technology Corp. Customer Support Dept. April, 00

2 MITSUBISHI 8-BIT SINGLE-CHIP MICROCOMPUTER 740 FAMILY 740 Family Software Manual

3 keep safety first in your circuit designs! Mitsubishi Electric Corporation puts the maximum effort into making semiconductor products better and more reliable, but there is always the possibility that trouble may occur with them. Trouble with semiconductors may lead to personal injury, fire or property damage. Remember to give due consideration to safety when making your circuit designs, with appropriate measures such as (i) placement of substitutive, auxiliary circuits, (ii) use of non-flammable material or (iii) prevention against any malfunction or mishap. Notes regarding these materials These materials are intended as a reference to assist our customers in the selection of the Mitsubishi semiconductor product best suited to the customer s application; they do not convey any license under any intellectual property rights, or any other rights, belonging to Mitsubishi Electric Corporation or a third party. Mitsubishi Electric Corporation assumes no responsibility for any damage, or infringement of any third-party s rights, originating in the use of any product data, diagrams, charts or circuit application examples contained in these materials. All information contained in these materials, including product data, diagrams and charts, represent information on products at the time of publication of these materials, and are subject to change by Mitsubishi Electric Corporation without notice due to product improvements or other reasons. It is therefore recommended that customers contact Mitsubishi Electric Corporation or an authorized Mitsubishi Semiconductor product distributor for the latest product information before purchasing a product listed herein. Mitsubishi Electric Corporation semiconductors are not designed or manufactured for use in a device or system that is used under circumstances in which human life is potentially at stake. Please contact Mitsubishi Electric Corporation or an authorized Mitsubishi Semiconductor product distributor when considering the use of a product contained herein for any specific purposes, such as apparatus or systems for transportation, vehicular, medical, aerospace, nuclear, or undersea repeater use. The prior written approval of Mitsubishi Electric Corporation is necessary to reprint or reproduce in whole or in part these materials. If these products or technologies are subject to the Japanese export control restrictions, they must be exported under a license from the Japanese government and cannot be imported into a country other than the approved destination. Any diversion or reexport contrary to the export control laws and regulations of JAPAN and/or the country of destination is prohibited. Please contact Mitsubishi Electric Corporation or an authorized Mitsubishi Semiconductor product distributor for further details on these materials or the products contained therein.

4 REVISION DESCRIPTION LIST 740 Family Software Manual Rev. No. Revision Description Rev. date.0 First Edition (/)

5 Preface This software manual is for users of the 740 Family. Register structures, addressing modes and instructions are introduced in each section. The enhanced instruction set with enhanced data and memory operations enable efficient programming. Please refer to the USER S MANUAL appropriate for the hardware device or the development support tools used.

6 Table of contents Table of contents CHAPTER. OVERVIEW... CHAPTER. CENTRAL PROCESSING UNIT (CPU).... Accumulator (A).... Index Register X (X), Index Register Y (Y).... Stack Pointer (S)....4 Program Counter (PC) Processor Status Register (PS)...4 CHAPTER. INSTRUCTIONS Addressing Mode Instruction Set Data transfer instructions Operating instruction Bit managing instructions Flag setting instructions Jump, Branch and Return instructions Interrupt instruction (Break instruction) Special instructions Other instruction...9. Description of instructions... 0 CHAPTER 4. NOTES ON USE Notes on interrupts Setting for interrupt request bit and interrupt enable bit Switching of detection edge Distinction of interrupt request bit Notes on programming Processor Status Register BRK instruction Decimal calculations JMP instruction...06 APPENDIX. Instruction Cycles in each Addressing Mode APPENDIX. 740 Family Machine Language Instruction Table... 7 APPENDIX. 740 Family list of Instruction Codes...79 I

7 Table of contents <Addressing Mode> Immediate... 7 Accumulator... 8 Zero Page... 9 Zero Page X... 0 Zero Page Y... Absolute... Absolute X... Absolute Y... 4 Implied... 5 Relative... 6 Indirect X... 7 Indirect Y... 8 Indirect Absolute... 9 Zero Page Indirect... 0 Special Page... Zero Page Bit... Accumulator Bit... Accumulator Bit Relatibe... 4 Zero Page Bit Relative... 5 <Instructions> ADC... AND... ASL... BBC... 4 BBS... 5 BCC... 6 BCS... 7 BEQ... 8 BIT... 9 BMI BNE... 4 BPL... 4 BRA... 4 BRK BVC BVS CLB CLC CLD CLI CLT... 5 CLV... 5 CMP... 5 COM CPX CPY DEC DEX DEY DIV EOR... 6 INC... 6 INX... 6 INY JMP JSR LDA LDM LDX LDY LSR... 7 MUL... 7 NOP... 7 ORA PHA PHP PLA PLP ROL ROR RRF... 8 RTI... 8 RTS... 8 SBC SEB SEC SED SEI SET STA STP... 9 STX... 9 STY... 9 TAX TAY TST TSX TXA TXS TYA WIT... 0 II

8 OV ERV IEW. OVERVIEW The distinctive features of the CMOS 8-bit microcomputers 740 Family s software are described below: ) An efficient instruction set and many addressing modes allow the effective use of ROM. ) The same bit management, test, and branch instructions can be performed on the Accumulator, memory, or I/O area. ) Multiple interrupts with separate interrupt vectors allow servicing of different non-periodic events. 4) Byte processing and table referencing can be easily performed using the index addressing mode. 5) Decimal mode needs no software correction for proper decimal operation. 6) The Accumulator does not need to be used in operations using memory and/or I/O.

9 C EN TRAL PROC ESSIN G UN IT Accumulator (A) Index Register X (X), Index Register Y (Y). CENTRAL PROCESSING UNIT (CPU) Six main registers are built into the CPU of the 740 Family. The Program Counter (PC) is a sixteen-bit register; however, the Accumulator (A), Index Register X (X), Index Register Y (Y), Stack Pointer (S) and Processor Status Register (PS) are eight-bit registers. Except for the I flag, the contents of these registers are indeterminate after a hardware reset; therefore, initialization is required with some programs (immediately after reset the I flag is set to ). 7 7 A 7 X 7 Y 7 S 0 7 PC L Accumulator(A) Index Register X(X) Index Register Y(Y) Stack Pointer(S) Program Counter(PC) 7 0 N V T B D I Z C Processor Status Register(PS) Carry Flag Zero Flag Interrupt Disable Flag Decimal Mode Flag Break Flag (BRK) X Modified Operation Mode Flag Overflow Flag Negative Flag Fig... Register Configuration. Accumulator (A) The Accumulator, an eight-bit register, is the main register of the microcomputer. This general-purpose register is used most frequently for arithmetic operations, data transfer, temporary memory, conditional judgments, etc.. Index Register X (X), Index Register Y (Y) The 740 Family has an Index Register X and an Index Register Y, both of which are eightbit registers. When using addressing modes which use these index registers, the address, which is added the contents of Index Register to the address specified with operand, is accessed. These modes are extremely effective for referencing subroutine and memory tables. The index registers also have increment, decrement, compare, and data transfer functions; therefore, these registers can be used as simple accumulators.

10 CENTRAL PROCESSING UNIT Stack Pointer (S). Stack Pointer (S) The Stack Pointer is an eight-bit register used for generating interrupts and calling subroutines. When an interrupt is received, the following procedure is performed automatically in the indicated sequence: () The contents of the high-order eight bits of the Program Counter (PCH) are saved to an address using the Stack Pointer contents for the low-order eight bits of the address. () The Stack Pointer contents are decremented by. () The contents of the low-order eight bits of the Program Counter (PCL) are saved to an address using the Stack Pointer Contents for the low-order eight bits of the address. (4) The Stack Pointer contents are decremented by. (5) The contents of the Processor Status Register (PS) are saved to an address using the Stack Pointer contents for the low-order eight bits of the address. (6) The Stack Pointer contents are decremented by. The Processor Status Register is not saved when calling subroutines (items (5) and (6) above are not executed). The Processor Status Register is saved by executing the PHP instruction in software. To prevent data loss when generating interrupts and calling subroutines, it is necessary to save other registers as well. This is done by executing the proper instruction in software while in the interrupt service routine or subroutine. The high-order eight bits of the address are determined by the Stack Page Selection Bit. For example, the PHA instruction is executed to save the contents of the Accumulator. Executing the PHA instruction saves the Accumulator contents to an address using the Stack Pointer contents as the low-order eight bits of the address. The RTI instruction is executed to return from an interrupt routine. When the RTI instruction is executed, the following procedure is performed automatically in sequence. () The Stack Pointer contents are incremented by. () The contents of an address using the Stack Pointer contents as the low-order eight bits of the address is returned to the Processor Status Register (PS). () The Stack Pointer contents are incremented by. (4) The contents of an address using the Stack Pointer as the low-order eight bits of the address is returned to the low-order eight bits of the Program Counter (PCL). (5) The Stack Pointer contents are incremented by. (6) The contents of an address using the Stack Pointer as the low-order eight bits of the address is returned to the high-order eight bits of the Program Counter (PCH). Steps () and () are not performed when returning from a subroutine using the RTS instruction. The Processor Status Register should be restored before returning from a subroutine by using the PLP instruction. The Accumulator should be restored before returning from a subroutine or an interrupt servicing routine by using the PLA instruction. The PLA and PLP instructions increment the Stack Pointer by and return the contents of an address stored in the Stack Pointer to the Accumulator or Processor Status Register, respectively. Saving data in the stack area gradually fills the RAM area with saved data; therefore, caution must exercised concerning the depth of interrupt levels and subroutine nesting.

11 C EN TRAL PROC ESSIN G UN IT Program Counter (PC) Processor Status Register (PS).4 Program Counter (PC) The Program Counter is a sixteen-bit counter consisting of PCH and PCL, which are each eight-bit registers. The contetnts of the Program Counter indicates the address which an instruction to be executed next is stored. The 740 Family uses a stored program system; to start a new operation it is necessary to transfer the instruction and relevant data from memory to the CPU. Normally the Program Counter is used to indicate the next memory address. After each instruction is executed, the next instruction required is read. This cycle is repeated until the program is finished. The control of the Program Counter of the 740 Family is almost fully automatic. However, caution must be exercised to avoid differences between program flow and Program Counter contents when using the Stack Pointer or directly altering the contents of the Program Counter..5 Processor Status Register (PS) The Processor Status Register is an eight-bit register consisting of 5 flags which indicate the status of arithmetic operations and flags which determine operation. Each of these flags is described below. Table.5. lists the instructions to set/clear each flag. Refer to the section Appendix MACHINE LANGUAGE INSTRUCTION TABLE or. INSTRUCTIONS for details on when these flags are altered. [ Carry flag C ] Bit 0 This flag stores any carry or borrow from the Arithmetic Logic Unit (ALU) after an arithmetic operation and is also changed by the Shift or Rotate instruction. This flag is set by the SEC instruction and is cleared by the CLC instruction. [ Zero flag Z ] Bit This flag is set when the result of an arithmetic operation or data transfer is 0 and is cleared by any other result. [ Interrupt disable flag I ] Bit This flag disables interrupts when it is set to. This flag immediately becomes when an interrupt is received. This flag is set by the SEI instruction and is cleared by the CLI instruction. [ Decimal mode flag D ] Bit This flag determines whether addition and subtraction are performed in binary or decimal notation. Addition and subtraction are performed in binary notation when this flag is set to 0 and as a -digit, -word decimal numeral when set to. Decimal notation correction is performed automatically at this time. This flag is set by the SED instruction and is cleared by the CLD instruction. Only the ADC and SBC instructions are used for decimal arithmetic operations. Note that the flags N, V and Z are invalid when decimal arithmetic operations are performed by these instructions. [ Break flag B ] Bit 4 This flag determines whether an interrupt was generated with the BRK instruction. When a BRK instruction interrupt occurs, the flag B is set to and saved to the stack; for all other interrupts the flag is set to 0 and saved to the stack. 4

12 C EN TRAL PROC ESSIN G UN IT Processor Status Register (PS) [ X modified operation mode flag T ] Bit 5 This flag determines whether arithmetic operations are performed via the Accumulator or directly on a memory location. When the flag is set to 0, arithmetic operations are performed between the Accumulator and memory. When, arithmetic operations are performed directly on a memory location. This flag is set by the SET instruction and is cleared by the CLT instruction. () When the T flag = 0 A A * M * : indicates an arithmetic operation A: accumulator contents M: contents of a memory location specified by the addressing mode of the arithmetic operation () When the T flag = M M * M * : indicates arithmetic operation M: contents of a memory location, designated by the contents of Index Register X. M: contents of a memory location specified by the addressing mode of arithmetic operation. [ Overflow flag V ] Bit 6 This flag is set to when an overflow occurs as a result of a signed arithmetic operation. An overflow occurs when the result of an addition or subtraction exceeds +7 (7F6) or 8 (806) respectively. The CLV instruction clears the Overflow Flag. There is no set instruction. The overflow flag is also set during the BIT instruction when bit 6 of the value being tested is. Overflows do not occur when the result of an addition or subtraction is equal to or smaller than the above numerical values, or for additions involving values with different signs. [ Negative flag N ] Bit 7 This flag is set to match the sign bit (bit 7) of the result of a data or arithmetic operation. This flag can be used to determine whether the results of arithmetic operations are positive or negative, and also to perform a simple bit test. Table.5. Instructions to set/clear each flag of processor status register Flag C Flag Z Flag I Flag D Flag B Flag T Set instruction SEC SEI SED SET Clear instruction CLC CLI CLD CLT Flag V CLV Flag N 5

13 IN STRUC TION S Addressing mode. INSTRUCTIONS. Addressing Mode The 740 Family has 9 addressing modes and a powerful memory access capability. When extracting data required for arithmetic and logic operations from memory or when storing the results of such operations in memory, a memory address must be specified. The specification of the memory address is called addressing. The data required for addressing and the registers involved are described below. The 740 Family instructions can be classified into three kinds, by the number of bytes required in program memory for the instruction: -byte, -byte and -byte instructions. In each case, the first byte is known as the Op-Code (operation code) which forms the basis of the instruction. The second or third byte is called the operand which affects the addressing. The contents of index registers X and Y can also effect the addressing. -byte instruction -byte instruction -byte instruction Index Register Op-Code Op-Code Op-Code Operand I Operand I Operand II X Y Fig... Byte Structure of Instructions Although there are many addressing modes, there is always a particular memory location specified. What differs is whether the operand, or the index register contents, or a combination of both should be used to specify the memory or jump destination. Based on these types of instructions, the range of variation is increased and operation is enhanced by combinations of the bit operation instructions, jump instruction, and arithmetic instructions. As for -byte instruction, an accumulator or a register is specified, so that the instruction does not have operand, which specify memory. 6

14 IN STRUC TION S Im m ed iate Addressing mode Addressin g m ode : Immediate Function : Specifies the Operand as the data for the instruction. In stru ction s : ADC, AND, CMP, CPX, CPY, EOR, LDA, LDX, LDY, ORA, SBC Ex a m p le : Mnemonic ADC #$A5 Machine code 696 A56 This symbol(#) indicates the Immediate addressing mode. Memory (A) (A) + (C) + A56 Op-code (696) Operand (A56) 7

15 IN STRUC TION S Addressin g m ode : Ac c u m u la to r Accumulator Addressing mode Function : Specifies the contents of the Accumulator as the data for the instruction. In stru ction s : ASL, DEC, INC, LSR, ROL, ROR Ex a m p le : Mnemonic ROL A Machine code A6 C Carry flag bit 7 Accumulator bit 0 8

16 IN STRUC TION S Ze ro Pa g e Addressing mode Addressin g m ode : Zero Page Function : In stru ction s : ADC, AND, ASL, BIT, CMP, COM, CPX, CPY, DEC, EOR, INC, LDA, LDM, LDX, LDY, LSR, ORA, ROL, ROR, RRF, SBC, STA, STX, STY, TST Ex a m p le : Mnemonic Specifies the contents in a Zero Page memory location as the data for the instruction. The address in the Zero Page memory location is determined by using Operand as the low-order byte of the address and 006 as the high-order byte. Machine code ADC $ (A) (A) + (C) + XX6 Memory Zero page Data(XX6) FF6 Zero page designation Op-code(656) Operand (406) 9

17 IN STRUC TION S Zero Page X Addressing mode Addressin g m ode : Zero Page X Function : In stru ction s : Specified the contents in a Zero Page memory location as the data for the instruction. The address in the Zero Page memory location is determined by the following: (a) Operand and the Index Register X are added. (If as a result of this addition a carry occurs, it is ignored.) (b) The result of the addition is used as the low-order byte of the address and 006 as the high-order byte. ADC, AND, ASL, CMP, DEC, DIV, EOR, INC, LDA, LDY, LSR, MUL, ORA, ROL, ROR, SBC, STA, STY Ex a m p le : Mnemonic ADC $5E,X Machine code 756 5E6 (A) (A) + (C) + XX6 Memory Zero page Data(XX6) FF6 Zero page X designation Op-code (756) Operand (5E6) + E66 = 446 Ignored Contents of Index Register X 0

18 IN STRUC TION S Zero Page Y Addressing mode Addressin g m ode : Zero Page Y Function : Specifies the contents in a Zero Page memory location as the data for the instruction. The address in the Zero Page memory location is determined by the following: (a) Operand and the Index Register Y are added (if as a result of this addition a carry occurs, it is ignored). (b) The result of the addition is used as the low-order byte of the address and 006 as the high-order byte. In stru ction s : LDX, STX Ex a m p le : Mnemonic Machine code LDX $6,Y B66 66 (X) XX6 Memory Zero page Data(XX6) FF6 Zero page Y designation Op-code (B66) Operand (66) = 686 Contents of Index Register Y

19 IN STRUC TION S Ab s o lu te Addressing mode Addressin g m ode : Absolute Function : Specifies the contents in a memory location as the data for the instruction. The address in the memory location is determined by using Operand I as the loworder byte of the address and Operand II as the highorder byte. In stru ction s : ADC, AND, ASL, BIT, CMP, CPX, CPY, DEC, EOR, INC, JMP, JSR, LDA, LDX, LDY, LSR, ORA, ROL, ROR, SBC, STA, STX, STY Ex a m p le : Mnemonic ADC $AD Machine code 6D6 6 AD6 Memory Op-code (6D6) Operand I (6) Operand II (AD6) Absolute designation (A) (A) + (C) + XX6 Data (XX6) AD6

20 IN STRUC TION S Ab s o lu te X Addressing mode Addressin g m ode : Absolute X Function : Specifies the contents in a memory location as the data for the instruction. The address in the memory location is determined by the following: (a) Operand I is used as the low-order byte of an address, Operand II as the high-order byte. (b) Index Register X is added to the address above. The result is the address in the memory location. In stru ction s : ADC, AND, ASL, CMP, DEC, EOR, INC, LDA, LDY, LSR, ORA, ROL, ROR, SBC, STA Ex a m p le : Mnemonic ADC $AD, X Machine code 7D6 6 AD6 Memory Op-code (7D6) Operand I (6) Operand II (AD6) Contetns of Index Register X + EE6 = AE006 Absolute X designation (A) (A) + (C) + XX6 Data(XX6) AE006

21 IN STRUC TION S Ab s o lu te Y Addressing mode Addressin g m ode : Absolute Y Function : Specifies the contents in a memory location as the data for the instruction. The address in the memory location is determined by the following: (a) Operand I is used as the low-order byte of an address, Operand II as the high-order byte. (b) Index Register Y is added to the address above. The result is the address in the memory location. In stru ction s : ADC, AND, CMP, EOR, LDA, LDX, ORA, SBC, STA Ex a m p le : Mnemonics ADC $AD, Y Machine code AD6 Memory Op-code (796) Contents of Index Register Y Operand I (6) + EE6 = AE006 Operand II (AD6) Absolute Y designation (A) (A) + (C) + XX6 Data(XX6) AE006 4

22 IN STRUC TION S Addressin g m ode : Implied Im p lie d Addressing mode Function : Operates on a given register or the Accumulator, but the address is always inherent in the instruction. In stru ction s : BRK, CLC, CLD, CLI, CLT, CLV, DEX, DEY, INX, INY, NOP, PHA, PHP, PLA, PLP, RTI, RTS, SEC, SED, SEI, SET, STP, TAX, TAY, TSX, TXA, TXS, TYA, WIT Ex a m p le : Mnemonic Machine code CLC 86 Processor status register bit 7 bit 0? Carry flag Carry flag is cleared to

23 IN STRUC TION S Addressin g m ode : Relative Re la tiv e Addressing mode Function : Specifies the address in a memory location where the next Op-Code is located. When the branch condition is satisfied, Operand and the Program Counter are added. The result of this addition is the address in the memory location. When the branch condition is not satisfied, the next instruction is executed. In stru ction s : BCC, BCS, BEQ, BMI, BNE, BPL, BRA, BVC, BVS Ex a m p le : Mnemonic BCC Machine code 906 F6 Decimal When the carry flag is cleared, jumps to address *. Memory When the carry flag is set, goes to address +. * Memory Address to be executed next Op-code (906) * Operand (F6) * + * Jump Op-code (906) * Operand (F6) Address to be executed next * + 6

24 IN STRUC TION S Indirect X Addressing mode Addressin g m ode : Indirect X Function : Specifies the contents in a memory location as the data for the instruction. The address in the memory location is determined by the following: (a) A Zero Page memory location is determined by the adding the Operand and Index Register X (if as a result of this addition a carry occurs, it is ignored). (b) The result of the addition is used as the low-order byte of an address in the Zero Page memory location and 006 as the high-order byte. (c) The contents of the address in the Zero Page memory location is used as the low-order byte of the address in the memory location. (d) The next Zero Page memory location is used as the high-order byte of the address in the memory location. In stru ction s : ADC, AND, CMP, EOR, LDA, ORA, SBC, STA Ex a m p le : Mnemonic ADC ($E,X) Machine code 66 E6 Absolute designation Memory Zero page Data I (006) Data II (46) Op-code (66) Operand (E6) FF6 Zero page X designation + E66 = 046 Ignored (A) (A) + (C) + XX6 Data(XX6) 4006 Contents of Index Register X Assuming that 006 for Data I, and 46 for Data ll are stored in advance. 7

25 IN STRUC TION S Indirect Y Addressing mode Addressin g m ode : Indirect Y Function : Specifies the contents in a memory location as the data for the instruction. The address in the memory location is determined by the following: (a) The Operand is used the low-order byte of an address in the Zero Page memory location and 006 of the high-order byte. (b) The contents of the address in the Zero Page memory location is used as the low-order byte of an address. The next Zero Page memory location is used as the high-order byte. (c) The Index Register Y is added to the address in Step b. The result of this addition is the address in the memory location. In stru ction s : ADC, AND, CMP, EOR, LDA, ORA, SBC, STA Ex a m p le : Mnemonic ADC ($E),Y Machine code 76 E6 Zero page indirect designation Memory Zero page Data I (06) Data II (6) Op-code (76) Operand (E6) 006 E6 F6 FF6 Contents of Index Register Y 06 + E66 = E76 Absolute Y designation (A) (A) + (C) + XX6 Data (XX6) E76 Assuming that 06 for Data I, and 6 for Data ll are stored in advance. 8

26 IN STRUC TION S In d ire c t Ab s o lu te Addressing mode Addressin g m ode : Indirect Absolute Function : In stru ction s : JMP Ex a m p le : Mnemonic Specifies the address in a memory location as the jump destination address. The address in the memory location is determined by the following: (a) Operand I is used as the low-order byte of an address and Operand II as the high-order byte. (b) The contents of the address above is used as the low-order byte and the contents of the next address as the high-order byte. (c) The high-order and low-order bytes in step b together form the address in the memory location. Machine code JMP ($400) 6C Memory Op-code (6C6) Operand I (006) Indirect designation Operand II (46) Data I (FF6) Data II (E6) Address to be executed next Absolute designation 4006 EFF6 Jump Assuming that FF6 for Data I, and E6 for Data ll are stored in advance. Note: The page s last address (address XXFF6) can not be specified for the indirect designation address; in other words, JMP ($XXFF) can not be executed. 9

27 IN STRUC TION S Zero Page Indirect Addressing mode Addressin g m ode : Zero Page Indirect Absolute Function : In stru ction s : JMP, JSR Specifies the address in a memory location as the jump destination address. The address in the memory location is determined by the following: (a) Operand is used as the low-order byte of an address in the Zero Page memory location and 006 as the high-order byte. (b) The contents of the address in the Zero Page memory location is used as the low-order byte and the contents of the next Zero Page memory location as high-order byte. (c) The high-order and low-order bytes in step b together form the address of the memory location. Ex a m p le : Mnemonic Machine code JMP ($45) B6 456 Zero page indirect designation Memory Zero page Data I (FF6) Data II (E6) Op-code (B6) Operand (456) Address to be executed next FF6 Jump EFF6 Absolute designation Assuming that FF6 for Data I, and E6 for Data ll are stored in advance. 0

28 IN STRUC TION S Addressin g m ode : Special Page Special Page Addressing mode Function : Specifies the address in a Special Page memory location as the jump destination address. The address in the Special Page memory location is determined by using Operand as the low-order byte of the address and FF6 as the high-order byte. In stru ction s : Ex a m p le : JSR Mnemonic JSR \$FFC0 Machine code 6 C06 This symbol indicates the Special page mode. Memory Op-code (6) Operand (C06) * FF006 Address to be executed next FFC06 Special page FFFF6 Jump Special page designation

29 IN STRUC TION S Zero Page Bit Addressing mode Addressin g m ode : Zero Page Bit Function : In stru ction s : CLB, SEB Specifies one bit of the contents in a Zero Page memory location as the data for the instruction. Operand is used as the low-order byte of the address in the Zero Page memory location and 006 as the high-order byte. The bit position is designated by the high-order three bits of the Op-code. Ex a m p le : Mnemonic Machine code CLB 5,$44 BF6 446 Memory Zero page bit 5? Zero page designation Bit designation Op-code(BF6) FF6 0 Operand (446) Zero page bit

30 IN STRUC TION S Ac c u m u la to r Bit Addressing mode Addressin g m ode : Accumulator Bit Function : Specifies one bit of the Accumulator as the data for the instruction. The bit position is designated by the high-order three bits of the Op-Code. In stru ction : CLB, SEB Ex a m p le : Mnemonic CLB 5,A Machine code BB6 Accumulator bit 5? Memory Bit designation Op-code(BB6) 0 0 Accumulator bit 5 0

31 IN STRUC TION S Ac c u m u la to r Bit Re la tiv e Addressin g m ode : Accumulator Bit Relative Function : Specifies the address in a memory location where the next Op-Code is located. The bit position is designated by the high-order three bits of the Op-Code. If the branch condition is satisfied, Operand and the Program Counter are added. The result of this addition is the address in the memory location. When the branch condition is not satisfied, the next instruction is executed. In stru ction s : BBC, BBS Addressing mode Ex a m p le : Mnemonic BBC 5,A, Machine code B6 F6 Decimal When the bit 5 of the Accumulator is cleared Accumulator bit 5 0 When the bit 5 of the Accumulator is set Accumulator bit 5 Memory Memory Address to be * executed next Bit designation Op-code(B6) * Jump Bit designation Op-code(B6) * Operand (F6) Operand (F6) * + Address to be * executed next + 4

32 IN STRUC TION S Zero Page Bit Relative Addressin g m ode : Zero Page Bit Relative Function : In stru ction s : BBC, BBS Addressing mode Specifies the address of a memory location where the next Op-Code is located. The bit position is designated by the high-order three bits of the Op-Code. The address in the Zero Page memory location is determined by using Operand I as low-order byte of the address and 006 as the highorder byte. If the branch condition is satisfied, Operand Il and the Program Counter are added. The result of this addition is the address in the memory location. When the branch condition is not satisfied, the next instruction is executed. Ex a m p le : Mnemonic BBC 5,$04, Machine language B F6 Decimal When the bit 5 at address 046 is cleared, jumps to address *. When the bit 5 at address 046 is set, goes to address *+. Memory Memory Zero page 006 Zero page 006 bit bit FF6 FF6 Zero page designation Address to be executed next * Zero page designation Bit designation Op-code(B76) Jump 0 0 * 0 0 Operand I (046) Bit designation Op-code(B76) Operand I (046) * Operand II (F6) Operand II (F6) *+ Address to be executed next *+ 5

33 IN STRUC TION S Instruction Set. Instruction Set The 740 Family has 7 types of instructions. The detailed explanation of the instructions is presented in.. Note that some instructions cannot be used for any products... Data transfer instructions These instructions transfer the data between registers, register and memory, and memories. The following are data transfer instructions. Load Store Transfer Stack Operation Instruction LDA LDM LDX LDY STA STX STY TAX TXA TAY TYA TSX TXS PHA PHP PLA PLP Function Load memory value into Accumulator, or memory where is indicated by Index Register X Load immediate value into memory Load memory contents into Index Register X Load memory contents into Index Register Y Store Accumulator into memory Store Index Register X into memory Store Index Register Y into memory Transfer Accumulator to the Index Register X Transfer Index Register X into the Accumulator Transfer Accumulator into the Index Register Y Transfer Index Register Y into the Accumulator Transfer Stack Pointer into the Index Register X Transfer Index Register X into the Stack Pointer Push Accumulator onto the Stack Push Processor Status onto the Stack Pull Accumulator from the Stack Pull Processor Status from the Stack 6

34 IN STRUC TION S Instruction Set.. Operating instruction The operating instructions include the operations of addition and subtraction, logic, comparison, rotation, and shift. The operating instructions are as follows: Instructions ADC Contents Add memory contents and C flag to Accumulator or memory where is indicated by Index Register X SBC Subtracts memory contents and C flag s complement from Accumulator or memory where is indicated by Index Addition & Subtraction Multiplication & Division Logical Operation INC DEC INX DEX INY DEY MUL (Note) DIV (Note) AND ORA EOR COM BIT TST CMP Register X Increment Accumulator or memory contents by Decrement Accumulator or memory contents by Increment Index Register X by Decrement Index Register X by Increment Index Register Y by Decrement Index Register Y by Multiply Accumulator with memory specified by Zero Page X addressing mode and store high-order byte of result on Stack and low-order byte in Accumulator Quotient is stored in Accumulator and one s complement of remainder is pushed onto stack AND memory with Accumulator or memory where is indicated by Index Register X OR memory with Accumulator or memory where is indicated by Index Register X Exclusive-OR memory with Accumulator or memory where is indicated by Index Register X Store one s complement of memory contents to memory AND memory with Accumulator (The result is not stored into anywhere.) Test whether memory content is 0 or not Compare memory contents and Accumulator or memory Comparison where is indicated by Index Register X CPX Compare memory contents and Index Register X CPY ASL LSR Compare memory contents and Index Register Y Shift left one bit (memory contents or Accumulator) Shift right one bit (memory contents or Accumulator) Shift ROL Rotate one bit left with carry (memory contents or & Accumulator) Rotate ROR RRF Rotate one bit right with carry (memory contents or Accumulator) Rotate four bits right witout carry (memory) Note: For some products, multiplication and division instructions cannot be used. 7

35 IN STRUC TION S Instruction Set.. Bit managing instructions The bit managing instructions clear 0 or set designated bits of the Accumulator or memory. Bit Managing Instructions CLB SEB Contents Clear designated bit in the Accumulator or memory Set designated bit in the Accumulator or memory..4 Flag setting instructions The flag setting instructions clear 0 or set C, D, I, T and V flags. Instructions Contents Flag Setting CLC SEC CLD SED CLI SEI CLT SET CLV Clear C flag Set C flag Clear D flag Set D flag Clear I flag Set I flag Clear T flag Set T flag Clear V flag C flag : Carry Flag D flag : Decimal Mode Flag I flag : Interrupt Disable Flag T flag : X Modified Operation Mode Flag V flag : Overflow Flag..5 Jump, Branch and Return instructions The jump, branch and return instructions as following are used to change program flow. Instructions Contents JMP Jump to new location Jump Branch Return BRA JSR BBC BBS BCC BCS BNE BEQ BPL BMI BVC BVS RTI RTS Jump to new location Jump to new location saving the current address Branch when the designated bit in the Accumulator or memory is 0 Branch when the designated bit in the Accumulator or memory is Branch when the C Flag is 0 C flag : Carry Flag Branch when the C Flag is Branch when the Z Flag is 0 Z flag : Zero Flag Branch when the Z Flag is Branch when the N Flag is 0 N flag : Negative Flag Branch when the N Flag is Branch when the V Flag is 0 V flag : Overflow Flag Branch when the V Flag is Return from interrupt Return from subroutine 8

36 IN STRUC TION S Instruction Set..6 Interrupt instruction (Break instruction) This instruction causes a software interrupt. Interrupt Instruction BRK Contents Executes a software interrupt...7 Special instructions These special instructions control the oscillation and the internal clock. Special Instructions WIT STP Contents Stops the internal clock. Stops the oscillation of oscillator...8 Other instruction Other Instruction NOP Contents Only advances the program counter. 9

37 IN STRUC TION S Instruction Set. Description of instructions This section presents in detail the 740 Family instructions by arranging mnemonics of instructions alphabetically and dividing each instruction essentially into one page. The heading of each page is a mnemonic. Operation, explanation and changes of status flags are indicated for each instruction. In addition, assembler coding format, machine code, byte number, and list of cycle numbers for each addressing mode are indicated. The following are symbols used in this manual: Symbol A Ai PC PCL PCH PS S X Y M Mi C Z I D B T V N REL BADRS Description Accumulator Bit i of Accumulator Program Counter Low-order byte of Program Counter High-order byte of Program Counter Processor Status Register Stack Pointer Index Register X Index Register Y Memory Bit i of memory Carry Flag Zero Flag Interrupt Disable Flag Decimal Operation Mode Flag Break Flag X Modified Operations Mode Flag Overflow Flag Negative Flag Relative address Break address Symbol hh ll zz nn i # \ $ + / ( ) Description Address high-order byte data in 0 to 55 Address low-order byte data in 0 to 55 Zero page address data in 0 to 55 Data in 0 to 55 Data in 0 to 7 Contents of the Program Counter Tab or space Immediate mode Special page mode Hexadecimal symbol Addition Subtraction Multiplication Division Logical AND Logical OR Logical exclusive OR Contents of register, memory, etc. Direction of data transfer 0

38 AD C Operation : ADD WITH CARRY When (T) = 0, (A) (A) + (M) + (C) (T) =, (M(X)) (M(X)) + (M) + (C) AD C Function : When T = 0, this instruction adds the contents M, C, and A; and stores the results in A and C. When T =, this instruction adds the contents of M(X), M and C; and stores the results in M(X) and C. When T=, the contents of A remain unchanged, but the contents of status flags are changed. M(X) represents the contents of memory where is indicated by X. Status flag: N : V : T : B : I : D : Z : C : N is when bit 7 is after the operation; otherwise it is 0. V is when the operation result exceeds +7 or 8; otherwise it is 0. Z is when the operation result is 0; otherwise it is 0. C is when the result of a binary addition exceeds 55 or when the result of a decimal addition exceeds 99; otherwise it is 0. Addressing mode Immediate Zero page Zero page X Absolute Absolute X Absolute Y (Indirect X) (Indirect Y) Statement ADC #$nn ADC $zz ADC $zz,x ADC $hhll ADC $hhll,x ADC $hhll,y ADC ($zz,x) ADC ($zz),y Machine codes 696, nn6 656, zz6 756, zz6 6D6, ll6, hh6 7D6, ll6, hh6 796, ll6, hh6 66, zz6 76, zz6 Byte number Cycle number Notes : When T=, add to the cycle number. : When ADC instruction is executed in the decimal operation mode (D = ), decision of C is delayed. Accordingly, do not execute the instruction which operates C such as SEC, CLC, etc.

39 AN D Operation : LOGICAL AND When (T) = 0, (A) (A) (M) (T) =, (M(X)) (M(X)) (M) AN D Function : When T = 0, this instruction transfers the contents of A and M to the ALU which performs a bit-wise AND operation and stores the result back in A. When T =, this instruction transfers the contents M(X) and M to the ALU which performs a bit-wise AND operation and stores the results back in M(X). When T = the contents of A remain unchanged, but status flags are changed. M(X) represents the contents of memory where is indicated by X. Status flag:n : V : T : B : I : D : Z : C : N is when bit 7 is after the operation; otherwise it is 0. Z is when the operation result is 0; otherwise it is 0. Addressing mode Immediate Zero page Zero page X Absolute Absolute X Absolute Y (Indirect X) (Indirect Y) Statement AND #$nn AND $zz AND $zz,x AND $hhll AND $hhll,x AND $hhll,y AND ($zz,x) AND ($zz),y Machine codes 96, nn6 56, zz6 56, zz6 D6, ll6, hh6 D6, ll6, hh6 96, ll6, hh6 6, zz6 6, zz6 Byte number Cycle number Note: When T =, add to a cycle number.

40 ASL ARITHMETIC SHIFT LEFT ASL Operation : C b7 b0 0 Function : Status flag: This instruction shifts the content of A or M by one bit to the left, with bit 0 always being set to 0 and bit 7 of A or M always being contained in C. N : V : T : B : I : D : Z : C : N is when bit 7 of A or M is after the operation; otherwise it is 0. Z is when the operation result is 0; otherwise it is 0. C is when bit 7 of A or M is, before this operation; otherwise it is 0. Addressing mode Accumulator Zero page Zero page X Absolute Absolute X Statement ASL A ASL $zz ASL $zz,x ASL $hhll ASL $hhll,x Machine codes 0A6 066, zz6 66, zz6 0E6, ll6, hh6 E6, ll6, hh6 Byte number Cycle number

41 BBC BRANCH ON BIT CLEAR BBC Operation : Function : Status flag : When (Mi) or (Ai) = 0, (PC) (PC) + n + REL (Mi) or (Ai) =, (PC) (PC) + n n: If addressing mode is Zero Page Bit Relative, n=. And if addressing mode is Accumulator Bit Relative, n=. This instruction tests the designated bit i of M or A and takes a branch if the bit is 0. The branch address is specified by a relative address. If the bit is, next instruction is executed. Addressing mode Accumulator bit Relative Zero page bit Relative Statement BBC i,a,$hhll BBC i,$zz,$hhll Machine codes (0i+)6, rr6 (0i+7)6, zz6, rr6 Byte number Cycle number 4 5 Notes : rr6=$hhll ( +n). The rr6 is a value in a range of 8 to +7. : When a branch is executed, add to the cycle number. : When executing the BBC instruction after the contents of the interrupt request bit is changed, one instruction or more must be passed before the BBC instruction is executed. 4

42 BBS BRANCH ON BIT SET BBS Operation : Function : Status flag : When (Mi) or (Ai) =, (PC) (PC) + n + REL (Mi) or (Ai) = 0, (PC) (PC) + n n : If addressing mode is Zero Page Bit Relative, n=. And if addressing mode is Accumulator Bit Relative, n=. This instruction tests the designated bit i of the M or A and takes a branch if the bit is. The branch address is specified by a relative address. If the bit is 0, next instruction is executed. Addressing mode Accumulator bit Relative Zero page bit Relative Statement BBS i,a,$hhll BBS i,$zz,$hhll Machine codes (0i+)6, rr6 (0i+7)6, zz6, rr6 Byte number Cycle number 4 5 Notes : rr6=$hhll ( +n). The rr6 is a value in a range of 8 to +7. : When a branch is executed, add to the cycle number. : When executing the BBS instruction after the contents of the interrupt request bit is changed, one instruction or more must be passed before the BBS instruction is executed. 5

43 BC C BRANCH ON CARRY CLEAR BC C Operation : Function : Status flag : When (C) = 0, (PC) (PC) + + REL (C) =, (PC) (PC) + This instruction takes a branch to the appointed address if C is 0. The branch address is specified by a relative address. If C is, the next instruction is executed. Addressing mode Relative Statement BCC $hhll Machine codes 906, rr6 Byte number Cycle number Notes : rr6=$hhll ( +). The rr6 is a value in a range of 8 to +7. : When a branch is executed, add to the cycle number. 6

44 BC S Operation : BRANCH ON CARRY SET When (C) =, (PC) (PC) + + REL (C) = 0, (PC) (PC) + BC S Function : This instruction takes a branch to the appointed address if C is. The branch address is specified by a relative address. If C is 0, the next instruction is executed. Status flag : Addressing mode Relative Statement BCS $hhll Machine codes B06, rr6 Byte number Cycle number Notes : rr6=$hhll ( +). The rr6 is a value in a range of 8 to +7. : When a branch is executed, add to the cycle number. 7

45 BEQ BRANCH ON EQUAL BEQ Operation : Function : Status flag : When (Z) =, (PC) (PC) + + REL (Z) = 0, (PC) (PC) + This instruction takes a branch to the appointed address when Z is. The branch address is specified by a relative address. If Z is 0, the next instruction is executed. Addressing mode Relative Statement BEQ $hhll Machine codes F06,rr6 Byte number Cycle number Notes : rr6=$hhll ( +). The rr6 is a value in a range of 8 to +7. : When a branch is executed, add to the cycle number. 8

46 BIT Operation : TEST BIT IN MEMORY WITH ACCUMULATOR (A) (M) BIT Function : This instruction takes a bit-wise logical AND of A and M contents; however, the contents of A and M are not modified. The contents of N, V, Z are changed, but the contents of A, M remain unchanged. Status flag: N : V : T : B : I : D : Z : C : N is when bit 7 of M is ; otherwise it is 0. V is when bit 6 of M is ; otherwise it is 0. Z is when the result of the operation is 0; otherwise Z is 0. Addressing mode Zero page Absolute Statement BIT $zz BIT $hhll Machine codes 46, zz6 C6, ll6, hh6 Byte number Cycle number 4 9

47 BM I Operation : BRANCH ON RESULT MINUS When (N) =, (PC) (PC) + + REL (N) = 0, (PC) (PC) + BM I Function : This instruction takes a branch to the appointed address when N is. The branch address is specified by a relative address. If N is 0, the next instruction is executed. Status flag : Addressing mode Relative Statement BMI $hhll Machine codes 06, rr6 Byte number Cycle number Notes : rr6=$hhll ( +). The rr6 is a value in a range of 8 to +7. : When a branch is executed, add to the cycle number. 40

48 BN E Operation : BRANCH ON NOT EQUAL When (Z) = 0, (PC) (PC) + + REL (Z) =, (PC) (PC) + BN E Function : This instruction takes a branch to the appointed address if Z is 0. The branch address is specified by a relative address. If Z is, the next instruction is executed. Status flag : Addressing mode Relative Statement BNE $hhll Machine codes D06, rr6 Byte number Cycle number Notes : rr6=$hhll ( +). The rr6 is a value in a range of 8 to +7. : When a branch is executed, add to the cycle number. 4

49 BPL BRANCH ON RESULT PLUS BPL Operation : Function : Status flag : When (N) = 0, (PC) (PC) + + REL (N) =, (PC) (PC) + This instruction takes a branch to the appointed address if N is 0. The branch address is specified by a relative address. If N is, the next instruction is executed. Addressing mode Relative Statement BPL $hhll Machine codes 06, rr6 Byte number Cycle number Notes : rr6=$hhll ( +). The rr6 is a value in a range of 8 to +7. : When a branch is executed, add to the cycle number. 4

50 BRA BRANCH ALWAYS BRA Operation :(PC) (PC) + + REL Function : Status flag : This instruction branches to the appointed address. The branch address is specified by a relative address. Addressing mode Relative Statement BRA $hhll Machine codes 806, rr6 Byte number Cycle number 4 Note: rr6=$hhll ( +). The rr6 is a value in a range of 8 to +7. 4

51 BRK Operation : FORCE BREAK (B) (PC) (PC) + (M(S)) (PCH) (S) (S) (M(S)) (PCL) (S) (S) (M(S)) (PS) (S) (S) (I) (PC) BADRS (Note ) BRK Function : When the BRK instruction is executed, the CPU pushes the current PC contents onto the stack. The BADRS designated in the interrupt vector table is stored into the PC. Status flag: N : V : T : B : I : D : Z : C : Addressing mode Implied Statement BRK Machine codes 006 Byte number Cycle number 7 Notes : BADRS means a break address. : The value of the PC pushed onto the stack by the execution of the BRK instruction is the BRK instruction address plus two. Therefore, the byte following the BRK will not be executed when the value of the PC is returned from the BRK routine. : Both after the BRK instruction is executed and after INT is input, the program is branched to the address where is specified by the interrupt vector table. By testing the value of the B Flag in the PS (pushed on the Stack) in the interrupt service routine, the user can determine if the interrupt was caused by the BRK instruction. 44

52 BV C Operation : BRANCH ON OVERFLOW CLEAR When (V) = 0, (PC) (PC) + + REL (V) =, (PC) (PC) + BV C Function : Status flag : This instruction takes a branch to the appointed address if V is 0. The branch address is specified by a relative address. If V is, the next instruction is executed. Addressing mode Relative Statement BVC $hhll Machine codes 506, rr6 Byte number Cycle number Notes : rr6=$hhll ( +). The rr6 is a value in a range of 8 to +7. : When a branch is executed, add to the cycle number. 45

COSC 243. Instruction Sets And Addressing Modes. Lecture 7&8 Instruction Sets and Addressing Modes. COSC 243 (Computer Architecture)

COSC 243. Instruction Sets And Addressing Modes. Lecture 7&8 Instruction Sets and Addressing Modes. COSC 243 (Computer Architecture) COSC 243 Instruction Sets And Addressing Modes 1 Overview This Lecture Source Chapters 12 & 13 (10 th editition) Textbook uses x86 and ARM (we use 6502) Next 2 Lectures Assembly language programming 2

More information

The 6502 Instruction Set

The 6502 Instruction Set The 6502 Instruction Set Load and Store Group LDA Load Accumulator N,Z LDX Load X Register N,Z LDY Load Y Register N,Z STA Store Accumulator STX Store X Register STY Store Y Register Arithmetic Group ADC

More information

A. CPU INSTRUCTION SET SUMMARY

A. CPU INSTRUCTION SET SUMMARY A. CPU INSTRUCTION SET SUMMARY This appendix summarizes the CPU instruction set. Table A-1 is a matrix of CPU instructions and addressing modes arranged by operation code. Table A-2 lists the CPU instruction

More information

instruction 1 Fri Oct 13 13:05:

instruction 1 Fri Oct 13 13:05: instruction Fri Oct :0:0. Introduction SECTION INSTRUCTION SET This section describes the aressing modes and instruction types.. Aressing Modes The CPU uses eight aressing modes for flexibility in accessing

More information

; Once Initialized, monitor character in calls to CN05 ; set carry for input, to be tested CN35 C SEC

; Once Initialized, monitor character in calls to CN05 ; set carry for input, to be tested CN35 C SEC // // Serialcode.s // 256 Byte Prom P8 and 512 Byte PROM P9A (second version) for Apple II Serial Card // P9A differs from P9 by adding RTS/ACK software flow control to output and // by removing batch

More information

Multi-Bit Shift of 32-Bit Data (Arithmetic Right Shift)

Multi-Bit Shift of 32-Bit Data (Arithmetic Right Shift) SH7 Series APPLICATION NOTE Label: Functions Used: SHARN SHLR2 Instruction SHLR8 Instruction SHLR16 Instruction Contents 1. Function... 2 2. Arguments... 2 3. Internal Register Changes and Flag Changes...

More information

Table 1: Mnemonics Operations Dictionary. Add Accumulators Add B to Y. Add with carry to B. Add Memory to B. Add 16-bit to D And B with Memory

Table 1: Mnemonics Operations Dictionary. Add Accumulators Add B to Y. Add with carry to B. Add Memory to B. Add 16-bit to D And B with Memory Table 1: Mnemonics s Dictionary ABA ABX ABY ADCA ADCB ADDA ADDB ADDD ANDA ANDB ASL ASLA ASLB ASLD ASR ASRA ASRB BCC BCLR BCS BEQ BGE BGT BHI BHS BITA BITB BLE BLO BLS BLT Add Accumulators Add B to X Add

More information

H8SX Family APPLICATION NOTE. Vector Table Address Switching. Introduction. Target Devices. Contents

H8SX Family APPLICATION NOTE. Vector Table Address Switching. Introduction. Target Devices. Contents APPLICATION NOTE H8SX Family Introduction This application note describes how to change the vector table address. Target Devices H8SX family Contents 1. Overview... 2 2. Applicable Conditions... 2 3. Configuration...

More information

Programming the Motorola MC68HC11 Microcontroller

Programming the Motorola MC68HC11 Microcontroller Programming the Motorola MC68HC11 Microcontroller COMMON PROGRAM INSTRUCTIONS WITH EXAMPLES aba Add register B to register A Similar commands are abx aby aba add the value in register B to the value in

More information

In repeat transfer mode of DMAC, choose functions from those listed in Table 1. Operations of the checked items are described below.

In repeat transfer mode of DMAC, choose functions from those listed in Table 1. Operations of the checked items are described below. APPLICATION NOTE 1. Abstract In repeat transfer mode of DMAC, choose functions from those listed in Table 1. Operations of the checked items are described below. Table 1. Choosed Functions Item Transfer

More information

M16C/60 Series and M16C/20 Series

M16C/60 Series and M16C/20 Series APPLICATION NOTE M16C/60 Series and M16C/20 Series General-purpose Program for Converting from Uppercase Alphabet to Lowercase Alphabet 1. Abstract This program converts an uppercase English alphabet in

More information

M16C/62 Group APPLICATION NOTE. Signed 32 Bit Multiplication Library. 1. Abstract. 2. Introduction

M16C/62 Group APPLICATION NOTE. Signed 32 Bit Multiplication Library. 1. Abstract. 2. Introduction APPLICATION NOTE M16C/62 Group 1. Abstract This application note describes an operational library of the multiplicant (signed 32 bit) X the multiplication (signed 32 bit) = the product (signed 64 bit )

More information

M16C R8C FoUSB/UART Debugger. User Manual REJ10J

M16C R8C FoUSB/UART Debugger. User Manual REJ10J REJ10J1725-0100 M16C R8C FoUSB/UART Debugger User Manual Renesas Microcomputer Development Environment System R8C Family R8C/2x Series Notes on Connecting R8C/2A, R8C/2B, R8C/2C, R8C/2D Rev.1.00 Issued

More information

COSC 243. Assembly Language Techniques. Lecture 9. COSC 243 (Computer Architecture)

COSC 243. Assembly Language Techniques. Lecture 9. COSC 243 (Computer Architecture) COSC 243 Assembly Language Techniques 1 Overview This Lecture Source Handouts Next Lectures Memory and Storage Systems 2 Parameter Passing In a high level language we don t worry about the number of parameters

More information

The Motorola 68HC11 Instruc5on Set

The Motorola 68HC11 Instruc5on Set The Motorola 68HC11 Instruc5on Set Some Defini5ons A, B * accumulators A and B D * double accumulator (A + B) IX, IY * index registers X and Y SP * stack pointer M * some memory loca5on opr * an operand

More information

M16C R8C FoUSB/UART Debugger. User s Manual REJ10J

M16C R8C FoUSB/UART Debugger. User s Manual REJ10J REJ10J1217-0100 M16C R8C FoUSB/UART Debugger User s Manual RENESAS MICROCOMPUTER Development Environment System M16C Family R8C/Tiny Series Precautions on Connecting R8C/20, R8C/21, R8C/22, R8C/23 Rev.1.00

More information

Regarding the change of names mentioned in the document, such as Hitachi Electric and Hitachi XX, to Renesas Technology Corp.

Regarding the change of names mentioned in the document, such as Hitachi Electric and Hitachi XX, to Renesas Technology Corp. To all our customers Regarding the change of names mentioned in the document, such as Hitachi Electric and Hitachi XX, to Renesas Technology Corp. The semiconductor operations of Mitsubishi Electric and

More information

Example Programs for 6502 Microprocessor Kit

Example Programs for 6502 Microprocessor Kit Example Programs for 6502 Microprocessor Kit 0001 0000 0002 0000 GPIO1.EQU $8000 0003 0000 0004 0000 0005 0200.ORG $200 0006 0200 0007 0200 A5 00 LDA $0 0008 0202 8D 00 80 STA $GPIO1 0009 0205 00 BRK 0010

More information

DAN64: an AVR based 8-bit Microcomputer

DAN64: an AVR based 8-bit Microcomputer DAN64: an AVR based 8-bit Microcomputer Juan J. Martínez jjm@usebox.net Manual for V.R - May 0, 06 Features Composite video black and white output, 56 x 9 resolution, x 4 characters (8 x 8 pixels font,

More information

0b) [2] Can you name 2 people form technical support services (stockroom)?

0b) [2] Can you name 2 people form technical support services (stockroom)? ECE 372 1 st Midterm ECE 372 Midterm Exam Fall 2004 In this exam only pencil/pen are allowed. Please write your name on the front page. If you unstaple the papers write your name on the loose papers also.

More information

M16C/62 APPLICATION NOTE. Using the M16C/62 CRC. 1.0 Abstract. 2.0 Introduction. 3.0 A Lesson in CRC and the CCITT Polynomial

M16C/62 APPLICATION NOTE. Using the M16C/62 CRC. 1.0 Abstract. 2.0 Introduction. 3.0 A Lesson in CRC and the CCITT Polynomial APPLICATION NOTE M16C/62 1.0 Abstract The register sets of the M16C/62 devices contain a Cyclic Redundancy Check (CRC) calculating peripheral. This gives the user the ability to quickly calculate a CRC

More information

68HC11 PROGRAMMER'S MODEL

68HC11 PROGRAMMER'S MODEL 8H11 PROGRMMER'S MODEL s (,, and D) s and are general-purpose 8-bit accumulators used to hold operands and results of arithmetic calculations or data manipulations. Some instructions treat the combination

More information

M16C/62 APPLICATION NOTE. Programming the M16C/62 in Flash Parallel Mode. 1.0 Abstract. 2.0 Introduction. 3.0 Setting Up the PGM1000 Programmer

M16C/62 APPLICATION NOTE. Programming the M16C/62 in Flash Parallel Mode. 1.0 Abstract. 2.0 Introduction. 3.0 Setting Up the PGM1000 Programmer APPLICATION NOTE M16C/62 1.0 Abstract The following article describes using the ATC (Advanced Transdata) PGM1000 programmer to parallel program the flash memory of the M16C/62 series of microcontrollers.

More information

This function allows the user to erase any Flash block within the MCU including the near area memory (below address 0xFFFF).

This function allows the user to erase any Flash block within the MCU including the near area memory (below address 0xFFFF). APPLICATION NOTE M16C/62P, M16C/26 1.0 Abstract A simple Application Program Interface (API) has been created to allow programmers of the M16C/62P (M30626FHP) and M16C/26 (M30262F8) to easily integrate

More information

III. Flags of the Processor Staus Register

III. Flags of the Processor Staus Register III. Flags of the Processor Staus Register INHALT 1. Meaning 2. Application 2.1 Shifts 2.2 Branches 2.3 Addition and Subtraction 2.4 Comparisons in magnitude 1. Meaning processor status register Overflow

More information

Regarding the change of names mentioned in the document, such as Hitachi Electric and Hitachi XX, to Renesas Technology Corp.

Regarding the change of names mentioned in the document, such as Hitachi Electric and Hitachi XX, to Renesas Technology Corp. To all our customers Regarding the change of names mentioned in the document, such as Hitachi Electric and Hitachi XX, to Renesas Technology Corp. The semiconductor operations of Mitsubishi Electric and

More information

M32C/84 Group APPLICATION NOTE. Operation of timer A (2-phase pulse signal process in event counter mode, normal mode selected) 1.

M32C/84 Group APPLICATION NOTE. Operation of timer A (2-phase pulse signal process in event counter mode, normal mode selected) 1. APPLICATION NOTE Operation of timer A (2-phase pulse signal process in event counter mode, normal mode selected) 1. Abstract In processing 2-phase pulse signals in event counter mode, choose functions

More information

CPU08RM/AD REV 3 8M68HC08M. CPU08 Central Processor Unit. Reference Manual

CPU08RM/AD REV 3 8M68HC08M. CPU08 Central Processor Unit. Reference Manual CPU08RM/AD REV 3 68HC08M6 HC08M68HC 8M68HC08M CPU08 Central Processor Unit Reference Manual blank CPU08 Central Processor Unit Reference Manual Motorola reserves the right to make changes without further

More information

OSIAC Read OSIAC 5362 posted on the course website

OSIAC Read OSIAC 5362 posted on the course website OSIAC 5362 Read OSIAC 5362 posted on the course website The Basic Structure of Control Unit m CLK Run/Inhibit Control Step Counter m Preset (to any new state) Reset IR Decoder/Encoder (combinational logic)

More information

M32C/84 Group APPLICATION NOTE. Operation of Key-Input Interrupt. 1. Abstract. 2. Introduction

M32C/84 Group APPLICATION NOTE. Operation of Key-Input Interrupt. 1. Abstract. 2. Introduction APPLICATION NOTE M32C/84 Group 1. Abstract The following is an operation of key-input interrupt. Figure 1 shows an example of a circuit that uses the key-input interrupt, Figure 2 shows an example of operation

More information

RTE/L Return from Exception Handling with Data Restoration

RTE/L Return from Exception Handling with Data Restoration APPLICATION NOTE Introduction Shows an example of C compiler use of the RTE/L instruction Contents 1 Specifications 2 2 Functions Used 2 3 Principles of Operation 2 4 Development Environment 3 5 Description

More information

M16C/Tiny Series APPLICATION NOTE. Operation of Timer A. (2-Phase Pulse Signal Process in Event Counter Mode, Multiply-by-4 Mode) 1.

M16C/Tiny Series APPLICATION NOTE. Operation of Timer A. (2-Phase Pulse Signal Process in Event Counter Mode, Multiply-by-4 Mode) 1. APPLICATION NOTE 1. Abstract In processing 2-phase pulse signals in event counter mode, choose functions from those listed in Table 1. Operations of the selected items are described below. Figure 1 shows

More information

Regarding the change of names mentioned in the document, such as Hitachi Electric and Hitachi XX, to Renesas Technology Corp.

Regarding the change of names mentioned in the document, such as Hitachi Electric and Hitachi XX, to Renesas Technology Corp. To all our customers Regarding the change of names mentioned in the document, such as Hitachi Electric and Hitachi XX, to Renesas Technology Corp. The semiconductor operations of Mitsubishi Electric and

More information

This application note describes the time measurement function of Timer S with the gate function.

This application note describes the time measurement function of Timer S with the gate function. APPLICATION NOTE M16C/28, 29 Group Time Measuerment Function of Time S with Gate Function 1. Abstract This application note describes the time measurement function of Timer S with the gate function. 2.

More information

8051 Overview and Instruction Set

8051 Overview and Instruction Set 8051 Overview and Instruction Set Curtis A. Nelson Engr 355 1 Microprocessors vs. Microcontrollers Microprocessors are single-chip CPUs used in microcomputers Microcontrollers and microprocessors are different

More information

INSTRUCTION SET AND EXECUTION

INSTRUCTION SET AND EXECUTION SECTION 6 INSTRUCTION SET AND EXECUTION Fetch F1 F2 F3 F3e F4 F5 F6 Decode D1 D2 D3 D3e D4 D5 Execute E1 E2 E3 E3e E4 Instruction Cycle: 1 2 3 4 5 6 7 MOTOROLA INSTRUCTION SET AND EXECUTION 6-1 SECTION

More information

This document describes how to set up and use the timer RA in timer mode on the R8C/25 Group device.

This document describes how to set up and use the timer RA in timer mode on the R8C/25 Group device. APPLICATION NOTE R8C/25 Group 1. Abstract This document describes how to set up and use the timer RA in timer mode on the R8C/25 Group device. 2. Introduction The application example described in this

More information

Content. 1. General informations 2. direct addressing 3. indirect addressing 4. Examples including informations

Content. 1. General informations 2. direct addressing 3. indirect addressing 4. Examples including informations IV. Addressing Modi Content 1. General informations 2. direct addressing 3. indirect addressing 4. Examples including informations 1. General Informations Address range for data and program : the 65xx

More information

VLA HYBRID IC ISOLATED TYPE DC-DC CONVERTER DESCRIPTION OUTLINE DRAWING FEATURES APPLICATIONS BLOCK DIAGRAM. +Vo +V IN.

VLA HYBRID IC ISOLATED TYPE DC-DC CONVERTER DESCRIPTION OUTLINE DRAWING FEATURES APPLICATIONS BLOCK DIAGRAM. +Vo +V IN. DESCRIPTION The is a DC-DC converter. Its output power is 1.5W and the input is isolated from the output. The over-current protection circuit is built-in and it is the best for on-board power supplies,

More information

The following article describes how to use the M16C/62 timers A s as square wave generators (Pulse Output Mode).

The following article describes how to use the M16C/62 timers A s as square wave generators (Pulse Output Mode). APPLICATION NOTE M16C/62 1.0 Abstract The following article describes how to use the M16C/62 timers A s as square wave generators (Pulse Output Mode). 2.0 Introduction The M16C/62 is a 16-bit MCU, based

More information

JBit E1 (1) Subroutines. Preface. Usage. Tables. Program Layout

JBit E1 (1) Subroutines. Preface. Usage. Tables. Program Layout JBit E1 (1) Preface, Usage, Program Layout, Subroutines, Tables Preface JBit E1 (1) The E1 series will show you how to write a complete application with JBit. While the application is trivial by today

More information

32176 Group APPLICATION NOTE. Application of the CAN Module (Remote Frame Transmission) 1. Overview. 2. Introduction

32176 Group APPLICATION NOTE. Application of the CAN Module (Remote Frame Transmission) 1. Overview. 2. Introduction 32176 Group 1. Overview APPLICATION NOTE The sample task described in this document uses the 32176 Group microcomputer s on-chip CAN (Controller Area Network) module. 2. Introduction The sample task described

More information

G65SC802 G65SC816. Microcircuits. CMOS 8-Bit/16-Bit Microprocessor Family ADVANCE INFORMATION. Features. General Description. Features (G65SC802 Only)

G65SC802 G65SC816. Microcircuits. CMOS 8-Bit/16-Bit Microprocessor Family ADVANCE INFORMATION. Features. General Description. Features (G65SC802 Only) G65SC802 G65SC816 Microcircuits CMOS 8-Bit/16-Bit Microprocessor Family Features Advanced CMOS design for low power consumption and increased noise immunity Emulation mode for total software compatibility

More information

Lecture #3 Microcontroller Instruction Set Embedded System Engineering Philip Koopman Wednesday, 20-Jan-2015

Lecture #3 Microcontroller Instruction Set Embedded System Engineering Philip Koopman Wednesday, 20-Jan-2015 Lecture #3 Microcontroller Instruction Set 18-348 Embedded System Engineering Philip Koopman Wednesday, 20-Jan-2015 Electrical& Computer ENGINEERING Copyright 2006-2015, Philip Koopman, All Rights Reserved

More information

Accumulator and memory instructions 1. Loads, stores, and transfers 2. Arithmetic operations 3. Multiply and divide 4. Logical operations 5. Data test

Accumulator and memory instructions 1. Loads, stores, and transfers 2. Arithmetic operations 3. Multiply and divide 4. Logical operations 5. Data test HC11 Instruction Set Instruction classes 1. 2. 3. 4. Accumulator and Memory Stack and Index Register Condition Code Register Program control instructions 2 1 Accumulator and memory instructions 1. Loads,

More information

M16C/26 APPLICATION NOTE. Measuring Computation Time of a Function Call. 1.0 Abstract. 2.0 Introduction. 3.0 Number of Function Call Returns

M16C/26 APPLICATION NOTE. Measuring Computation Time of a Function Call. 1.0 Abstract. 2.0 Introduction. 3.0 Number of Function Call Returns APPLICATION NOTE M16C/26 1.0 Abstract The following article discusses a technique for measuring computation time spent during a function call, which can be in C or Assembly, from a main C program for the

More information

M16C/26 APPLICATION NOTE. Using the M16C/26 Timer in Event Counter Mode. 1.0 Abstract. 2.0 Introduction

M16C/26 APPLICATION NOTE. Using the M16C/26 Timer in Event Counter Mode. 1.0 Abstract. 2.0 Introduction APPLICATION NOTE M16C/26 1.0 Abstract Event counters are useful in automated packaging lines, tachometers, and mechanical equipment monitoring. The event counters on the M16C/26 can be configured to interrupt

More information

M16C/26 APPLICATION NOTE. Using the DMAC with a Forward Source. 1.0 Abstract. 2.0 Introduction

M16C/26 APPLICATION NOTE. Using the DMAC with a Forward Source. 1.0 Abstract. 2.0 Introduction APPLICATION NOTE 1.0 Abstract The following article introduces and shows an example of how to use the DMAC function of the with a forward counting source address and fixed destination address. 2.0 Introduction

More information

Chapter 7 Central Processor Unit (S08CPUV2)

Chapter 7 Central Processor Unit (S08CPUV2) Chapter 7 Central Processor Unit (S08CPUV2) 7.1 Introduction This section provides summary information about the registers, addressing modes, and instruction set of the CPU of the HCS08 Family. For a more

More information

M16C/62 APPLICATION NOTE. Using the M16C/62 DMAC in Forward Source Mode. 1.0 Abstract. 2.0 Introduction

M16C/62 APPLICATION NOTE. Using the M16C/62 DMAC in Forward Source Mode. 1.0 Abstract. 2.0 Introduction APPLICATION NOTE M16C/62 1.0 Abstract The following article introduces and shows an example of how to use the DMAC function of the M16C/62 with a forward counting source address and fixed destination address.

More information

Architecture & Instruction set of 8085 Microprocessor and 8051 Micro Controller

Architecture & Instruction set of 8085 Microprocessor and 8051 Micro Controller of 8085 microprocessor 8085 is pronounced as "eighty-eighty-five" microprocessor. It is an 8-bit microprocessor designed by Intel in 1977 using NMOS technology. It has the following configuration 8-bit

More information

APPLICATION NOTE R8C, M16C, M32C

APPLICATION NOTE R8C, M16C, M32C APPLICATION NOTE R8C, M16C, M32C 1. Abstract Since the internal flash of a Renesas R8C/M16C/M32C microcontroller can be erased and programmed in-circuit, an application has been created in order to eliminate

More information

Disassembly of MC9S12 op codes Decimal, Hexadecimal and Binary Numbers

Disassembly of MC9S12 op codes Decimal, Hexadecimal and Binary Numbers Disassembly of MC9S12 op codes Decimal, Hexadecimal and Binary Numbers o How to disassemble an MC9S12 instruction sequence o Binary numbers are a code and represent what the programmer intends for the

More information

Disassembly of MC9S12 op codes Decimal, Hexadecimal and Binary Numbers

Disassembly of MC9S12 op codes Decimal, Hexadecimal and Binary Numbers Disassembly of MC9S12 op codes Decimal, Hexadecimal and Binary Numbers o How to disassemble an MC9S12 instruction sequence o Binary numbers are a code and represent what the programmer intends for the

More information

M16C/26 APPLICATION NOTE. Using Timer B in Pulse Period/Width Measurement Mode. 1.0 Abstract. 2.0 Introduction

M16C/26 APPLICATION NOTE. Using Timer B in Pulse Period/Width Measurement Mode. 1.0 Abstract. 2.0 Introduction APPLICATION NOTE M16C/26 1.0 Abstract Measuring the frequency (1/period) or the pulse width of an input signal is useful in applications such as tachometers, DC motor control, power usage calculations,

More information

UNIT-II. Part-2: CENTRAL PROCESSING UNIT

UNIT-II. Part-2: CENTRAL PROCESSING UNIT Page1 UNIT-II Part-2: CENTRAL PROCESSING UNIT Stack Organization Instruction Formats Addressing Modes Data Transfer And Manipulation Program Control Reduced Instruction Set Computer (RISC) Introduction:

More information

Old Company Name in Catalogs and Other Documents

Old Company Name in Catalogs and Other Documents To our customers, Old Company Name in Catalogs and Other Documents On April 1 st, 2010, NEC Electronics Corporation merged with Renesas Technology Corporation, and Renesas Electronics Corporation took

More information

Single Power Supply F-ZTAT On-Board Programming

Single Power Supply F-ZTAT On-Board Programming Single Power Supply F-ZTAT On-Board Programming Renesas F-ZTAT Microcomputer Rev.2.00 Revision Date: Dec 13, 2004 Keep safety first in your circuit designs! 1. Renesas Technology Corp. puts the maximum

More information

Assembly Language Programming of 8085

Assembly Language Programming of 8085 Assembly Language Programming of 8085 Topics 1. Introduction 2. Programming model of 8085 3. Instruction set of 8085 4. Example Programs 5. Addressing modes of 8085 6. Instruction & Data Formats of 8085

More information

Interrupt Level Setting and Modification by Interrupt Controller

Interrupt Level Setting and Modification by Interrupt Controller Controller Introduction APPLICATION NOTE Interrupts of different levels are generated by specifying interrupt levels via the interrupt controller (INTC) of the SH7145F. Target Device SH7145F Contents 1.

More information

10-1 C D Pearson Education, Inc. M. Morris Mano & Charles R. Kime LOGIC AND COMPUTER DESIGN FUNDAMENTALS, 4e

10-1 C D Pearson Education, Inc. M. Morris Mano & Charles R. Kime LOGIC AND COMPUTER DESIGN FUNDAMENTALS, 4e 10-1 C D E A B 10-2 A B A B C (A B) C D A A B (A B) C E D (A B) C D E (A B) C + D E (A B) C 10-3 Opcode Mode Address or operand 10-4 Memory 250 Opcode Mode PC = 250 251 ADRS 252 Next instruction ACC Opcode:

More information

TYPES OF INTERRUPTS: -

TYPES OF INTERRUPTS: - There are 3 types of interrupts. TYPES OF INTERRUPTS: - External Interrupts. Internal Interrupts. Software interrupts. Hardware Interrupts (1) External interrupts come from I/O devices, from a timing device

More information

Microcontroller Intel [Instruction Set]

Microcontroller Intel [Instruction Set] Microcontroller Intel 8051 [Instruction Set] Structure of Assembly Language [ label: ] mnemonic [operands] [ ;comment ] Example: MOV R1, #25H ; load data 25H into R1 2 8051 Assembly Language Registers

More information

1. Specifications Functions Used Operation Software Flowcharts Program Listing... 13

1. Specifications Functions Used Operation Software Flowcharts Program Listing... 13 APPLICATION NOTE SH7145F Summary The SH7144 series is a single-chip microprocessor based on the SH-2 RISC (Reduced Instruction Set Computer) CPU core and integrating a number of peripheral functions. This

More information

... Executing conditional instructions

... Executing conditional instructions 1 2 Executing conditional instructions Our design to this point has been the SISD (single instruction single data) architecture This is fine if we wish to execute in a purely sequential mode We now wish

More information

ECE331 Handout 3- ASM Instructions, Address Modes and Directives

ECE331 Handout 3- ASM Instructions, Address Modes and Directives ECE331 Handout 3- ASM Instructions, Address Modes and Directives ASM Instructions Functional Instruction Groups Data Transfer/Manipulation Arithmetic Logic & Bit Operations Data Test Branch Function Call

More information

The following article introduces and shows an example of how to set up and use the watchdog timer on the M16C/26 microcontroller (MCU).

The following article introduces and shows an example of how to set up and use the watchdog timer on the M16C/26 microcontroller (MCU). APPLICATION NOTE M16C/26 1.0 Abstract The following article introduces and shows an example of how to set up and use the watchdog timer on the M16C/26 microcontroller (MCU). 2.0 Introduction The Renesas

More information

COMPUTE! ISSUE 36 / MAY 1983 / PAGE 244

COMPUTE! ISSUE 36 / MAY 1983 / PAGE 244 Versatile Data Acquisition with VIC Doug Homer and Stan Klein COMPUTE! ISSUE 36 / MAY 1983 / PAGE 244 This simple method of adjusting the VIC's internal jiffy dock can slow it down to match your timing

More information

EE 3170 Microcontroller Applications

EE 3170 Microcontroller Applications EE 37 Microcontroller Applications Lecture 8: Instruction Subset & Machine Language: A Brief Tour of the 68HC Instruction Set - Miller 2.4 & 5.2-5.3 & Appendix A Based on slides for ECE37 by Profs. Davis,

More information

Assembly Language Programming of 8085

Assembly Language Programming of 8085 Assembly Language Programming of 8085 1. Introduction A microprocessor executes instructions given by the user Instructions should be in a language known to the microprocessor Microprocessor understands

More information

H8/300L Series Programming Manual

H8/300L Series Programming Manual H8/300L Series Programming Manual Notice When using this document, keep the following in mind: 1. This document may, wholly or partially, be subject to change without notice. 2. All rights are reserved:

More information

This document describes how to set up and use the timer RB in programmable one-shot generation mode on the R8C/25 Group device.

This document describes how to set up and use the timer RB in programmable one-shot generation mode on the R8C/25 Group device. APPLICATION NOTE R8C/25 Group 1. Abstract This document describes how to set up and use the timer RB in programmable one-shot generation mode on the R8C/25 Group device. 2. Introduction The application

More information

1. Specifications Operational Overview of Functions Used Principles of Operation Description of Software...

1. Specifications Operational Overview of Functions Used Principles of Operation Description of Software... APPLICATION NOTE SH7080 Group Introduction This application note describes the serial data transmission function that uses the transmit-fifo-data-empty interrupt source of the SCIF (Serial Communication

More information

Programming the 65816

Programming the 65816 Programming the 65816 Including the 6502, 65C02 and 65802 Distributed and published under COPYRIGHT LICENSE AND PUBLISHING AGREEMENT with Authors David Eyes and Ron Lichty EFFECTIVE APRIL 28, 1992 Copyright

More information

ARM Assembly Language. Programming

ARM Assembly Language. Programming Outline: ARM Assembly Language the ARM instruction set writing simple programs examples Programming hands-on: writing simple ARM assembly programs 2005 PEVE IT Unit ARM System Design ARM assembly language

More information

Code Secrets of Wolfenstein 3D IIGS. Eric Shepherd

Code Secrets of Wolfenstein 3D IIGS. Eric Shepherd Code Secrets of Wolfenstein 3D IIGS Eric Shepherd Fast Screen Refresh with PEI Slamming Or, Dirty Tricks with the Direct Page IIGS Features We Can Abuse Super high-resolution graphics shadowing Bank $01

More information

HC11 Instruction Set

HC11 Instruction Set HC11 Instruction Set Instruction classes 1. Accumulator and Memory 2. Stack and Index Register 3. Condition Code Register 4. Program control instructions CMPE12 Summer 2009 19-2 1 Accumulator and memory

More information

User Manual for KRUSADER. Ken s Rather Useless Symbolic Assembly Development Environment for the Replica 1 or is that Reasonably Useful? You decide!

User Manual for KRUSADER. Ken s Rather Useless Symbolic Assembly Development Environment for the Replica 1 or is that Reasonably Useful? You decide! User Manual for KRUSADER Ken s Rather Useless Symbolic Assembly Development Environment for the Replica 1 or is that Reasonably Useful? You decide! Ken Wessen ken.wessen@gmail.com Version 1.3 December

More information

PROGRAM CONTROL UNIT (PCU)

PROGRAM CONTROL UNIT (PCU) nc. SECTION 5 PROGRAM CONTROL UNIT (PCU) MOTOROLA PROGRAM CONTROL UNIT (PCU) 5-1 nc. SECTION CONTENTS 5.1 INTRODUCTION........................................ 5-3 5.2 PROGRAM COUNTER (PC)...............................

More information

M16C APPLICATION NOTE. Target Setup for the In-Circuit Debugger. 1.0 Abstract. 2.0 Introduction

M16C APPLICATION NOTE. Target Setup for the In-Circuit Debugger. 1.0 Abstract. 2.0 Introduction APPLICATION NOTE MC.0 Abstract The ICD (In-Circuit Debugger), or USB-Monitor, is a low cost, compact interface that has two functions for Renesas MC Flash microcontrollers: ) an in-circuit debugger tool

More information

Renesas LIN Overview. White paper REU05B Introduction

Renesas LIN Overview. White paper REU05B Introduction White paper Introduction LIN is a communication and distributed processing bus system. It is characterized by low cost hardware and a relatively low data transmission speed and number of bus nodes. Only

More information

ME4447/6405. Microprocessor Control of Manufacturing Systems and Introduction to Mechatronics. Instructor: Professor Charles Ume LECTURE 7

ME4447/6405. Microprocessor Control of Manufacturing Systems and Introduction to Mechatronics. Instructor: Professor Charles Ume LECTURE 7 ME4447/6405 Microprocessor Control of Manufacturing Systems and Introduction to Mechatronics Instructor: Professor Charles Ume LECTURE 7 Reading Assignments Reading assignments for this week and next

More information

SH7080/SH7146/SH7125/SH7200 Series

SH7080/SH7146/SH7125/SH7200 Series APPLICATION NOTE SH78/SH746/SH75/SH7 Series Introduction This application note discusses synchronous operation of the MTU and MTUS timers, Target Device Microcomputer: SH785 (R5F785) Operating frequency:

More information

Silicon Epitaxial Planar Zener Diode for Stabilized Power Supply. Type No. Mark Package Code HZS Series Type No. MHD B 7

Silicon Epitaxial Planar Zener Diode for Stabilized Power Supply. Type No. Mark Package Code HZS Series Type No. MHD B 7 Silicon Epitaxial Planar Zener Diode for Stabilized Power Supply Features REJ3G184-3Z (Previous: ADE-28-12B) Rev.3. Mar.11.24 Low leakage, low zener impedance and maximum power dissipation of 4 mw are

More information

Aug.3, W65C816S 8/16 bit Microprocessor

Aug.3, W65C816S 8/16 bit Microprocessor Aug., 9 WC8S 8/ bit Microprocessor WDC reserves the right to make changes at any time without notice in order to improve design and supply the best possible product. Information contained herein is provided

More information

Computers and Microprocessors

Computers and Microprocessors Computers and Microprocessors - Introduction Over the last few decades, computers, and microprocessors in particular, have begun to have an enormous impact upon our lives. In early stages of development,

More information

EE 3170 Microcontroller Applications

EE 3170 Microcontroller Applications Q. 3.9 of HW3 EE 37 Microcontroller Applications (a) (c) (b) (d) Midterm Review: Miller Chapter -3 -The Stuff That Might Be On the Exam D67 (e) (g) (h) CEC23 (i) (f) (j) (k) (l) (m) EE37/CC/Lecture-Review

More information

W65C816S 8/16 bit Microprocessor

W65C816S 8/16 bit Microprocessor November 9, 8 WC8S 8/ bit Microprocessor WDC reserves the right to make changes at any time without notice in order to improve design and supply the best possible product. Information contained herein

More information

Instruction Set Instruction set of 8085 can be classified in following groups: Data Transfer Instructions These instructions can perform data transfer operations between Registers of 8085 e.g. MOV 8085

More information

By: Dr. Hamed Saghaei

By: Dr. Hamed Saghaei By: Dr. Hamed Saghaei The AVR RISC Microcontroller supports powerful and efficient addressing modes for access to the program memory (Flash) and data memory (SRAM). This section describes the different

More information

Programming. A. Assembly Language Programming. A.1 Machine Code. Machine Code Example: Motorola ADD

Programming. A. Assembly Language Programming. A.1 Machine Code. Machine Code Example: Motorola ADD A. Assembly Language Programming Programming of a computer system: Machine code direct execution Assembly language tool: assembler High level programming language tool: interpreter tool: compiler Programming

More information

Programming of 8085 microprocessor and 8051 micro controller Study material

Programming of 8085 microprocessor and 8051 micro controller Study material 8085 Demo Programs Now, let us take a look at some program demonstrations using the above instructions Adding Two 8-bit Numbers Write a program to add data at 3005H & 3006H memory location and store the

More information

VLA A HYBRID IC ISOLATED TYPE DC-DC CONVERTER DESCRIPTION FEATURES BLOCK DIAGRAM

VLA A HYBRID IC ISOLATED TYPE DC-DC CONVERTER DESCRIPTION FEATURES BLOCK DIAGRAM DESCRIPTION The is an isolated DC-DC converter designed to control the industrial equipment. It can input the DC400~850V directly and convert to low voltage. Total output power is 150W. FEATURES Input

More information

User s Guide. pico Viewer v.1.01

User s Guide. pico Viewer v.1.01 User s Guide pico Viewer 6502 v.1.01 ii User s Guide Copyright Notice This documentation and the software described herein are copyrighted with all rights reserved. Under the copyright laws, neither this

More information

M16C APPLICATION NOTE. Firmware Requirements for In-Circuit Debugger. 1.0 Abstract. 2.0 Introduction

M16C APPLICATION NOTE. Firmware Requirements for In-Circuit Debugger. 1.0 Abstract. 2.0 Introduction APPLICATION NOTE M16C 1.0 Abstract The USB-Monitor is a low cost, compact interface that has two functions for Renesas M16C Flash microcontrollers 1) an in-circuit debugger tool with KD30 Debugger, and

More information

SH7144/45 Group APPLICATION NOTE. 2-Phase Encoder Count. 1. Specifications

SH7144/45 Group APPLICATION NOTE. 2-Phase Encoder Count. 1. Specifications APPLICATION NOTE SH7144/45 Group 1. Specifications Two external clocks are input to channel 1 (ch1), and a counter is incremented or decremented according to the phase difference of the pulses, as shown

More information

EC2304-MICROPROCESSOR AND MICROCONROLLERS 2 marks questions and answers UNIT-I

EC2304-MICROPROCESSOR AND MICROCONROLLERS 2 marks questions and answers UNIT-I EC2304-MICROPROCESSOR AND MICROCONROLLERS 2 marks questions and answers 1. Define microprocessors? UNIT-I A semiconductor device(integrated circuit) manufactured by using the LSI technique. It includes

More information

EXPERIMENT NO. 1 THE MKT 8085 MICROPROCESSOR TRAINER

EXPERIMENT NO. 1 THE MKT 8085 MICROPROCESSOR TRAINER OBJECT: EXPERIMENT NO. 1 THE MKT 8085 MICROPROCESSOR TRAINER To understand the structure and operating instruction of the microprocessor trainer. INTRODUCTION: The MKT 8085 is a single-board microcomputer,

More information

BINARY LOAD AND PUNCH

BINARY LOAD AND PUNCH BINARY LOAD AND PUNCH To easily decrease the amount of time it takes to load a long tape (Cassette or paper) a BINARY formatting technique can be used instead of the conventional ASCII format used by the

More information

(2) Explain the addressing mode of OR What do you mean by addressing mode? Explain diff. addressing mode for 8085 with examples.

(2) Explain the addressing mode of OR What do you mean by addressing mode? Explain diff. addressing mode for 8085 with examples. (1) Explain instruction format and Opcode format of 8085 μp with example. OR With help of examples, explain the formation of opcodes of 8085 OR What is an instruction? List type of instruction based on

More information