--- /dev/null
+# THIS SAMPLE CODE IS PROVIDED AS IS AND IS SUBJECT TO ALTERATIONS. FUJITSU */\r
+# MICROELECTRONICS ACCEPTS NO RESPONSIBILITY OR LIABILITY FOR ANY ERRORS OR */\r
+# ELIGIBILITY FOR ANY PURPOSES. */\r
+# (C) Fujitsu Microelectronics Europe GmbH */\r
+\r
+# Environment and memory manioulation after program upload\r
+\r
+\r
+# Settings\r
+\r
+SET VARIABLE abortIRQ0 = 0x1\r
+SET VARIABLE intVectorMonitorDebugger = 0xFFC00\r
+\r
+\r
+\r
+\r
+# Disable all Interrupts\r
+SET REGISTER I = 0x0\r
+\r
+# Set Table Base Register\r
+SET REGISTER TBR = intVectorMonitorDebugger\r
+\r
+\r
+# Run to smd_tbr and save TBR of Application\r
+go ,Start91460\smd_tbr\r
+SET VARIABLE intVectorApllication = %r0\r
+SET REGISTER TBR = intVectorApllication \r
+\r
+# Copy required vector table entries of monitor debugger in vector table of application\r
+MOVE intVectorMonitorDebugger + 0x3C0..intVectorMonitorDebugger + 0x3FF, intVectorApllication + 0x3C0\r
+ \r
+\r
+# Prepare Entries for INT0\r
+IF %abortIRQ0 == 0x1\r
+ MOVE intVectorMonitorDebugger + 0x3C0..intVectorMonitorDebugger + 0x3C3, intVectorApllication + 0x3BC\r
+ SET MEMORY/BYTE 0x32 = 0x3\r
+ SET MEMORY/BYTE 0x30 = 0x0\r
+ SET MEMORY/BYTE 0x31 = 0x1\r
+ SET MEMORY/BYTE 0x440 = 0x10\r
+ SET REGISTER ILM = 0x1E\r
+ENDIF\r
+\r
+\r
+# Setting indicates software reset, which leads to that the clock settings are not changed.\r
+SET REGISTER R4 = 0x8\r
+\r
+\r
+# Set TBR to Vector table of application\r
+SET REGISTER TBR = intVectorApllication \r
+\r
+# Run to smd_c and let the CS enabled\r
+go noClockStartup,Start91460\smd_cs\r
+set register r2 = %r2|0x2\r
+\r
+# Run to main()\r
+go ,main
\ No newline at end of file