摘要 |
PURPOSE:To make operation of data of different form possible by the same instruction without changing the form by changing the content of an operation mode register according to the form of data to be operated. CONSTITUTION:In a program 13, the operation mode is made to A by an MODEA. After loading a constant 100 in a general-purpose register R1, subroutine 15 in the address 300 is called out by 'CALL 300'. In the subroutine 15, the content of the address 100 is stored in R2, and the content of the address 104 and the content of R2 are added by 'ADDR2, (R1+4)', and stored in R2. Similarly, after executing 'ADDR2, (R1+8)', 'ADDR2, (R1+12)', the content of R2 is stored in the address R1+16, and returned to the program 13 by 'RET'. At this point of time, the result of addition of 4 words of addresses 100-112 remains in the address 116. |