Author Topic: Help on printing formfeeds  (Read 328 times)


  • Guest
Help on printing formfeeds
« on: January 08, 2021, 08:03:26 AM »
I want to start using MASM again and I want to get formatted and paginated listings on my Brother mono-laser printer or my Canon color inkjet.  I can't seem to get formfeed control chars imbedded in the file to be recognized.  It just prints the chars and continues on its merry way.  I want to be able to add a control statement to my asm text file like "NP" for new page and have the printer eject to new page while its printing my asm listing.  How do I do that??  anybody?? :rolleyes:  I'm using Windows 10 and Windows 7 pro


  • Member
  • *****
  • Posts: 11130
  • Assembler is fun ;-)
    • MasmBasic
Re: Help on printing formfeeds
« Reply #1 on: January 08, 2021, 09:15:13 AM »
See this recent thread. StartDoc, StartPage, EndPage, EndDoc and the EM_FORMATRANGE message are what you need (I doubt that older methods still work).


  • Administrator
  • Member
  • ******
  • Posts: 8116
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Re: Help on printing formfeeds
« Reply #2 on: January 15, 2021, 11:43:36 PM »
Joe, you might have to have a look at the printer manual as later printers have little reason to support very old character types.
hutch at movsd dot com    :biggrin:  :skrewy:


  • Member
  • ***
  • Posts: 495
    • LetTheLightIn
Re: Help on printing formfeeds
« Reply #3 on: January 16, 2021, 01:40:16 AM »
Yeh might have to use escape characters to control the line printing. Something like this might work perhaps:

Printer driver might also have to be set to a dot matrix style line printer for basic escape characters to be recognized in some cases - but some trial and error might be required to test that out, the existing brother driver might be fine with the escape chars from the pdf. Not sure about canon, but the same principle applies about using certain escape chars depending on the printer make and model.


CM690II Case, HX1000 PSU, Asus Z97, Intel i7-4790K, Seidon 120v Cooler, 16GB DDR3, MSI GTX 980TI

My Github  Twitter


  • Member
  • ****
  • Posts: 669
Re: Help on printing formfeeds
« Reply #4 on: January 16, 2021, 01:48:29 AM »
In GDI mode, scanning every line for FF and call EndPage() for it ?
May the source be with you


  • Guest
Re: Help on printing formfeeds
« Reply #5 on: January 20, 2021, 10:05:17 AM »
I want to thank all who responded and viewed this problem.  Was not able to modify my laser printer driver.  I purchased a Texas Instruments 850 RO printer (dot-matrix) used and its manual off eBay.  In process of cleaning and testing.  Ordered new ribbon and fan-fold paper.  I'll let you guys know how successful I am in this endeavor.  Thanks again for all your help..  JOE