News:

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

MASM 10 needed.

Started by KeepingRealBusy, November 29, 2011, 11:00:34 PM

Previous topic - Next topic

KeepingRealBusy

Attached is a zip of a masm test I recently made. I am running MASM 9.0 from
Visual Studio 2008. When I tried to add the /SG option to the ML command line, I
encountered a MASM Internal Error. I was wondering if anyone had a copy of MASM
10.0 to try to assemble and execute this code and see if it also has the same
problems.

If you want to try, unzip the masmtst.zip file, and execute dotest.bat. This
will execute makeit.bat (make sure ML and LINK are in the path or change this to
a correct path for your system) and then it executes chkdata.exe. There is only
one API call in the program: ExitProcess.

Oh, by the way, you'll love the source code!

There are two assemblies, a chkdata.asm and a makedata.asm (identical code)
which include head.pkg, main.pkg, and test.pkg. The only difference is that
makedata.asm is assembled with the /SG option and fails, chkdata.asm assembles
correctly and executes correctly. There is no program output, just INT 3 traps
to detect incorrect execution.

There are other MASM errors as well. When the makedata.asm assembly fails, MASM
does not exit with an error code and so LINK tries to link a non-existant (null)
object and it too fails.

*******************************************************************************

Here is the assembly execution report:



Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

F:\DAVE06DATA\strtest\cp\maze\masmtst>dotest

F:\DAVE06DATA\strtest\cp\maze\masmtst>call makeit

F:\DAVE06DATA\strtest\cp\maze\masmtst>call makeit0.bat

F:\DAVE06DATA\strtest\cp\maze\masmtst>copy makeit0.bat chkdata.bat
        1 file(s) copied.

F:\DAVE06DATA\strtest\cp\maze\masmtst>del chkdata.*

F:\DAVE06DATA\strtest\cp\maze\masmtst>copy makedata.asm chkdata.asm
        1 file(s) copied.

F:\DAVE06DATA\strtest\cp\maze\masmtst>del makedata.*

F:\DAVE06DATA\strtest\cp\maze\masmtst>copy chkdata.asm makedata.asm
        1 file(s) copied.

F:\DAVE06DATA\strtest\cp\maze\masmtst>ML /nologo -Zi -c -Cp -Fl -Sf -coff chkdata.asm
Assembling: chkdata.asm

F:\DAVE06DATA\strtest\cp\maze\masmtst>if errorlevel 1 goto terminate1

F:\DAVE06DATA\strtest\cp\maze\masmtst>LINK /SUBSYSTEM:CONSOLE /DEBUG /MAP /LARGEADDRESSAWARE /OUT:chkdata.exe chkdata.obj kernel32
.lib
Microsoft (R) Incremental Linker Version 9.00.21022.08
Copyright (C) Microsoft Corporation.  All rights reserved.


F:\DAVE06DATA\strtest\cp\maze\masmtst>ML /nologo -Zi -c -Cp -Fl -Sg -Sf -coff makedata.asm
Assembling: makedata.asm

MASM : fatal error A1016: Internal error

  Version 9.00.21022.08

  ExceptionCode            = C0000005
  ExceptionFlags           = 00000000
  ExceptionAddress         = 004258C3 (00400000) "F:\DAVE06DATA\DS\TOOLS\ml.exe"
  NumberParameters         = 00000002
  ExceptionInformation[ 0] = 00000000
  ExceptionInformation[ 1] = 3C3C4C4C

CONTEXT:
  Eax    = 3C3C4C4C  Esp    = 0012F938
  Ebx    = 0040A7B0  Ebp    = 0012F938
  Ecx    = 3C3C4C4D  Esi    = 0000003C
  Edx    = 0012F95C  Edi    = 0096A7EC
  Eip    = 004258C3  EFlags = 00010206
  SegCs  = 0000001B  SegDs  = 00000023
  SegSs  = 00000023  SegEs  = 00000023
  SegFs  = 0000003B  SegGs  = 00000000
  Dr0    = 00000000  Dr3    = 00000000
  Dr1    = 00000000  Dr6    = 00000000
  Dr2    = 00000000  Dr7    = 00000000

