Recent Posts

Pages: 1 [2] 3 4 ... 10
11
Irvine Book Questions. / Re: help please: masm32 input dialog box
« Last post by AW on September 18, 2018, 05:20:24 PM »
It will not be easy what you want from a console application. Try a windows application.
12
ASMC Development / Re: Having a look to asmc
« Last post by nidud on September 18, 2018, 07:13:06 AM »
Some more updates.

I added the two directories to install.bat.

The latest version of LINKW do not need the PATH statement in the batch file so only the root directory (ASMCDIR) needs to be set (or remove it by edit the linkw.lnk file).

However, the shell (DZ) holds the environment for the current source so it's recommended to use this instead of CMD. Note also that the environment is local (mistake I did when testing) to the source tree. If you copy one instance of DZ.EXE to \masm32\bin and execute it, use Ctrl-K, Ctrl-X, and Ctrl-O to emulate CMD, and issue the following commands:

D:\masm32\bin>PATH
PATH=D:\masm32\bin;C:\Windows;...

D:\masm32\bin>echo %INCLUDE%
D:\masm32\include

D:\masm32\bin>echo %ASMCDIR%
D:\masm32


So it adapts to the directory where it is located. The default setting is as follows (dz.ini):

[Environ]
0=INCLUDE=%ASMCDIR%\include

[Path]
0=%DZ%
1=%PATH%

13
The Workshop / Re: Determinant of any real4 matrix NxN
« Last post by Siekmanski on September 18, 2018, 05:23:14 AM »
Hi Rui,

Here are the results.
14
The Workshop / Determinant of any real4 matrix NxN
« Last post by RuiLoureiro on September 18, 2018, 04:45:10 AM »
Hi all,
       Here we have 2 SSE versions to compute the determinant of any square
       matrix MxM and 1 FPU version. We have also some versions SSE and FPU
       that use the Laplace method.

Quote
      VERSION 1,2:     
                PROCEDURE:  Laplace3x3_v1SSE
                                      Laplace3x3_v2SSE
                                      Laplace4x4_v2SSE                           
               
                FILE:       Laplace3x3_v1SSE.inc
                               Laplace3x3_v2SSE.inc
                               Laplace4x4_v2SSE.inc                           
      VERSION 3:     
                PROCEDURE:  GaussMethod_v3SSE
               
                FILE:             GaussMethod_v3SSE.inc

                MACROS:     CopyMatrixXtoW_v3SSE.mac
                                   CleanTriangularInfW_v3SSE.mac
                                   TryTheBestPivot_v3SSE.mac
               
      VERSION 2:     
                PROCEDURE:  GaussMethod_v2SSE
               
                FILE:             GaussMethod_v2SSE.inc

                MACROS:     CopyMatrixXtoW_v2SSE.mac
                                   CleanTriangularInfW_v2SSE.mac
                                   TryTheBestPivot_v2SSE.mac

      VERSION FPU:     
                PROCEDURES: GaussMethod_v1FPU

                                    Laplace2x2_v1FPU
                                    Laplace3x3_v1FPU
                                    Laplace4x4_v1FPU
                                    Laplace5x5_v1FPU
                                    Laplace6x6_v1FPU
               
                FILES:          GaussMethod_v1FPU.inc
               
                                    Laplace2x2_v1FPU.inc
                                    Laplace3x3_v1FPU.inc
                                    Laplace4x4_v1FPU.inc
                                    Laplace5x5_v1FPU.inc
                                    Laplace6x6_v1FPU.inc

    DOCUMENTATION:          TEXT_ABOUT_DETERMINANT_SSE_REAL4.txt

    MATRIX DEFINITION:      We must define any matrixX as this

                            ALIGN 16
                            dd ?
                            dd ?
                            dd M   ; <<--- number of columns
                            dd M   ; <<--- number of lines
              matrixX  dd (M*M) dup (?)         
   
    Please test it in your CPU (i5/i7/AMD).
    Use ExecuteTestDeterminant_v2.bat and post the file ResultsTestDeterminant_v2.txt.

Good luck
RuiLoureiro

Some results:
Quote
Siekmanski:
***** Time table - LoopCount =100 000 *****

Intel(R) Core(TM) i7-4930K CPU @ 3.40GHz (SSE4)

   3  cycles, Laplace2x2_v1FPU,  MatrixX2x2
   9  cycles, GaussMethod_v3SSE, MatrixX2x2    <<<-- use Laplace
  10  cycles, GaussMethod_v2SSE, MatrixX2x2
