TIP: Click on subject to list as thread! ANSI
echo: power_bas
to: CARLES MATEO
from: JOSE MEJUTO
date: 1995-09-03 03:25:00
subject: SHELL in a window

30 Aug 95 15:15, Carles Mateo escrib¡a a ALL:
Hola Carles!
 CM> I want to do a SHELL in a window just like :
 CM>  *********************************
 CM>  |                               |
 CM>  |       ================        |<-+-- SCREEN
 CM>  |       | SHELL WINDOW |        |
 CM>  |       ================        |
 CM>  |                               |
 CM>  *********************************
 CM> I want to SHELL to another program without overwriting my screen.
 Ummmh! big trouble! If the 'shelled' program writes directly to the screen, 
there are no way to do that. If the program uses standard DOS services you 
can do that coding and assembly routine, but the problem is the INT 29h 'DOS 
fast putchar' that is undocumented, and don't works in the same way in all 
DOS.
 CM> Can someone help me ?
 If you are going to use the routine in a machine with an VGA or EGA you can 
use a simple VGA trick, that skips the problem with direct screen writes. The 
effect is something like this:
-----------------------====---------------------------------
 ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
 ³       Shell         ³
 ³      WINDOW         ³
 ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
 ³   Your program      ³
 ³      WINDOW         ³
 ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
-----------------------====---------------------------------
 The code is something like this:
-[ Start: TWICKVGA.BAS ]--==---------------------------------
Call TwickVGA(1) 'Twick VGA
Shell
Call TwickVGA(2) 'Restore VGA
Shell
End
Sub TwickVGA(Switch%)
    Local Segment??
    Segment??=&H0B800
    Swap PbvDefSeg,Segment??
    Scry%=CsrLin
    Scrx%=Pos(0)
    If Switch%=1 Then
'   ------Twiking my VGA
       Poke$ 8000,Peek$(320,1120)
       Poke$ 9440,Peek$(1440,2560)
       Out &H3D4,&H0C
       Out &H3D5,15          ' VGA values (I can't remenber what thay do)
       Out &H3D4,&H0D
       Out &H3D5,160         ' VGA values (I can't remenber what thay do)
       Poke$ 4000,Peek$(9440,2560)
       Poke$ 2560,Peek$(8000,1120)
       Out &H3D4,&H0C
       Out &H3D5,5            ' VGA values (I can't remenber what thay do)
       Out &H3D4,&H0D
       Out &H3D5,0            ' VGA values (I can't remenber what thay do)
    Else
'-------UnTwiking my VGA
       Poke$ 8000,Peek$(2560,4000)
       Out &H3D4,&H0C
       Out &H3D5,15           ' VGA values (I can't remenber what thay do)
       Out &H3D4,&H0D
       Out &H3D5,160          ' VGA values (I can't remenber what thay do)
       Poke$ 0,Peek$(8000,4000)
       Out &H3D4,&H0C         ' VGA values (I can't remenber what thay do)
       Out &H3D5,0
       Out &H3D4,&H0D
       Out &H3D5,0            ' VGA values (I can't remenber what thay do)
    End If
    Swap PbvDefSeg,Segment??
    Locate Scry%,Scrx%
End Sub
-[ End: TWICKVGA.BAS ]----==---------------------------------
 This is an older code, and I don't remenber what it do exactly :-?
 CM> I need this info urgently cause I need to finish my program.
 I'm trying to help you ;-)
Saludotes,
       ,,,   JOS (2:348/102)
      `0-0'  jmejuto@encomix.com
     /-(_)-\ mejuto@sfdzuma.usc.es
--- FD2.12+ & GoldED 2.50+ & FE145+
---------------
* Origin: -=EDI=BBS=-// Santiago de Compostela //+34-81-502110 (2:348/102)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.