intrrupt

  • Follow


hi all . is any one have 0x13 intrrupt handler proc code  or any idia
about that  . it counts  the number of intrrupts .
i really need it
0
Reply tom.t.2090800 (12) 1/13/2011 8:33:22 AM

"ramtin" wrote:

> hi all . is any one have 0x13 intrrupt handler proc code  or any idia
> about that  . it counts  the number of intrrupts .

You like to count the occurance of INT13h ?
I'd just count how often I call this 16-bit realmode BIOS-function :)

More serious:  realmode or VM86 ...?

If the OS you are using allow it at all then just hook interrupt 13h,
increment your counter and let the BIOS continue as normal.

> i really need it

close to due date with homework ?
__
wolfgang


0
Reply wolfgang 1/13/2011 4:04:03 PM


On Jan 13, 7:04=A0pm, "wolfgang kern" <nowh...@never.at> wrote:
> "ramtin" wrote:
> > hi all . is any one have 0x13 intrrupt handler proc code =A0or any idia
> > about that =A0. it counts =A0the number of intrrupts .
>
> You like to count the occurance of INT13h ?
> I'd just count how often I call this 16-bit realmode BIOS-function :)
>
> More serious: =A0realmode or VM86 ...?
>
> If the OS you are using allow it at all then just hook interrupt 13h,
> increment your counter and let the BIOS continue as normal.
>
> > i really need it
>
> close to due date with homework ?
> __
> wolfgang

thanks a lot. . .  do you have any text about hooking the int 13 . i
want to learn it but i didn't find any thing to read
and one more thing could  you plz  say what does int 13 do
0
Reply ramtin 1/13/2011 4:30:38 PM

ramtin wrote:
> On Jan 13, 7:04 pm, "wolfgang kern" <nowh...@never.at> wrote:
>> "ramtin" wrote:
>>> hi all . is any one have 0x13 intrrupt handler proc code  or any idia
>>> about that  . it counts  the number of intrrupts .
>> You like to count the occurance of INT13h ?
>> I'd just count how often I call this 16-bit realmode BIOS-function :)
>>
>> More serious:  realmode or VM86 ...?
>>
>> If the OS you are using allow it at all then just hook interrupt 13h,
>> increment your counter and let the BIOS continue as normal.
>>
>>> i really need it
>> close to due date with homework ?
>> __
>> wolfgang
> 
> thanks a lot. . .  do you have any text about hooking the int 13 . i
> want to learn it but i didn't find any thing to read
> and one more thing could  you plz  say what does int 13 do

Different things...

http://www.ctyme.com/intr/int-13.htm

While you're consulting Ralf Brown, check out int 21h/35h and int 21h/25h.

Are you in the same class as this guy?

http://www.asmcommunity.net/board/index.php?topic=30419.0

Whether or not, you might do well to read over that thread, and follow 
the links to further information.

Best,
Frank
0
Reply Frank 1/13/2011 5:30:50 PM

