Recent Posts

Pages: [1] 2 3 ... 10
1
16 bit DOS Programming / Re: small stub to load and run 64-bit PE binaries in DOS
« Last post by _japheth on Today at 10:08:31 AM »
> What happened to your old avatar ?

nickname japheth was already used in Github ( it was most likely me signing up 10 years ago and then forgetting about this ), so I used "Baron von Riedesel", which is also a very nice name. You may shorten it to "Baron", if you like -  a reference to "Huckleberry Finn" with the "Duke" and the "King" .
2
The Orphanage / Re: Tomorrow is my birthday
« Last post by Mikl__ on Today at 09:35:53 AM »
In the beginning the bear did not want to enter the room, because he was embarrassed by the guests who played the balalaika and drank vodka. Then the bear cub got used to us a little and began to beg the guests for a treat him. When the bear was brought to the table to to extinguish the candles on the cake, instead of blowing out the candles, he sucked in air together with the candles and cream. It was very fun for us and the bear cub
3
The Laboratory / Re: Simple floating point macros.
« Last post by RuiLoureiro on Today at 08:48:22 AM »
Looks good Marinus, I confess being a maths illiterate that I don't know how reciprocals work.

fld1            ; st(1)= 1.0
fld  num     ; st(0) = num
fdivp          ; st(0) = 1.0/num

The reciprocal of a fraction 4/5 is 5/4 ( n/m <-> m/n)
The reciprocal of x^n  is x^-n
and the x^-n is x^n.
What is the reciprocal of 1/(1/2) ? is 1/2.
4
The Laboratory / Re: Simple floating point macros.
« Last post by Siekmanski on Today at 08:44:29 AM »
A reciprocal is 1/value

This is useful if you want to divide by a fixed number, say 100.0
Then the reciprocal is 1.0/100.0 = 0.01

Instead of dividing by 100.0 you multiply with 0.01
5
The Laboratory / Re: Simple floating point macros.
« Last post by hutch-- on Today at 08:34:39 AM »
Looks good Marinus, I confess being a maths illiterate that I don't know how reciprocals work.
6
The Workshop / Re: Multiply matrix MxM by MxM real4 any size
« Last post by Siekmanski on Today at 08:12:09 AM »
The results.
7
Miscellaneous Projects / Re: How do I convert a masm32 windows application to masm64
« Last post by JLC on Today at 08:01:07 AM »
Never mind. I found the gdi32.inc file and now I am all set. I tried the createfont method last year and ran into errors and never followed through to correct. I wish I would have as it would have prevented a lot of frustration trying to get the look I needed with the application. Getting old and blind.

Thanks again.
8
The Workshop / Multiply matrix MxM by MxM real4 any size
« Last post by RuiLoureiro on Today at 07:58:19 AM »
Hi all
Here we have 1 version to multiply any matrix MxM by
the same matrix MxM using SSE instructions and 1 that uses FPU.
This is a particular case of MxN * NxK already posted here.
If we need to multiply a matrix by itself this is the better
solution than to use the general case.

Quote
VERSION 1:
PROCEDURE:  MultiplyMxM_MxM_v1SSE

FILE:       multiplySSEMxM_MxM_v1.inc

MACROS:     multiplyMxN_MxK_v2A.mac
multiplyMxN_MxK_v2B.mac
basicmulMxN_MxK_v1.mac

VERSION FPU:
PROCEDURE:  MultiplyMxM_MxM_v1FPU

FILE:       multiplyFPUMxM_MxM_v1.inc

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 (?)

If we want to alloc memory, see the file AllocMemory.inc

VERIFY SSE PROCEDURE:   Use multiplyMxM_MxM_v1.exe/asm

Use ExecuteTestmultiplyMxM_MxM_SSEv1.bat and
post the file ResultsmultiplyMxM_MxM_v1.txt.

Good luck
RuiLoureiro

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

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

52  cycles, MultiplyMxM_MxM_v1SSE,  MatrixX4x4   * MatrixX4x4
381  cycles, MultiplyMxM_MxM_v1FPU,  MatrixX4x4   * MatrixX4x4

