News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Pocket PCs

Started by Danesh, July 09, 2005, 06:49:36 PM

Previous topic - Next topic

Danesh

Hi all,

I am aboslutely newbie in Pocket PCs. I want to know can usual programs which have been written in MASM32 run under a pocket PC ? Well, if they will not, I know that Pelle's pocket PC compiler is a solution. Also, does Pelle's pocket PC compile code for all pocket PCs which run Windows as their OS ? What about those who have Palm OS ? I want to buy a HP Ipaq pocket PC and want to make sure of it.

Thanks,

Danesh Daroui


PellesC

Hello,

Pocket PC devices don't use X86 processors, they use ARM and other processors (at least on older devices). The mnemonics/instructions from MASM32 can't be used directly. Pelles C support only the ARM processor for Pocket PC (StrongARM or better). At least a few years back, M$ said only ARM should be supported in the future (I'm not completely sure about this statement anymore). In other words, Pelles C should work on most Pocket PC devices - at least if they are not too old.

Palm OS is a completely different story - different processor, different operating system.

There are many different models now, but HP Ipaq should work fine (AFAIK).

Pelle

Danesh

Hej Pelle,

In that case what would you recommend (as easiest way) to recompile my code which has been written in MASM32 assembly to work on a pocket PC which uses an ARM processor instead of x86 processor ? I mean, is it possible to just use it as core of the project in a Pelles C Pocket PC project like inline assembly ? Could Pelles C compile inline assembly ? If yes, can it compile x86 inline assembly or it has its own instructions ? I am looking for the way with lowest cost to port my program to pocket PC.

Hälsningar,

Danesh


PellesC

Hej Danesh,

I completely understand - the problem is that it's not trivial to translate from a Complex Instruction Set Computer like X86, to a Reduced Instruction Set Computer like ARM. When you choose assembly language, you also choose - more or less - the target processor. This is basically why we have high(er) level languages like C - to make it easy/easier to move between different processors and environments.

The world and the Internet are huge, so I can't swear there is no such thing as a X86 to ARM translator - but I very much doubt it.

There have been some attempts at converting from assembly to C (for example) - but not very successful.

I'm sorry, but I don't have a really good suggestion for you...

Hälsningar
Pelle

Mark Jones

I wonder how difficult the ARM assembler language is?

I can say with certainty that the PIC brand of microcontrollers are simple compared to the x86 architecture. The PIC16F877 (a mid-range chip) has a whopping 35 instructions.  :) Not sure about ARM though.
"To deny our impulses... foolish; to revel in them, chaos." MCJ 2003.08

PellesC

ARM is a RISC processor, so there are rather few instructions (I don't have the exact count). All instructions are 32 bits in length, which make things "interesting". Some of the bits are needed to encode an instruction, which means that (for example) some constants don't fit in one instruction. You either have to build a constant from multiple instructions, or load it from memory ( and building the address to this memory location is a different story...  ::) ). So even if there are few instructions to learn, you get complexities from other things.

The Pelles C compiler support inline ARM assembler, but at the "core" level. Some ARM assemblers have pseudo-instructions, to hide some of the complexities with constants and addresses (for example). I don't support this, so the programmer need to know pretty well what he is doing...

Pelle