Category : Science and Education
Archive   : WDBDISK5.ZIP
Filename : IDSHDUMP.INC

 
Output of file : IDSHDUMP.INC contained in archive : WDBDISK5.ZIP
{By Fred Pospeschil - AUG 1985}

{This routine is used to dump the Z100 640 X 480 screed to an IDS
Microprism 480 and Paper Tiger 4xx series printers. It will dump the
entire screen regardless of the world coordinates used to generate
the display. It uses the lowlevel FGxxxx routines so as to use only
the Flexi-Graph MASM routines for speed considerations.}

PROCEDURE IDSHDUMP(BACKGROUND : INTEGER);
VAR
ROW : INTEGER; {LOOP CONTROL VARIABLE FOR PASSES MADE BY PRINTER}
X : INTEGER; {X AXIS LOOP CONTROL VARIABLE}
BIT : INTEGER; {LOOP CONTROL VARIABLE FOR BUILDING OUTPUT BYTES}
Y : INTEGER; {Y AXIS LOOP CONTROL VARIABLE}
BASE_Y : INTEGER; {Y COORDIATE FOR BOTTOM PRINT WIRE FOR EACH PASS}
{OF THE PRINTER}
COLOR : INTEGER; {TESTXY LOADS THIS WITH THE PIXEL COLOR}
OUT_BYTE : INTEGER; {OUTPUT BYTES ARE BUILD IN THIS VARIABLE}
BIT_VAL : ARRAY [0..6] OF INTEGER; {HOLDS SUBSCRIPTED BIT VALUES}
PRINTER : TEXT;

BEGIN {INITIALIZE THE BIT_VAL ARRAY WITH THE}
BIT_VAL[0] := 64; {BINARY VALUES WHICH EQUATE TO THE PRINTER}
BIT_VAL[1] := 32; {PRINT HEAD PINS. THIS DEFINITION IS FOR}
BIT_VAL[2] := 16; {PRINTERS WHICH USE THE TOP PRINT PIN FOR}
BIT_VAL[3] := 8; {THE LEAST SIGNIFICANT BIT IN THE BYTE WHICH}
BIT_VAL[4] := 4; {IS BEING PRINTED. SIMPLY REVERSE THE VALUES}
BIT_VAL[5] := 2; {IF THE IF THE LEAST SIGNIFICANT BIT DRIVES}
BIT_VAL[6] := 1; {THE BOTTOM PRINT PIN}

ASSIGN(PRINTER, 'PRN:'); {ALLOCATE THE OUTPUT DEVICE}
REWRITE(PRINTER); {PREPARE IT FOR WRITING}
WRITE(PRINTER, CHR(3)); {PUT THE PRINTER IN GRAPHICS MODE}
FOR ROW := 0 TO 50 DO WRITE(PRINTER, CHR(0));
WRITE(PRINTER, CHR(03), CHR(14));

FOR ROW := 68 DOWNTO 0 DO {Z100 SCREEN IS 480 PIXELS HIGH (68X7)}
BEGIN
BASE_Y := ROW * 7; {CALCULATE Y COORD FOR BOTTOM PRINT WIRE}
{FOR THIS PASS OF THE PRINT HEAD}

FOR X := 0 TO 639 DO {Z100 SCREEN IS 640 PIXELS WIDE}
BEGIN
OUT_BYTE := 0; {INITIALIZE THE OUTPUT VARIABLE}

FOR BIT := 0 TO 6 DO {IDS OUTPUTS 7 BITS PER PASS}
BEGIN
Y := BASE_Y + BIT;
IF Y < 480 THEN {BUILD THE OUTPUT BYTE}
BEGIN
FGMOVE(X,Y);
FGDOTC(COLOR); {GET COLOR OF PIXEL AT X,Y}
IF COLOR <> BACKGROUND THEN {DON'T SET BIT IF PIXEL IS}
OUT_BYTE := OUT_BYTE + BIT_VAL[BIT]; {BACKGROUND COLOR}
END;
END; {FOR BIT}

IF OUT_BYTE = 3 THEN {IF OUT_BYTE IS SPECIAL IDS}
WRITE(PRINTER, CHR(03)); {VALUE THEN WRITE IT TWICE}
WRITE(PRINTER, CHR(OUT_BYTE)); {PRINT OUT_BYTE}
END; {FOR X}
WRITE(PRINTER, CHR(03), CHR(14)); {GRAPHICS CR/LF IN GRAPHICS MODE}
END; {FOR ROW}

WRITE(PRINTER, CHR(03), CHR(02)); {EXIT GRAPHICS MODE}

CLOSE(PRINTER);
END; {SCREEN_DUMP}




  3 Responses to “Category : Science and Education
Archive   : WDBDISK5.ZIP
Filename : IDSHDUMP.INC

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/