X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f From: s4somesh AT yahoo DOT co DOT in (Somesh Bartakkay) Newsgroups: comp.os.msdos.djgpp,comp.os.msdos.misc Subject: Printer TSR with watcom Date: 8 Jan 2004 02:27:35 -0800 Organization: http://groups.google.com Lines: 54 Message-ID: <5cc5bb23.0401080227.728e48f8@posting.google.com> NNTP-Posting-Host: 220.224.55.97 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1073557656 16230 127.0.0.1 (8 Jan 2004 10:27:36 GMT) X-Complaints-To: groups-abuse AT google DOT com NNTP-Posting-Date: Thu, 8 Jan 2004 10:27:36 +0000 (UTC) To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com We are using causway 32-bit extender for watcom compiler. We are working with a PRINTER related program. In this we want to capture the BYTE send to printer, this is done when printer interrupt occures(which is 23 or 17h). This task is possible through Borland's TURBO C++ compiler. It allows directly to access the data byte in register with _AL, _AH variables. Following code works with Turbo C++,it replaces any char from file with 'P' while sending to printer.The same I want to use with causway 32-bit extener with watcom compiler. ----------------------- #include void interrupt (*prev)(); void interrupt our(); void interrupt our() { if(_AH==0) _AL='P'; /* Here _AL returns the exact character going to print, which can be captured */ (*prev)(); } void main() { prev = getvect(23); setvect(23,our); keep( 0, 1000 ); } When i compiled code with watcom, it giving Error for _AL/_AH variables. so i wanna know : 1.How to get the BYTE being send to printer ? 2.Is there any other method to access the data which is going to printer after the interrupt 23 occures? Somesh Bartakke Software Engineer ImagePoint Technologies Pvt Ltd Pune (India)