#### Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

# DEF SEG and Lprinting multible printers in Qbasic.

Member Posts: 7
Hi,

I'm working on a installation which consists of one computer with three matrix printers connected to it (parallel port extension cards). See how it will work at http://www.mohr-i.nl/~marco/4kleuranni!.html
I know how I can peek and poke to the three different memory adresses.

DEF SEG &h0040
LPT1% = (peek(&h0009) * 256) + peek(&h0008)
LPT2% = (peek(&h000B) * 256) + peek(&h000A)
LPT3% = (peek(&h000D) * 256) + peek(&h000C)
DEF SEG
(thanks to ben lunt)
But I don't know how to sent text data to the three different printers.
Does annybody have some clues?

Regards

Marco
Marco@mfa.mohr-i.nl
http://www.mohr-i.nl/~marco/index.htm

• Member Posts: 7

DEF SEG &h0040

LPT1% = (peek(&h0009) * 256) + peek(&h0008)
LPT2% = (peek(&h000B) * 256) + peek(&h000A)
LPT3% = (peek(&h000D) * 256) + peek(&h000C)
DEF SEG

OPEN "LPT1:" FOR OUTPUT AS #1
OPEN "LPT2:" FOR OUTPUT AS #2
OPEN "LPT3:" FOR OUTPUT AS #3

PRINT #1, "This is LPT1:"
PRINT #2, "This is LPT2:"
PRINT #3, "This is LPT3:"

CLOSE

Ok Tom Thanks a lot.
• Member Posts: 0

__ // http://forcoder.org // free ebooks and video tutorials about / Scratch, Assembly, Ruby, Python, C#, Java, MATLAB, Visual Basic .NET, Perl, JavaScript, Delphi, Go, PHP, C++, R, Swift, PL/SQL, Objective-C, Visual Basic, C Clojure, Kotlin, F#, VBScript, ML, COBOL, Transact-SQL, D, Ada, Julia, Awk, Hack, Lua, Crystal, LabVIEW, Scheme, Logo, Lisp, Apex, SAS, Prolog, Dart, ABAP, Alice, FoxPro, Rust, Scala, Bash, Erlang, Fortran / ________