Category : BASIC Source Code
Archive   : CAPSTAT.ZIP
Filename : CAPSTAT.SUB

 
Output of file : CAPSTAT.SUB contained in archive : CAPSTAT.ZIP
':::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
':::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
'::: :::
'::: :::
'::: PROGRAM: CAPSTAT.SUB :::
'::: AUTHOR: Mike Shaffer :::
'::: DATE: Feb 2, 1991 :::
'::: VERSION: 2.0 :::
'::: PURPOSE: Determines if printer capture is turned :::
'::: on for a Novell workstation, and if so, :::
'::: which device the captured output is being :::
'::: directed to. :::
'::: REVISIONS: :::
'::: :::
'::: :::
'::: :::
'::: NOTES: This program assumes you're using PDQ from :::
'::: Crescent Software. If not (shame on you!) :::
'::: than you can modify the interrupt call to :::
'::: use INT86 as provided with QuickBASIC, and :::
'::: take out the reference to PDQDECL.BAS :::
'::: :::
'::: :::
':::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
':::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
'
sub CAPSTAT(capst%,conid%) static
'
dim regs as regtype ' Create type to hold registers
' ' NOTE: regtype is defined in
' ' the PDQ declarations
' ' include. If you're not
' ' using PDQ, you'll
' ' probably want to use
' ' INT86 as provided by
' ' QuickBASIC, in which
' ' case the interrupt
' ' control structure will
' ' be an integer array.
' ' (see the QB docs)
' '
' '
' '
regs.ax = &hF003 ' AH=&hF0, AL=&h03
' ' Function to get cap status
interrupt &h21,regs ' So we get it!
' '
temp& = regs.ax ' Move to long integer
if temp&<0 then temp&=temp&+65536 ' Compensate for INT>32767
al = temp& and &hFF ' Get value of AL
ah = temp&\256 ' Get value of AH
if ah = &hFF then ' Yes, capture active!
capst% = -1 ' Set flag and
conid% = al ' Set connection ID
else ' ELSE
capst% = 0 ' clear flag and
conid% = 0 ' clear connection ID
end if '
' '
end sub ' Done!
'




  3 Responses to “Category : BASIC Source Code
Archive   : CAPSTAT.ZIP
Filename : CAPSTAT.SUB

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/