Hello all,
Wince 6.0 vs 2005.
What assembler(ml.exe) does wince 6.0 x86 uses? MASM is 32 bit or 16 bit? If
it is 32 bit then how we shall use it for assembling boot loader code?

Re: X86 assembler by Luca

Luca
Wed Mar 19 00:02:26 PDT 2008

masm is a 32 bit assembler but there are directive to write 'dos' code (for
example .model tiny);
then you can use the prefixes address size (0x67) or operand size (0x66) to
override the default.
google for 'masm reference guide'


--

Luca Calligaris
www.eurotech.it

"Sankarraj" <Sankarraj@discussions.microsoft.com> ha scritto nel messaggio
news:3699D768-2CA2-4DCF-9E89-1BC16398F311@microsoft.com...
> Hello all,
> Wince 6.0 vs 2005.
> What assembler(ml.exe) does wince 6.0 x86 uses? MASM is 32 bit or 16 bit?
> If
> it is 32 bit then how we shall use it for assembling boot loader code?
>
>



Re: X86 assembler by AndreasSander1

AndreasSander1
Wed Mar 19 01:04:08 PDT 2008

On 19 Mrz., 08:02, "Luca Calligaris"
<anonym...@discussions.microsoft.com> wrote:
> masm is a 32 bit assembler but there are directive to write 'dos' code (for
> example .model tiny);
> then you can use the prefixes address size (0x67) or operand size (0x66) to
> override the default.
> google for 'masm reference guide'

Luca,

The bootloader must swich from real mode to protected mode. So you
need a mix of 16 bit code and 32 bit code. I never succeeded to mix
this in one file. Do you have a small example?

Andreas

Re: X86 assembler by Luca

Luca
Wed Mar 19 03:19:31 PDT 2008

take a look at
%_WINCEROOT%\\PLATFORM\CEPC\SRC\BOOTLOADER\BIOSLOADER\LOADER\startup.asm.
in that file you'll see an example of mixed code using the address size /
operand size prefixes; in the same file you'll
see how they switch to real mode to protected mode with a flat addressing in
the GDT
--

Luca Calligaris
www.eurotech.it

<AndreasSander1@gmx.net> ha scritto nel messaggio
news:de695846-e2af-400b-a7f0-4944cd1d2049@2g2000hsn.googlegroups.com...
> On 19 Mrz., 08:02, "Luca Calligaris"
> <anonym...@discussions.microsoft.com> wrote:
>> masm is a 32 bit assembler but there are directive to write 'dos' code
>> (for
>> example .model tiny);
>> then you can use the prefixes address size (0x67) or operand size (0x66)
>> to
>> override the default.
>> google for 'masm reference guide'
>
> Luca,
>
> The bootloader must swich from real mode to protected mode. So you
> need a mix of 16 bit code and 32 bit code. I never succeeded to mix
> this in one file. Do you have a small example?
>
> Andreas



Re: X86 assembler by Sankarraj

Sankarraj
Wed Mar 19 04:08:01 PDT 2008

I firstly thank you. (built .obj file)
I wanted to build the bsec.img file for exfat file system. In the build.bat
file these lines are mentioned
@REM It relies on a 16-bit assembler and linker. As well, it executes a
debug.com
@REM script at the end to extract the boot sector text area from the resultant
@REM COM file. Since the boot sector code runs in a loader-less
environment, the
@REM better part of the COM file is of no use to us.
@REM
@REM ** NOTE: the debug.com script extracts just the text area of the boot
sector
@REM and doesn't include the BIOS parameter block (BPB) area. This is
because
@REM the BPB created by the format operation is used instead and an offset
@REM (62d/0x3E) is applied to the boot sector code before it's written into
@REM the boot sector.
@REM
@ECHO OFF

ml /Zm /Flbsect.lst /c bsect.asm
link bsect.obj,bsect.com,,,
debug bsect.com < getbsect.scr
I could able to build bsect.obj and bsect.lst. While linking with the above
batch file "bsect.obj,bsect.com,,,", i got linker error file not found.
So i deleted the bsect.com,,, and tried to link it with link bsect.obj
alone. I am getting the error bsect.obj : "fatal error LNK1190: invalid
fixup found, type 0x0001". I searched and tried to fix it. Could you tell me
where i am wrong?
I wanted to make Exfat file system as wince bootable...


"AndreasSander1@gmx.net" wrote:

> On 19 Mrz., 08:02, "Luca Calligaris"
> <anonym...@discussions.microsoft.com> wrote:
> > masm is a 32 bit assembler but there are directive to write 'dos' code (for
> > example .model tiny);
> > then you can use the prefixes address size (0x67) or operand size (0x66) to
> > override the default.
> > google for 'masm reference guide'
>
> Luca,
>
> The bootloader must swich from real mode to protected mode. So you
> need a mix of 16 bit code and 32 bit code. I never succeeded to mix
> this in one file. Do you have a small example?
>
> Andreas
>