WinCE assembler (ARM)
CASTalk.com Forum Index CASTalk.com
Discussion of DSP, FPGA, storage and embedded system.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web castalk.com
WinCE assembler (ARM)

 
Post new topic   Reply to topic    CASTalk.com Forum Index -> Embedded System
Author Message
Buddy Smith
Guest





Posted: Wed Dec 21, 2005 9:15 am    Post subject: WinCE assembler (ARM) Reply with quote

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) Reply with 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
Back to top
Chuck F.
Guest





Posted: Thu Dec 22, 2005 9:15 am    Post subject: Re: WinCE assembler (ARM) Reply with quote

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
 
Post new topic   Reply to topic    CASTalk.com Forum Index -> Embedded System All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




VoIP Electronics Powered by phpBB