home *** CD-ROM | disk | FTP | other *** search
/ 8bitfiles.net/archives / archives.tar / archives / canada-remote-systems / geos / drivers / shelldc2.sda / EPSON8PING (.txt) < prev    next >
GEOS ConVerT  |  2019-04-13  |  5KB  |  128 lines

  1. Epson8pinG
  2. PRG formatted GEOS file V1.0
  3. Star NX-10
  4. OP V2.0 or higherII.rel
  5. PetASCII.rel
  6. BLASTER'S CONVERTER V2.5
  7. -&PChanSerial5.rel-%
  8. PChanSerial7.rel.
  9. Write Image V2.0
  10. geoWrite    V2.1
  11. .Graphics portion of generic Shell Printer Driver. Read Shell easy docs for info.
  12. @CardsWid
  13. e    =80    ;A card is 8 pixels wide.  Maximum is 80.
  14. CardsLon
  15. g    =94    ;A card is 8 pixels high.  Normal is 94.
  16.     .include    ShellZero    ;This defines fixed zero-page locations.
  17. @GraphicB
  18.     .block    1    ;This driver needs just one more byte.
  19.     .psect
  20. @InitForP
  21. rint:        ;Start program here.
  22.     rts        ;No dialog box used so just return.
  23. @PrintPag
  24.     ldx    #mBeginPage    ;Send message at beginning of each
  25.     jsr    SendMessage    ;printed page (see next page for messages).
  26. 100$    jsr    DoScan    ;Scan head across page while printing.
  27.     lda    #8    ;Since head has 8 pins in graphics mode,
  28.     jsr    MoveDown    ;move down 8 pixels.
  29.     lda    PrintMode    ;Check this byte to see if there is more to
  30.     cmp    #$3e    ;print on this page.
  31.     bcs    100$    ;Branch if there is more to print.
  32.     ldx    #mEndPage    ;Now send message at bottom of page.
  33.     jsr    SendMessage
  34. @DoScan
  35. :            ;Prints one head-scan across the page.
  36.     ldx    #mBeginScan    ;Print code sequence to print 640 graphic
  37.     jsr    SendMessage    ;dots across the page in one scan.
  38.     ldy    #1    ;Open the Window starting on card (column)
  39. 100$    jsr    OpenWindow    ;one, at the left-hand edge of the page.
  40. 200$    jsr    DoGraphicByte    ;Print one vertical byte (8 pixels high). 
  41.     jsr    ShiftPixels    ;Shift the pixels in the Window to the left.
  42.     bne    200$    ;Repeat for 8 pixels (one card or column).
  43.     ldy    ActiveColumn    ;See if the column number has progressed
  44.     iny        ;all the way across the page past column
  45.     cpy    #81    ;80.
  46.     bcc    100$    ;Repeat if column number is less than 81.
  47.     ldx    #mEndScan    ;Send message to end the head scan.
  48.     jsr    SendMessage
  49. @DoGraphi
  50. cByte:        ;Assemble 8 vertical pixels into a byte. 
  51.     ldx    #0    ;Start with top pixel. 
  52. 100$    lda    Window+24,x    ;This is the middle column of the Window.
  53.     rol    a    ;Get the left-hand pixel.
  54.     rol    GraphicByte    ;Shift it into the graphic byte for the printer.
  55.     inx        ;Move down one pixel in the Window.
  56.     cpx    #8    ;See if 8 pixels have been assembled.
  57.     bcc    100$    ;Branch if not.
  58.     lda    GraphicByte    ;Now get the assembled byte and give it
  59.     jsr    SendByte    ;to the printer.
  60. @ColorFil
  61. ters:
  62.     .word    $0001,$0000    ;black on white.
  63. @MessageO
  64. ffset:
  65.     .byte    <(m00-messages)
  66.     .byte    <(m01-messages)
  67.     .byte    <(m02-messages)
  68.     .byte    <(m03-messages)
  69.     .byte    <(m04-messages)
  70.     .byte    <(m05-messag
  71. @ColorFil
  72. ters:
  73.     .word    $0001,$0000    ;black on white.
  74. @MessageO
  75. ffset:
  76.     .byte    <(m00-messages)
  77.     .byte    <(m01-messages)
  78.     .byte    <(m02-messages)
  79.     .byte    <(m03-messages)
  80.     .byte    <(m04-messages)
  81.     .byte    <(m05-messages)
  82.     .byte    <(m06-messages)
  83.     .byte    <(m07-messages)
  84. @MessageL
  85. ength:
  86.     .byte    <(m01-m00)
  87.     .byte    <(m02-m01)
  88.     .byte    <(m03-m02)
  89.     .byte    <(m04-m03)
  90.     .byte    <(m05-m04)
  91.     .byte    <(m06-m05)
  92.     .byte    <(m07-m06)
  93.     .byte    <(m08-m07)
  94. @messages
  95. :        ;Printer code sequences (aka "messages").
  96. @mBeginPa
  97. ge    =0    ;Message to send at top of each page.
  98. m00:    .byte    ESC,"@"    ;Reset printer (for top of form).
  99. @mBeginSc
  100. an    =1    ;Send to start a graphic scan of 640 bytes.
  101. m01:    .byte    ESC,"*",4    ;Code for 80 dpi with
  102.     .word    640    ;640 bytes.
  103. @mEndScan
  104.     =2    ;Send at end of graphic scan.
  105. m02:    .byte    CR,ESC,"J",24    ;Carriage Return and Line Feed 24/216 inches.
  106. @mEndPage
  107.     =3    ;Send at bottom of page.
  108. m03:    .byte    FF    ;Form Feed to top of next page.
  109. @mBeginTe
  110. xt    =4    ;Send at top of page in DRAFT and NLQ.
  111. m04:    .byte    ESC,"@"    ;Reset printer.
  112. @mEndText    
  113. =5    ;Send at bottom 
  114. of page in DRAFT and NLQ.
  115. m05:    .byte    FF    
  116. ;Form Feed to top of next page.
  117. @mTextLin
  118. eFeed    =6    ;Send Line Feed in DRAFT and NLQ.
  119. m06:    .byte    CR,LF    ;Carriage Return and Line Feed.
  120. @mSetNLQ
  121.         =7    ;Send code to switch printer to NLQ font.
  122. m07:    .byte    ESC,"x",1    ;NLQ on.
  123. m08:            ;One more label needed to calculate length.
  124. HEpson 8-pin 80 dpi driver    
  125. Page: PAGE
  126. Printed on: DATE    At: TIME    File: Epson8pinG
  127. ----------------------------------------------------------------------------------------------
  128.