This is the second post of this question, rewritten to make it clearer. I am attempting to use in-line assembly within my VB apps WITHOUT the use of COM files, DLLs etc. Certain interrupts work, others don't. (ie BIOS 'Get Time' Interrupt works, DOS 'Get Time' Interrupt doesn't). Following is the assembler code I use to execute the BIOS 'Get Time' Interrupt. push ebp mov ebp, esp push ebx mov ebx, mov al, cmp al, 1Ah jne GETOUT mov ah, int 1Ah mov , ch mov , cl mov , dh mov ,dl pop ebx mov esp, ebp pop ebp ret 16 I store the machine code equivalent of the above in a Visual Basic byte array. The above code is executed in a standard VB module and displays the result every 1/2 second. As I stated before this BIOS time routine works flawlessly. I use similar code to execute the DOS 'Get Time' Interrupt but get a GPF when it executes. Any help would be greatly appreciated.
Posted on 2001-05-24 15:22:00 by mms
You can't use real mode interrupts in windows. You can however if you go through a VxD.
Posted on 2001-05-24 16:58:00 by Jon Richardson
--------------------------------------------- to Jon Richardson Any pointers as to how I go about doing that? --------------------------------------------- to disease_2000 I set up a Sub in which I load the code thus: Dim MachineCode(1 To 37) As Byte

MachineCode(1) = &H55    'push ebp

MachineCode(2) = &H89    'mov ebp, esp
MachineCode(3) = &HE5

MachineCode(4) = &H53    'push ebx

MachineCode(5) = &H8B    'mov ebx, 
MachineCode(6) = &H5D    
MachineCode(7) = &H8

etc.
Then in the body of my main program I call the Sub
Posted on 2001-05-25 07:23:00 by mms

 thanx MMS.

 wow, so simple that it blinded me from knowing. with that, i now
 accept that assembly is powerful!

 farewell
Posted on 2001-05-27 19:32:00 by disease_2000
No, not off the top of my head I don't know how to. I've seen it done before. If I can find the source i'll let you know. Check out Iczelions tuts on VxD programming though.
Posted on 2001-05-28 00:02:00 by Jon Richardson