using basm with delphi

Hi, i'm trying to learn to use basm with delphi. I need a list of all the upcodes, what thay do and how to use them.
Thanks.
LVL 1
lfrodriguesAsked:
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.

intheCommented:
hi,
unfortunatly its a bit more complicated than that.you need to learn asembly language first,
for that you can get some stuff here:

http://inthe.future.easyspace.com/asm/asm.html
(helppc.zip contains opcodes etc)

there are a lot of asm links here:

http://www.geocities.com/SiliconValley/2926/tp_1.html#ASM

particularly the link to Randall Hyde's Assembly Language Page, Art of ASM programming would be the best to start.

Regards Barry
0
intheCommented:
A good source of code is always other graphics/maths components as they nearly always use assembler,various links for graphics/maths at
http://www.efg2.com/Lab/Library/

but really first thing is get as many good books on assembler and especially go here:
http://webster.cs.ucr.edu/Page_asm/ArtofAssembly/ArtofAsm.html


i leave some examples :

procedure WritePortB( wPort : Word; bValue : Byte );
begin
  asm
    mov dx, wPort
    mov al, bValue
    out dx, al
  end;
end;

function ReadPortB( wPort : Word ) : Byte;
begin
  asm
    mov dx, wPort
    in al, dx
    mov result, al
   end;
end;


procedure PCSpeakerBeep(Frequency, Duration: Integer);
begin
if Win32Platform = VER_PLATFORM_WIN32_NT then
Windows.Beep(Frequency, Duration)
else
asm MOV ECX, Frequency
JCXZ @@2
MOV EAX, 1193181
CDQ
IDIV ECX
MOV ECX, EAX
IN AL, ($61)
TEST AL, $03
JNZ @@1
OR AL, $03
OUT ($61), AL
MOV AL, $B6
OUT ($43), AL
@@1: MOV AL, CL
OUT ($42), AL
MOV AL, CH
OUT ($42), AL
PUSH Duration
CALL Windows.Sleep
@@2: IN AL, ($61)
AND AL, $FC
OUT ($61), AL
end;
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
lfrodriguesAuthor Commented:
Does basm support all of the upcodes??
0
intheCommented:
no only up to about 386 ,you can get stuff for mmx but it probably not worth it unless your writing particularly for mmx.
you can also get opcode listing s from intels site,but i think helppc covers it.
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.