News:

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

32 bit code in masm 6.11

Started by anjali dhasmana, January 29, 2010, 04:35:36 AM

Previous topic - Next topic

anjali dhasmana

i am using pheonix 486 procesor and writing code in masm 6.11.
in general we can access 32bit by eax,ebx,ecx,edx registers, but masm is showing error when i am compiling my code.

also can anyone please help me that how can we switch between protected and real mode.

some one please help me

hutch--

anjali,

Its a very old processor. Tell us what OS its running as that will dictate what instructions can be run.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

dedndave

welcome to the forum anjali
is this an embedded system ?
you need a processor directive in your asm file

        .486

for example

as for switching between protected/real - use the forum search tool (and google)
that one has been covered hundreds of times   :U

anjali dhasmana

thanks all

yes its embedded ques.

OS is win 98, we are using PC/104. code written in masm 611 and we run it on command prompt as exe file of through masm cv command

as am a beginner so i really nead your help

plz tell me how to switch between real and protected mode

redskull

Quote from: anjali dhasmana on January 29, 2010, 12:45:43 PM
plz tell me how to switch between real and protected mode

If you are writing for Win98, you are already in protected mode.  If you are trying to do your own boot loader or something, then you need to be writing real-mode code, which generally doesn't use the 32-bit registers and uses different linkers and such (and perhaps the source of your errors?  In real-mode code, you need explicit changes to access the extended registers).  Also, be warned that such code won't really run right under Windows; the results are often hit-or-miss.

-r

Strange women, lying in ponds, distributing swords, is no basis for a system of government

hutch--

anjali,

What we need to know is if you are trying to build 16 bit or 32 bit code. MASM 6.11 would not build 32 bit code without a specialised linker that was only available in an early NT3.5 SDK and its not what you need. Use a later version of ML to build 32 bit code.

RE: Swapping between16 and 32 bit code which is usually boot code, it cannot be safely done from within Win98, you need to boot the machine from a floppy disk with your code on the floppy disk so that you can start in real mode and switch to protected mode. There are a number of members in the forum who are experienced in this area.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php