M EQU Byte Ptr 0[BX] TITLE 'Bitmap SCAN OUTPUT PROCESSOR' DGROUP GROUP DATA ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; ; ; ; ; SCANER : SCAN AND OUTPUT one 'PLOT STRIP' from BITMAP to PRINTER ; ; ; Monochrome printer ; ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; ; ; Revision : Dec. 14, 1983 File "SCANER.A86" Version 1.0 ; ; Dec-14-84: Check Console Key Press, allowing output to be stopped. ; ; ; ; Scaner (pline, xw, pixl, mapend, mpty) ; ; ; ; Function : SCAN and OUTPUT entire 'PLOT STRIP' from BITMAP to PRINTER. ; ; ; ; for j = 1 to PLINE ;loop to output one strip ; ; call GSCAN ; output one line ; ; output GLF } ; Graphic LineFeed ; ; ; ; Input : PLINE - No. of print lines per plot strip ; ; XW - No. of bytes per print line ; ; LSIZE - Offset to the start of next line to output in Bitmap ; ; MAPEND - First Byte address pointer in BITMAP buffer ; ; ; ; Output : None ; ; ; ; Calls : GSCAN - Transpose and output Image buffer to printer ; ; ; ;----------------------------------------------------------------------------; ; CALL SCANER ; RET ; PUBLIC SCANER Extrn GSCAN:near, GLF:near, Check_abort:near dseg ;;;;;; EXTRN BITMAP:word Extrn MAPEND:word, mpty:word, XMAX:word, YMAX:word EXTRN YW:word, PLINE:word, NSTRIP:word, PIXL:word EXTRN BYTEND:word, XW:word, BMIN:word, Abort_flg:byte PUBLIC ISTBYT ISTBYT RS 02 cseg SCANER: MOV Bx, Word Ptr MAPEND ; = first byte address in bitmap ; to start scanning bit pattern Mov Word Ptr ISTBYT, Bx MOV Cx, Word Ptr PLINE ;No. of Print Lines per Strip ; PLINE = Outer loop count ; for j = 1 to pline JLOOP: PUSH CX ; Save pline count Push Bx ; Save Byte Pointer ; If Bitmap is empty, skip scanning data for output Cmp Byte Ptr MPTY, 0 ; Check Empty flag for this plane Je jloop9 Call GSCAN ; Output one scan line jloop9: CALL glf ; Output Graphic LineFeed Pop Bx ; Get Byte Pointer POP CX ; Get PLINE count DEC CX ; Decrement pline count, Done yet? JZ sent ; Check Console status Call Check_abort Cmp Byte Ptr Abort_flg, 0ffH Je sent ; Stop output if abort flag is set Sub Bx, Word Ptr BMIN Mov Word Ptr ISTBYT, Bx ; Update Buffer Pointer Jmp Jloop sent: RET ; Yes, Return END