Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > MSDOS Programmer > Re: Int questio...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 3 of 7 Topic 432 of 495
Post > Topic >>

Re: Int question

by Doors <doorsremove@[EMAIL PROTECTED] > Dec 6, 2006 at 04:39 PM

On 6 Dec 2006 09:57:04 -0800, "g*****ca" <pg*****ca@[EMAIL PROTECTED]
> wrote:

>Ok. I need to know when a program reachs certain location in its code.
>I dont have the source of it, so my idea:
>This is a piece of the code. I need to know when the program reachs
>address 071a:0d3c.
>I wrote a tsr with a int60h handler, and change address 071a:0d3c to
>call int 60h. (cd 60).
>
>071A:00000D37 50                     PUSH    AX
>071A:00000D38 51                     PUSH    CX
>071A:00000D39 52                     PUSH    DX
>071A:00000D3A 56                     PUSH    SI
>071A:00000D3B 57                     PUSH    DI
>071A:00000D3C 33 DB                  XOR     BX,BX         (Change this
>to CD 60) <<<<<<<<<<<<<<
>071A:00000D3E B9 F0 03               MOV     CX,03F0
>071A:00000D41 BA 83 07               MOV     DX,0783
>071A:00000D44 B3 03                  MOV     BL,03
>071A:00000D46 E8 E7 00               CALL    (+00E7)
>071A:00000D49 8A 1C                  MOV     BL,[SI]
>071A:00000D4B E8 E2 00               CALL    (+00E2)
>071A:00000D4E 02 FB                  ADD     BH,BL
>071A:00000D50 46                     INC     SI
>071A:00000D51 E2 EE                  LOOP    (-12)
>071A:00000D53 5F                     POP     DI
>071A:00000D54 5E                     POP     SI
>071A:00000D55 5A                     POP     DX
>071A:00000D56 59                     POP     CX
>071A:00000D57 58                     POP     AX
>071A:00000D58 C3                     RET
>
>Good, now i can do anything when the program gets there. Then, at the
>end of my int, i do the xor bx,bx and push it to the stack, so the
>program can continue with its bx = 0. Int handler is written in c++,
>doing those regular pushes and pops.

Why are you pu****ng anything on the stack.
Just end your ISR with an XOR bx,bx and IRET no need for the push
that will drive the stack out of sync.

>
>void interrupt int61(void)
>  {
>    a++;
>    asm pop bx;
>    asm xor bx,bx;
>    asm push bx;
>  }
>
>Not working. I disassembled my int handler and it looks fine, the
>assembly flow is ok.

please see above queation about pushes.

>My question is what could go wrong here? Could my int be changing flags
>or any other things? Also, could I use dos ints from my int in that
>case? (Like fopen, fwrite...) I know this procedure isnīt called from
>any other int.
>Sorry, may look a little confusing.
>
>Tks,
>Pedro.

-- 
Doors - Dont look at the future in a window.
        Walk to a door - Open it, and go there.

http://www.freedoors.org

doorsremove@[EMAIL PROTECTED]

 




 7 Posts in Topic:
Int question
"gerotica" <  2006-12-06 09:57:04 
Re: Int question
pklos@[EMAIL PROTECTED]   2006-12-06 18:38:42 
Re: Int question
Doors <doorsremove@[EM  2006-12-06 16:39:49 
Re: Int question
"gerotica" <  2006-12-06 19:18:19 
Re: Int question
"gerotica" <  2006-12-06 19:53:13 
Re: Int question
"gerotica" <  2006-12-06 20:41:46 
Re: Int question
"gerotica" <  2006-12-06 20:53:47 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sun Jul 6 16:01:42 CDT 2008.