News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

October edition of MASM32 current image

Started by hutch--, October 30, 2005, 09:42:33 AM

Previous topic - Next topic

hutch--

I have just uploaded the current image for the MASM32 project at the following URL.

www.website.masmforum.com/masm32/masm32ci.zip

There are later macros and documentation to match, some of the library modules have been further optimised and there is additional example code.

This is effectively the BETA for the next version of the MASM32 project so it would be appreciated if anyone who tracks down any problems with the current image reports it.

When you unzip the project, ENSURE you read the install.txt and install it in the right place then build the LIBRARIES otherwise it will not work.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

Jimg

It worked good on my machine.

There is two typos in the install.txt file-

The archive can be installed on ANY PARTITION that is local to a computer
but for the partition it is to be installed on, it MUST BE a directory
names MASM32 and it must be directly off the root directory. If you
       ^
  s.b.   named


The current image of MASM32 is effectively a BETA of the next version of
MASM32 and it has additional example code, later libraries, new macros and
most of the documentation to match the new functionality. The form is
subject to change and additiona until a later version is released.
                                ------------
    not sure what you meant to type here,  conditional??


Also, us old dogs know what directories are, but newbies refer to these as folders, I think.



I applaud your efforts to make it so that it can be on any drive.  Excluding all the .exe's and .dll's, there are still a few files that could possibly have the hard-coded c:\masm32 changed as follows:

"R:\masm32\com\bin\blddll.bat"
18: \masm32\bin\Link /DLL /SUBSYSTEM:WINDOWS /DEF:%1.def /LIBPATH:c:\masm32\lib %1.obj rsrc.obj
24: \masm32\bin\Link /DLL /SUBSYSTEM:WINDOWS /DEF:%1.def /LIBPATH:c:\masm32\lib %1.obj

"R:\masm32\com\bin\bldocx.bat"
18: \masm32\bin\Link /out:%1.ocx /DLL /SUBSYSTEM:WINDOWS /DEF:%1.def /LIBPATH:c:\masm32\lib %1.obj rsrc.obj
24: \masm32\bin\Link /out:%1.ocx /DLL /SUBSYSTEM:WINDOWS /DEF:%1.def /LIBPATH:c:\masm32\lib %1.obj

"R:\masm32\com\docs\adapting quick editor for com.doc"
32:           /LIBPATH:c:\masm32\lib %1.obj rsrc.obj
36: Link /DLL /SUBSYSTEM:WINDOWS /DEF:%1.def           /LIBPATH:c:\masm32\lib %1.obj
56:           /LIBPATH:c:\masm32\lib %1.obj rsrc.obj
60: Link /DLL /SUBSYSTEM:WINDOWS /DEF:%1.def /OUT:%1.ocx           /LIBPATH:c:\masm32\lib %1.obj

"R:\masm32\com\docs\creating a com object in asm.doc"
220: (Default) "C:\MASM32\MYCOM\MYCOM.DLL"
230: (Default) " C:\masm32\COM\MyCom \MYCOM.DLL"
234: (Default) "C:\masm32\COM\MyCom"
236: One key value here is variable, that is the path and name of the server dll itself. On my system I placed it at "C:\MASM32\COM\MYCOM\MYCOM.DLL" This was detected when I registered the component, as one other function of DllRegisterServer is to discover where the dll itself is stored by invoking GetModuleFileName.

"R:\masm32\com\docs\mycom2 and the colib.doc"
279: #include <c:\masm32\include\colib\coserver.rc>
289: IDD_RGS_SCRIPT  REGISTRY    C:\masm32\MyCom2\MyCom2.rgs

"R:\masm32\com\examples\mycom2\make.bat"
18: \masm32\bin\Link /DLL /SUBSYSTEM:WINDOWS /DEF:MyCom2.def /LIBPATH:c:\masm32\lib MyCom2.obj rsrc.obj
24: \masm32\bin\Link /DLL /SUBSYSTEM:WINDOWS /DEF:MyCom2.def /LIBPATH:c:\masm32\lib MyCom2.obj