223  cycles, GaussMethod_v1FPU, MatrixX2x2
 
  16  cycles, Laplace3x3_v1FPU,  MatrixAX3x3
  17  cycles, GaussMethod_v3SSE, MatrixAX3x3   <<<-- use Laplace
  19  cycles, Laplace3x3_v1SSE,  MatrixAX3x3
  19  cycles, GaussMethod_v2SSE, MatrixAX3x3
316  cycles, GaussMethod_v1FPU, MatrixAX3x3
 
  18  cycles, GaussMethod_v3SSE, MatrixX3x3  <<<-- use Laplace
  19  cycles, GaussMethod_v2SSE, MatrixX3x3
  19  cycles, Laplace3x3_v1FPU,  MatrixX3x3
285  cycles, GaussMethod_v1FPU, MatrixX3x3

  63  cycles, Laplace4x4_v2SSE,  MatrixC4x4
  69  cycles, Laplace4x4_v1FPU,  MatrixC4x4
201  cycles, GaussMethod_v2SSE, MatrixC4x4
201  cycles, GaussMethod_v3SSE, MatrixC4x4
480  cycles, GaussMethod_v1FPU, MatrixC4x4

250  cycles, GaussMethod_v3SSE, MatrixX5x5
260  cycles, GaussMethod_v2SSE, MatrixX5x5
593  cycles, GaussMethod_v1FPU, MatrixX5x5
646  cycles, Laplace5x5_v1FPU,  MatrixX5x5

385  cycles, GaussMethod_v2SSE, MatrixX6x6
576  cycles, GaussMethod_v3SSE, MatrixX6x6
833  cycles, GaussMethod_v1FPU, MatrixX6x6
4552  cycles, Laplace6x6_v1FPU,  MatrixX6x6

495  cycles, GaussMethod_v3SSE, MatrixX7x7
518  cycles, GaussMethod_v2SSE, MatrixX7x7
1103  cycles, GaussMethod_v1FPU, MatrixX7x7

613  cycles, GaussMethod_v3SSE, MatrixA8x8
643  cycles, GaussMethod_v2SSE, MatrixA8x8
1465  cycles, GaussMethod_v1FPU, MatrixA8x8

789  cycles, GaussMethod_v3SSE, MatrixX9x9
845  cycles, GaussMethod_v2SSE, MatrixX9x9
1888  cycles, GaussMethod_v1FPU, MatrixX9x9

994  cycles, GaussMethod_v3SSE, MatrixX10x10
1066  cycles, GaussMethod_v2SSE, MatrixX10x10
2384  cycles, GaussMethod_v1FPU, MatrixX10x10

1236  cycles, GaussMethod_v3SSE, MatrixX11x11
1299  cycles, GaussMethod_v2SSE, MatrixX11x11
3051  cycles, GaussMethod_v1FPU, MatrixX11x11
15
ASMC Development / Re: Having a look to asmc
« Last post by Vortex on September 18, 2018, 04:29:43 AM »
Hello nidud,

Thanks, building the missing libraries solved the problem.

This should probably be added to the install.bat file thought.

Exactly.

Here is my report :
Code: [Select]
C:\asmc-master\test>path
PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\obw\Mingw32\bin;
C:\Program Files\OpenVPN\bin;

C:\asmc-master\test>Build.bat

C:\asmc-master\test>SET PATH=\asmc-master\bin

C:\asmc-master\test>SET ASMCDIR=\asmc-master

C:\asmc-master\test>asmc64 -I\asmc-master\include test.asm
Asmc Macro Assembler (x64) Version 2.28.08
Copyright (C) The Asmc Contributors. All Rights Reserved.

 Assembling: test.asm

C:\asmc-master\test>linkw sys con_64 file test

C:\asmc-master\test>path
PATH=\asmc-master\bin

C:\asmc-master\test>notepad
'notepad' is not recognized as an internal or external command,
operable program or batch file.

There is only one problem, the environment variable %PATH% should preserve the original value followed by the path to asmc.

Code: [Select]
PATH = %PATH%;\asmc-master\bin
As you can see in my report, I cannot execute notepad or other tools since %PATH% points only the asmc installation.