258  cycles, MultiplyMxM_MxM_v1SSE,  MatrixX8x8   * MatrixX8x8
1902  cycles, MultiplyMxM_MxM_v1FPU,  MatrixX8x8   * MatrixX8x8

763  cycles, MultiplyMxM_MxM_v1SSE,  MatrixX10x10 * MatrixX10x10
4157  cycles, MultiplyMxM_MxM_v1FPU,  MatrixX10x10 * MatrixX10x10

768  cycles, MultiplyMxM_MxM_v1SSE,  MatrixX12x12 * MatrixX12x12
5797  cycles, MultiplyMxM_MxM_v1FPU,  MatrixX12x12 * MatrixX12x12

991  cycles, MultiplyMxM_MxM_v1SSE,  MatrixX11x11 * MatrixX11x11
4606  cycles, MultiplyMxM_MxM_v1FPU,  MatrixX11x11 * MatrixX11x11

1371  cycles, MultiplyMxM_MxM_v1SSE,  MatrixX13x13 * MatrixX13x13
7289  cycles, MultiplyMxM_MxM_v1FPU,  MatrixX13x13 * MatrixX13x13

1895  cycles, MultiplyMxM_MxM_v1SSE,  MatrixX16x16 * MatrixX16x16
14628  cycles, MultiplyMxM_MxM_v1FPU,  MatrixX16x16 * MatrixX16x16

2217  cycles, MultiplyMxM_MxM_v1SSE,  MatrixX15x15 * MatrixX15x15
11565  cycles, MultiplyMxM_MxM_v1FPU,  MatrixX15x15 * MatrixX15x15

2412  cycles, MultiplyMxM_MxM_v1SSE,  MatrixX14x14 * MatrixX14x14
9141  cycles, MultiplyMxM_MxM_v1FPU,  MatrixX14x14 * MatrixX14x14

3080  cycles, MultiplyMxM_MxM_v1SSE,  MatrixX17x17 * MatrixX17x17
16757  cycles, MultiplyMxM_MxM_v1FPU,  MatrixX17x17 * MatrixX17x17

3650  cycles, MultiplyMxM_MxM_v1SSE,  MatrixX20x20 * MatrixX20x20
26873  cycles, MultiplyMxM_MxM_v1FPU,  MatrixX20x20 * MatrixX20x20

3823  cycles, MultiplyMxM_MxM_v1SSE,  MatrixX18x18 * MatrixX18x18
20278  cycles, MultiplyMxM_MxM_v1FPU,  MatrixX18x18 * MatrixX18x18

4174  cycles, MultiplyMxM_MxM_v1SSE,  MatrixX19x19 * MatrixX19x19
23342  cycles, MultiplyMxM_MxM_v1FPU,  MatrixX19x19 * MatrixX19x19

14668  cycles, MultiplyMxM_MxM_v1SSE,  MatrixX32x32 * MatrixX32x32
108478  cycles, MultiplyMxM_MxM_v1FPU,  MatrixX32x32 * MatrixX32x32
9
The Campus / Re: just question. on USB programming.
« Last post by Siekmanski on Today at 07:47:14 AM »
Look for libusb

https://libusb.info/
https://sourceforge.net/p/libusb-win32/wiki/Home/
https://sourceforge.net/projects/libusb-win32/

I once made an attempt to control a SDR dongle via usb, never finished it.
But got the USB part working.
10
The Laboratory / Re: Simple floating point macros.
« Last post by Siekmanski on Today at 07:11:01 AM »

Code: [Select]
`fpercent MACRO num,pcnt     ;; Get Percentage of numberlocal F8rcp_100    .const    F8rcp_100 real8 0.01    .code    fld     pcnt            ;; load required percentage    fld     num             ;; load the number    fmul    F8rcp_100     fmulp                   ;; multiple by percentage    EXITM   <st(0)>    ENDM`
Pages: [1] 2 3 ... 10