sds & longint in asm-code

how can i use some longint-variables in my asm-code ?

need help
columbo666

btw:does anybody know, where i can download sds (sound deluxe system) ? i think the actual version number is around 5.
LVL 1
columbo666Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

HypoCommented:
To use longint variables in your asm code you need to use 32-bit registers.

32Bit registers are not supported by the pascal compiler (BP 7.x) since 32Bit registers were first introduced by the 80386 and BP 7.x only supports the 80286 assembler instruction set.

Anyway, it's not impossible to use 32bit registers & longint variables in your code. I answered a question similar to this a couple of months ago:
http://www.experts-exchange.com/jsp/qShow.jsp?ta=pascal&qid=10168326 

There's an example below here... it shows you how you can put override prefixes before the 16bit instructions so that they become 32Bit instructions.

Program test;

var T : longint;

Procedure TestA(L : longint; var D : longint); assembler;
asm
 DB $66; MOV AX,word [L] {EAX := L}
 LES DI,D
 DB $66; MOV ES:[DI],AX  {D := EAX}
end;

Procedure TestB(La,Lb : longint; var D : longint); assembler;
asm
 DB $66; MOV AX,word [La] {EAX := La}
 DB $66; MOV BX,word [Lb] {EBX := Lb}
 DB $66; ADD AX,BX        {EAX := EAX+EBX}
 LES DI,D
 DB $66; MOV ES:[DI],AX   {D := EAX}
end;

begin
 T := 1;
 writeln(T);
 TestA(1000,T);
 writeln(T);
 TestB(100,100,T);
 writeln(T);
end.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
columbo666Author Commented:
i leave this question open for some time, 'cause i think, your answer can help other people too. answer is good !

greets
columbo666
0
HypoCommented:
ok
0
columbo666Author Commented:
thank you very much hypo. btw:what are you doing ? which laguage(s) are you using ?

greets & thanxs from
columbo666
0
HypoCommented:
:) I like to share my knowledge every now and then.

Right now I'm working on an online  game project with a couple of guys.
We're using VC++ for that one. Other than that I'm using these languages when I programm:

*Assembler
Pascal (my first real language)
Delphi
C++
some Java/HTML

I'm working on learning, SQL programming and CGI scripts too. I figure there might be some money to make there.

anyway: Thx for the points! ;)
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Delphi

From novice to tech pro — start learning today.