On Jan 13, 8:30=A0pm, Frank Kotler
<fbkot...@nospicedham.myfairpoint.net> wrote:
> ramtin wrote:
> > On Jan 13, 7:04 pm, "wolfgang kern" <nowh...@never.at> wrote:
> >> "ramtin" wrote:
> >>> hi all . is any one have 0x13 intrrupt handler proc code =A0or any id=
ia
> >>> about that =A0. it counts =A0the number of intrrupts .
> >> You like to count the occurance of INT13h ?
> >> I'd just count how often I call this 16-bit realmode BIOS-function :)
>
> >> More serious: =A0realmode or VM86 ...?
>
> >> If the OS you are using allow it at all then just hook interrupt 13h,
> >> increment your counter and let the BIOS continue as normal.
>
> >>> i really need it
> >> close to due date with homework ?
> >> __
> >> wolfgang
>
> > thanks a lot. . . =A0do you have any text about hooking the int 13 . i
> > want to learn it but i didn't find any thing to read
> > and one more thing could =A0you plz =A0say what does int 13 do
>
> Different things...
>
> http://www.ctyme.com/intr/int-13.htm
>
> While you're consulting Ralf Brown, check out int 21h/35h and int 21h/25h=
..
>
> Are you in the same class as this guy?
>
> http://www.asmcommunity.net/board/index.php?topic=3D30419.0
>
> Whether or not, you might do well to read over that thread, and follow
> the links to further information.
>00002  * Copyright (C) 2006 Michael Brown <mbrown@fensystems.co.uk>.
00003  *
00004  * This program is free software; you can redistribute it and/or
00005  * modify it under the terms of the GNU General Public License
as
00006  * published by the Free Software Foundation; either version 2
of the
00007  * License, or any later version.
00008  *
00009  * This program is distributed in the hope that it will be
useful, but
00010  * WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU
00012  * General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU General Public
License
00015  * along with this program; if not, write to the Free Software
00016  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00017  */
00018
00019 FILE_LICENCE ( GPL2_OR_LATER );
00020
00021 #include <stdint.h>
00022 #include <limits.h>
00023 #include <byteswap.h>
00024 #include <errno.h>
00025 #include <assert.h>
00026 #include <gpxe/list.h>
00027 #include <gpxe/blockdev.h>
00028 #include <gpxe/memmap.h>
00029 #include <realmode.h>
00030 #include <bios.h>
00031 #include <biosint.h>
00032 #include <bootsector.h>
00033 #include <int13.h>
00034
00035 /** @file
00036  *
00037  * INT 13 emulation
00038  *
00039  * This module provides a mechanism for exporting block devices
via
00040  * the BIOS INT 13 disk interrupt interface.
00041  *
00042  */
00043
00044 /** Vector for chaining to other INT 13 handlers */
00045 static struct segoff __text16 ( int13_vector );
00046 #define int13_vector __use_text16 ( int13_vector )
00047
00048 /** Assembly wrapper */
00049 extern void int13_wrapper ( void );
00050
00051 /** List of registered emulated drives */
00052 static LIST_HEAD ( drives );
00053
00054 /**
00055  * Number of BIOS drives
00056  *
00057  * Note that this is the number of drives in the system as a
whole
00058  * (i.e. a mirror of the counter at 40:75), rather than a count
of the
00059  * number of emulated drives.
00060  */
00061 static uint8_t num_drives;
00062
00063 /**
00064  * Update BIOS drive count
00065  */
00066 static void int13_set_num_drives ( void ) {
00067         struct int13_drive *drive;
00068
00069         /* Get current drive count */
00070         get_real ( num_drives, BDA_SEG, BDA_NUM_DRIVES );
00071
00072         /* Ensure count is large enough to cover all of our
emulated drives */
00073         list_for_each_entry ( drive, &drives, list ) {
00074                 if ( num_drives <=3D ( drive->drive & 0x7f ) )
00075                         num_drives =3D ( ( drive->drive & 0x7f ) +
1 );
00076         }
00077
00078         /* Update current drive count */
00079         put_real ( num_drives, BDA_SEG, BDA_NUM_DRIVES );
00080 }
> Best,
> Frank- Hide quoted text -
>
> - Show quoted text -

hi
i fined these codes for you but i'm not sure it is sth that you wanted
or not


0
Reply nicole 1/13/2011 6:31:20 PM

In article  <5fafe9c7-eed8-43f8-a9c7-649af29a2e6c@l24g2000vby.googlegroups.com>
           tom.t.2090@nospicedham.gmail.com "ramtin" writes:

> On Jan 13, 7:04�pm, "wolfgang kern" <nowh...@never.at> wrote:
> > "ramtin" wrote:
> > > hi all . is any one have 0x13 intrrupt handler proc code �or any idia
> > > about that �. it counts �the number of intrrupts .
> >
> > You like to count the occurance of INT13h ?
> > I'd just count how often I call this 16-bit realmode BIOS-function :)
> >
> > More serious: �realmode or VM86 ...?
> >
> > If the OS you are using allow it at all then just hook interrupt 13h,
> > increment your counter and let the BIOS continue as normal.
> >
> > > i really need it
> >
> > close to due date with homework ?
> > __
> > wolfgang
> 
> thanks a lot. . .  do you have any text about hooking the int 13 . i
> want to learn it but i didn't find any thing to read

If you are talking about real mode/MSDOS take a look at DOS service 
25h/35h (a search for RBIL should help).

