VB InLine ASM issues |
EACam | I downloaded the VB InLine ASM add-in for VB 6.0. I desperately need to take advantage of ASM's speed, so I tried to compile app with the add-in linked to the compiler. If said I need some Assembler exe (an option that I apparently hadn't set). Um...I don't know what this assembler is and where I can get it...becuase ml.exe doesn't exist on my computer (that seemed to be the name of the executable it wanted).
Thanks. |
Almar Joling | quote: Originally posted by EACam
I downloaded the VB InLine ASM add-in for VB 6.0. I desperately need to take advantage of ASM's speed, so I tried to compile app with the add-in linked to the compiler. If said I need some Assembler exe (an option that I apparently hadn't set). Um...I don't know what this assembler is and where I can get it...becuase ml.exe doesn't exist on my computer (that seemed to be the name of the executable it wanted).
Thanks.
[url]http://www.persistentrealities.com/vbfibre/index.php?category=0&item=5&t=asm[/url]
hmm, but it seems I haven't mentioned a download link to MASM... do a quick google for it :)
here:
[url]http://www.masm32.com/[/url] |
Eric Coleman | You should probably download the files from the original source. For the assmbly add-in, it is a modification to John Chamberlain's compile controller. His website doesn't exist anymore and he's stopped answering emails unfortunately. Someone did upload his original plug-in to planetsourcecode, but that website tookout all of the examples, so what you get from that website isn't the complete package and is missing documentation. You can find likes to both the modified compiler controller addin and samples for the modifcation by looking in the [url="http://www.vbgamer.com/links_Tools_Libraries_Engines.asp"]Tools section[/url] here at vbgamer. For Microsoft's assembly compiler, you can get it by downloading their processor pack for visual studio 6. The processor pack allows visual C++ to compiler for processors other than the Pentium Pro, such as for AMD 3DNow! and Penitum MMX, SSE, etc. extensions. It also contains sample source code from AMD on how to do optimized vector, matrix and quaternion mathematics. |
Almar Joling | quote: Originally posted by Eric Coleman
You should probably download the files from the original source. For the assmbly add-in, it is a modification to John Chamberlain's compile controller. His website doesn't exist anymore and he's stopped answering emails unfortunately. Someone did upload his original plug-in to planetsourcecode, but that website tookout all of the examples, so what you get from that website isn't the complete package and is missing documentation. You can find likes to both the modified compiler controller addin and samples for the modifcation by looking in the [url="http://www.vbgamer.com/links_Tools_Libraries_Engines.asp"]Tools section[/url] here at vbgamer. For Microsoft's assembly compiler, you can get it by downloading their processor pack for visual studio 6. The processor pack allows visual C++ to compiler for processors other than the Pentium Pro, such as for AMD 3DNow! and Penitum MMX, SSE, etc. extensions. It also contains sample source code from AMD on how to do optimized vector, matrix and quaternion mathematics.
Al those files are mirrored on the files section of Vb fibre [:)] |
Spodi | Too bad ASM is hella cornfoosin! |
VBBR | I'm forced to agree! If it's already kinda hard to learn C++ imagine the brain one must have to properly understand ASM... I think he must be some kind of a genius or have nothing more stored on his memory... [:)]
...I mean, his "brainal" merory, not his RAM...
...wait I think it also takes a lot of RAM to document ASM too, right?... |
Sr. Guapo | How much faster could a method be using ASM anyway[?] |
cjb0087 | c++ and asm arn't really that difficult, the advanced stuff in c++ link templates are sorta hard.
its just difficult to find out how to do stuff in it |
VBBR | So there's something that is hard... [:)] But I'm trying to learn C++ anyway... |
Almar Joling | I learned ASM because I think it's easier than C++. I mean.. you know all your Soin /Cos/ + - stuff? Well, ASM it's just words.
mov eax, 10;
add eax, 20;
dec eax;
mov ecx, 15;
add ecx, eax;
would be in VB
dim eax as integer, ecx as integer
eax= 10
eax = eax + 20
eax = eax -1
ecx = 15
ecx = eax + ecx
well, easy isn't it? :) |
VBBR | Hum, I guess that is... but this is far simple... What if I want to communicate with DX for example?
Just another thing: Why are ASM variables called like eax, ebx, ecx etc. ? |
Almar Joling | quote: Originally posted by VBBR
Hum, I guess that is... but this is far simple... What if I want to communicate with DX for example?
Just another thing: Why are ASM variables called like eax, ebx, ecx etc. ?
Those are registers.. read up on those :) ASM is quite easy.. just check out the stuff @ vbfibre.
You could use ASM to do complex matrix multiplication operations for example :)
|
Sr. Guapo | From what I understand, assembly is about as close to machine code as you can get, right? ANyway, I looked at one of the tutorials... It confused me for a long time, but once you start toi understand, it becomes easier. All I can say is, it's a lot more complicated than higher level languages (like VB) |
cjb0087 | mov eax, 10;
add eax, 20;
dec eax;
mov ecx, 15;
add ecx, eax;
would be in C++
int eax =10 ,ecx =15;
eax += 20;
eax--;
ecx+=eax;
less lines of code :D
yeah ASM is as close to machine code as possable, but then who would want to write that as
010101000111010010101010101001010010
101111010011010101010101101010101001
101010010011010100001010011001010101
010010101010101010101011111000011010 ?
(the lines breaks are so it dosnt extend the table) |
Almar Joling | quote: Originally posted by cjb0087
mov eax, 10;
add eax, 20;
dec eax;
mov ecx, 15;
add ecx, eax;
would be in C++
int eax =10 ,ecx =15;
eax += 20;
eax--;
ecx+=eax;
less lines of code :D
yeah ASM is as close to machine code as possable, but then who would want to write that as
010101000111010010101010101001010010
101111010011010101010101101010101001
101010010011010100001010011001010101
010010101010101010101011111000011010 ?
(the lines breaks are so it dosnt extend the table)
Lines of code doesn't say a thing. If so, Javascript will own your C code, here:
<script language="javascript">var eax = 10; var ecx = 20; eax+=20; eax--;ecx+=eax; alert("Result: " + eax);</script> |
cjb0087 | i know it dosnt mean a thing, anyway isnt that 6 lines opposed to 4? |
EACam | Well, I downloaded that thing, linked the VB InLine ASM add-in to ML.EXE, and now when I compile, i don't get any errors (i think) but none of the ASM functions work.
I don't know what could be the problem...is there anything else I need to do? |
Almar Joling | Call the asm function? [;)] [:P] |
VBBR | Is the addin really activated? Because if it isn't then the VB compiler won't see any errors as all of the ASM code is commented... |
EACam | what do you mean...call the ASM function? I've copied the distance function from your site (directed to Almar). I guess that was a joke...oops. [:)] |
Sr. Guapo | You should be able to call the function like you normally would in straight VB, but the add in thingee should do all the ASM code (assumming the dll is all set up/registered/whatever[;)]) |
Almar Joling | yup. I guess I'll should put up an example project so people can check if the add in works, or doesn't :) |
EACam | That'd be nice. |
Eric Coleman | In VB 5 or 6, go to the Add-Ins menu, then go to Add-In Manager and make sure the add-in is loaded. You can either load it manually there or make it load automatically when vb starts. |
EACam | Yes...I have it loaded, it's linked to the compiler and everything. I've even checked and it IS calling the function. It ISN'T returning a meaningful value (I always get 0) which probably means it's having errors. |
Almar Joling | [url="http://www.persistentrealities.com/vbfibre/index.php?category=0&item=50"]Files section of VB Fibre[/url]
Get it there, bottom link :) |