nidud, thanks for the update. Keep up the nice work :t
16
ASMC Development / Re: Having a look to asmc
« Last post by nidud on September 18, 2018, 04:17:12 AM »
Well, the import + libc libraries appear to exist (no missing printf) but directxmath.lib and uuid.lib is missing. Try building the missing libraries and remove the includelib stuff from the source. The include files take care of all that.

To build the missing libraries using DZ, go to ./source/directx and hit enter on the makefile. Same with uuid. This should probably be added to the install.bat file thought.
17
ASMC Development / Re: Having a look to asmc
« Last post by Vortex on September 18, 2018, 03:23:29 AM »
Hi nidud,

Thanks for the update. Here is my report. I received the similar error messages both with the batch file and the makefile executed by DosZip :

Code: [Select]
D:\asmc-master\test>path
PATH=C:\Program Files (x86)\Sent;C:\app\Administrator\product\11.2.0\client_1;C:
\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\Window
sPowerShell\v1.0\

D:\asmc-master\test>Build.bat

D:\asmc-master\test>SET PATH=\asmc-master\bin

D:\asmc-master\test>SET ASMCDIR=\asmc-master

D:\asmc-master\test>asmc64 -I\asmc-master\include test.asm
Asmc Macro Assembler (x64) Version 2.28.08
Copyright (C) The Asmc Contributors. All Rights Reserved.

 Assembling: test.asm

D:\asmc-master\test>linkw sys con_64 file test
Warning! W1008: cannot open directxmath.lib : No such file or directory
Warning! W1008: cannot open uuid.lib : No such file or directory
Error! E2028: XMConvertVectorFloatToInt@@24 is an undefined reference
file test.obj(test.asm): undefined symbol XMConvertVectorFloatToInt@@24

D:\asmc-master\test>path
PATH=\asmc-master\bin

Checking the environment variable PATH, I see that it's modified to reflect only the path of asmc. I should be like the following
PATH = %PATH%;\asmc-master\bin

DosZip :

Code: [Select]
Asmc Make Version 1.6 Copyright (c) 2017 GNU General Public License

test.exe:
        asmc64 test.asm
        linkw sys con_64 file test
        test.exe
        pause
Asmc Macro Assembler (x64) Version 2.28.08
Copyright (C) The Asmc Contributors. All Rights Reserved.

 Assembling: test.asm
Warning! W1008: cannot open directxmath.lib : No such file or directory
Warning! W1008: cannot open uuid.lib : No such file or directory
Error! E2028: XMConvertVectorFloatToInt@@24 is an undefined reference
file test.obj(test.asm): undefined symbol XMConvertVectorFloatToInt@@24

OS : Windows 7 Sp1 64-bit Professional with the latest updates
Path of asmc : D:\asmc-master
Location of the test project : D:\asmc-master\test
18
Thanks for the reply hutch-- ,

I will start with small small programs in MASM32 and learn slowly rather than jumping to crack me's like you said

I have to start preparing notes
19
The Laboratory / Randomise stack test piece.
« Last post by hutch-- on September 18, 2018, 03:03:30 AM »
This should add misery to someone who wants to play games with someone else's binary.  :biggrin:
The batch file assumes the name is subrsp.exe .

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

    include \masm32\include64\masm64rt.inc

    .code

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

 entry_point proc

    call get_unique_seed        ; get a random seed
    rcall seed_rrand, rax       ; set the random seed
    rcall rrand,2,32            ; random number within range

    shl rax, 5                  ; mul random number by 32
    sub rsp, rax                ; subtract result from rsp
    call main                   ; start the app

 entry_point endp

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

 main proc

    conout str$(rsp)," address of rsp",lf,lf

    .exit

 main endp

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

    end

 comment #

    The batch file to test stack address in each iteration

    @echo off
    subrsp
    subrsp
    subrsp
    subrsp
    subrsp
    subrsp
    subrsp
    subrsp
    subrsp
    subrsp
    subrsp
    subrsp
    subrsp
    subrsp
    subrsp
    subrsp

    #
20
The Workshop / Re: Multiply two QWORDs
« Last post by AW on September 18, 2018, 02:24:31 AM »
A little convoluted way but it works.

Code: [Select]
val1=0x1122334455667788
val2=0x99aabbccddeeff00
val1*val2=0xa48ddeb93f93d70479983e499807800
Pages: 1 [2] 3 4 ... 10