From 98cab31fc3659e33aef260efca55bf9f1753164c Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Mon, 11 Feb 2019 11:49:19 +0100 Subject: Add source files from Michael --- system/std.zusatz/1.7.3/src/MINPRINT.ELA | 94 ++++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 system/std.zusatz/1.7.3/src/MINPRINT.ELA (limited to 'system/std.zusatz/1.7.3/src/MINPRINT.ELA') diff --git a/system/std.zusatz/1.7.3/src/MINPRINT.ELA b/system/std.zusatz/1.7.3/src/MINPRINT.ELA new file mode 100644 index 0000000..a0bd44a --- /dev/null +++ b/system/std.zusatz/1.7.3/src/MINPRINT.ELA @@ -0,0 +1,94 @@ +PACKET minimal font routines DEFINES lf height of current font, + x factor per inch, + y factor per inch: + +REAL CONST lf height of current font :: 2.54 / 6.0; +INT CONST x factor per inch :: 10, + y factor per inch :: 6; + +END PACKET minimal font routines; + +PACKET minimal printer (* 25.04.84 *) + DEFINES material, + start, + new page, + reset printer, + line, + print text , + printer cmd, + on, + off, + x pos, + y pos, + papersize, + limit, + change type: + + +PROC change type (TEXT CONST name of type): ENDPROC change type; + +PROC material (TEXT CONST value): END PROC material; + +PROC start (REAL CONST x,y): END PROC start; + +PROC papersize (REAL CONST x,y): END PROC papersize; + +PROC limit (REAL CONST l): END PROC limit; + +PROC on (TEXT CONST cmd): END PROC on; + +PROC off (TEXT CONST cmd): END PROC off; + +PROC xpos (REAL CONST cm): END PROC xpos; + +PROC ypos (REAL CONST cm): END PROC ypos; + +PROC printer cmd (TEXT CONST cmd): + out (buffer); buffer := ""; + out(cmd) +END PROC printer cmd; + +INT VAR actual line ; + +TEXT VAR buffer; + +PROC reset printer: + buffer := ""; + actual line := 0 +ENDPROC reset printer; + +PROC print text (TEXT CONST content, INT CONST mode): + buffer CAT content +ENDPROC print text; + +PROC new page: + IF buffer <> "" + THEN line (1.0) + FI; + actual line := actual line MOD 72 ; + IF actual line > 0 + THEN page feed + FI . + +page feed : + INT VAR i ; + FOR i FROM actual line UPTO 71 REP + out(" "13""10"") + PER ; + actual line := 0 + +ENDPROC new page; + +PROC line (REAL CONST lf): + out (buffer); buffer := ""; + IF lf > 0.0 + THEN REAL VAR ist := 0.0 ; + REP + out (""13""10"") ; + actual line INCR 1 ; + ist INCR 1.0 + UNTIL ist >= floor (lf) PER + FI +ENDPROC line; + +ENDPACKET minimal printer; -- cgit v1.2.3