Syntax10.Scn.Fnt8FoldElemsNew#Syntax10.Scn.FntVV(*---------------------------------------------------------------- Dsp offers screen output in low-level modules that can neither import Out nor Texts. It directly draws into the right bottom corner of the screen overwriting anything which is displayed there. If the output area has been filled by Dsp the lines wrap around and the output goes to the first line of the output area again. Dsp.Set(x, y) sets the top-left corner of the output rectangle (default = (800, 400)). Dsp.Char(ch) writes ch. Dsp.Ln skips to the next line. Dsp.String(s) writes string s. Dsp.Int(x) writes number x with as many digits as necessary. Dsp.Off switches further output off. Anything written with Dsp will be invisible. Dsp.On switches further output on again. Dsp.Reset Clears the output area. ----------------------------------------------------------------*)Syntax10i.Scn.Fnt 8+StampElemsAlloc26 Jun 98xp_VersionElemsAllocBeg#Syntax10.Scn.FntWindows PowerMacWindowsWindows PowerMac$Syntax14b.Scn.FntPOWERMAC VERSIONSyntax14b.Scn.Fntp_VersionElemsAllocEnd ~p#Syntax10.Scn.FntPowerMac WindowsWindowsPowerMac#Syntax10.Scn.Fnt Macintosh, Windows pSyntax10b.Scn.Fntqp#Syntax10.Scn.FntPowerMac WindowsWindowsPowerMac#Syntax10.Scn.Fnt Macintosh.FlushCache; Windows p(qwT)&Documentation MODULE Dsp; (* HM  WINDOWS VERSION*) IMPORT Display, Fonts; VAR Y: INTEGER; (*current base line*) X: INTEGER; (*position of next character in base line*) top, left: INTEGER; (*left margin of current line*) on: BOOLEAN; windowCleared: BOOLEAN; fnt: Display.Font; dsr, lsp: INTEGER; PROCEDURE Set* (x, y: INTEGER); BEGIN left := x; top := y; X := x; Y := y; Display.ReplConst(Display.black, left, 1, Display.Width - left - 1, top + dsr + lsp - 1, Display.replace); windowCleared := TRUE END Set; PROCEDURE Char* (ch: CHAR); VAR dx, x, y, w, h: INTEGER; pat: Display.Pattern; BEGIN IF on THEN Display.GetChar(fnt, ch, dx, x, y, w, h, pat); Display.CopyPattern(Display.white, pat, X + x, Y + y, Display.replace);  X := X + dx END END Char; PROCEDURE Ln*; BEGIN IF on THEN X := left; Y := Y - lsp; IF Y + dsr < 0 THEN Set(left, top) END END END Ln; PROCEDURE String* (s: ARRAY OF CHAR); VAR i: INTEGER; BEGIN i := 0; WHILE s[i] # 0X DO Char(s[i]); INC(i) END END String; PROCEDURE Int* (n: LONGINT); VAR d: ARRAY 10 OF CHAR; i: INTEGER; BEGIN IF n < 0 THEN Char("-"); n := -n END ; i := 0; REPEAT d[i] := CHR(30H + n MOD 10); n := n DIV 10; INC(i) UNTIL n = 0; REPEAT DEC(i); Char(d[i]) UNTIL i = 0 END Int; PROCEDURE On*; BEGIN IF ~ windowCleared THEN Set(800, 400) END; on := TRUE END On; PROCEDURE Off*; BEGIN on := FALSE END Off; PROCEDURE Reset*; BEGIN Set(left, top) END Reset; BEGIN fnt := Fonts.Default.raster; lsp := Fonts.Default.height; dsr := Fonts.Default.minY; windowCleared := FALSE; Off END Dsp.