Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community

At 23 JAN 2002 05:59:40PM Frank Ritts wrote:

I can't print to Lpt4 through Lpt9 on a W2k machine through a windows nt server. I have Arev 3.12 setup to us 9 printer ports in the printer env and select printer to 4 through 9 produces a printer output to the lpt3 port and printer. I can print from dos with dir ] lpt4.lpt9 and it works. What am I doing wrong? Any help thanks.

Frank


At 24 JAN 2002 12:14AM Warren wrote:

NET USE LPTx \\server\printer_name should work


At 24 JAN 2002 01:57AM Frank Ritts wrote:

Net use is waht I have. It will print from dos, but not from Arev. It always seems to go to lpt3 when I setprinter to 4 through 9. I'm looking all over the place for this fix.


At 27 JAN 2002 06:58PM [url=http://www.sprezzatura.com]The Sprezzatura Group[/url] wrote:

Frank,

The problem with programming for lpt4-9 is that these ports are usually at non-standard memory addresses (related to your specific hardware) rather than lpt1-3 which are standard - 378h, 278h and 3f8h (from memory). So there's no way that AREV could have been designed with your hardware in mind. The addresses for the standard lpt1&2 ports live in a DOS BIOS area at addresses 0040:0008h and 0040:000Ah, (there's probably a device driver required to nominate the addresses of your other ports).

C:\]debug

-d 0040:0008

* here you'll see the lpt1/2/3 addresses across 2 bytes per port

-q

C:\]

It is likely that $prnstat and other printer support routines do no recognize/enable the ports for lpt4-9.

At a pinch you could always use a modified version of this lptswap.com routine, which was used on PCs c. 1988 to toggle between two printers addressed as lpt1. Running this utility made lpt2 accept input from lpt1. You could patch in your own addresses and swap, say lpt4 for lpt1 (and back again afterwards) or lpt5 for lpt1 accordingly. This routine can also be adjusted and compiled as an AREV object.


;LPTSWAP

data_1e		equ	8			
data_2e		equ	0Ah			

seg_a		segment	byte public
		assume	cs:seg_a, ds:seg_a

		org	100h

lptswap		proc	far

start:
		push	ds
		mov	ax,40h
		mov	ds,ax
		mov	bx,ds:data_1e		; lpt address
		mov	cx,ds:data_2e		
		mov	ds:data_1e,cx		; lpt address
		mov	ds:data_2e,bx		
		pop	ds
		cmp	cx,378h
		jne	loc_1			; Jump if not equal
		mov	al,31h			; '1'
		jmp	short loc_2		
loc_1:						
		mov	al,32h			; '2'
loc_2:						
		mov	byte ptr data_3+18h,al	
		mov	dx,offset data_3	
		mov	ah,9
		int	21h			
		int	20h			
data_3		db	0Dh, 0Ah, 'LPT1 redirected to LPT'	  
		db	'1', 0Dh, 0Ah, '$'

lptswap		endp
seg_a		ends
		end	start

The Sprezzatura Group

World Leaders in all things RevSoft

View this thread on the forum...

  • third_party_content/community/commentary/forums_nonworks/394a9a775ef3a34988256b4a007e5020.txt
  • Last modified: 2024/01/04 21:00
  • by 127.0.0.1