72
ImageCraft Assembly Language Guide, Document # 001-44475 Rev. *B
M8C Instruction Set
4.35
System Supervisor Call
SSC
Provides the method for users to access pre-existing routines in the Supervisory ROM. The supervi-
sory routines perform various system-related functions. The CPU_PC and CPU_F registers are
pushed on the stack prior to the execution of the supervisory routine. All bits of the Flag register are
cleared before any supervisory routine code is executed; therefore, interrupts and page mode are
disabled.
All supervisory routines return using the
RETI
instruction, causing the CPU_PC and CPU_F register
to be restored to their pre-supervisory routine state.
Supervisory routines are device specific. Reference the data sheet for the device you are using for
detailed information on the available supervisory routines.
Instructions
Operation
Opcode
Cycles Bytes
Mnemonic
Argument
SSC
0x00
15
1
Conditional
Flags:
CF
ZF
Unaffected.
Unaffected.
Example:
The following example is one way to set up an SSC operation for the CY8C25xxx
and CY8C26xxx PSoC devices. PSoC Designer uses the signature created by the
following lines of code to recognize supervisory system calls and configures the In-
Circuit Emulator for SSC debugging. It is recommended that users take advantage
of the SSC Macro provided in PSoC Designer, to ensure that the debugger recog-
nizes and therefore debugs supervisory operations correctly. See separate data
sheets for complete device-specific options.
mov
X, SP
;get stack pointers current value
mov
A, X
;move SP to A
add
A, 3
;add 3 to SP value
mov
[0xF9], A
;store SP+3 value in ram[0xF9]=KEY2
mov
[0xF8], 0x3A
;set ram[0xF9]=0x3A=KEY1
mov
A, 2
;set supervisory function code = 2
SSC
;call supervisory function
ram SP
PC 15:8
SP
SP 1
ram SP
PC 7:0
SP
SP 1
ram SP
F
PC
0x0000
F
0x00
+
+
Summary of Contents for PSoC DESIGNER ImageCraft M8C
Page 6: ...6 ImageCraft Assembly Language Guide Document 001 44475 Rev B Contents Feedback ...
Page 10: ...10 ImageCraft Assembly Language Guide Document 001 44475 Rev B Introduction Feedback ...
Page 24: ...24 ImageCraft Assembly Language Guide Document 001 44475 Rev B M8C Microprocessor Feedback ...
Page 95: ...ImageCraft Assembly Language Guide Document 001 44475 Rev B 95 Assembler Directives Feedback ...
Page 96: ...96 ImageCraft Assembly Language Guide Document 001 44475 Rev B Assembler Directives Feedback ...
Page 104: ...104 ImageCraft Assembly Language Guide Document 001 44475 Rev B Feedback ...
Page 108: ...108 ImageCraft Assembly Language Guide Document 001 44475 Rev B Index Feedback ...