--------------- FIDO MESSAGE AREA==> TOPIC: 214 POWER BASIC Ref: CAM00003 Date: 06/07/95 From: JOSE MEJUTO Time: 10:54am \/To: GARY MAJOR (Read 4 times) Subj: Errorlevels 28 May 95 18:56, Gary Major escriba a All: Hola Gary! GM> I am looking for a way to trap an errorlevel from a shell command. GM> when Irun pkzip in a shell and i want to trap the errorlevel returned GM> by pkzip and use it in another part of my program. How could i do GM> this? Try this: -----------------------==<( Cut Here )>==--------------------------------- %AX=1 Function GetErrorLevel as INTEGER Reg %AX,&H4D00 Call Interrupt &h21 GetErrorLevel=Reg(%AX) And &HFF End Function -----------------------==<( Cut Here )>==--------------------------------- Saludotes, ,,, `0-0' JOS (2:348/102) /-(_)-\ jmejuto@encomix.com --- FD2.12+ & GoldED2.50+ & FE141+ * Origin: -=EDI=BBS=-// Santiago de Compostela //+34-81-502110 (2:348/102) --------------- FIDO MESSAGE AREA==> TOPIC: 214 POWER BASIC Ref: CAN00000 Date: 06/18/95 From: BRANDON CARNAHAN Time: 11:28pm \/To: LAWRENCE GORDON (Read 4 times) Subj: Example Code... Quoting LAWRENCE GORDON to BRANDON CARNAHAN: LG>Nice to see you posting again here, Brandon. How is the BBS project LG>coming? Not posting to often here, but read it daily :) Not too much going on the BBS project. Hit a few snags, lost a few people etc..etc.. :( Brandon // bc@primenet.com \\ --- * Don't worry, I'm go ng t b ckup t d ! --- MsgToss 2.0d(beta) 02/21/93 * Origin: Device and Data Services <602> 786-0219, 786-3964 (1:114/271) --------------- FIDO MESSAGE AREA==> TOPIC: 214 POWER BASIC Ref: CAP00000 Date: 06/19/95 From: ANTON MONROE Time: 07:11am \/To: PHILIP EATON (Read 4 times) Subj: 16 Background Colors Blin PE> I understand that the blinking would be normal. How can I set this up so PE> that I get the 16 colors and no blinking. It seems to work on some PE> systems but not on others. The machine can operate in two modes-- the "normal" one where high-numbered background colors are the same as the low ones but blinking, and another mode where all 16 colors are available for background. A call to Interrupt 10h can switch between them. It sounds like you may have gotten that far already. Since you don't say exactly how you are trying to do it, it's hard to speculate on why it doesn't work on some systems. The high-intensity/blink toggle is only available on EGA displays and better. I think I have read that the VGA has an interrupt call to get the blink status, but on an EGA you have to check a byte in segment 40h. The function below uses that because it should work on either one. You've probably figured out that it's more complicated than just having foreground and background variables from 0-15 and using the COLOR statement-- when using high-intensity backgrounds the same color has to have different numbers in the foreground and background variable. What I do is simplify it by having the same range of numbers for both variables and call a subroutine called ColorX that converts them so PB understands it. Here's some code that might be useful: SUB SetBlink (byval Blink%) '---------------------------------------------------------------------------- 'Changes video mode from blinking to bright background (Blink% = 0) or 'from bright background to blinking (Blink% = 1) '---------------------------------------------------------------------------- !Mov ax,&h1003 !Mov bx,Blink% !Int &h10 END SUB FUNCTION BlinkStatus% '---------------------------------------------------------------------------- 'Returns an integer to show if Blinking is currently on or off '0 = Blink Off (Bright Background enabled) '1 = Blink On '---------------------------------------------------------------------------- 'get current status from 40h:65h bit 5: DEF SEG = &h40 VGAModeByte? = peek(&h65) BlinkStatus% = bit(VGAModeByte?, 5) DEF SEG END FUNCTION SUB ColorX (BYVAL Frgd%, BYVAL Bkgd%) '---------------------------------------------------------------------------- 'COLORX is a replacement for COLOR intended for use when Blinking is turned 'off to allow high intensity backgrounds. It lets the Frgd% and Bkgd% 'variables each range from 0 to 15, which is easier to use than the normal 'system of making high intensity backgrounds by adding 16 to the foreground 'value. A value will represent the same color whether it is Foreground or 'Background, so COLORX can be used even if Blinking is On.