News:

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

Main Menu

Does Masm compile under Wine

Started by Magnum, July 30, 2016, 01:12:20 PM

Previous topic - Next topic

Magnum

Does Masm compile under Wine in Linux ?

And if so, will said programs run under Wine ?

I am using ubuntu-mate-16.04-desktop-amd64.

Thanks guys. :-)

Take care,
                   Andy

Ubuntu-mate-18.04-desktop-amd64

http://www.goodnewsnetwork.org

mineiro

yes sir Magnum
wine ml64
wine hjwasm
wine casm
wine sol_asm2
...
you can try too 'wineconsole', 'wine start','wine cmd' ... . Wine have embebed dinamic libraries (dll -like a pseudo WOW(Linux on windows)) and not all functions from dll are implemented but to an assembler level you can do what you need.
I have see some faults inside wine,  not all programs are compatible, but you can play a lot.
But, under linux you don't need that thing, you can deal with as, sol_asm, hjwasm, yasm, nasm,  today I'm playing with 6 assemblers... . The same history that these guys here are confronting today to port from 32 to 64 bits, so, this way I'm learning a lot with some pseudo discussions here.
The good news is, if you don't like strlen function inside C library, so remove that one  and insert your on that place. This way you can speed you O.S. Microsoft does not allow this.
Other good news is that have a lot of functions inside linux that are really usefull to programmers (not only to users) like (single and double lists, arrays, binary and balanced trees, hashs,autocomplete, iteration, lexers, conversions,  ..., and look, I'm talking only about one portable library), this way you don't need recreeate the whell, you just put things to work at first moment, after yes, you optimize a code to that function. Well, you can rebuild kernel to your own machine because others don't know that you live on a 3rd world country and they sell to you a 2nd hand factory computer and like to throw to you a best (beast) configuration.
Please, don't judge me, I use windows and linux, I can say a lot of good thing about windows but I have perceived that I'm being more produtive as being a programmer under linux side.
I'm really thinking what these brilhant guys are done under windows side, but who I am to judge.
I'd rather be this ambulant metamorphosis than to have that old opinion about everything

Magnum

Quote from: mineiro on July 30, 2016, 01:46:01 PM
yes sir Magnum
wine ml64
wine hjwasm
wine casm
wine sol_asm2
...
you can try too 'wineconsole', 'wine start','wine cmd' ... . Wine have embebed dinamic libraries (dll -like a pseudo WOW(Linux on windows)) and not all functions from dll are implemented but to an assembler level you can do what you need.
I have see some faults inside wine,  not all programs are compatible, but you can play a lot.
But, under linux you don't need that thing, you can deal with as, sol_asm, hjwasm, yasm, nasm,  today I'm playing with 6 assemblers... . The same history that these guys here are confronting today to port from 32 to 64 bits, so, this way I'm learning a lot with some pseudo discussions here.
The good news is, if you don't like strlen function inside C library, so remove that one  and insert your on that place. This way you can speed you O.S. Microsoft does not allow this.
Other good news is that have a lot of functions inside linux that are really usefull to programmers (not only to users) like (single and double lists, arrays, binary and balanced trees, hashs,autocomplete, iteration, lexers, conversions,  ..., and look, I'm talking only about one portable library), this way you don't need recreeate the whell, you just put things to work at first moment, after yes, you optimize a code to that function. Well, you can rebuild kernel to your own machine because others don't know that you live on a 3rd world country and they sell to you a 2nd hand factory computer and like to throw to you a best (beast) configuration.
Please, don't judge me, I use windows and linux, I can say a lot of good thing about windows but I have perceived that I'm being more produtive as being a programmer under linux side.
I'm really thinking what these brilhant guys are done under windows side, but who I am to judge.

Thanks mineiro .

Wine is a little difficult to use.

Could you please give more details ?

I used wine before with some 32 bit programs I wrote, but nothing ran correctly.



Take care,
                   Andy

Ubuntu-mate-18.04-desktop-amd64

http://www.goodnewsnetwork.org

mineiro

of course Magnum
I'm not using mate ok, so the only thing that I can't write about is how to install wine under this linux distribution. I'm suposing that you have wine installed. On linux we have a lot of different distributions and each one have their own package way like .tgz on slackware, .rpm on red had, .deb on debian, ... . This is a point to Microsoft on my point of view, you have few installers like .exe, .msi. You should have administrative rights to install a package under linux, and instead of logoff, login as a root to install they created a sudo, su, gksu programs.
On windows we have CUI (console-command interpreter) programs like command.com to ms-dos and cmd.exe to windows. On linux they say terminal or shell, and have a lot like xterm, konsole (kde), bash, sh, cshell, ... .
On windows we have a GUI(graphical) that is 'explorer.exe', on linux we have 'X graphical server' and now 'wayland'. And they build things using these servers and generated lxde to poor machines, kde, gnome, ... .


So, Download masm32 package from this board.
Open a terminal of your choice under a graphical environment, you probably will be on your home user folder as a start point. If not, you can type "pwd" to check where path/folder you are. You can type only "cd" to change to your home folder. I'm supposing that your masm32 download will be into your "Downloads" folder that it's inside your home folder.
Hidden folder under linux start with a dot ".", so if you type "ls" (dir on console windows) you will not see a wine folder because it's a hidden folder. If you type "ls -sal" you will see all folders including hidden. You should see ".wine" folder. So, unzip masm32 package.


mineiro@assembly:/bin$ pwd
/bin
mineiro@assembly:/bin$ cd
mineiro@assembly:~$ pwd
/home/mineiro
mineiro@assembly:~$ ls
Área de Trabalho  Assembly  Documentos  Downloads  Imagens
mineiro@assembly:~$ ls -sal
total 224
4 drwxr-xr-x 25 mineiro asm   4096 Jul 30 08:03 .
4 drwxr-xr-x  5 root    root  4096 Nov 28  2013 ..
4 drwxr-xr-x  5 mineiro asm   4096 Jul  7 23:24 .wine
mineiro@assembly:~$ cd Downloads/
mineiro@assembly:~/Downloads$ ls
masm32v11r.zip  temp
mineiro@assembly:~/Downloads$ unzip masm32v11r.zip
Archive:  masm32v11r.zip
  inflating: install.exe             
mineiro@assembly:~/Downloads$ ls
install.exe  masm32v11r.zip  temp
mineiro@assembly:~/Downloads$


Now, time to use wine. Type 'wineconsole install.exe'. After some time you will see a Install masm32 window program, go on and proceed instalation. You will see too a console screen opened and at some time while installing you will see all outputs by masm32 like 'assembling file.asm'. On linux terminal you will see some errors messages that wine is sending to us, I'm receiving "fixme:ntdll:find_reg_tz_info Can't find matching timezone ..." error messages.
So, at some point of instalation I received a message from console like: "overwrite c:\masm32\include\msvcrt.inc"? So, yes and go on, and ascii build appears, unicode build appears, ... .At end qedit will be show.
So, close qedit and console will be closed too.

Now let's start check things.
Under terminal go to wine folder and list (ls) whats inside.


mineiro@assembly:~/Downloads$ cd
mineiro@assembly:~$ cd .wine
mineiro@assembly:~/.wine$ ls
desktop-integration  dosdevices  drive_c  system.reg  userdef.reg  user.reg
mineiro@assembly:~/.wine$ cd drive_c
mineiro@assembly:~/.wine/drive_c$ ls
masm32  Program Files  temp  users  windows
mineiro@assembly:~/.wine/drive_c$ cd masm32
mineiro@assembly:~/.wine/drive_c/masm32$ ls
bigtstbd.qsc  datetime      help        makecimp.exe  multitool.exe  qeint.bin     testinst    tview.exe
bin           dlgmake.exe   include     makecon.qsc   plugins        qetb.exe      text        ueint.bin
bin2dbex.exe  dlgproc.qsc   intro.txt   makelibs.bat  procmap.exe    qetxt.bin     tmp.qsc     uetxt.bin
blankdlg.qsc  dlgtmplt.qsc  jtmake.exe  makerc.qsc    procs          qsc.dll       tools       uniedit.exe
bldmakit.qsc  examples      lib         maketbl.exe   prostart.exe   script        topgun.chm  vkdebug
blockp.ini    fda32.exe     libbat.qsc  mangle.exe    prostart.ini   se.dll        topgun.exe  wcsch.exe
cg.exe        fda.exe       licence     menuedit.dll  prostart.set   shellex.exe   tproc.exe
cg.ini        fpulib        m32lib      menus.ini     pths.ini       subclass.exe  tproc.txt
cpicker.exe   getcolor.exe  macros      mnutoasm.exe  qeditor.exe    testbed.qsc   tutorial
mineiro@assembly:~/.wine/drive_c/masm32$ wine qeditor
fixme:richedit:ME_HandleMessage EM_SETMARGINS: stub
mineiro@assembly:~/.wine/drive_c/masm32$ wine ml
wine: cannot find L"C:\\windows\\system32\\ml.exe"
mineiro@assembly:~/.wine/drive_c/masm32$


We received a message telling that wine does not find ml.exe program. Wine expects that it should be on "C:\\windows\\system32\\" folder and thats on linux is "HOMEFOLDER/.wine/drive_c/windows/system32". So, we can copy ml.exe from masm32/bin folder to 'windows' folder. We can as an option navigate to bin folder and 'wine ml' and will work fine. But instead of this let's correct things instead of copy.
Well, lets continue checking things. Type 'wine cmd' and a console mode will appear, now, all our knowledge of windows console is valid. Let's try invoke 'ml.exe' command. Hmm, same error, cannot find it. So, let's put on this session masm32 "bin,include,lib folders' on path environment variable so this way we can just type "ml.exe" on any folder and "console" will find it.


mineiro@assembly:~/.wine/drive_c/masm32$ wine cmd
Versão do CMD Wine 5.1.2600 (1.6.2)

C:\masm32>ml
Não é possível reconhecer 'ml' como um comando interno, externo ou arquivo de lotes. (like cannot recognize typed command as ...)

C:\masm32>set path
PATH=C:\windows\system32;C:\windows;C:\windows\system32\wbem
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH

C:\masm32>set path=%path%;c:\masm32\bin;c:\masm32\include;c:\masm32\library

C:\masm32>ml
Microsoft (R) Macro Assembler Version 6.14.8444
Copyright (C) Microsoft Corp 1981-1997.  All rights reserved.

usage: ML [ options ] filelist [ /link linkoptions]
Run "ML /help" or "ML /?" for more info

C:\masm32>


Now, things are working, and we can check if 'link' can be invoked too.
Type 'exit' to get out from console mode and let's return to linux terminal.

C:\masm32>exit
mineiro@assembly:~/.wine/drive_c/masm32$

Note that some linux wine configurations don't configure console mode inside same terminal mode. They open a window with console mode. Try this by typing "wine start".
Now, back again on terminal mode, type 'winecfg", we can configure windows behavoir. Note that you can insert real windows .dll files into this screen, so, if some program don't work properly inside wine you can overwrite 'faked' wine .dll's by using real windows dinamic linked libraries (.dll).
Under terminal, let's read about wine manual by typing "man wine".

An easy way to go is type "wine explorer" from terminal, so now we can just double click on programs.

I writed this way because you can configure programs/assemblers/IDE/... that do not have instalation like hjwasm,casm,sol_asm2,Radasm,... . So, you can walk by yourself and set environment variable to these programs.
A note is about wine configuration, sometimes you try to invoke a console assembler like "wineconsole ml64.exe" and will not work properly. If this happens, try too "wine ml64.exe".
Other note is about that wine supports win32 and win64 programs (64 bits windows mode only on linux x86-64 system).
A final note is about not all programs will work under wine. Radasm is one of this, it works fine but errors happens sometimes when you try to assemble a program from menu way (first time works fine, second time not and crashes). So, open 2 instances of wine, one to radasm and other to console, and from console you are able to assemble and link.
I have done a 'simple pipe edit example' program that's inside this board to solve this. So, you can create .bat files to asemble and link more quickly while using an editor and on a graphical way.
Remember a good habit but it's not really necessary, put windows programs inside .wine/drive_? folder to work properly.

Hope this helps you, if you have questions feel free to ask. I'm a normal user under linux, so I feel that I can't answer all things but we can shakehands and try.
I'd rather be this ambulant metamorphosis than to have that old opinion about everything

qWord

Quote from: Magnum on July 30, 2016, 01:12:20 PM
Does Masm compile under Wine in Linux ?
I know you have not much to do with programming overall and use this forum mainly as computer helpdesk, but you should know that MASM is an assembler and not a compiler...
MREAL macros - when you need floating point arithmetic while assembling!

Zen

Quote...MASM is an assembler,...
...and NOT a compiler,...

...I won't believe it until GOD tells me so,...:dazzled:
...Ha,...ha,...:bgrin:
My bizarre theory is that MASM is a HYBRID compiler/assembler. (...but, then, when no one is around,...it actually talks to me...:dazzled:)   

jj2007

Quote from: Zen on July 31, 2016, 04:36:23 AM...I won't believe it until GOD tells me so,...:dazzled:

Watch your step :badgrin:

anunitu

ZEN,it is I,your Father...you must learn to first walk on water,and then you may approach the black art of assembler.....(magic hand comes down out of the cloud and pokes ZEN in his funny place)


Magnum

Quote from: qWord on July 31, 2016, 12:41:40 AM
Quote from: Magnum on July 30, 2016, 01:12:20 PM
Does Masm compile under Wine in Linux ?
I know you have not much to do with programming overall and use this forum mainly as computer helpdesk, but you should know that MASM is an assembler and not a compiler...

You are unusually pleasant. :-)

When you get nice, I will know the end is coming.

The MASM package does both assemble and compile.

Take care,
                   Andy

Ubuntu-mate-18.04-desktop-amd64

http://www.goodnewsnetwork.org

Magnum

thanks mineiro.

It is installed and created my first program under Linux.

Linux can not correctly run certain code that contains FPU code or sounds.

Take care,
                   Andy

Ubuntu-mate-18.04-desktop-amd64

http://www.goodnewsnetwork.org

mineiro

Well, I can try some tests to fpu if you need, just post source. My machine don't have speakers.

But I think is better you create programs to linux, it's not hard like appears. If you need some start point just ask and I think I can try to guide you.
I'd rather be this ambulant metamorphosis than to have that old opinion about everything

cman

Quote
MASM is an assembler and not a compiler...

Couldn't one properly refer to MASM as a type of compiler ( a compiler is simply a software translator that converts one computer language to another , in a general sense ).  To me , an assembler is a type of compiler ( i know there are different translation requirements for HLL translators and assemblers ). Just a thought ...... :biggrin:

jj2007

See reply #5 - you are touching religious questions here :icon_mrgreen:

Zen

:bgrin:...QWORD has such a HIGH IQ that it's frightening,...:bgrin:
We should start a special, top-secret fund, so that we can surreptitiously FedEx him a Stratocaster and a couple of the better-looking Sports Illustrated Swimsuit Models,...:bgrin: