Skip to contentSkip to conversation

PrintScreen

DISCUSSION Stas Sergeev 2 participants 2 messages Jan 10, 2003 – Jan 11, 2003

lore
Share & tools
lore
#0 lore raw

Hello.

Quoted 2 lines · Jan Willem Stumpel

Pressing the PrtSc key in dosemu (1.1.4.0) prints the (text) screen, which is a nice surprise.

Why? I can assure you you'll have
the same also with 1.1.3.
What did you expect anyway? :)

Quoted 4 lines

Specifying a different printer in dosemu.conf works for "normal" DOS printing (printing from applications and COPYing to LPT1), but not for PrtSc: the printer always seems to be "lp". Can anyone confirm this? Is there a fix?

Maybe the attached patch can help?

base/async/int.c +6 -6
@@ -1471,15 +1471,15 @@
 int x_pos, y_pos;
 ushort *base=SCREEN_ADR(READ_BYTE(BIOS_CURRENT_SCREEN_PAGE));
     g_printf("PrintScreen: base=%p, lines=%i columns=%i\n", base, li, co);
-    printer_open(1);
+    printer_open(0);
     for (y_pos=0; y_pos < li; y_pos++) {
 	for (x_pos=0; x_pos < co; x_pos++) 
-	    printer_write(1, READ_BYTE(base + y_pos*co + x_pos));
-	printer_write(1, 0x0d);
-	printer_write(1, 0x0a);
+	    printer_write(0, READ_BYTE(base + y_pos*co + x_pos));
+	printer_write(0, 0x0d);
+	printer_write(0, 0x0a);
     }
-    printer_flush(1);
-    printer_close(1);
+    printer_flush(0);
+    printer_close(0);
 }
 
 static void int05(u_char i) 
#1 lore raw
Quoted 1 line · Stas Sergeev

Maybe the attached patch can help?

Works!

Regards, Jan