This site is no longer active and is available for archival purposes only. Registration and login is disabled.

Challenge for the ARM Assembler gurus!


Postby kornalius » Jan 24, 2004 @ 3:49am

Thanx a lot. I will be doing some more testing tomorrow.

Btw, how would you convert this into assembly opcodes:

mov r0, #0xFA, 26

I know it's e3a0dfa but I need to be able to add my dfa to e3a0. Could I do it with a string and then convert it back into int? If so how to do this in C?

Another one: Let's say I have an array of *char that I need to use inside my new assembly code, can I directly access an array item with it's address or does it have to be relative to the pc (r15 i think)?

You see I want to do something like this: (Move the address of array[10] variable into r0 and then call a regular C void called _push).

C code
=====

void _push(char *s)
{
PushOnInternalStack(s);
}

Assembly code to generate
==================

ldr r0, array[10]
bl _push

How would this translate into ARM opcodes?

Regards,
Alain Deschenes
User avatar
kornalius
pm Member
 
Posts: 1704
Joined: Dec 9, 2003 @ 6:04pm
Location: Montreal, Québec, Canada


Postby picard » Jan 24, 2004 @ 1:35pm

User avatar
picard
pm Member
 
Posts: 115
Joined: Aug 21, 2003 @ 4:30pm
Location: BetaPlayer


Postby kornalius » Jan 24, 2004 @ 5:19pm

User avatar
kornalius
pm Member
 
Posts: 1704
Joined: Dec 9, 2003 @ 6:04pm
Location: Montreal, Québec, Canada


Postby picard » Jan 24, 2004 @ 10:43pm

User avatar
picard
pm Member
 
Posts: 115
Joined: Aug 21, 2003 @ 4:30pm
Location: BetaPlayer


Postby kornalius » Jan 25, 2004 @ 6:37am

User avatar
kornalius
pm Member
 
Posts: 1704
Joined: Dec 9, 2003 @ 6:04pm
Location: Montreal, Québec, Canada


Postby picard » Jan 25, 2004 @ 7:35am

User avatar
picard
pm Member
 
Posts: 115
Joined: Aug 21, 2003 @ 4:30pm
Location: BetaPlayer


Postby kornalius » Jan 25, 2004 @ 5:34pm

Thanx picard, I did in fact learn some of the ARM by looking at the generated code from evc. Not easy at first but now it is starting to make a lot of sense.

Thanx for your time and patience.

Regards,
Alain Deschenes
User avatar
kornalius
pm Member
 
Posts: 1704
Joined: Dec 9, 2003 @ 6:04pm
Location: Montreal, Québec, Canada


Postby kornalius » Jan 25, 2004 @ 5:36pm

One more question:

Is it hard to use floating points in ARM?
User avatar
kornalius
pm Member
 
Posts: 1704
Joined: Dec 9, 2003 @ 6:04pm
Location: Montreal, Québec, Canada


Postby hm » Jan 25, 2004 @ 6:09pm

User avatar
hm
pm Member
 
Posts: 201
Joined: Dec 28, 2003 @ 8:47pm
Location: Seattle, WA


Postby refractor » Jan 26, 2004 @ 9:42am

User avatar
refractor
pm Insider
 
Posts: 2304
Joined: Feb 5, 2002 @ 1:12pm
Location: Luxembourg


Postby kornalius » Jan 26, 2004 @ 2:36pm

Hi guys,

What is the best way in evc to debug a code like mine without having to go through the long process of debugging with the device connected to my pc. If I use the emulator it's fast and cool, but it only works with Intel code.

You see, if I create a block of memory with ARM binary in it, it won't be able to dissassemble it and show me the result in memory.
User avatar
kornalius
pm Member
 
Posts: 1704
Joined: Dec 9, 2003 @ 6:04pm
Location: Montreal, Québec, Canada


Postby kornalius » Jan 26, 2004 @ 4:06pm

User avatar
kornalius
pm Member
 
Posts: 1704
Joined: Dec 9, 2003 @ 6:04pm
Location: Montreal, Québec, Canada


Postby Exocet » Jan 26, 2004 @ 4:30pm

Exocet
pm Member
 
Posts: 18
Joined: Jun 29, 2003 @ 2:24am
Location: Toronto, Canada


Postby kornalius » Jan 26, 2004 @ 5:30pm

User avatar
kornalius
pm Member
 
Posts: 1704
Joined: Dec 9, 2003 @ 6:04pm
Location: Montreal, Québec, Canada


Postby picard » Jan 26, 2004 @ 6:18pm

User avatar
picard
pm Member
 
Posts: 115
Joined: Aug 21, 2003 @ 4:30pm
Location: BetaPlayer


PreviousNext

Return to Windows Mobile


Sort


Forum Description

A discussion forum for mobile device developers on the Windows Mobile platform. Any platform specific topics are welcome.

Moderators:

Dan East, sponge, Digby, David Horn, Kevin Gelso, RICoder

Forum permissions

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 post attachments in this forum

cron