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

Reply to
Buddy Smith
Loading thread data ...

// ---------- 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

Reply to
ipaqwizard

snipped-for-privacy@hotmail.com wrote: >

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:
Reply to
Chuck F.

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.