http://www.ousob.com --- Legacy Redefined #include <bios.h> #include <extend50.h> #define READY 1 #define NOT_READY 0 CLIPPER b_chklpt() { union { unsigned rtrn; struct { unsigned time_out : 1; unsigned not_used : 2; unsigned io_error : 1; unsigned selected : 1; unsigned no_paper : 1; unsigned acknowlege : 1; unsigned ready : 1; unsigned high_byte : 8; } s; } status; unsigned outbyte; int lpt_port; int ret_val = NOT_READY; if( !ISNUM(1) ){ _retl(ret_val); return; } lpt_port = (_parni(1) - 1); if( (lpt_port >= 0) && (lpt_port <= 4) ){ status.rtrn = _bios_printer(_PRINTER_STATUS, lpt_port, outbyte); if( (status.s.selected) && (status.s.ready) ){ ret_val = READY; } } _retl(ret_val); }