Re: [Freedos-devel] monitoring screen output

2004-04-20 Thread Diego Iastrubni
ביום שלישי, 20 באפריל 2004, 22:09, נכתב על ידי Arkady V.Belousov:
>  No. Unfortunately, DOS itself calls INT28 too rarely (only when it
> waits onput to fill input keyboard buffer), so you should use other doors.
> Ie., for example, you should trap INT21 and, if happen some event (handler
> from INT1C sets some flag), then your main resident code may call DOS if
> DOS not called OR you in DOS, but DOS calls INT28.
>
>  But wait from me too much answers, I'm not write extensive resident
> code. You should study, for example, libraries like TeSeRact, TSRtoo, AMIS
> (management library from Ralf Brown) etc.
I did a readln in pascal, and was hoping to see my interrupt working :)
this is not the case.

> DI> Another thing:
> DI> Looking inside the kernel in file chario.c in function:
> read_char_sft_dev, I DI> see this code:
> DI>   if (check_break && *pdev != syscon)
> DI> check_handle_break(&syscon);
> DI>   /* the idle int is only safe if we're using the character stack
> */ DI>   if (user_r->AH < 0xd)
> DI> DosIdle_int();
> DI> and also:
> DI> http://www.ctyme.com/intr/rb-2739.htm
>
>  I don't know what contained in this page. Just mention, which
> interrupt you mean.
DOS 2+ - GET ADDRESS OF INDOS FLAG

AH = 34h

ignore that... me stupid... did not see GET.

anyway, I see an "if" before. what does is the variable which is checked? 

> DI> Apparently I have to pass a pointer to a byte to the DOS and set that
> byte DI> to 1? I think I am lost, that "manual" is not that usefull. :(
>
>  ?
again, ignore me, I am just half blind. I will look for the libs you 
mentioned, and I am also looking for demos in C (asm is too long :)


Thanks again.

-- 

diego, kde-il translation team

Please avoid sending me Word or PowerPoint attachments.
See http://www.fsf.org/philosophy/no-word-attachments.html
Free MS-Office replacement for most platforms
http://www.openoffice.org/


---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click
___
Freedos-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freedos-devel


Re: [Freedos-devel] monitoring screen output

2004-04-20 Thread Arkady V.Belousov
Hi!

20-Апр-2004 18:28 [EMAIL PROTECTED] (Diego Iastrubni) wrote to
[EMAIL PROTECTED], "Arkady V.Belousov"

>>  Because DOS is not reenterable (you can't call most DOS function from
>> inside TSR, when TSR gets control at time of DOS working), you should check
>> when DOS is in idle state (see INT28 description).
>>  Also, there are other issues, related to hardware interrupts: when
>> INT8 calls INT1C, it not acknowledge timer interrupt, so, until you return
>> from INT1C, your system will/can not receive other interupts (timer,
>> keyboard, etc).
DI> OK nice, still good to learn new DOS stuff :)
DI> Now, it seems like all I need to do is to trap the 28 interrupt instead of
DI> 1Ch or 8 (a 1 line patch). I did this and the interrupt is not called.
DI> I am still missing something.

 No. Unfortunately, DOS itself calls INT28 too rarely (only when it
waits onput to fill input keyboard buffer), so you should use other doors.
Ie., for example, you should trap INT21 and, if happen some event (handler
from INT1C sets some flag), then your main resident code may call DOS if DOS
not called OR you in DOS, but DOS calls INT28.

 But wait from me too much answers, I'm not write extensive resident
code. You should study, for example, libraries like TeSeRact, TSRtoo, AMIS
(management library from Ralf Brown) etc.

DI> Another thing:
DI> Looking inside the kernel in file chario.c in function: read_char_sft_dev, I
DI> see this code:
DI>   if (check_break && *pdev != syscon)
DI> check_handle_break(&syscon);
DI>   /* the idle int is only safe if we're using the character stack */
DI>   if (user_r->AH < 0xd)
DI> DosIdle_int();
DI> and also:
DI> http://www.ctyme.com/intr/rb-2739.htm

 I don't know what contained in this page. Just mention, which interrupt
you mean.

