WinCE assembler (ARM)

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
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

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


Re: WinCE assembler (ARM)
 >
Quoted text here. Click to load it

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
We've slightly trimmed the long signature. Click to see the full one.

Site Timeline