News:

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

Main Menu

Transpose a matrix

Started by jj2007, April 04, 2017, 09:43:51 AM

Previous topic - Next topic

guga

Coding in Assembly requires a mix of:
80% of brain, passion, intuition, creativity
10% of programming skills
10% of alcoholic levels in your blood.

My Code Sites:
http://rosasm.freeforums.org
http://winasm.tripod.com

jj2007

Quote from: Siekmanski on April 05, 2017, 02:48:52 AMIt's a mystery to me.  :(

For me, too. Did you try different assemblers and/or linkers? I tried a number of options, none produced a non-zero result.

Siekmanski

The commandline options used,

@echo off

if exist "Align_64.obj" del "Align_64.obj"
\masm32\bin\ml.exe /c /coff "Align_64.Asm"
if errorlevel 1 goto Einde

if exist "Align_64.exe" del "Align_64.exe"
\masm32\bin\Link.exe /SUBSYSTEM:CONSOLE /OPT:NOREF /OUT:Align_64.exe Align_64.obj
if errorlevel 1 goto Einde

Align_64.exe

:Einde


Microsoft (R) Macro Assembler Version 12.00.21005.1
Copyright (C) Microsoft Corporation.  All rights reserved.

Assembling: Align_64.Asm
## current=209      nops added: 47      sum=256      (line 60)
Microsoft (R) Incremental Linker Version 5.12.8078
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.

Align_64 test.

Align4  00
Align16 00
Align64 32

Press any key to continue...


Same result with Polink.exe
Creative coders use backward thinking techniques as a strategy.

nidud

#18
deleted

Siekmanski

Stripped the assembler and the linker from the vs2015.com_enu.iso
Still the same result.....

Microsoft (R) Macro Assembler Version 14.00.23026.0
Copyright (C) Microsoft Corporation.  All rights reserved.

Assembling: Align_64.Asm
## current=218      nops added: 38      sum=256      (line 60)
Microsoft (R) Incremental Linker Version 14.00.23026.0
Copyright (C) Microsoft Corporation.  All rights reserved.

Align_64 test.

Align4  00
Align16 00
Align64 32

Press any key to continue...


commandline options used,

@echo off

if exist "Align_64.obj" del "Align_64.obj"
d:\RadASM2212\Masm2015\ml.exe /c /coff "Align_64.Asm"
if errorlevel 1 goto Einde

if exist "Align_64.exe" del "Align_64.exe"
d:\RadASM2212\Masm2015\link.exe /SUBSYSTEM:CONSOLE /OPT:NOREF /OUT:Align_64.exe Align_64.obj
if errorlevel 1 goto Einde

Align_64.exe

:Einde
Creative coders use backward thinking techniques as a strategy.

jj2007

Quote from: Siekmanski on April 05, 2017, 04:51:31 AM
The commandline options used
...
Same result with Polink.exe

I can produce the error with /debug and the M$ linkers (6.14 and 9.0), but not with polink.

Siekmanski

I'm clueless.
Maybe it's how my CPU handles things......

Entry point is 401120h (32 bit aligned)


Creative coders use backward thinking techniques as a strategy.

jj2007

Quote from: Siekmanski on April 05, 2017, 07:12:00 AM
I'm clueless.
Maybe it's how my CPU handles things......

No, your CPU is not the culprit. I can produce the same error. It's the linker... all linkers, actually :(
The macro adds the right number of nops afaics.

Siekmanski

Which linker do you use ?
Creative coders use backward thinking techniques as a strategy.

jj2007

Mostly polink, then ML link 5.12 or 10.0
I've given up on other LINK versions, it's dll hell:
LINKV14 : fatal error LNK2023: bad DLL or entry point 'msobj140.dll'
etc etc

I just don't have the energy to shove the missing DLLs around. Besides, polink and link10 are sufficient.

Siekmanski

Then it's not the linker. I used version 5.12 with the same wrong result.

d:\RadASM2212\Masm\Projects\Align_64>makeit
Microsoft (R) Macro Assembler Version 12.00.21005.1
Copyright (C) Microsoft Corporation.  All rights reserved.

Assembling: Align_64.Asm
## current=219      nops added: 37      sum=256      (line 65)
Microsoft (R) Incremental Linker Version 5.12.8078
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.

Align_64 test.

Align4  00
Align16 00
Align64 32
Entry  401120
Creative coders use backward thinking techniques as a strategy.

nidud

#26
deleted

Siekmanski

Creative coders use backward thinking techniques as a strategy.

jj2007

Try this one:align_64 MACRO
Local curalign, tmp$
  repeat 3
  curalign=($-_TEXT) and 63
  tmp$ CATSTR <current alignment=>, %curalign
% echo tmp$
if curalign
nop
align 16
echo * align16
endif
  endm
endm


I get the impression that I do not understand what the linker really does :(

Siekmanski

Hi Jochen,
Test with the new macro:

Microsoft Windows [Version 6.3.9600]
(c) 2013 Microsoft Corporation. Alle rechten voorbehouden.

d:\RadASM2212\Masm\Projects\Align_64>makeit
Microsoft (R) Macro Assembler Version 12.00.21005.1
Copyright (C) Microsoft Corporation.  All rights reserved.

Assembling: Align_64.Asm
current alignment=27
* align16
current alignment=43
* align16
current alignment=59
* align16
Microsoft (R) Incremental Linker Version 5.12.8078
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.

Align_64 test.

Align4  00
Align16 00
Align64 48
Entry  4010A0

Press any key to continue...d:\RadASM2212\Masm\Projects\Align_64>makeit2 ( with polink )
Microsoft (R) Macro Assembler Version 12.00.21005.1
Copyright (C) Microsoft Corporation.  All rights reserved.

Assembling: Align_64.Asm
current alignment=27
* align16
current alignment=43
* align16
current alignment=59
* align16
Align_64 test.

Align4  00
Align16 00
Align64 48
Entry  4010A0

Press any key to continue...d:\RadASM2212\Masm\Projects\Align_64>makeit3
Microsoft (R) Macro Assembler Version 14.00.23026.0
Copyright (C) Microsoft Corporation.  All rights reserved.

Assembling: Align_64.Asm
current alignment=36
* align16
current alignment=52
* align16
current alignment=4
* align16
Microsoft (R) Incremental Linker Version 14.00.23026.0
Copyright (C) Microsoft Corporation.  All rights reserved.

Align_64 test.

Align4  00
Align16 00
Align64 48
Entry  3010A0
Creative coders use backward thinking techniques as a strategy.