링크가 복사됨
5 응답
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
I found the answer to my question. I realize I had asked the same question several months ago and received an authoritative answer from a Compaq assembly language expert. Here is the answer that I had misplaced until now:
The Microsoft Macro Assembler (MASM) command line for properly assembling the asm listing files produced (optionally produced when compiling a CVF program) into .obj files is:
ML /I. /Zm /Cp /Fl /Sa filename.asm
The Microsoft Macro Assembler (MASM) command line for properly assembling the asm listing files produced (optionally produced when compiling a CVF program) into .obj files is:
ML /I. /Zm /Cp /Fl /Sa filename.asm
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
Well, Microsoft's Visual C++ 6.0 Processor Pack seems to claim that it contains a MASM with the latest processor instructions (assuming I can read between the lines of the MS documentation correctly - haven't tried it yet myself.)
Steve
Steve
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
Yes, after installing Visual Studio SP5 and the corresponding processor pack, changing the .486 to .686 in asmfile enables ML to assemble the p6 code. Required options appear to be:
ML -Zi -c -coff -Zm ...
-Zi enables Vtune to display the .asm source.
ML -Zi -c -coff -Zm ...
-Zi enables Vtune to display the .asm source.
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
I noticed a few things since I started this thread. First off, the version of MASM discussed above is 6.15. Also, it may be that those MASM options required to replicate the object file from an asm listing that was produced by a CVF compile-link of Fortran source code differ from the options a user would use in writing an assembly program from scratch. Another MASM switch that may be important is -Zp4 (to align structures along 4-byte boundaries). Also, one of the reasons I wanted to re-assemble an asm listing was to generate timings for each assembly instruction (not given in the CVF asm listings); this requires the -Sc switch.
So here is what I think should be a good set of switches to compile assembly language code into an CVF-compatible object file (especially if you are trying to get an insight into exactly how your Fortran code compiled from the CVF asm listing):
ML.EXE -I. -Zm -Cp -Fl -Sa -Sc -coff -Zp4 -c asmlistingfile.asm
One more thing, even with older assembler versions one can always embed the newer processor instructions by directly embedding op codes using the "DB" (define byte command). For example to encode a CPUID instruction insert the two lines: "db 0fh" then "db 0a2h" (see Intel documentation AP-485 on this particular example and on the CPUID instruction in general).
So here is what I think should be a good set of switches to compile assembly language code into an CVF-compatible object file (especially if you are trying to get an insight into exactly how your Fortran code compiled from the CVF asm listing):
ML.EXE -I. -Zm -Cp -Fl -Sa -Sc -coff -Zp4 -c asmlistingfile.asm
One more thing, even with older assembler versions one can always embed the newer processor instructions by directly embedding op codes using the "DB" (define byte command). For example to encode a CPUID instruction insert the two lines: "db 0fh" then "db 0a2h" (see Intel documentation AP-485 on this particular example and on the CPUID instruction in general).
