MASM problems in Win 2k. 
Author Message
 MASM problems in Win 2k.

MASM problems in Win 2k.
..model small
..stack 100h
..code
main proc

mov ds, ax

mov ax, 0
mov al, 4
mov bx, 3
mul bx

main endp

end main
This is the result when I compile the test program
======================================
Drive:\ASSEMBLY>ML /Sa /Fl test.asm
Microsoft (R) Macro Assembler Version 6.14.8444
Copyright (C) Microsoft Corp 1981-1997.  All rights reserved.

 Assembling: test.asm
Microsoft (R) Incremental Linker Version 5.12.8181
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.

/z2
"test.obj"
"test.exe"
NUL
LINK: warning LNK4044: unrecognized option "z2"; ignored
LINK: error : Segment reference in fixup record
test.obj: fatal error LNK1123: failure during conversion to COFF: file
invalid
or corrupt
=============================================
Why is this happened?
Thank you.



Wed, 15 Oct 2003 07:20:48 GMT  
 MASM problems in Win 2k.

Quote:
> Why is this happened?

Looks like you're using the Win32 assembler and linker to assemble source
code written for DOS:

Quote:
> ..model small

No memory models on Win32

Quote:

> mov ds, ax

Don't modify the segment registers in Win32. They are set up by Windows to
the correct values, and they aren't just segment base addresses any more
(they are selectors and hence completely different).

--
Tim Robinson
http://www.gaat.freeserve.co.uk/
Listening to: Low Sun [Chicane]



Wed, 15 Oct 2003 09:35:45 GMT  
 MASM problems in Win 2k.
..stack 100h
..code
main proc
mov ax,4
mov bx, 3
mul bx
main endp

end main
This program can't work too
What wrong?
Could you write me a simple program so I can test the compiler??
Thank You.




| > Why is this happened?
|
| Looks like you're using the Win32 assembler and linker to assemble source
| code written for DOS:
|
| > ..model small
|
| No memory models on Win32
|

| > mov ds, ax
|
| Don't modify the segment registers in Win32. They are set up by Windows to
| the correct values, and they aren't just segment base addresses any more
| (they are selectors and hence completely different).
|
| --
| Tim Robinson
| http://www.gaat.freeserve.co.uk/
| Listening to: Low Sun [Chicane]
|
|
|



Thu, 16 Oct 2003 05:49:22 GMT  
 MASM problems in Win 2k.

Quote:
> ..stack 100h
> ..code
> main proc
> mov ax,4
> mov bx, 3
> mul bx
> main endp

> end main
> This program can't work too
> What wrong?
> Could you write me a simple program so I can test the compiler??

Sorry, I can't help you much here:
a) I don't know MASM
b) I don't do a lot of assembly programming on Windows

--
Tim Robinson
http://www.gaat.freeserve.co.uk/
Listening to: Desert Storm [Orbital]



Thu, 16 Oct 2003 08:42:10 GMT  
 MASM problems in Win 2k.

Quote:
> ..stack 100h
> ..code
> main proc
> mov ax,4
> mov bx, 3
> mul bx
> main endp

> end main
> This program can't work too
> What wrong?

It doesn't return back to the OS, there must be at least RET instruction in
the end of your main procedure (for .COM program it's enough, for .EXE
program use 4ch function of int 21h).

Good Luck
--
Alexei A. Frounze
alexfru [AT] chat [DOT] ru
http://alexfru.chat.ru
http://members.xoom.com/alexfru/
http://welcome.to/pmode/



Thu, 16 Oct 2003 08:42:12 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Win 2K app problem

2. Weird Win 2K indexing problem

3. sys.argv problem in Win 2k

4. CFD and Win 2k group > 64K

5. Clarion for dos 3009 & win 2k

6. Non CW Question : Win 2k Adv Server keeps rebooting

7. NT4 Workstation / Win 2K Pro Registry Setting Required

8. Win 2k and clarion dos ctrl-esc key

9. YAWin2KQ (Yet Another Win 2K Question)

10. Dos App running on Win 2K

11. win 2000, 2K and screen

12. SCSI pass thru - Linux, Win NT/2K/XP

 

 
Powered by phpBB® Forum Software