printing with formfeeds

I have some old assembly listing files that are text, paged by formfeed characters. I can't find a way to print nice listings on a modern laser printer/copier. They ignore the formfeeds or print a black box.

Any ideas?

Maybe I could write a program to replace the ff's with a control sequence or something?

Reply to
John Larkin
Loading thread data ...

man pr The old fashion way.

Reply to
Ed Lee

????

Actually, Word will do it. It's not entirely obvious.

Reply to
John Larkin

pr file.asm > file.txt (then ftp to printer machine) or pr file.asm | lpr (for native linux)

man pr (for manual). default is 55 lines per page, can be overridden.

Reply to
Ed Lee

Page breaks are not really considered part of the responsibility of modern text editors.

I don't suppose you'd be willing to paste it into a word processing program such as Word (or one of the free ones)?

Of course you'll want to set up a monospaced font. You *could* use Courier, but why with nostalgic fonts like this one available?

formatting link

Reply to
Spehro Pefhany

Word does it. It fooled me by refusing to let me drag-drop a text file onto the icon, or drag it into a doc, but it does eventually allow a text file to be opened, and printed properly. This is an old 68K assembly program that I need to update to replace an EOL digital capacitor chip. I want a paper listing to scribble on. Just getting all the tools to work was fun.

That isn't a real chain font; the characters are spaced too well horizontally. Drum printers scattered them vertically.

There must be typewriter and dot matrix fonts.

Reply to
John Larkin

Ed Lee snipped-for-privacy@gmail.com wrote in news:304707f9-4854-4c75- snipped-for-privacy@googlegroups.com:

Output to a text file and then edit the file and remove the offending control sequences.

Reply to
DecadentLinuxUserNumeroUno

It's already a text file, an assembly listing.

The "control sequence" is a single formfeed character per page. But I want that to shoot out a fresh page!

There might actually be some escape sequence that the Cannon copier/printer accepts as a page feed, but I can't find it.

Reply to
John Larkin

Try Unix (or linux). Maybe Microsoft doesn't like to print other company's output?

Hul

John Lark> I have some old assembly listing files that are text, paged

Reply to
Hul Tytus

Wordpad (not Notepad) should do the trick. You'll likely want to pick a fixed-width font to ensure the columns (opcode, args, comments) line up pretty.

Reply to
Don Y

A unix / Linux one line script using sed would do that. Using the substitute s command. Something like:

echo <infile> | sed s/oldchar/newchar/ > <outfile>

Don't do much script here, but quite amazing what can be done in a single line with standard commands and pipes...

Chris

Reply to
chris

You also need to count lines before FF and pad up to 66 lines (55 + top and bot margins). That's exactly what "pr" does.

Interesting to know how many ways to replace "pr".

Reply to
Ed Lee

John Larkin <jlarkin@highland_atwork_technology.com> wrote in news: snipped-for-privacy@4ax.com:

I am saying to use a filter to pull everything out but the text. Then you can put whatever you want there to make it work right.

Reply to
DecadentLinuxUserNumeroUno

The 'old typewriter' and dot matrix fonts are easy to find but the creators of the whole programming paradigm didn't anticipate wanting variations like that.

If you have access to a Adobe Indesign there's a free plugin from Beetroot Design called Humane Type that will convert all those sterile perfectly aligned characters into more organic crappy alignment.

It's not ideal and some of the effects look like they were designed by a millenial trying to emulate photocopier distortions rather than typographic variations. A real artist would do each one individually. A real engineer would write a custom script.

Reply to
Spehro Pefhany

The way that "pr" handles that is by adding the correct number of linefeeds at every formfeed character to skip exactly to the next page.

It is a broken approach that falls apart when the printer does auto-wrap too long lines (printers did not do that at the time pr was written...) or when there are other uncontrollable vertical spacing problems.

It normally is the formfeed (FF, hex 0C) character. When the printer does not recognize that, it is unlikely that it recognizes something else.

These days, printers normally do not get fed with plain characters, CR, LF, TAB and FF. The pages get rendered in the computer and get sent in a page description language that is either some printer-dependent thing, or Postscript. The printer is not involved in layout issues anymore.

Reply to
Rob

I can write a program to find formfeeds and replace with some escape sequence that the copier/printer recognizes as a page feed; I just don't know what will work. Googling didn't help.

Actually, I'm not sure that I can actually send a stream of characters to this kind of printer... opened as LPT3: or something. There may be drivers in the way.

Reply to
John Larkin

Is that a Linux thing?

I thought about writing a program to do that, but Word seems to work.

Yes, some lines wrap, even in landscape mode.

Reply to
John Larkin

Many times now I kind of wish I still had a nice page printer with tractor feed and lots of paper for those long listings... Like we used to do decades ago.

I should not have recycled my big box of tractor feed paper just a few years ago !

Reply to
boB

I have a box of 8.5x11 (microperf edges so you can rip the tractor feed holes off). But, I try hard to avoid paper.

There are tools that let you annotate "electronic paper" in much the same way that you would markup paper listings in days past.

Personally, I like not having stacks of paper lying around the office. There's enough shi^H^H^Htuff there, already!

And, project listings that were 20-50 pages are now 2000 - 5000 pages...

Reply to
Don Y

You can still buy it. I see 2700 sheets for about $87 USD equivalent.

I have a Panasonic KX-P1124 kicking around- you can still get clone ribbons for it at $14 for 6 pieces free ship in the US.

But .. why ? These days most likely the issue is in some code that someone else wrote or in your interpretation of it.

Reply to
Spehro Pefhany

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.