Re: A useful .COM proggy:
Article: 8650 of alt.hackers From: mjarvis@qns2.qns.com (Michael Jarvis) Newsgroups: alt.hackers Subject: Re: A useful .COM proggy: Date: 20 Sep 1995 23:55:43 -0500 Organization: Questar Network Services Lines: 45 Approved: foo@bar.com Message-ID: 43qr8f$q4v@qns2.qns.com X-Newsreader: TIN [version 1.2 PL2] Status: RO
David Hedley (David Hedley (hedley@inferno.cs.bris.ac.uk)) wrote: Well, if we're going to do SIMPLE com files, here's one. It just sends a formfeed to lpt1. It's useful if you do a "type foo.txt > lpt1" and your printer doesn't automagically send a formfeed. It's only 17 bytes: begin 755 ff.com 1LP2Q`;H0`;1`S2&X`$S-(0S] ` end Heck, I'll even include the TASM source: ----CUT HERE----Cut Here----cut here----CUT HERE----Cut Here----cut here---- ; ff.com title 'Form Feed' .model TINY .data FormFeed db 12 .code org 100h Start: mov bl, 04h ; We're going to output to file handle 4, ; which is the standard printer (PRN) mov cl, 01h ; We're going to output one byte. lea dx, FormFeed ; Load DX with the offset of the ASCII 12 mov ah, 40h ; Using INT 21h service 40h int 21h ; Execute! mov ax, 4c00h ; End the program int 21h end Start ----CUT HERE----Cut Here----cut here----CUT HERE----Cut Here----cut here---- -- Michael Jarvis | Finger for PGP Public key | QNSnet Technical Support mjarvis@qns.com | http://www.qns.com/~mjarvis | Questar Network Services GC3.1: GCS d s+++: a26 C++++ USLV++++$ P++++ L++ E--- W++ N++ !o K+ W-- !O M- !V PS+ PE Y+ PGP+ t+ 5 X R tv b+++ DI+++ D++ G+ e>++ h---(*) r+++ y+++