| Author |
Message |
Buddy Smith
Guest
|
Posted:
Wed Dec 21, 2005 9:15 am Post subject:
WinCE assembler (ARM) |
|
|
Hi,
I'm looking for some example code for a WinCE project I'm working on.
What I'm trying to figure out is how to do is have an assembler routine
that, when called, increments a value stored in a global variable (say,
g_tickCnt).
This global variable is declared in and used by a C value.
Since I'm sure you'll ask, I'm working on an interrupt handler for timer
overflows, so that I can have a little more range. This is inside the
bootloader, so the OS isn't running. I know how to handle the
interrupt, I just don't know how to get at and use the C variable inside
assembly code.
If someone can give me an example of doing this in a way the MS
assembler can understand, it would be appreciated :)
The chip is an IXP420 (Intel Xscale)
ttyl,
--buddy |
|
| Back to top |
|
 |
Guest
|
Posted:
Thu Dec 22, 2005 9:08 am Post subject:
Re: WinCE assembler (ARM) |
|
|
// ---------- test.c
int g_tickCnt = 0xF00;
;; --------- assemble.s
IMPORT g_tickCnt
ldr r8, =g_tickCnt ; load address
ldr r7, [r8] ; load the value of g_tickCnt |
|
| Back to top |
|
 |
Chuck F.
Guest
|
Posted:
Thu Dec 22, 2005 9:15 am Post subject:
Re: WinCE assembler (ARM) |
|
|
ipaqwizard@hotmail.com wrote:
| Quote: |
// ---------- test.c
int g_tickCnt = 0xF00;
;; --------- assemble.s
IMPORT g_tickCnt
ldr r8, =g_tickCnt ; load address
ldr r7, [r8] ; load the value of g_tickCnt
|
Is this supposed to mean something? Include context. See below
for how on the broken google interface to Usenet.
--
"If you want to post a followup via groups.google.com, don't use
the broken "Reply" link at the bottom of the article. Click on
"show options" at the top of the article, then click on the
"Reply" at the bottom of the article headers." - Keith Thompson
More details at: <http://cfaj.freeshell.org/google/> |
|
| Back to top |
|
 |
|
|
|
|