|
|
|
|
|
| Compiler Support on StarCore |
data: | 0x01 | 0x23 | 0x45 0x67 0x89 0xAB 0xCD 0xEF | 0xAA 0xBB 0xCC 0xDD | ||
| 0xEE | 0xFF | 0x11 0x22 |
| ||
|
|
|
|
|
|
|
|
|
| Expected | Simulator | ||
|
|
|
|
|
|
|
move #data+2,r0 | r0 |
| 00 |
| |||||||||
move.w (r0),d0 |
|
|
|
|
|
|
|
|
|
|
|
|
|
d0 |
|
|
|
|
|
|
| ||||||
|
|
|
|
|
|
| |||||||
|
|
|
|
|
|
|
| ||||||
move.2w (r0),d0:d1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |||||||||||
d0 |
|
|
| ||||||||||
| d1 |
|
|
|
|
| |||||||
|
|
|
|
|
| ||||||||
move.2f (r0),d2:d3 |
|
|
|
|
|
|
|
|
|
|
|
| |
|
|
|
|
|
|
|
|
|
| ||||
d2 |
|
|
|
|
|
| |||||||
|
|
|
|
|
|
|
|
|
|
| |||
| d3 |
|
|
|
|
| |||||||
move.4w (r0),d4:d5:d6:d7 |
|
|
|
|
|
|
|
|
|
|
| ||
|
|
|
|
|
|
| |||||||
d4 |
|
|
|
|
|
| |||||||
|
|
|
|
|
|
|
| ||||||
| d5 |
|
|
|
|
|
| ||||||
|
|
|
|
|
| ||||||||
|
|
|
|
|
|
|
| ||||||
| d6 |
|
|
|
|
|
| ||||||
|
|
|
|
|
|
|
| ||||||
| d7 |
|
|
|
| ||||||||
|
|
|
| ||||||||||
|
|
|
|
|
|
|
|
|
|
| |||
move.2l (r0),d8:d9 | d8 |
|
|
|
|
|
| ||||||
|
|
|
|
| |||||||||
| d9 |
|
|
|
| ||||||||
|
|
| |||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
0000
0102
Second Code Section
4.Compile the Ex4.c file: ccsc100
The Big Endian
5.Run the GUI simulator: guisc100. In the simulator command window, type reset d m1 to put the simulator in Big Endian mode.
6.Open an assembly window:
7.Load the file: Load Ex4.eld.
8.Set a breakpoint on “main” by typing break _main into the command window.
9.Type go. The code should now be at the start of main.
10.Open a memory window:
11.Type data into the Scroll box (of the memory window) to display the contents of the array data[ ] defined in Ex4.c. Verify that these contents are as expected.
Introduction to the SC140 Tools | 15 |