--------------- FIDO MESSAGE AREA==> TOPIC: 214 POWER BASIC Ref: D4N00001 Date: 04/14/96 From: ESTEVE VALENTI Time: 06:39pm \/To: ALL (Read 3 times) Subj: Ansi Read (2/3) '------------------------------------------------------------- '----------------- PBSCR.INC ------------------------------- '------------------------------------------------------------- ' 'ͻ ' SUB :scr.defseg 10-19-1992 '͹ ' ACTION: Define automatical the screen segment. Like DEF SEG = &Hb800 ' ' TO PASS: Nothing ' ' RETURN: Nothing ' 'ͼ sub scr.defseg def seg = scr.seg.get end sub function scr.get$ local size% size% = scr.size% call scr.defseg scr.get$ = peek$( 0, size% ) end function sub scr.put( mpant$ ) call scr.defseg poke$ 0, mpant$ end sub ' 'ͻ ' FUNCTION :scr.get.text$ 10-19-1992 '͹ ' ACTION: Return a character string with the screen text. ' ' ' TO PASS: ' posy% ===> First row of the screen text to get ' posx% ===> First column of the screen text to get ' lend% ===> Lenght of the text to get ' ' RETURN: ' scr.get.text$ ===> Character string with the screen text ' 'ͼ function scr.get.text$ ( posy%, posx%, lend% ) local text$, t$, x% text$ = scr.get.chrattr$(posy%, posx%, lend%) for x% = 1 to len(text$) step 2 t$ = t$ + mid$(text$,x%,1) next x% scr.get.text$ = t$ end function ' 'ͻ ' SUB :scr.cursor.hold 10-19-1992 '͹ ' ACTION: Put the screen cursor position in an array. ' ' TO PASS: Nothing ' ' RETURN: Nothing ' 'ͼ sub scr.cursor.hold shared scr.cur%() ' array when hold the cursor position shared scr.curp% ' array pointer if scr.curp% = 0 then redim scr.cur%(1:15,1:2) end if incr scr.curp% scr.cur%( scr.curp%, 1 ) = csrlin scr.cur%( scr.curp%, 2 ) = pos(0) end sub ' 'ͻ ' SUB :scr.cursor.rest 10-19-1992 '͹ ' ACTION: Get the holded screen cursor position and change it ' ' TO PASS: Nothing ' ' RETURN: Nothing ' 'ͼ sub scr.cursor.rest shared scr.cur%() ' array when hold the cursor position shared scr.curp% ' array pointer local y%, x% if scr.curp% > 0 then y% = scr.cur%(scr.curp%,1) x% = scr.cur%(scr.curp%,2) if y% > 0 and x% > 0 then locate y%, x% else locate 1,1 end if decr scr.curp% else locate 1,1 end if end sub ' 'ͻ ' SUB :scr.mode.def 10-19-1992 '͹ ' ACTION: Define the screen mode ' ' TO PASS: ' mode% ===> Screen mode number. See Int 10H function 00H ' of ROM BIOS book. ' ' RETURN: Nothing ' 'ͼ sub scr.mode.def( mode% ) reg 1, mode% call interrupt &h10 end sub ' 'ͻ ' FUNCTION :scr.mode.get% 10-19-1992 '͹ ' ACTION: Get the screen mode number ' ' TO PASS: Nothing ' ' RETURN: ' scr.mode.get% ===> Screen mode number ' 'ͼ function scr.mode.get% reg 1, &h0f00 call interrupt &h10 scr.mode.get% = reg(1) mod 256 end function ' 'ͻ ' FUNCTION :scr.page.get% 10-19-1992 '͹ ' ACTION: Get the number of the active screen page. ' ' TO PASS: Nothing ' ' RETURN: ' scr.page% ===> active screen page number. ' 'ͼ function scr.page.get% reg 1, &h0f00 call interrupt &h10 scr.page.get% = reg(2) \ 256 end function ' 'ͻ ' FUNCTION :scr.rows% 10-19-1992 '͹ ' ACTION: Return the maxium screen rows number ' ' TO PASS: Nothing ' ' RETURN: ' scr.rows% ===> Returns the maxium rows number of the actual ' screen: 25, 43 or 50. ' 'ͼ function scr.rows% local rows% reg 1, &h1130 ' func. 11h subfunc. 30h call interrupt &h10 ' get letter type (EGA,MCGA,VGA) rows% = (reg(4) mod 256) + 1 ' exxtract DL if rows% <> 0 then scr.rows% = rows% else scr.rows% = 25 end if end function ' 'ͻ ' FUNCTION :scr.cols% 10-19-1992 '͹ ' ACTION: Return the screen columns size. ' ' TO PASS: Nothing ' ' RETURN: ' scr.cols% ===> Returns the maxium columns number of the ' actual screen: 40, 80, 132. ' 'ͼ function scr.cols% local columns% reg 1, &h0f00 call interrupt &h10 columns% = reg(1) \ 256 scr.cols% = columns% end function ' 'ͻ ' FUNCTION :scr.size% 10-19-1992 '͹ ' ACTION: Return the size in bytes of the screen memory ' ' TO PASS: Nothing ' ' RETURN: ' scr.size% ===> size in bytes of the screen. (rows*cols*2) ' 'ͼ function scr.size% local size% size% = scr.rows% * scr.cols% * 2 size% = size% scr.size% = size% end function ' 'ͻ ' SUB :scr.text.8x8 10-19-1992 '͹ ' ACTION: Change the screen type to 8x8 character's size. ' ' TO PASS: Nothing ' ' RETURN: Nothing ' 'ͼ sub scr.text.8x8 reg 1, &h1112 reg 2, 0 call interrupt &h10 end sub ' 'ͻ ' SUB :scr.text.8x14 10-19-1992 '͹ ' ACTION: Change the screen type to 8x14 character's size. ' ' TO PASS: Nothing ' ' RETURN: Nothing ' 'ͼ sub scr.text.8x14 reg 1, &h1111 reg 2, 0 call interrupt &h10 end sub ' 'ͻ ' SUB :scr.text.8x16 10-19-1992 '͹ ' ACTION: Change the screen type to 8x16 character's size. ' ' TO PASS: Nothing ' ' RETURN: Nothing ' 'ͼ sub scr.text.8x16 reg 1, &h1114 reg 2, 0 call interrupt &h10 end sub ' 'ͻ ' FUNCTION :scr.seg.get 10-19-1992 '͹ ' ACTION: Return the screen segment number. Detect all type of graphic ' tarjets ( Hercules, CGA, EGA, VGA, SVGA, etc... ) and return ' his correspondents screen segment numbers. ' ' TO PASS: Nothing ' ' RETURN: ' scr.seg.get ===> Screen segment number. ' Hercules = &hb000 ' CGA = &hb800 if it's the first page ' EGA, VGA = &ha000 ' 'ͼ function scr.seg.get local ah%, al%, bh% local s%, o%, w% reg (1), &hf * 256 ' function "Search video mode" call interrupt &h10 ' of the ROM BIOS ah% = reg(1) \ 256 al% = reg(1) mod 256 bh% = reg(2) \ 256 w% = bh% ' actived screen page if ah% = 80 then ' screen page size o% = &h100 else o% = &h80 end if select case al% ' video mode case &h0 to &h6 ' text or medium resolution graphics s% = &hb800 case &h7 ' hercules monochrome s% = &hb000 case &h8 to &ha ' PCjr exclusive video mode s% = &hb800 case &hd to &h13 ' high resolution graphics s% = &ha000 case else s% = &hb800 end select scr.seg.get = s% + (o% * w%) end function ' 'ͻ ' FUNCTION :scr.get.chrattr$ 10-19-1992 '͹ ' ACTION: Return a character string with a selected part of the ' screen memory. ' TO PASS: ' posy% ===> First row of the screen text|attr to get ' posx% ===> First column of the screen text to get ' lend% ===> Lenght of the text to get ' ' RETURN: ' scr.get.chrattr===> Character string = "CACACACACACA" ' C = screen character ' A = color attribute of ' previus character 'ͼ function scr.get.chrattr$( posy%, posx%, lend% ) local o%, text$ call scr.defseg ' automaticall DEF SEG = o% = scr.pos2offset%( posy%, posx% ) text$ = peek$( o%, lend% * 2) ' get into the screen memory a string scr.get.chrattr$ = text$ end function ' 'ͻ ' SUB:scr.put.chrattr$ 10-19-1992 '͹ ' ACTION: Put a character string in the selected part of the ' screen memory. ' TO PASS: ' posy% ===> First row of the screen text|attr to get ' posx% ===> First column of the screen text to get ' scr.part$ ===> Character string = "CACACACACACA" ' ' RETURN: 'ͼ sub scr.put.chrattr( posy%, posx%, scr.part$ ) local o% call scr.defseg o% = scr.pos2offset( posy%, posx% ) poke$ o%, scr.part$ end sub ' 'ͻ ' FUNCTION :scr.pos2offset% 10-19-1992 '͹ ' ACTION: Translate a BASIC screen position to the correspondent ' screen memory offset ' ' TO PASS: ' posy% ===> Row Y screen position ' posx% ===> Column X screen position ' ' RETURN: ' scr.pos2offset%===> Screen memory offset ' 'ͼ function scr.pos2offset%( posy%, posx% ) local o% o% = scr.cols% * 2 * (posy% - 1) + 2 * (posx% - 1) scr.pos2offset% = o% end function ' 'ͻ ' FUNCTION :scr.color2attr% 10-19-1992 '͹ ' ACTION: Return the color attribute number of the Fore Ground and ' Back Ground color passed. ' ' TO PASS: ' fgc% ===> Fore Ground color ' bgc% ===> Back Ground color ' ' RETURN: ' scr.color2attr===> Colour attribute ' 'ͼ function scr.color2attr%( fgc%, bgc% ) local temp% temp% = (bgc% * 16) + fgc% if fgc% > 15 then temp% = temp% + 112 scr.color2attr% = temp% end function ' 'ͻ ' SUB :scr.attr2color.fn 10-19-1992 '͹ ' ACTION: Return the Fore Ground and Back Ground colors of the passed ' color attribute. ' ' TO PASS: ' attr% ===> Colour attribute value. ' ' RETURN: ' fgc% ===> Fore Ground Colour extracted of color attrib. ' bgc% ===> Back Ground Colour " " ' 'ͼ sub scr.attr2color.fn( attr%, fgc%, bgc% ) fgc% = attr% mod 8 if (attr% and 8) <> 0 then fgc% = fgc% + 8 ' intensity if (attr% and 128) <> 0 then fgc% = fgc% + 16 ' blink bgc% = ( attr% \ 16 ) mod 8 end sub ' 'ͻ ' FUNCTION :scr.attr2fgc% 10-19-1992 '͹ ' ACTION: Return the Fore Ground Colour of the passed attribute. ' ' TO PASS: ' attr% ===> Colour attribute value. ' ' RETURN: ' scr.attr2fgc% ===> Fore ground color value extracted of attrib. ' 'ͼ function scr.attr2fgc%( attr% ) local mfgc%, mbgc% call scr.attr2color.fn( attr%, mfgc%, mbgc% ) scr.attr2fgc% = mfgc% end function ' 'ͻ ' FUNCTION :scr.attr2bgc% 10-19-1992 '͹ ' ACTION: Return the Back Ground Colour of the passed attribute. ' ' TO PASS: ' attr% ===> Colour attribute value. ' ' RETURN: ' scr.attr2bgc% ===> Back ground color value extracted of attrib. ' 'ͼ function scr.attr2bgc%( attr% ) local mfgc%, mbgc% 3Ըx4   j-=mld\cQkkbal0eN bl{WٰeP긾|bI-|ӌeLXaMQ:t 0AJו=mѤjiCn4Fgи`s-D3_L | jm Zjz  ' }Dңhi]Wbgeq6lknv+ӉZzJgo߹ホCՎ`~ѡ 8ROggW?K6H+ L J6`zA`Ugn1yiFa--------------- FIDO MESSAGE AREA==> TOPIC: 214 POWER BASIC Ref: D4N00002 Date: 04/14/96 From: ESTEVE VALENTI Time: 06:41pm \/To: ALL (Read 3 times) Subj: Ansi Read (3/3) '-------------------------------------------------------------- '------------------- PBDSK.INC ----------------------------- '-------------------------------------------------------------- ' ͻ ' Subrrutina ....: FindFile ' ͹ ' Busca un fichero o grupo de ficheros en la trayectoria especificada en ' Search$. ej: Search$ = A:\*.* = el primer fichero de A:\*.* ' la siguiente llamada se hace con Search$ = "" ' Search$ = "" = el segundo fichero de A:\*.* ' ͹ ' search$ ====> Trayectoria de busqueda y fichero si procede. ' sattrib% ====> Atributo del fichero a buscar. ej: 0 = Fichero Normal ' ' Retorna...: ' f$ ===> Nombre y tipo de fichero ' fattrib% ===> Atributo del fichero ' size& ===> Longitud del fichero en bytes. ' date% ===> Byte de Fecha de grabacin del fichero. ' time% ===> Byte de Hora,Minuto,Segundo de grabacin del fichero. ' e% ===> Codigo de error. 0=No error 2=Path no valido ' 18=No hay mas ficheros ' ͼ SUB FindFile(search$,sattrib%,f$,fattrib%,size&,date%,time%,e%) PUBLIC STATIC dta%() ' static disk transfer area DIM dta%(0:31) ' 64 bytes - preserved between calls LOCAL dtas#, dtao# STATIC buf$ ' note: this must be a static variable dtas# = VARSEG(dta%(0)) dtao# = VARPTR(dta%(0)) REG 1,&h1A00 ' DOS set DTA address function REG 8,dtas# ' DS:DX = address of buffer REG 4,dtao# CALL INTERRUPT &H21 IF search$<>"" THEN 'prepare for find first call buf$ = search$+chr$(0) ' create a buffer to hold search string DEF SEG ' set default data segment REG 1,&h4E00 ' DOS find first function REG 3,sattrib% ' search attribute byte in CL REG 8,STRSEG(buf$) ' DS:DX = pointer to buffer REG 4,STRPTR(buf$) ELSE 'prepare for find next call REG 1,&h4F00 ' DOS find next function END IF CALL INTERRUPT &H21 e% = REG(1) ' get error from AX IF e%=0 THEN 'ok, so extract file info DEF SEG = dtas# f$ = PEEK$(dtao#+30,13) ' extract file f$ = LEFT$(f$,INSTR(f$,CHR$(0))-1) ' extract CHR$(0) of file fattrib% = dta%(10) \ 256 ' extract file attribute size& = CLNG( PEEKL(dtao+26) ) ' extract file size date% = dta%(12) ' extract file date time% = dta%(11) ' extract file time DEF SEG END IF END SUB * Wave Rider 1.20 [NR] * ... UNREGISTERED EVALUATION COPY --- Wave Rider v1.20 * Origin: Clot BBS 34-3-2324070 (A 14K4) / 34-3-2654579 (A 28K8) (757:101/24) --------------- FIDO MESSAGE AREA==> TOPIC: 214 POWER BASIC Ref: D4N00003 Date: 04/14/96 From: ESTEVE VALENTI Time: 06:54pm \/To: SANDER SMEENK (Read 3 times) Subj: Interrupts? SS>How do I get PowerBasic to set Register AL, AH and BL? SS>The help only says something about AX,BX,CX etc... ' 'ͻ ' SUB :kbd.speed 10-19-1992 '͹ ' ACTION: Change the speed of the keyboard rate and delay. ' ' TO PASS: ' mrate% ===> rate per second: 1 to 32 ' mdelay% ===> delay between keys: 0 fast ' ' RETURN: Nothing ' 'ͼ sub kbd.speed(mrate%, mdelay%) reg 1, &h0305 reg 2, (mdelay% * 256) + mrate% call interrupt &h16 end sub Yo can use two sistems: reg 1, &h0305 to put 03h in AH and 05h in AL or reg 2, (mdelay% * 256) + mrate% multiply the number by 256 to put this value in AH, BH, CH, etc and the add AL, BL, etc... Deu. Bye. Esteve Valenti * Wave Rider 1.20 [NR] * ... UNREGISTERED EVALUATION COPY --- Wave Rider v1.20 * Origin: Clot BBS 34-3-2324070 (A 14K4) / 34-3-2654579 (A 28K8) (757:101/24) --------------- FIDO MESSAGE AREA==> TOPIC: 214 POWER BASIC Ref: D4N00004 Date: 04/15/96 From: ABELARDO GARCES Time: 07:39pm \/To: ALL (Read 3 times) Subj: How to detect Desqview and others multit19:39:4404/15/96 * Original message posted in: quik_bas. * Crossposted in: power_bas, alt.lang.basic, comp.lang.basic.misc. Hello ! I search a method for detect DesqView and others populars multitask if present. I use POWER BASIC and QUICK BASIC 4.5 Thanks! Abelardo Garces agarces@absint.login.qc.ca --- FMail/386 1.02+ * Origin: ABS International, Montreal, Canada * 514.937.7451 (1:167/136)