News:

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

ever experienced "code rot"?

Started by tetsu-jp, March 31, 2009, 06:57:44 PM

Previous topic - Next topic

tetsu-jp

well i have.

what you see on the picture is a version which can not scroll through allocated memory.

back then in the year 2004, i had this working after many days of hard work!

but I've lost this revision, all what's survived is an early backup.
it is somehow frustrating.

All I can think of is to restart from zero.
I'm now using VB and seriously thinking about Windows ASM.
maybe I'll try again to start off (it is not supported anymore inside Visual Studio).



the purpose of the program was to have better control over memory allocation!

should i try to reconstruct the work from the year 2004? certainly it would be possible with some effort...

BlackVortex

I usually use this opportunity to rewrite/improve my code and try to make sure it's as compatible as possible.

Also, VB ?   :toothy

EDIT: And there's a thread to use asm in Visual Studio.

tetsu-jp

you maybe know VS2008 can not use any assembly language (at least not directly).

and in VB, there are now Array lists (which sort of, resemble the thing i was working on).
not sure about the performance, but guess, the clock rate increased, for the intend application it won't matter.

so it would be for fun/entertainment only.

GregL

Quoteyou maybe know VS2008 can not use any assembly language (at least not directly).

Yes, it can.  It comes with MASM.


tetsu-jp

sorry 32 bit processors are no longer relevant for current sales.

"The inline assembler is built into the compiler, so you don't need a separate assembler such as the Microsoft Macro Assembler (MASM).
"

I assume that you have a different VS,


GregL

Quote from: tetsu-jpI assume that you have a different VS

No, you can use inline assembly in Visual C++ 2008 for 32-bit code, you can also use a separate assembler.  For 64-bit code, inline assembly is no longer allowed and you must use a separate assembler (if you want to use assembly language).  You really don't know what you are talking about.


tetsu-jp

Quote from: Greg on March 31, 2009, 09:48:43 PM
Quote from: tetsu-jpI assume that you have a different VS

No, you can use inline assembly in Visual C++ 2008 for 32-bit code, you can also use a separate assembler.  For 64-bit code, inline assembly is no longer allowed and you must use a separate assembler (if you want to use assembly language).  You really don't know what you are talking about.


that's pointless and you know it.

I've no commercial need to maintain this project.

don't deal with information that's obvious (for instance, printed on the screenshot).

MASM would be such an assembler? Was that the purpose to visit the forum?

tell me something that I really want to know: http://www.masm32.com/board/index.php?topic=11147.0
Thank you.

GregL

tetsu-jp,

I really don't know what you are trying to say, or ask.

[edit]  OK, I read your post at that link.  You keep saying "VS2008 does not support assembly anymore at all", and I am saying, yes it does.  You can interface MASM and VB, I am much more familiar with interfacing MASM and C/C++ so I can't help you much with that.  If all your code is 16-bit DOS code then I think you would be better off re-writing the whole thing.  Why not re-write it all in one language, then if you have performance problems consider using MASM (or another assembler).  You could re-write the whole thing with MASM, if you wanted to.


tetsu-jp

I think you did not understand it completely.

Also we could cooperate a little on the forum, NP (no problem).

the situation is, the program was written using MASM, and it is a 32bit WINDOWS program!

not a 16bit DOS program. this should be obvious from the 32bit HEX numbers.

it works fine (by the way), printing, keys, memory etc. is done via Windows.

SO THAT's not the problem.

If you can explain how to interface VC++, 64bits, VS2008, also NP, i can use C++,
it's indeed the first language I've used for VS programming.

there is no special requirement to stick to VB.

just, it can be messy to try hours with options, maybe there is a code example already?

also currently i am thinking to restart the project, rather than to try to resemble the lost code.

BlackVortex

If you rely on strange language mix&match you should not upgrade your development machine to a newer VS. But considering your view of Vista and XP I think you'd sacrifice speed and usability very easily, just to get your upgrade fix. Come on now, admit it.   :cheekygreen:

GregL

tetsu-jp,

