News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

failurre to run compiled 64 icz examples

Started by mikeburr, October 04, 2017, 03:43:15 PM

Previous topic - Next topic

mikeburr

dear mikl et al ..
ive tried compiling tutorial16 with ml64 [version 9.00.30729.01] and linker obtained from the microsoft SDK Although this compiles OK it doesnt run It may be due to the associated dlls which are ms..80 and 90. I no longer have the ability to download vast amounts of stuff to obtain a working set. Would somebody be kind enough to email the appropriate dlls etc so that i can compile your examples.
Second question ... i am using linked lists of heaps in a 32 bit program and can accommodate about 12 million records and linked lines of data at which point im pretty much at the 2 gig limit for the program .. is the virtal program space extended for 64 bit as im unclear about this
regards   mike burr

Mikl__

#1
Hi, Mike burr!
I would like to ask you a few questions. You wrote "I have tried compiling tutorial16... Although this compiles OK it doesnt run" This means that the compilation and launch of lessons from 1-st to 15-th have been successful? Or your programing cycle started from the 16-th lessons? Can You show the contents of the bat-file for compiling and linking the asm-text of the program?

mikeburr

thanks for your prompt response Mikl .. i tried the compilation again with tut_22 just in case i had done something odd .. obviously i dont have stub.exe so i compiled without that directive and was getting an align 16 error which i thought odd  "LNK4108    /ALIGN specified without /DRIVER or /VXD; image may not run "   i realised then that the Version of CMD.EXE  that id dumped in with the tut to run it might be an old pre 64 bit version. This canny hunch may have proved to be true even if the reasoning was in error ...but is a salutary warning to ALL SLACK-ALICE's like myself  to be a little more careful ... so .. the compile is using your original .bat file minus the STUB and works fine ...

HOWEVER ...i still get the linker warning when compiling TUT_33 .. i thought i try an /IGNORE:LNK4108  command which didnt do anything [which is not surprising as i dint look to see if this was a properly formatted command ]

any way thanks for all your good work converting the examples ... the ms 80 and 90 dll's seem to work ok but i would be grateful if somebody could send me the 140 versions as i know ill be up to date ...i dont want Visual C and its too large to download as ive got a very limited download capacity on the dongle attached to the computer here .
ALSO   does largeaddressware:YES   mean that you get more the full 64 bit  virtual address space as the reason for wanting to convert to 64 bit is so that i can use this if possible as my programs are currently limited to 2 gig [ i use Heap allocation for the data and working storage ...but run concurrent threads .. which is not for the faint hearted ]   

mikeburr

This is probably also a question for Hutch   etc 
just tried tut_31a and that gives a load of error messages relating to LV_column and LV_item  neither of which are in win64.inc but obviously are in windows.inc ..  what  is in and what isnt ???    what MASM32.COM  really needs is a definitive set of inc libraries etc as this is all a bit haphazard ???
regards mike b

Mikl__

Hi, Mike burr!
I could send to you ml64 and the dll-s, but I need your e-mail address because I don't want litigations Microsoft against masm32.com
If you want to deal with Iczelion tutorials x64 -- It makes sense to start with the first lesson, and not with tut_16-th, tut_22-nd or tut_31_a-st

hutch--

 :biggrin:

> what MASM32.COM  really needs is a definitive set of inc libraries etc as this is all a bit haphazard ???

Feel free to write them yourself, I don't get paid for producing include files and the version of win64.inc has many hours of work done on it to get most of its content up to date.

Mikl__

Hi, hutch--!
Do not be so serious about these words

mikeburr

dear hutch and mikl   
i certainly didnt mean anything derogatory. The MASM32.COM BIT IS SUPERB precisely because you can download the working set as a novice [like me a few years ago] and you can work through the examples knowing they work and mess around with them. The 64 bit doesnt seem to have that organisation. Im not sure whether thats because of distribution because its a Microsoft Proprietary product or that everybody is expecting Hutch to do everything, which certainly isnt very fair.  Cant we all chip in somehow and make the equivalent for 64 working set that you have made for 32. I realise that Iczehelion and Mikl have gone to a lot of trouble to make the examples possible which im sure will have benefited everyone who looks at this site,[ along with the peles and japeth compilers and so on ...] 
regards mike b   

mikeburr

dear Mikl
i did compile a few of the very early ones but they were a bit too simple.  I was looking for things which were closer in concept to the stuff i have here.
How do i send you my email address ???
regards mike b

hutch--

Mike,

The 64 bit project is a work in progress and differing from the late 1990s where I worked with a lot of very skilled people to construct the early version, I have had to write all of the 64 bit code and structure myself and that includes rewriting a vast amount of the win64.inc file then testing it to make sure it was reliable.

> Cant we all chip in somehow and make the equivalent for 64 working set that you have made for 32

Probably not as the complexity would knock you over and one glitch and the assembler will pelt garbage at you. For the equates LV_column and LV_item you look them up and put them into your own source file and they are probably the same as the ones in the 32 bit windows.inc file.

I work on the 64 bit version because I need it myself and I am happy enough to share the stuff I have already done but it is advanced stuff where folks who want to develop in 64 bit MASM need to do their own investigations on extra or missing bits.

mikeburr

