|
-
Nov 8th, 2000, 10:38 PM
#1
Thread Starter
Member
Is it possible to write a loop function in asm and then use the obj file in a vb program?
-
Nov 9th, 2000, 06:06 AM
#2
Frenzied Member
You can write standard dlls in ASM using something like MASM or PASS32, then use a declare Statement and use the function in VB, if you have a C++ compiler you can set up a dll using that and just use inline ASM inside the function.
-
Nov 9th, 2000, 04:47 PM
#3
Thread Starter
Member
But can use do this with the obj files? A dll is alot slower isn't it?
-
Nov 9th, 2000, 09:45 PM
#4
Frenzied Member
the first time you use a dll in an instance of your application it has to load, but that's nothing compared to how long a VB app takes to load anyway, after that it's just a far call to your procedures.
-
Nov 10th, 2000, 03:14 PM
#5
Monday Morning Lunatic
I thought with 32bit programming there was no more near/far messing around?
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Nov 10th, 2000, 04:52 PM
#6
Frenzied Member
you don't have to, nowadays you just use far calls, but you can still use near calls for backward compatibility, it's still a far call though, it's just that near calls aren't used anymore.
I think anyway, or maybe I'm just making it up as I go along.
-
Nov 14th, 2000, 03:25 AM
#7
Thread Starter
Member
What are far and near calls?
-
Nov 14th, 2000, 06:51 AM
#8
Monday Morning Lunatic
I think...
They're left from 16bit programming. The memory address was split into a segment:offset address. A near call was one inside your current code segment. A far call was one to a different segment.
Trust me, you don't want to play around with those .
(Sam...if this is wrong let me know )
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Nov 14th, 2000, 01:57 PM
#9
Thread Starter
Member
So it originated from asm but dosen't apply anymore to VB or C++? Does it have something to do with RAM memory locations as in c or asm?
-
Nov 14th, 2000, 03:50 PM
#10
Frenzied Member
Parksie's actually right, in most asm compilers you don't have to worry about them, because you very rarely actually type in a memory address, if you're passing parameters on the stack (like windows does) to your own functions then you need to know which one it is to get at your parameters.
they are still used in 32bit programming, but unless you're coding in binary (which I am unfortunatley) you don't have to worry.
Near and far procedures are described here
http://burks.bton.ac.uk/burks/langua...m#HEADING1-133
and passing on the stack is here
http://burks.bton.ac.uk/burks/langua...htm#HEADING4-1
-
Dec 1st, 2000, 08:02 PM
#11
Thread Starter
Member
"As for me, I am poor and needy but God is thinking about me right now." Psalm 40
-
Dec 10th, 2000, 08:36 AM
#12
Intrigued!
hey Sam,
What sort of program are you working on that requires you to code in binary? Just being nosey!
-
Dec 14th, 2000, 04:45 AM
#13
Fanatic Member
I thought he was making a special compiler, but I don't think you need binary for that as MASM 6 was written in a previous MASM (weird). So this has left me confused. I must go back into my cardboard box to think about this...
-
Dec 14th, 2000, 01:58 PM
#14
hmm, i was thinking the other night (quite a rare occurence in the first place) about how hard it would be to create a compiler from scratch. And it put me in mind of recursive programming - in other words, which came first: the chicken or the egg. I reckon building a compiler is the second hardest thing a programmer can undertake, by its very nature a compiler must have pretty much no bugs at all.
The hardest thing, obviously, is Artificial Intelligence - which has no reliable definition. I hope i'm not going too deep here, but i'd like to get some opinions on this 
What do you think?
-
Dec 15th, 2000, 01:41 PM
#15
Monday Morning Lunatic
Hi there V(ery)!!! Haven't heard from you in ages! How's it going?
wossname - I think it's the egg. Because, during evolution, when the species was sufficiently changed to become a "Chicken", it would have come from an egg laid by a non-"Chicken".
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Dec 15th, 2000, 01:53 PM
#16
Frenzied Member
Well that depends on whether you think the kind of egg is defined by what laid it, or what it will hatch into. It's all a matter of definition, as it usually is 
Harry.
"From one thing, know ten thousand things."
-
Dec 15th, 2000, 03:35 PM
#17
(sigh) no hope of an intelligent and stimulating conversation then? Oh well, sounds about right for this forum.
-
Dec 15th, 2000, 04:10 PM
#18
Frenzied Member
Well perhaps if you want to discuss artificial intelligence, you might display some of your own and join the *shock horror* artificial intelligence thread
Harry.
"From one thing, know ten thousand things."
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|