home *** CD-ROM | disk | FTP | other *** search
/ Oakland CPM Archive / oakcpm.iso / sigm / vol147 / pitch.a86 < prev    next >
Encoding:
Text File  |  1984-04-29  |  2.4 KB  |  110 lines

  1. ;************************************************
  2. ;*                        *
  3. ;*    NEC 8023 Font switching utility        *
  4. ;*                        *
  5. ;************************************************
  6. ;
  7. ;    By    Bill Bolton
  8. ;        NEC Information Systems Australia
  9. ;        99 Nicholson St.,
  10. ;        St. Leonards,
  11. ;        NSW, 2065
  12. ;        Australia
  13. ;
  14. ;        Phone (02) 439-3544 (Australia)
  15. ;              61-2-439-2544 (International)
  16. ;
  17. ;        Telex AA27411
  18. ;
  19. ;        Fax   (02) 439-6584 (Australia)    
  20. ;              61-2-439-6584 (International)
  21. ;
  22. ;    VERSION LIST, most recent version first
  23. ;
  24. ;01/Mar/83 Added pick up of pitch from command line and
  25. ;       version number in signon message. Version 1.1 [BB]
  26. ;
  27. ;14/Jan/83 Initial Version 1.0 [BB]
  28. ;
  29. FALSE    EQU    0
  30. TRUE    EQU    NOT FALSE
  31. ;
  32. BASE    EQU    0
  33. FCB    EQU    BASE+05CH
  34. ;
  35. PRINT    EQU    5        ;CP/M-86 BDOS list output function
  36. STRING    EQU    9        ;CP/M-86 BDOS string display function
  37. ;
  38. ALF    EQU    0AH        ;ASCII Line feed
  39. ACR    EQU    0DH        ;ASCII Carriage return
  40. ESC    EQU    01BH        ;ASCII escape
  41. ;
  42. OPTION17 EQU    'Q'
  43. OPTION12 EQU    'E'
  44. OPTION10 EQU    'N'
  45. ;
  46. VER    EQU    11            ;Current version number
  47. ;
  48.     CSEG
  49. ;
  50. START:
  51.     MOV    CL,STRING
  52.     MOV    DX,Offset SIGNON
  53.     INT    224                ;Tell them who we are
  54.     MOV    AL,Byte Ptr .FCB+1        ;Point to command line
  55.     CMP    AL,' '                ;Command present?
  56.     JE    EREXIT                ;No, error
  57.     CMP    AL,'1'                ;Yes, first char '1'?
  58.     JNE    EREXIT                ;No, error
  59.     MOV    AL,Byte Ptr .FCB+2        ;Yes, point to second character
  60.     CMP    AL,'0'                ;10 pitch?
  61.     MOV    PITCH_MSG,AL            ;Stuff char into message
  62.     MOV    OPTION,OPTION10            ;Set up option
  63.     JE    OK                
  64.     CMP    AL,'2'                ;12 pitch?
  65.     MOV    OPTION,OPTION12
  66.     JE    OK
  67.     CMP    AL,'7'                ;17 pitch?
  68.     MOV    OPTION,OPTION17
  69.     JNE    EREXIT                ;No, error
  70. OK:
  71.     MOV    DL,ESC
  72.     MOV    CL,PRINT
  73.     INT    224                ;Send lead-in character
  74.     MOV    DL,OPTION
  75.     MOV    CL,PRINT
  76.     INT    224                ;Send option
  77.     MOV    DX,Offset DONE_MESSG        ;Tell them what we did
  78. DISPLAY:
  79.     MOV    CL,STRING
  80.     INT    224
  81.     MOV    DL,0
  82.     MOV    CL,0
  83.     INT    224                ;Back to CP/M-86
  84. ;
  85. EREXIT:
  86.     MOV    DX,Offset ERROR_MSG        ;Display Usage message
  87.     JMP    DISPLAY
  88.  
  89.     DSEG
  90.     ORG    100H
  91.  
  92. OPTION        DB    0
  93. ;
  94. SIGNON        DB    ACR,ALF,'NEC 8023 dot matrix printer pitch setting utility'
  95.         DB    ACR,ALF,'Version ',VER/10 + '0','.',VER MOD 10 + '0'
  96.         DB    ', By Bill Bolton, NECIS Australia.'
  97.         DB    ACR,ALF,'$'
  98. ;
  99. ERROR_MSG    DB    ACR,ALF,'Usage:'
  100.         DB    ACR,ALF,'    PITCH 10    sets 8023 to 10 pitch'
  101.         DB    ACR,ALF,'    PITCH 12    sets 8023 to 12 pitch'
  102.         DB    ACR,ALF,'    PITCH 17    sets 8023 to 17 pitch'
  103.         DB    ACR,ALF,'$'
  104. ;
  105. DONE_MESSG    DB    ACR,ALF,'8023 Printer character pitch set to 1'
  106. PITCH_MSG    DB    '0'
  107.         DB    ' characters per inch.',ACR,ALF,'$'
  108. ;
  109.     END
  110.