62
ImageCraft Assembly Language Guide, Document # 001-44475 Rev. *B
M8C Instruction Set
4.25
Pop Stack into Register
POP
Removes the last byte placed on the stack and put it in the specified M8C register. The Stack Pointer
is automatically decremented. The Zero Flag is set if the popped value is zero; otherwise, the Zero
Flag is cleared. The Carry Flag is not affected by this instruction.
For PSoC devices with more than 256 bytes of RAM, the stack is confined to a single designated
stack page defined by the value of the STK_PP Register. The M8C automatically selects the stack
page as the source for the memory read during the
POP
instruction. Therefore, a
POP
instruction may
be issued in any RAM page. After the
POP
instruction has completed, user code will be operating
from the same RAM page as before the
POP
instruction was executed.
See the RAM Paging chapter of the
PSoC Technical Reference Manual (TRM)
for details.
Instructions
Operation
Opcode
Cycles Bytes
Mnemonic
Argument
POP
A
0x18
5
1
POP
X
0x20
5
1
Conditional
Flags:
CF
ZF
Unaffected.
Set if
A
is updated to zero.
Example 1:
mov
A, 34
push A
;top value of stack is now 34, SP+1
mov
A, 0
;clear the Accumulator
pop
A
;A=34, SP-1
Example 2:
mov
A, 34
push A
;top value of stack is now 34, SP+1
pop
X
;X=34, SP-1
A
ram SP 1
–
SP
SP 1
–
X
ram SP 1
–
SP
SP 1
–
Содержание PSoC DESIGNER ImageCraft M8C
Страница 6: ...6 ImageCraft Assembly Language Guide Document 001 44475 Rev B Contents Feedback ...
Страница 10: ...10 ImageCraft Assembly Language Guide Document 001 44475 Rev B Introduction Feedback ...
Страница 24: ...24 ImageCraft Assembly Language Guide Document 001 44475 Rev B M8C Microprocessor Feedback ...
Страница 95: ...ImageCraft Assembly Language Guide Document 001 44475 Rev B 95 Assembler Directives Feedback ...
Страница 96: ...96 ImageCraft Assembly Language Guide Document 001 44475 Rev B Assembler Directives Feedback ...
Страница 104: ...104 ImageCraft Assembly Language Guide Document 001 44475 Rev B Feedback ...
Страница 108: ...108 ImageCraft Assembly Language Guide Document 001 44475 Rev B Index Feedback ...