summaryrefslogtreecommitdiff
path: root/dynamo/dyn.print
diff options
context:
space:
mode:
authorLars-Dominik Braun <lars@6xq.net>2016-09-30 16:57:23 +0200
committerLars-Dominik Braun <lars@6xq.net>2016-09-30 16:59:06 +0200
commit724cc003460ec67eda269911da85c9f9e40aa6cf (patch)
tree14e27b45e04279516e4be546b15dcf6fafe17268 /dynamo/dyn.print
downloadeumel-src-724cc003460ec67eda269911da85c9f9e40aa6cf.tar.gz
eumel-src-724cc003460ec67eda269911da85c9f9e40aa6cf.tar.bz2
eumel-src-724cc003460ec67eda269911da85c9f9e40aa6cf.zip
Add extracted sources from floppy disk images
Some files have no textual representation (yet) and were added as raw dataspaces.
Diffstat (limited to 'dynamo/dyn.print')
-rw-r--r--dynamo/dyn.print43
1 files changed, 43 insertions, 0 deletions
diff --git a/dynamo/dyn.print b/dynamo/dyn.print
new file mode 100644
index 0000000..36ea279
--- /dev/null
+++ b/dynamo/dyn.print
@@ -0,0 +1,43 @@
+PACKET dynamo printer DEFINES initialize print, new line, print :
+
+BOOL VAR prt;
+TEXT VAR headline;
+REAL VAR prtper, nextprint;
+
+PROC initialize print (TEXT CONST h) :
+ headline := h;
+ prtper := get prtper;
+ nextprint := 0.0
+END PROC initialize print;
+
+PROC new line (REAL CONST time) :
+ IF time >= nextprint
+ THEN do lf
+ ELSE prt := FALSE
+ FI;
+ WHILE time >= nextprint REP
+ nextprint INCR prtper
+ PER.
+
+ do lf :
+ print line;
+ prt := TRUE;
+ IF pagefeed necessary OR NOT was print
+ THEN vdt;
+ sys page;
+ print headline
+ FI;
+ print (time).
+
+ print headline :
+ println ("TIME " + headline).
+END PROC new line;
+
+PROC print (REAL CONST r) :
+ IF prt
+ THEN print output (text (text (round (r, 5)), 13))
+ FI
+END PROC print
+
+END PACKET dynamo printer
+