F:\DAVE06DATA\strtest\cp\maze\masmtst>if errorlevel 1 goto terminate2

F:\DAVE06DATA\strtest\cp\maze\masmtst>LINK /SUBSYSTEM:CONSOLE /DEBUG /MAP /LARGEADDRESSAWARE /OUT:makedata.exe makedata.obj kernel
32.lib
Microsoft (R) Incremental Linker Version 9.00.21022.08
Copyright (C) Microsoft Corporation.  All rights reserved.

makedata.obj : fatal error LNK1136: invalid or corrupt file

calling chkdata.exe

F:\DAVE06DATA\strtest\cp\maze\masmtst>chkdata.exe

back from chkdata.exe

Press any key to continue . . .


*******************************************************************************

For another error, check out the chkdata.lst file for the symbol Oc0lk1


    OLl0o1 . . . . . . . . . . . . . Text    ALIGN OWORD
    Oc0lk1 . . . . . . . . . . . . . ‹ÿU‹ìQƒeü  00000000 _DATA   ;   This one.
    Ockl01 . . . . . . . . . . . . . Byte 00004E81 _DATA


This symbol is declared as (this is the First Pass output for /Sf):


      C INCLUDE <test.pkg>
      C OPTION PROLOGUE:NONE
      C OPTION EPILOGUE:NONE
00000000       C .data
      C ALIGN OWORD
      C Oc0lk1 OWORD -1                                 ;   This one.


MAASM seems to know how to handle the OWORD but it also seems to partially fail
(this is the .lst file entry):


00000000                     C Oc0lk1 OWORD -1                     ;   This one.
   FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
                              C .nolist
                              C .list
00000000                     C .code
                              C OLl0o1
00000000                     C lCkO10 PROC,
                              C O0lc1k:lOkc10,
                              C lkc10O:DWORD,
                              C oLOl10:Oklc10
00000000  50           C push eax
00000001  52           C push edx
00000002  8B 44 24 0C       C mov eax,[esp+(3*Lol1O0)]
00000006  0F B6 54 24 10     C movzx edx,OlkC10 [esp+(4*Lol1O0)]
0000000B  F3/ 0F 6F 10       C movdqu xmm2,[eax]
0000000F  02 F2           C add dh,dl
00000011  75 0D           C jnz oOlL10
00000013  66| 0F EF C0       C pxor xmm0,xmm0
00000017  E9 00000064       C jmp OkC0l1
                              C OLl0o1
00000020                     C oOlL10:
00000020  66| 0F 6E C2       C movd xmm0,edx
00000024  66| 0F EF C9       C pxor xmm1,xmm1
00000028  F2/ 0F 70 C0       C pshuflw xmm0,xmm0,0
   00


All of the rest of the listing seems to honor splitting the object code so it
does not cross column 30 (even 100 column strings):


00000021 7D 49 41 50 54      C O0kl1c BYTE "}IAPTAPT=TP18AR^[TaffT I=8= 1b8PTT`R^[T1I=1TPb8{bPTS`8T=T{=8Ab1-T`ST+u8+`PbP[TPu IT=PT1bP1AR^T=T^`Pw"
   41 50 54 3D 54
   50 31 38 41 52
   5E 5B 54 61 66
   66 54 20 49 3D
   38 3D 20 31 62
   38 50 54 54 60
   52 5E 5B 54 31
   49 3D 31 54 50
   62 38 7B 62 50
   54 53 60 38 54
   3D 54 7B 3D 38
   41 62 31 2D 54
   60 53 54 2B 75
   38 2B 60 50 62
   50 5B 54 50 75
   20 49 54 3D 50
   54 31 62 50 31
   41 52 5E 54 3D
   54 5E 60 50 77


*******************************************************************************

Dave.