Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!rutgers!usc!orion.cf.uci.edu!uci-ics!zardoz!dhw68k!arcturus!mitch From: mitch@arcturus.UUCP (Mitchell S. Gorman) Newsgroups: comp.lang.pascal Subject: Re: Printer control with Turbo Message-ID: <5440@arcturus> Date: 18 Jul 89 16:21:57 GMT References: <1474@laura.UUCP> Organization: Rockwell International, Anaheim, CA Lines: 39 st%trillian.irb@unido.uucp (Stefan Timphus) writes: >A while ago I asked how I could send Escape-codes to the printer, but >nobody could really answer that. Now while testing the same for Turbo-C >I found the solution (at least for my printer). >This doesn't work : >T-Pascal : write(lst,#27,'G'); > write(lst,chr(27),'G'); >But try this : >T-Pascal : write(lst,chr($1b),'G'); Or, you could simply send a bunch of byte values to the printer, like this: write(lst, #27#71); { Esc-G } I'm working an application right now that will be running with a laser printer. Unfortunately, I am currently the embarrassed owner of an MX-80. In order to test my reports. I've set up compiler directives that define constants like this: {$ifdef hp} bold=#27##; . . . {$else} bold=#27#; . . . {$endif} Then, the correct escape sequence will be sent depending on my compiler directve status (hp). TYhis works just fine. Mitch @ Rockwell, Anaheim Disclaimer: I don't _care_ if you don't care!!