I found an old HP Jornada 520c Pocket PC that runs Windows CE 3.0(Pocket PC 2000) on an SH3 processor.

I've been using MASM32 & WinAsm Studio to maintain some Windows 98se systems and was wondering if anyone could point me in the right direction for writing and/or porting over source code to this device.

One thing I noticed is LINK has...  /MACHINE:xxxx, /WINDOWSCE:xxx, and /SUBSYSTEM:xxxx switches, but I can't find any detailed information outside what LINK displays when requesting help with /?.

The Linker version in the MASM32 package I downloaded in early 2005 is....


I've tried various switch settings, but don't seem to be having any luck. Thanks for insights in advance.

Sea. ;)
Posted on 2006-10-12 17:35:16 by SeaFarer
it runs on ARM processors (or MIPS maybe, not sure), so "porting" it means "rewriting" it.

writing lowlevel apps for winCE is very undocumented, there's only one virus around.

As for tools i am aware of, there is armasm from microsoft, and FASM clone FASMARM. I am using FASMARM in my job now, for some hacky stuff with winCE PE files.

API of winCE is same as Win32, but reduced, so you may miss few functions.

For debugging, you can use visual studio, embedded visual c++ (free), or IDA Pro v5. + ARM/WinCE debugger module.
Posted on 2006-10-12 17:44:18 by vid
Isn't WinCE unicode-only, or is that just Windows Mobile? Also, the CPUs... iirc they're intel xscale, an ARM derivate. At least for WinMob.
Posted on 2006-10-12 17:50:51 by f0dder
Thanks Vid, Fodder...

Nope, this definately has an SH3(somethin by Hitachi I read somewhere).

I appreciate your comments. Question...

Did you check out the /MACHINE:xxx switch? It supports MIPS, SHx, ARM, x86 and a couple others without taking a look again.

New about FASMARM, but this thing has the SH3 chip in it.

Were it not for being poor, I'd get something new anyway. Wound up talking the garage salesperson from $50.00 down to $0.00.  :D

Posted on 2006-10-12 19:07:31 by SeaFarer
Windows CE runs on my StrongARM PDA, Pelle's assembler (PoAsm) can be used for ARM assembly, but I use C for the few times I actually need something for the PDA, mostly just scanning/database utilities that are adapted from the Symbol SDK for my needs.
Posted on 2006-10-12 19:08:32 by donkey
MASM is for x86 CPU instructions.
LINK can link object code for various CPUs into various types of executables
including the Hitachi SH3 CPU and Windows CE executables.

There are/were various compilers that could make Windows CE executables
including ones for the SH3 CPU, a later version of the CPU is the SH4.

Some compilers, if still available, that may work for your setup.
The Visual series Basic, C++ and other ones dsForth, PocketC, NSBasic.

Most of the targets for CE and the various followup OSes
are for the ARM/StrongARM/xScale family CPUs.

The CPU targets for CE :
SH3, MIPS, the main target ARM/xScale
and x86 (for the emulator, and now for hardware).
Posted on 2006-10-12 20:55:34 by dsouza123
CE is mostly unicode. For example there is very unknown function GetProcAddressA, but there is no LoadLibraryA  :?:

programming for CE is almost same as for win32, besides assembly syntax. Even PE is exactly the same. But the loader beheaves differently, you know that from windoze. for example you need to have OrigFirstThunk value set in imports, but it can point to same table as FirstThunk
Posted on 2006-10-13 04:07:01 by vid
Thanks a bunch guys!

Sea spent a lot of time on dialup yesterday poking around for facts on this topic.

Unfortunately PocketC has been retired, so has embbed VC 3.0 and eVb 3.0. Since I'm using win98se, I'm kinda stuck for tools at the moment being that the updated IDE's from M$ all require W2Kor XP. Plus an 8.5 hour download at 56kbs. (Oh Sh!%$)

Is there a place to obtain fully functional retired IDE's like the M$ ones I mentioned? Perhaps someone has an old M$ link that still works?

Posted on 2006-10-13 10:32:34 by SeaFarer
eVC4.0 is what I use on Win2k for PocketPC development, got it from microsoft's site. But it won't run on 98se. All tools you can get for free from MS require at least win2k.. so MS's IDEs and compilers aren't your way to go.

Instead, get a pre-built GCC cross-compiler with bintools, running on Win32 via Cygwin.dll, compiling SH3 binaries, and linking them to a WinCE PE .exe file. And get some IDE like Code::Blocks or the latest DevC++ . But prepare yourself for a lot of waiting for downloads and even more nerves on figuring-out how to tune the compiler. And then even more nerves on using GAS (the GNU assembler). I've spent a lot of nerves and bandwidth (even though I'm with 0.5mbit/s inet) ... I can imagine what you'll go through :( . Btw, don't immediately jump on C++ .. first make some simple MessageBox()-using proggie in C, then play with assembly... and maybe finally try compiling C++ projects.

P.S: hopefully you can use the eVC4 compiler instead of spending a lot of nerves on GCC toolchains - maybe only the MS IDEs require Win2k/XP. Code::Blocks and DevC++ have become as useful as VC IDEs.
Posted on 2006-10-13 11:19:46 by Ultrano