> and one more thing could  you plz  say what does int 13 do

Ah -- it is homework....

Pete
-- 
   "We have not inherited the earth from our ancestors,
    we have borrowed it from our descendants."
0
Reply pete 1/13/2011 7:49:28 PM

nicole wrote:
> hi
> i fined these codes for you but i'm not sure it is sth that you wanted
> or not

Something *I* wanted? No. I appreciate the thought, though. Thanks.

Best,
Frank

0
Reply Frank 1/13/2011 7:51:24 PM

"ramtin" wrote:
>> hi all . is any one have 0x13 intrrupt handler proc code or any idia
>> about that . it counts the number of intrrupts .

> You like to count the occurance of INT13h ?
> I'd just count how often I call this 16-bit realmode BIOS-function :)

> More serious: realmode or VM86 ...?

> If the OS you are using allow it at all then just hook interrupt 13h,
> increment your counter and let the BIOS continue as normal.
>
> > i really need it
>
> close to due date with homework ?
> __
> wolfgang

|thanks a lot. . .  do you have any text about hooking the int 13 . i
|want to learn it but i didn't find any thing to read
|and one more thing could  you plz  say what does int 13 do

For hooking any INT you can use DOS-functions as Frank mentioned,
or if you run it in realmode (not VM86) you can do it manually:

A really dirty hack, my codestyle is a bit different to this :)
but it's perhaps better for understanding what's going on.

___________
setup_hook:
;uses ax,bx,ds
;get int13h-vector
; push ds                ;save it if desired
 push 0
 pop ds                  ;ds = 0000
 mov bx,004ch            ;   = 13h*4
 mov ax,[bx]             ;get lower word (offset part)
 mov cs:[origin13h],ax   ;store that
 mov ax [bx+2]           ;get upper word (segment part)
 mov cs:[origin13h+2],ax ;store this as well
 mov word [bx],hook13    ;new offset = your label(***but see below)
 mov [bx+2],cs           ;new segment = yours yet
; INT13h is now hooked !
; but this piece of code needs an end
; DS is still 0000 yet, so for memory access ... be aware of.
;...
; pop ds                  ;restore it if saved at start
;...           either wait until count or key or time or
;...           make it a TSR or return to DOS
             ;(see DOS-functions for all variants)
self:
 jmp self      ;or just let it idle until you hit RESET
_______
hook13:
;uses nothing! except a variable in the code-segment
 pushf              ;push pop flag is only here to keep everthing clean
 inc word cs:count  ;this is what you wanted ?
 popf
jmpf origin13h      ;could need "jmp far" on your assembler

;data:              ;within but after the code yet
origin13h: dd 0     ;four bytes needed to save it here
count:     dw 0     ;your counter
_______________

*) if you compiler can't do this then replace the marked line with:
 mov ax,hook13
 mov es:[bx],ax

HTH.
__
wolfgang


0
Reply wolfgang 1/16/2011 1:46:26 PM

On Sun, 16 Jan 2011 14:46:26 +0100, "wolfgang kern"
<nowhere@never.at> wrote:


>For hooking any INT you can use DOS-functions as Frank mentioned,
>or if you run it in realmode (not VM86) you can do it manually:
>
>A really dirty hack, my codestyle is a bit different to this :)
>but it's perhaps better for understanding what's going on.
>
>___________
>setup_hook:
>;uses ax,bx,ds
>;get int13h-vector
>; push ds                ;save it if desired
> push 0
....
In case it matters, note that PUSH immediate did not exist
until the 80186/80188 and later, it was not available on the
8088 used in the original PC/XT.  You had to clear a
register (or memory) and push that instead.

Best regards,


Bob Masta
 
              DAQARTA  v6.00
   Data AcQuisition And Real-Time Analysis
              www.daqarta.com
Scope, Spectrum, Spectrogram, Sound Level Meter
    Frequency Counter, FREE Signal Generator
           Pitch Track, Pitch-to-MIDI 
          Science with your sound card!
0
Reply N0Spam 1/17/2011 1:07:34 PM

8 Replies
141 Views

(page loaded in 0.182 seconds)

Similiar Articles:













7/21/2012 4:41:31 AM


Reply: