| Electronic Components Datasheet Search |
|
ADAM27P16 Datasheet(PDF) 28 Page - ABOV Semiconductor Co., Ltd. |
|
|
|||||||||||||||||||||||||||||
ADAM27P16 Datasheet(HTML) 28 Page - ABOV Semiconductor Co., Ltd. |
|
28 / 39 page ![]() Page 27 of 38 ADAM27PXX 3. Instruction (16) CAL a Naming : Subroutine Call on status 1 Status : Conditional depending on the status Format : Ⅳ Operand : Subroutine code address a (Addr) Function : When ST =1 : PC ← a (Addr) PA ← PB BA ← BB SR1 ← PC + 1 PSR1 ← PA BSR1 ← BA SR2 ← SR1 PSR2 ← PSR1 BSR2 ← BSR1 SR3 ← SR2 PSR3 ← PSR2 BSR3 ← BSR2 When ST = 0 : PC ← PC + 1 PA ← PA BA ← BA ST ← 1 Note : PC actually has pseudo-random count against the next instruction. <Comment> In a program, control is allowed to be transferred to a mutual subroutine. Since a call instruction preserves the return address, it is possible to call the subroutine from different locations in a program, and the subroutine can return control accurately to the address that is preserved by the use of the call return instruction (RTN). Such calling is always conditional depending on the status. a. If the status is reset, call is not executed. b. If the status is set, call is rightly executed. The subroutine stack (SR) of three levels enables a subroutine to be manipulated on three levels. Besides, a long call (to call another page) can be executed on any level. For a long call, LBBY or LPBI instruction should be executed before the CAL. When LBBY or LPBI is omitted (and when BA=BB and PA=PB), a short call (calling in the same page) is executed. (17) RTN Naming : Return from Subroutine Status : Set Format : Ⅰ Function : PC ← SR1 PA, PB ← PSR1 BA, BB ← BSR1 SR1 ← SR2 PSR1 ← PSR2 BSR1 ← BSR2 SR2 ← SR3 PSR2 ← PSR3 BSR2 ← BSR3 SR3 ← SR3 PSR3 ← PSR3 BSR3 ← BSR3 ST ← 1 <Purpose> Control is returned from the called subroutine to the calling program. <Comment> Control is returned to its home routine by transferring to the PC the data of the return address that has been saved in the stack register (SR1). At the same time, data of the page stack register (PSR1) is transferred to the PA and PB, and data of the block stack register(BSR1) is transferred to the BA and BB. |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |