News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

masm 10 vs 11

Started by bomz, January 22, 2013, 09:45:06 AM

Previous topic - Next topic

qWord

that are maybe relocation data ... however also link v10 add these automatically. (disable: /DYNAMICBASE:NO)
MREAL macros - when you need floating point arithmetic while assembling!

bomz



do you know some else use full keys?
I just today read about it for ml and link

say please a few word about STUB

qWord

Quote from: bomz on January 24, 2013, 07:10:16 AMdo you know some else use full keys?
What key?

Quote from: bomz on January 24, 2013, 07:10:16 AMsay please a few word about STUB
If you mean the DOS stub program, there is nothing more to say then that it exist only for compatibility reasons.
(Running a PE from DOS, the stub shows a message that this program can't run under DOS)
MREAL macros - when you need floating point arithmetic while assembling!

bomz

command prompt keys for link.exe and ml.exe. I don't understand anuthing because don't know anyting about linking

bomz

.386
.model flat, stdcall
option casemap:none

include \masm32\include\windows.inc
include \masm32\include\kernel32.inc
include \masm32\include\user32.inc
include \masm32\include\ntdll.inc
includelib \masm32\lib\kernel32.lib
includelib \masm32\lib\user32.lib
includelib \masm32\lib\ntdll.lib

.code

start:
invoke  RtlAdjustPrivilege,13h,1h,0h,esp
invoke  NtShutdownSystem,1
invoke ExitProcess, 0
end start


This code with masm32.11 2.5 kb
masm32.11 /dynamicbase:no 2.0 kb
masm32.10 1.5 kb
why?

masm32.10 makes 2.5 kb files for "little" code, 2.0  for "little" code without data? section, and 1.5 kb  for "little" code without data and data? section

/merge:.rdata=.text 1 kb without data and data?

ragdog

Hey

You can experiment with the ml and link but the Original Ml and link from Hutch´s Sdk works perfect
or Jwasm.

With Jwasm can your make your own exe like

Quote
op stack=0x40000
format windows nt
runtime windows=4.0
op osname='Windows NT'
op linkversion=1.9
op version=1.0
op checksum
op norelocs
file program.obj

And works a Ml or link not anymore of a later windows scream all here and find a good solution  :biggrin: 8)


For build your Driver with or without KmdKit works fine with Masm32 v10 and v11,
and on a XP-Win7

Regards,

bomz

.data?
value YMMWORD ?
OK
.data
value YMMWORD 0
ERROR

how init YMMWORD value?



qWord

As for XMMWORD, you can't initialize these types, because they represent a union of diffrent typed arrays. As a solution, you can either use it with the LABEL directive or use a corresponding structure/union.

foo LABLE YMMWORD
db 32 dup (0)
MREAL macros - when you need floating point arithmetic while assembling!

bomz


bomz

.386

.model flat, stdcall
option casemap :none

include \MASM32\INCLUDE\windows.inc
include \MASM32\INCLUDE\user32.inc
include \MASM32\INCLUDE\kernel32.inc
includelib \MASM32\LIB\user32.lib
includelib \MASM32\LIB\kernel32.lib

.data
mestitle db "YMMWORD",0
form db "%04hx%04hx%04hx%04hx%04hx%04hx%04hx%04hx", 0
value YMMWORD 6.1111

.data?
buffer db 512 dup(?)

.code
start:
invoke wsprintf,ADDR buffer,ADDR form,\
dword ptr[value],dword ptr[value+4],dword ptr[value+8],dword ptr[value+12],\
dword ptr[value+16],dword ptr[value+20],dword ptr[value+24],dword ptr[value+28]

invoke MessageBox,0,ADDR buffer,ADDR mestitle,MB_ICONASTERISK
invoke ExitProcess,0
end start



http://www.masmforum.com/board/index.php?PHPSESSID=8d46cd4ecb1688be429ab49694ec53e6&topic=15872.0;wap2
Quotejj2007:
It's actually a lot more complicated...
Masm does not initialise the XMMWORD (but it does initialise the OWORD)
JWasm initialises both.

hutch--



IF 0  ; ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
                      Build this template with "CONSOLE ASSEMBLE AND LINK"
ENDIF ; ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤

    include \masm32\include\masm32rt.inc

    .data
      align 16
      item16 dd 0,0,0,0
      item32 dd 0,0,0,0,0,0,0,0

    .code

start:
   
; ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤

    call main
    inkey
    exit

; ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤

main proc

    print ustr$(lengthof item16),13,10,13,10
    print ustr$(lengthof item32),13,10,13,10

    ret

main endp

; ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤

end start

bomz

#71
OK.

Install 2010 studio and update it. Is it possible to find in it something usefull else? May be some libs , includes or exe files?

ML.EXE 10.0.40219.1 not support /AT - report error but compile. and not support directives: .186 .286 .8087

bomz

hutch--
I find in studio 2010 a lot of LIB's, try convert them to INC with imp2inc (and protoize) and obtain approximately the same includes.
What principle use which includes include to masm32 and what is not?

bomz

ML.EXE 10.0.40219.1 m32lib fptoa.asm

    fbstp [esp]
(73) Instruction error must be the same size

    fbstp real10 ptr[esp]

hutch--

Thanks but we already know that, from memory ML started to have this error in version 8.0. It builds fine in version 6.14.