.386 Directive problem 
Author Message
 .386 Directive problem

Hi all
I have MASM. When first time I used .386 directive in
my ASM code , my .COM program shows very strange results
when run. In fact this code gets assembled successfully
without error by MASM.
When run this code just hangs my PC. I have 486 DX2
system.

.386
CODSEG SEGMENT
     ORG  100H
M:   MOV  AX,0FFFFH
     RET
CODSEG ENDS
     END M

So what is the problem?
And also send answer by email(Bbecause Ii don't know
how you usually answer people)
-Dhiraj.



Fri, 11 Jan 2002 03:00:00 GMT  
 .386 Directive problem
: Hi all
: I have MASM. When first time I used .386 directive in
: my ASM code , my .COM program shows very strange results
: when run. In fact this code gets assembled successfully
: without error by MASM.
: When run this code just hangs my PC. I have 486 DX2
: system.

: .386
: CODSEG SEGMENT

the .386 causes all subsequent segments to be 32-bit  
by default.  you very likely want 16-bit; change the
above declaration to "CODSEG SEGMENT USE16".

:      ORG  100H
: M:   MOV  AX,0FFFFH
:      RET
: CODSEG ENDS
:      END M



Fri, 11 Jan 2002 03:00:00 GMT  
 .386 Directive problem

Quote:


> : Hi all
> : I have MASM. When first time I used .386 directive in
> : my ASM code , my .COM program shows very strange results
> : when run. In fact this code gets assembled successfully
> : without error by MASM.
> : When run this code just hangs my PC. I have 486 DX2
> : system.

> : .386
> : CODSEG SEGMENT

> the .386 causes all subsequent segments to be 32-bit
> by default.  you very likely want 16-bit; change the
> above declaration to "CODSEG SEGMENT USE16".

> :      ORG  100H
> : M:   MOV  AX,0FFFFH
> :      RET
> : CODSEG ENDS
> :      END M

Another solution is to put .386 INSIDE the CODESEG segment. Then
the segment will still remain 16-bit, but will have 32-bit commands
enabled.

--
Wanna make $$$ ? It's easy!!!
Holding <Shift> key press "4" three times.



Fri, 11 Jan 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. .386

2. .386

3. ANOTHER .386 HELP !!!

4. "segment" directive problem in a86

5. : ABOUT " .386 "

6. Problem with .TYPE directive

7. "segment" directive problem in a86

8. OO-Cobol compiler directive problem

9. PROBLEM WITH COMPILER DIRECTIVE SIGN"EBCDIC"

10. Directives problem, help !!!

11. format directive problem

12. Dummy section assembler directives

 

 
Powered by phpBB® Forum Software