If you don't already have Visual C++ 2008, then download Visual C++ 2008 Express Edition here. It comes with 32-bit MASM. Then download the Windows SDK here, it includes 64-bit MASM (ml64.exe). Follow the instructions here. I got it working on Windows 7 Beta x64.

If you already have Visual Studio 2008 Standard or Professional, it's already set up to do x64 builds, just change the project's properties.

You could also use GoAsm, which supports x64. There is a GoAsm sub-forum here.

You could also use Pelle's C, which supports x64, and has an assembler called POASM. There is a Pelle's Assembler sub-forum here.


ecube

actually the latest 32bit MASM v 9 somthing can be gotten http://www.masm32.com/board/index.php?topic=11111.0

and the MASM64 (and my minimum SDK including semi converted inc's, all 64bit libs and some code examples) http://www.masm32.com/board/index.php?topic=11115.0

also you can create *real VB dll's and also write MASM code directly in the vb IDE and compile it in, info is here
http://www.masm32.com/board/index.php?topic=11103.0

You can get a VB IDE Assembly clone(basically) from here
http://www.easycode.cat/English/index.htm

I recommend GoASM over MASM though for 64bit as it's superior in almost every way, and is similar enough to 32bit masm that it doesn't take long to learn it(took me a night and i've gotten everything converted I wanted to from masm, thanks Donkey answering questions)

hutch--

tetsu,

If you can do it you are almost always better off rewriting the code as you will get a better end result. In 32 bit you can use inline assembler in VC but Microsoft supply MASM for a good reason. Inline assembler is not properly compatible with the internal compiler optimisation done in VC so particularly using small bits of inline assembler mixed with VC code produces substandard code and lower performance than either pure assembler or optimised VC code.

You are always better off writing assembler code in a seperate module as you code runs as well as you have written it and the VC code is fully optimised by the compiler with no interference with inline assembler register usage. With 64 bit VC you have no choice as the internal compiler optimisation is a lot more complex due to the stack/register techniques used in 64 bit Windows.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

tetsu-jp

thanks a lot.

I've build some inline libraries for 128 bit math in assembly, in the year 2001, using VC++.
(this code is long lost).
Never had any problems interfacing with the compiler made code:

-there have been a few rules on preservation/restore/passing etc.
-there was a disassembler built into the debugger!

back then I had no idea how to do this in C, so i've used 386 assembly.

I have VS Standard edition, VC++, C#, VB, Silverlight, F#.

I think the MASM32 (version 10) is producing 32-bit .OBJ file, can this be linked to 64bit code??
Actually how to interface it properly is a riddle to me, but i will investigate all the links that you have given!

MASM32 programs run, NP, but i guess in x86 IA32 compatibility mode (while the Windows itself runs in 64 bit mode).
but also NP, many softwares are still 32bit.

I have searched the computer for all instances of ML. there is no such program supplied with VS.
neither any version of MASM.


i guess it is not just 32/64bit, but the technology is entirely different (64 bit is now based on MSIL).
I do not know if it makes sense to install additional express edition (32 bit version), and i do not want to do it, to be honest.

Can you answer it more detailed:

-can MASM32 produce .OBJ file, that can be linked to 64bit project?
BASIC provides keywords to define external DLL/OBJ namespace, i do not know if they can interface 32 bits!
and the data type for windows handle inside VB- 32bits/64 bits? i have no idea!

until i get detailed instructions, I will download everything and try to build interface to VB application.
(I have not read all the AMD manuals but also the standard registers are now different, they are all 64 bits. so at least they must be cleared correctly).

EDIT: I do not think 32bit .OBJ can be linked to 64bit program

EDIT: MFC C++ can be compiled as Win32, ASM can be included. if compiled as x64, error message is generated.
I've tested right now. C++ Windows Forms can not use ASM.

TmX

Quote from: tetsu-jp on April 01, 2009, 10:45:51 AM
thanks a lot.

I have searched the computer for all instances of ML. there is no such program supplied with VS.
neither any version of MASM.

Probably because you're using the standard one.

I myself use VS 2008 Team System, and ml is available