summaryrefslogtreecommitdiffstats
blob: 1e233a106202e095d42bcd87cbfa9522df75a6e9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
;****************************************************************************
;* FILE PURPOSE: Code a simple endian independent example
;****************************************************************************
;* FILE NAME: Simple.s
;*
;* DESCRIPTION: This program is part of the Himalaya I2C boot test plan.
;*              It is a simple program that defines two initialized
;*              sections, text and data, and performs a simple
;*              execution with a self check on the results in register a0.
;*
;*              The code is also designed to be relocatable, so it will
;*              function in the himsim program running on the DM642.
;*
;*****************************************************************************

;*****************************************************************************
;*  Initialized data
;*****************************************************************************
   .data
   .def     someData
someData   .word   01234ABCDh

    .def  byte1
	.sect ".byte1"
byte1:	.byte 0x12

	.def byte2
	.sect ".byte2"
byte2:	.byte 0x12, 0x34

;*****************************************************************************
;*  code
;*****************************************************************************
   .text
   .def _c_int00
   
myConst    .equ    011223344h
   
_c_int00:

   MVKL.S1     myConst, A1
   MVKH.S1     myConst, A1

   MVKL.S1     byte1, A2
   MVKH.S1     byte1, A2
   LDB.D1	   *A2, B2

   MVKL.S1     byte2, A3
   MVKH.S1     byte2, A3
   LDB.D1	   *A3++, B3
   LDB.D1      *A3,   B4
   
   
etrap:

   BNOP.S1 etrap, 5