dear Hutch .. OK   anyway as regards the LV 's thats exactly what i did but it is guesswork rather than certainty ... i have to add that although i struggled a little  with the 32 bit at the very start there was so much stuff  it was very easy to get going. I was using Ruby previously to try out mu number theory stuff which its surprisingly well suited to  but its not as flexible or as fast as assembler plus its very easy to get quite a good GUI interface very quickly with such easy access to the Windows API's .. NO ONE has answered my last question yet though ... will a 64 bit program admit more than the current 2 gig limit in storage .. where can i find out about the compiler options too other than the scant help in ml54 itself ???in fact is there an ml64 manual of any kind as other people seemed to have written better ones than MS for the 32 bit compiler ???
regards Mike b 

Mikl__

Hi, Mike burr!
I sent to you ml64, link, dll-s and another files. I renamed *.dll to *.d, *.exe to *.e, *.bat to *.b so to send attachments without problems. You will create folder masm64 and nested subdirectories: bin, lib, include, images, samples 
The files you received are for the bin folder\masm64\bin
api-ms-win-crt-conio-l1-1-0.dll
api-ms-win-crt-convert-l1-1-0.dll
api-ms-win-crt-environment-l1-1-0.dll
api-ms-win-crt-filesystem-l1-1-0.dll
api-ms-win-crt-heap-l1-1-0.dll
api-ms-win-crt-locale-l1-1-0.dll
api-ms-win-crt-math-l1-1-0.dll
api-ms-win-crt-process-l1-1-0.dll
api-ms-win-crt-runtime-l1-1-0.dll
api-ms-win-crt-stdio-l1-1-0.dll
api-ms-win-crt-string-l1-1-0.dll
api-ms-win-crt-time-l1-1-0.dll
api-ms-win-crt-utility-l1-1-0.dll
asm2.bat
Bind.Exe
cvtres.exe
dumpbin.exe
hiew32.exe
link.exe
link.exe.config
ml64.exe
mspdbcore.dll
msvcdis140.dll
msvcp140.dll
pgodb140.dll
rc.exe
rcdll.dll
stubby.exe
vcruntime140.dll
to fill the subdirectories lib and include you create a bat-file with the following contents@echo off
cls
set masm64_path=\masm64\
set FileName=user32
if exist %FileName%.inc del %FileName%.inc
if exist %FileName%.def del %FileName%.def
%masm64_path%bin\dumpbin.exe /EXPORTS %windir%\System32\%FileName%.dll /OUT:%FileName%.txt
@echo EXPORTS >> %FileName%.def
for /f "skip=16 tokens=1-4" %%a in (%FileName%.txt) do ( if "%%a"=="Summary" goto :exit
if "%%d"=="" ( @echo extern __imp_%FileName%_ordinal%%a:qword >> %FileName%.inc
@echo %FileName%_ordinal%%a TEXTEQU ^<__imp_%FileName%_ordinal%%a^> >> %FileName%.inc
@echo %FileName%_ordinal%%a=ordinal%%a @%%a NONAME >> %FileName%.def
) else ( if not "%%d"=="(forwarded" ( @echo extern __imp_%%d:qword >> %FileName%.inc
@echo %%d TEXTEQU ^<__imp_%%d^> >> %FileName%.inc
@echo %%d=__imp_%%d >> %FileName%.def )))
:exit
%masm64_path%bin\link -lib /DEF:%FileName%.def /OUT:%FileName%.lib /MACHINE:X64
you willl substitute  names "user32", "kernel32", "gdi32" etc. in line "FileName="

hutch--

Mike,

> will a 64 bit program admit more than the current 2 gig limit in storage

If you build 64 bit apps with the /LARGEADDRESSAWARE option, you can exceed the 2 gig limit but it also prevents you from using some of the older mnemonic constructions. You get this from reading the "link /?" data.

YES the ml64 documentation is lousy, much of what is posted on the internet is wrong and most of the code is crap from folks who don't know how to write a prologue/epilogue in MASM.

These are the joys of working on a leading edge area, bad mannered tools, lousy documentation and people who don't know what they are talking about and the need to do everything the hard way as there is no other way.

Now as you are using the work that Mikl__ has done, you need to ask him about the methods to use with that system. He has done a lot of work with the tutorials and has been able to get a lot of code up and working.

mikeburr

2 relies in 1
Dear mikl
i tried to send you a program present using the same renaming strategy by which you sent me what i needed .. my pressy is a bit rubbish by comparison but ill post it here if i can figure out how to do it . Itll prob be in the wrong place here as its a quite large 32 bit program listing and a large prime number file [in label  dd  value format ]
Dear Hutch
  why cant you and the other knowledgeable people send me roughly the information you think should go in a MASM 64  GUIDE and ill write it in a vaguely coherent form and maybe thatll help the direction of use of 64 so it can be a bit more standardised as it sounds like everybody is trying to do their own thing finding out how best to make use of 64 rather than one cohesive effort
ps funny enough all that strange looking Russian text is relatively translatable without Google .. once you know that a H is approximately a N(ye) in Oz and a Pi  is a Fu  etc you pretend youve got a Comedy Russian accent and many of the words come out  in sort of strained Oz , the worlds a lot smaller than you think and a lot of fun too
regards Mike b   

aw27

Quote from: hutch-- on October 07, 2017, 03:47:10 PM
If you build 64 bit apps with the /LARGEADDRESSAWARE option, you can exceed the 2 gig limit but it also prevents you from using some of the older mnemonic constructions. You get this from reading the "link /?" data.
I believe that when building 64-bit applications /LARGEADDRESSAWARE is the default. You have to explicitly use /LARGEADDRESSAWARE:NO on the linker command line for the LARGE_ADDRESS_AWARE flag being absent from the File Header.