The MASM Forum

Miscellaneous => Irvine Book Questions. => Topic started by: charlay90 on January 05, 2014, 10:26:55 AM

Title: Assistance on proper installiton of masm32 on Windows 8, 64 bits
Post by: charlay90 on January 05, 2014, 10:26:55 AM
Hello
I downloaded masm32 from one of the links on the site,however the installion did not go as smoothly as i had hoped. I was getting errors during the installation, i assumed it might be a  case of missing libraries. Apparently the syntax i used for the actual programming was not recognised as a result, i was not able to create any object files or executable files.
The feedback being 'Volume in C has no label' ,am not sure what label is required. Could it be the Libraries or maybe i should create a seperate partition for the installation?i really need to get it working as soon as possible.. 
Title: Re: Assistance on proper installiton of masm32 on Windows 8, 64 bits
Post by: hutch-- on January 05, 2014, 11:47:46 AM
I can't help you with Win8 as I don't use it but it installs correctly on everything from Win2000 to Win7 64 bit. What you must make sure is that the OS or virus scanner does not interfere with the installation. The installer must have write access.
Title: Re: Assistance on proper installiton of masm32 on Windows 8, 64 bits
Post by: jj2007 on January 05, 2014, 03:48:18 PM
There are several related threads which may help you sort it out:
http://masm32.com/board/index.php?topic=1110.0
http://masm32.com/board/index.php?topic=1922.0
Title: Re: Assistance on proper installiton of masm32 on Windows 8, 64 bits
Post by: Vortex on January 05, 2014, 09:03:49 PM
The message displayed by the dir command :

QuoteVolume in C has no label

is not an issue. Simply, the C volume has no label.
Title: Re: Assistance on proper installation of masm32 on Windows 8, 64 bits
Post by: charlay90 on January 05, 2014, 10:06:03 PM
The links were particularly helpful. But am still not able to build any object files in my coded programmes, however the templates in masm are working perfectly. Is there a sample program i can run coded on Win8?
thanks and regards
Title: Re: Assistance on proper installation of masm32 on Windows 8, 64 bits
Post by: dedndave on January 05, 2014, 10:35:38 PM
Quote from: charlay90 on January 05, 2014, 10:06:03 PM
...am still not able to build any object files in my coded programmes...

can you show us a small example of your code ?
are any errors displayed ?
Title: Re: Assistance on proper installiton of masm32 on Windows 8, 64 bits
Post by: charlay90 on January 06, 2014, 12:05:46 AM
;a simple program
include \masm32\include\masm32rt.inc
DumpRegs PROTO
.data

    intA BYTE 15
    intB BYTE 20
    intC BYTE 10

.code
main PROC
    mov eax,0
    mov eax,intA
    add eax,intB
    sub eax,intC
   

    call DumpRegs
    exit

main ENDP
END main




am getting an error A2070 : no instruction operands.
Title: Re: Assistance on proper installiton of masm32 on Windows 8, 64 bits
Post by: charlay90 on January 06, 2014, 12:35:50 AM
made adjustments to the earlier program

include \masm32\include\masm32rt.inc
ExitProcess Proto , dwExitcode:DWORD
DumpRegs PROTO
.data

    intA DWORD 15
    intB DWORD 20
    intC DWORD 10

.code
main PROC
    MOV EAX,0
    MOV EAX,intA
    ADD EAX,intB
    SUB EAX,intC
   

    call DumpRegs
    INVOKE ExitProcess,0
 

main ENDP
END main



now this didnt build the obj file and the exe file...
am almost there please help
Title: Re: Assistance on proper installiton of masm32 on Windows 8, 64 bits
Post by: charlay90 on January 06, 2014, 12:58:01 AM
Is Irvine32.inc ok to use as a library
Title: Re: Assistance on proper installiton of masm32 on Windows 8, 64 bits
Post by: dedndave on January 06, 2014, 02:41:28 AM
let's start with a simple program to see if the masm32 installation works, then work on Irvine

build this as a CONSOLE app
    include \masm32\include\masm32rt.inc

    .data

intA DWORD 15
intB DWORD 20
intC DWORD 10

    .code

main    PROC

    MOV EAX,intA
    ADD EAX,intB
    SUB EAX,intC

    print  sstr$(eax),13,10

    inkey
    INVOKE ExitProcess,0

main    ENDP

    END     main
Title: Re: Assistance on proper installiton of masm32 on Windows 8, 64 bits
Post by: charlay90 on January 06, 2014, 05:41:19 AM
Phew!!!!worked like a charm!!!

thank you so much!!
the Irvine lib however seems to be absent from my system
Title: Re: Assistance on proper installiton of masm32 on Windows 8, 64 bits
Post by: dedndave on January 06, 2014, 05:51:43 AM
the irvine library is available online

http://kipirvine.com/asm/examples/index.htm (http://kipirvine.com/asm/examples/index.htm)

i think i use the VS2010 version - even though i do not use visual studio
Kip has designed his libraries around visual studio because they are available for free (express versions) and it saves him a lot of work

however, there are a couple conflicts with irvine and masm32
one that i can think of is that the masm32 package has a macro named "exit"
in the Irvine32 SmallWin.inc file, "exit" is an EQUate
exit EQU <INVOKE ExitProcess,0>
i would just comment out the EQUate and use the macro, as it's more flexible

some time ago, Jochen (jj2007) showed that Irvine32 and masm32 could be used together
use the forum search tool (maybe the advanced search tool)
Title: Re: Assistance on proper installiton of masm32 on Windows 8, 64 bits
Post by: charlay90 on January 06, 2014, 06:23:13 AM
wow thanks!!!it worked using the VS2010 version....
though i havent found the instruction for the screen output...
i did it use the first prog you put up....
however in Irvine the "sstr$" isn't included
Title: Re: Assistance on proper installiton of masm32 on Windows 8, 64 bits
Post by: charlay90 on January 06, 2014, 06:46:06 AM
how do i display the contents of the register EAX using Irvine.inc lib?
Title: Re: Assistance on proper installiton of masm32 on Windows 8, 64 bits
Post by: jj2007 on January 06, 2014, 09:38:26 AM
Quote from: charlay90 on January 06, 2014, 06:46:06 AM
how do i display the contents of the register EAX using Irvine.inc lib?

There is a generic function "DumpRegs" which displays, inter alia, eax.
You might install MasmBasic (http://masm32.com/board/index.php?topic=94.0). Once you see the editor with the help file loaded, go to the file menu, click "New Masm source", then click "Irvine32 example" about thirty lines down. The deb macro is what you really need, but if you insist on using genuine Irvine32, have a look at DumpRegs in that example ...
Title: Re: Assistance on proper installiton of masm32 on Windows 8, 64 bits
Post by: dedndave on January 06, 2014, 11:39:08 AM
i copied the file Irvine32.lib into the \masm32\lib folder
i copied the file Irvine32.inc into the \masm32\include folder

i modified 3 lines in the \masm32\include\Irvine32.inc file
it's pretty easy, because you just want to comment them out...
;Modified dedndave ;INCLUDE SmallWin.inc ; MS-Windows prototypes, structures, and constants
;Modified dedndave ;INCLUDE VirtualKeys.inc

;Modified dedndave ;MsgBox PROTO ; display popup message box

there is no need for SmallWin.inc or VirtualKeys.inc because the contents
of those files are covered in the masm32 Windows.inc file

MsgBox is the name of a masm32 macro that is likely more powerful than Kip's function

now, you should be able to use masm32 and Irvine32 together
be aware that any Irvine32 example program that uses MsgBox will need some slight modification
        INCLUDE     \masm32\include\masm32rt.inc
        INCLUDE     \masm32\include\Irvine32.inc
        INCLUDELIB  \masm32\lib\Irvine32.lib

        .DATA

intA DWORD 15
intB DWORD 20
intC DWORD 10

        .CODE

_main   PROC

        MOV     EAX,intA
        ADD     EAX,intB
        SUB     EAX,intC

        call    DumpRegs

        inkey
        exit

_main   ENDP

        END     _main


results...
  EAX=00000019  EBX=7FFDD000  ECX=0012FFB0  EDX=7C90E514
  ESI=00000000  EDI=00000012  EBP=0012FFF0  ESP=0012FFC4
  EIP=00401016  EFL=00000212  CF=0  SF=0  ZF=0  OF=0  AF=1  PF=0

Press any key to continue ...


EAX = 19h (15+20-10 = 25 decimal)
CF=SF=ZF=OF=0
Title: Re: Assistance on proper installiton of masm32 on Windows 8, 64 bits
Post by: jj2007 on January 06, 2014, 06:21:41 PM
Quote from: dedndave on January 06, 2014, 11:39:08 AM
now, you should be able to use masm32 and Irvine32 together
Good job, Dave :t
Title: Re: Assistance on proper installiton of masm32 on Windows 8, 64 bits
Post by: dedndave on January 07, 2014, 01:56:44 AM
thanks Jochen
didn't you already do this once ?   :redface:
Title: Re: Assistance on proper installiton of masm32 on Windows 8, 64 bits
Post by: jj2007 on January 07, 2014, 03:50:11 AM
Quote from: dedndave on January 07, 2014, 01:56:44 AM
thanks Jochen
didn't you already do this once ?   :redface:

See reply #14 - it's included in the MasmBasic package, test with \Masm32\MasmBasic\IrvineMB\IrvineMasm32.asc (and I actually got permission from Kip Irvine himself to redistribute it...)

But you did a better job because you really went to see what is needed and what is not ;-)
Title: Re: Assistance on proper installiton of masm32 on Windows 8, 64 bits
Post by: dedndave on January 07, 2014, 04:19:09 AM
actually - it could be improved upon
for example, Kip's macros are in Macros.inc, which looks like it could be added without modification
(copy it to \masm32\macros folder)

he has a few little odds and ends also, like...
TAB EQU 9

i should probably contact him and see if it's fair game to modify his content, etc   :t
Title: Re: Assistance on proper installiton of masm32 on Windows 8, 64 bits
Post by: jj2007 on January 07, 2014, 05:06:56 AM
Quote from: dedndave on January 07, 2014, 04:19:09 AM
for example, Kip's macros are in Macros.inc, which looks like it could be added without modification
See \Masm32\MasmBasic\IrvineMb\IrvineMacsMb.asm
Title: Re: Assistance on proper installiton of masm32 on Windows 8, 64 bits
Post by: charlay90 on January 07, 2014, 08:51:38 AM
 :greenclp:
thank you very much Dave and Jochen...i really apreciate the knowledge you have shared..it will go a long way...am able to use both libraries now :eusa_dance:
Title: Re: Assistance on proper installiton of masm32 on Windows 8, 64 bits
Post by: dedndave on January 07, 2014, 10:58:57 AM
you can also copy Irvine's Macro.inc into the masm32\macros folder
then.....
        INCLUDE     \masm32\include\masm32rt.inc
        INCLUDE     \masm32\include\Irvine32.inc
        INCLUDELIB  \masm32\lib\Irvine32.lib
        INCLUDE     \masm32\macros\Macros.inc


add that last line - from what i can see, Kip's macros all have names that don't conflict with anything else
Title: Re: Assistance on proper installiton of masm32 on Windows 8, 64 bits
Post by: Gunther on January 08, 2014, 07:12:39 AM
But one question: Is Kip's material and library worth the effort? I'm not sure.

Gunther
Title: Re: Assistance on proper installiton of masm32 on Windows 8, 64 bits
Post by: dedndave on January 08, 2014, 07:19:05 AM
that's a good point, Gunther

personally, i have no need of it
but, many new ASM programmers buy Kip's book, then turn to us with questions
there are solutions to the problem, other than using Kip's libraries

nonetheless, i have requested permission from Kip
haven't heard any word, yet
Title: Re: Assistance on proper installiton of masm32 on Windows 8, 64 bits
Post by: Gunther on January 08, 2014, 08:32:01 AM
Dave,

Quote from: dedndave on January 08, 2014, 07:19:05 AM
that's a good point, Gunther

personally, i have no need of it
but, many new ASM programmers buy Kip's book, then turn to us with questions
there are solutions to the problem, other than using Kip's libraries

nonetheless, i have requested permission from Kip
haven't heard any word, yet

by chance I've seen a copy of the book. I think the material is dispensable. There are other and better alternatives.

Gunther
Title: Re: Assistance on proper installiton of masm32 on Windows 8, 64 bits
Post by: dedndave on January 08, 2014, 09:56:03 PM
thing is, many universities have selected the book
so - students are compelled to use it - i believe the same is true of Randy Hyde's Art of Assembly
Title: Re: Assistance on proper installiton of masm32 on Windows 8, 64 bits
Post by: Gunther on January 09, 2014, 05:07:50 AM
Dave,

Quote from: dedndave on January 08, 2014, 09:56:03 PM
thing is, many universities have selected the book
so - students are compelled to use it - i believe the same is true of Randy Hyde's Art of Assembly

but Randy's book is a lot more respectable.

Gunther