"R:\masm32\oop\csprite\example 2 showing inheritance\rsrc.obj"
2:   H              @  À   /         (C:\masm32\JProject2\Hutch\inher\rsrc.obj#    Microsoft CVTRES 5.00.1735.1                  (  €   X  €   €  €               È      €É   ¸  €Ê   Ð  €,  è  €                    €    €   0 €               d   H €e   ` €                    x                      ˆ                      ˜                      ¨                      ¸                      È                      Ø                      è                      ø      0              x              ,,              °               è              (              (              "                          ¸      È      è         Ø 

"R:\masm32\vkdebug\example\demo1\make.bat"
1: \masm32\bin\ml.exe /c /coff C:\masm32\VKDEBUG\EXAMPLE\DEMO1\dbdemo.asm > out.txt
2: \masm32\bin\link.exe /SUBSYSTEM:WINDOWS C:\masm32\VKDEBUG\EXAMPLE\DEMO1\dbdemo.obj >> out.txt


Plus all the "R:\masm32\icztutes\   files


PBrennick

Jimg,
additiona should be additions, the a and s are next to each other.

P
The GeneSys Project is available from:
The Repository or My crappy website

rags

I am getting a "send/dont send", on the test install program, when I try to run it, after compiling it.
But , I have successfully compiled and ran a small algo testbed, with the new image, to see if I get the same
results with a different program.

Rags
God made Man, but the monkey applied the glue -DEVO

PBrennick

That does not sound good.  I did not run into that problem on XP, no service packs.

Paul
The GeneSys Project is available from:
The Repository or My crappy website

Jimg

My-  You have been very busy Hutch.  I like the new help files but wonder why you deleted some of the topics (such as register preservation)?  Also, perhaps rc.hlp should be in the help folder rather than the bin folder?

Mincho Georgiev

Very Nice! I like the help files and the new sample codes. Maybe in some future edition you can post a MASM Forum Offline Version (compiled html), what do you think about that,Hutch ?

hutch--

rags,

I don't understand what has happened. Is there a problem with the "testinst.asm" file that is built at the end of the makelibs.bat batch file ? I have not connected the  "send/dont send" error message.

Jim,

Thanks for finding those, I have never chased through Ernie Murphy's stuf so its a task that needs to be done. I caught one of the typos after I had posted the beta.  :bg
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

rags

Hutch,
I am running winxp pro sp2.
To install the package I renamed my current masm directory to masm32_bak, and made a new masm32 directory to install to,
Both are in the root, ie; D:\masm32, and D:\masm32_bak.

At the end of the install  the "testinst.asm" is built, but when the makelibs.bat file calls the testinst program,
I believe it is dr. watson that comes up with and error, and the send/don't send options.

I then deleted the testinst.obj and testinst.exe files and rebuilt the file with the makeit.bat. in the testinst directory.
I got the same results when I ran the .exe.

To see if I could compile and build other programs correctly, I created a small algo test bed
and a bare console app,  using the templates.
They both built and ran ok, with no errors.

I cant figure it out.

Rags

God made Man, but the monkey applied the glue -DEVO

Vortex

Hi Hutch,

Thanks for the package, it works fine on my Win Xp Home Sp2 :U

Can you update Ernst Murphy's image library? Here is the latest version ( I hope I was able to fix all the bugs :) )

http://www.masmforum.com/simple/index.php?topic=937.msg23841#msg23841

Also, can you put the latest versions of Polink and Polib? They come with Pelle's package V4.00

ramguru

RGB macro is wrong!

      RGB MACRO red, green, blue
        xor eax, eax
        mov ah, blue    ; blue
        mov al, green   ; green
        rol eax, 16     ;SHOULD BE 8
        mov al, red     ; red
      ENDM

It was pain in the ass to figure out what I'm doing wrong... :lol

hutch--

Thanks,

Thats why I post a beta these days. Here is the verification.


; «««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««
    include \masm32\include\masm32rt.inc
; «««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««

comment * -----------------------------------------------------
                        Build this  template with
                       "CONSOLE ASSEMBLE AND LINK"
        ----------------------------------------------------- *

      RGBx MACRO red, green, blue
        xor eax, eax
        mov ah, blue    ; blue
        mov al, green   ; green
        rol eax, 8
        mov al, red     ; red
      ENDM

    .code

start:
   
; «««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««

    call main
    inkey
    exit

; «««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««

main proc

    RGBx 0Ah,0Bh,0Ch

    print hex$(eax),13,10

    ret

main endp

; «««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««

end start
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

caraveiro

Just a matter of wish

in Dialogs.inc

Why dont' remove  WS_TABSTOP flag in DlgGroup ?
Don't know about others, but I always use a Group control as "NOT TABSTOPpable" ;)

.
.
.
    ; ----------
    ; group box
    ; ----------
      DlgGroup MACRO quoted_caption,tx,ty,wd,ht,ctlID
        align_4 edi
        mov DWORD PTR [edi+0],  WS_VISIBLE or WS_CHILD or BS_GROUPBOX ;or WS_TABSTOP
        mov WORD  PTR [edi+8],  tx
        mov WORD  PTR [edi+10], ty
        mov WORD  PTR [edi+12], wd
        mov WORD  PTR [edi+14], ht
        mov WORD  PTR [edi+16], ctlID
        mov WORD  PTR [edi+18], 0FFFFh  ;; class array
        mov WORD  PTR [edi+20], 0080h   ;; button
        add edi, 22
        ustring quoted_caption
        align_2 edi
        add edi, 2
      ENDM


in Bffolder.inc

Usually I need to select a Network Resource, so I modify BrowseForFolder to optionally add some flags


BrowseForFolderA proc hParent:DWORD, lpBuffer:DWORD, lpTitle:DWORD, lpString:DWORD, uFlags:DWORD

  ; ------------------------------------------------------
  ; hParent  = parent window handle
  ; lpBuffer = 260 byte buffer to receive path
  ; lpTitle  = zero terminated string with dialog title
  ; lpString = zero terminated string for secondary text
  ; ------------------------------------------------------

    LOCAL lpIDList :DWORD
    LOCAL bi  :BROWSEINFO

    mov eax,                hParent         ; parent handle
    mov bi.hwndOwner,       eax
    mov bi.pidlRoot,        0
    mov bi.pszDisplayName,  0
    mov eax,                lpString        ; secondary text
    mov bi.lpszTitle,       eax
    mov eax,                uFlags
    mov bi.ulFlags,         eax ;BIF_RETURNONLYFSDIRS OR BIF_RETURNFSANCESTORS
    mov bi.lpfn,            offset cbBrowseA
    mov eax,                lpTitle         ; main title
    mov bi.lParam,          eax
    mov bi.iImage,          0
    ;BIF_DONTGOBELOWDOMAIN
    ;BIF_RETURNFSANCESTORS
    ;BIF_RETURNONLYFSDIRS
    ;BIF_BROWSEFORCOMPUTER
    ;BIF_BROWSEFORPRINTER
    ;BIF_DONTGOBELOWDOMAIN
    ;BIF_RETURNFSANCESTORS
    ;BIF_RETURNONLYFSDIRS
    ;BIF_STATUSTEXT
    Invoke SHBrowseForFolder,ADDR bi
    mov lpIDList, eax

    .if lpIDList == 0
      mov eax, 0      ; if CANCEL return FALSE
      push eax
      jmp @F
    .else
      Invoke SHGetPathFromIDList,lpIDList,lpBuffer
      mov eax, 1        ; if OK, return TRUE
      push eax
      jmp @F
    .endif

    @@:

    Invoke CoTaskMemFree,lpIDList

    pop eax
    ret

BrowseForFolderA endp


Best Regards
"knowledge is now free at last, everything should be free from now on, enjoy knowledge and life and work for everybody else"
+ORC
http://www.fravia.com

Jibz

Wouldn't it be possible to use some macro magic to check if the three values given to RGBx were numbers, and if so compute the result and do a single 'mov eax, value'?

zooba

Quote from: Jibz on November 15, 2005, 08:19:43 PM
Wouldn't it be possible to use some macro magic to check if the three values given to RGBx were numbers, and if so compute the result and do a single 'mov eax, value'?

Here you go:  :U

RGB MACRO red, green, blue
  IF ((OPATTR red) AND (OPATTR green) AND (OPATTR blue) AND 00000100b)
    mov     eax, (red OR (green SHL 8) OR (blue SHL 16))
  ELSE
    xor     eax, eax
    mov     ah, blue
    mov     al, green
    rol     eax, 8
    mov     al, red
  ENDIF
ENDM