DI> Apparently I have to pass a pointer to a byte to the DOS and set that byte
DI> to 1? I think I am lost, that "manual" is not that usefull. :(

 ?




---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click
___
Freedos-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freedos-devel


Re: [Freedos-devel] monitoring screen output

2004-04-20 Thread Diego Iastrubni
ביום רביעי, 14 באפריל 2004, 23:44, נכתב על ידי Arkady V.Belousov:
> Hi!
>  Because DOS is not reenterable (you can't call most DOS function from
> inside TSR, when TSR gets control at time of DOS working), you should check
> when DOS is in idle state (see INT28 description).
>
>  Also, there are other issues, related to hardware interrupts: when
> INT8 calls INT1C, it not acknowledge timer interrupt, so, until you return
> from INT1C, your system will/can not receive other interupts (timer,
> keyboard, etc).
OK nice, still good to learn new DOS stuff :)

Now, it seems like all I need to do is to trap the 28 interrupt instead of 1Ch 
or 8 (a 1 line patch). I did this and the interrupt is not called. I am still 
missing something.

Another thing:
Looking inside the kernel in file chario.c in function: read_char_sft_dev, I 
see this code:

  if (check_break && *pdev != syscon)
check_handle_break(&syscon);
  /* the idle int is only safe if we're using the character stack */
  if (user_r->AH < 0xd)
DosIdle_int();

and also:
http://www.ctyme.com/intr/rb-2739.htm
Apparently I have to pass a pointer to a byte to the DOS and set that byte to 
1? I think I am lost, that "manual" is not that usefull. :(


-- 

diego, kde-il translation team

Please avoid sending me Word or PowerPoint attachments.
See http://www.fsf.org/philosophy/no-word-attachments.html
Free MS-Office replacement for most platforms
http://www.openoffice.org/


---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click
___
Freedos-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freedos-devel


Re: [Freedos-devel] monitoring screen output

2004-04-14 Thread Arkady V.Belousov
Hi!

14-Апр-2004 23:24 [EMAIL PROTECTED] (Diego Iastrubni) wrote to
[EMAIL PROTECTED]:

DI> I need to write a program which periodically saves the screen contents into
DI> a file. What I have done is trapping int $1C, and every 30 secs, run a 2nd
DI> procedure which opens a file and saves $B800: to it. The problem is
[...]
DI> when I open a file, and start writing to it, the emulator dies.
[...]
DI> If anyone knows what I am doing wrong, please tell me.

 Because DOS is not reenterable (you can't call most DOS function from
inside TSR, when TSR gets control at time of DOS working), you should check
when DOS is in idle state (see INT28 description).

 Also, there are other issues, related to hardware interrupts: when INT8
calls INT1C, it not acknowledge timer interrupt, so, until you return from
INT1C, your system will/can not receive other interupts (timer, keyboard,
etc).




---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click
___
Freedos-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freedos-devel


[Freedos-devel] monitoring screen output

2004-04-14 Thread Diego Iastrubni
Hi all!

I need to write a program which periodically saves the screen contents into a 
file. What I have done is trapping int $1C, and every 30 secs, run a 2nd 
procedure which opens a file and saves $B800: to it. The problem is (that 
I am stupid and forgot to pushf before calling the original handler :) that 
when I open a file, and start writing to it, the emulator dies. 

For those who lost me, I am compiling using the "free" French version of TP7 
under DOSEMU and sometimes XP.

The relevant code is, the failure point is (as far as I know) the point marked 
by {*}:


Procedure save_screen; far;
Var
   F: file;
   x,y: integer;
Begin

 Assign( f, 'f:\screen.txt' );
 ReWrite( f, 1 );

 For y:=0 to 24 do
For x:=0 to 79 do
{*}
   BlockWrite( f, screen[y][x].letter, 1  );

 Close(f);

End;

Procedure my_timer; Interrupt;
Begin

  PUSHF;
  Call(old_timer);

  If (tics mod 18) = 0
 Then Case (tics div 18) mod 3 of
0: do_something;
1: save_screen;
  End;
End;

var
  x,y: integer;
begin
 old_timer := get_int( TIMER_INT );
 set_int( TIMER_INT, @my_timer );
 readln;
 set_int( TIMER_INT, old_timer );
end.



If anyone knows what I am doing wrong, please tell me. 

PS:
does the license of the FTP7 let you use it for commercial products? Can I 
compile something with it and sell it?


TIA

-- 

diego, kde-il translation team

Please avoid sending me Word or PowerPoint attachments.
See http://www.fsf.org/philosophy/no-word-attachments.html



---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
___
Freedos-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freedos-devel