home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frostbyte's 1980s DOS Shareware Collection
/
floppyshareware.zip
/
floppyshareware
/
USCX
/
TEXTUTIL.ZIP
/
SFX.ASM
< prev
next >
Wrap
Assembly Source File
|
1985-09-29
|
4KB
|
105 lines
COMMENT| SETFX.COM Copyright (C) Ronald E. Frank 29 Sep 85
This program accepts a parameter or asks for one with a
menu, converts it with a translation table to a series of
printer codes, and sends those codes to the printer. The
printer beeps to acknowledge receipt.
Line 6 is as follows:
Compr // Elite // 8 Lpi // Skip 8 on Perf // Left Marg 20
0F 1B,4D 1B,30 1B,4E,08 1B,6C,20 Hex codes
I-5 I-7 I-14 I-13 I-12 Epson Reference
END COMMENT |
PUBLIC BEGIN,GO,GETPARM,GOTPARM,PRINTIT
CODE SEGMENT PARA PUBLIC 'CODE'
ASSUME CS:CODE,DS:CODE,ES:CODE
ORG 100H
BEGIN: JMP GO
MENU DB 16 DUP (' '),201,44 DUP (205),187,10,13
DB 16 DUP (' '),186,' 0 - Reset [Epson] 1B,40 ',186,10,13
DB 16 DUP (' '),186,' 1 - NLQ [Epson] 1B,78,1 ',186,10,13
DB 16 DUP (' '),186,' 2 - Set LF to 1/8" 1B,30 ',186,10,13
DB 16 DUP (' '),186,' 3 - Compressed 0F ',186,10,13
DB 16 DUP (' '),186,' 4 - Elite [Epson] 1B,4D ',186,10,13
DB 16 DUP (' '),186,' 5 - Skip on Perf 1B,4E,8 ',186,10,13
DB 16 DUP (' '),186,' 6 - Compr Elite 8 lpi skip LM 10 ',186,10,13
DB 16 DUP (' '),186,' 0F,1B,4D,1B,30,1B,4E,8,1B,6C,20. ',186,10,13
DB 16 DUP (' '),186,' 7 - Underline ON 1B,2D,1 ',186,10,13
DB 16 DUP (' '),186,' 8 - Emphasize ON 1B,45 ',186,10,13
DB 16 DUP (' '),186,' 9 - 11 Inch Page 1B,43,0,11 ',186,10,13
DB 16 DUP (' '),200,44 DUP (205),189
DB 10,10,10,10,13,'$'
ASK1 DB 16 DUP (' '),'Enter Your Selection ->','$'
INPTPARM DB '*'
NTRY_LEN DB 12
PRNTCODE DB 1BH,40H,00H,00H,00H,00H,00H,00H,00H,00H,00H,07H
DB 1BH,78H,01H,00H,00H,00H,00H,00H,00H,00H,00H,07H
DB 1BH,30H,00H,00H,00H,00H,00H,00H,00H,00H,00H,07H
DB 0FH,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,07H
DB 1BH,4DH,00H,00H,00H,00H,00H,00H,00H,00H,00H,07H
DB 1BH,4EH,08H,00H,00H,00H,00H,00H,00H,00H,00H,07H
DB 0FH,1BH,4DH,1BH,30H,1BH,4EH,08H,1BH,6CH,20,07H
DB 1BH,2DH,01H,00H,00H,00H,00H,00H,00H,00H,00H,07H
DB 1BH,45H,00H,00H,00H,00H,00H,00H,00H,00H,00H,07H
DB 1BH,43H,88H,00H,00H,00H,00H,00H,00H,00H,00H,07H
SETMX PROC FAR
GO: PUSH DS ;save psp segment address
MOV AX,0 ;word for far return
PUSH AX
MOV SI,80H ;80H is where the input parameter
MOV DL,[SI] ;count is left by opening procedure
CMP DL,0 ;if there's a parm, move on
JE GETPARM
MOV SI,82H
MOV AL,[SI] ;mov immediate won't work
JMP GOTPARM
GETPARM: MOV CX,0 ;Gene Plantz's screen scroll cls
MOV DX,2479H
MOV BH,7
MOV AX,0600H
INT 10H
MOV DH,3 ;row
MOV DL,0 ;column
MOV BH,0 ;active page
MOV AH,2 ;locate cursor
INT 10H
LEA DX,MENU
MOV AH,9 ;print string
INT 21H
LEA DX,ASK1 ;point to query and print it
MOV AH,9 ;with DOS
INT 21H
MOV AH,1 ;keyboard input DOS p D-17
INT 21H ;char returned in AL
GOTPARM: SUB AL,'0' ;conv ASCII to byte
MUL NTRY_LEN ;find offset in table
LEA BX,PRNTCODE
MOV CX,12 ;output standard 12 chrs
PRINTIT: PUSH AX ;save for reuse (need AL)
XLAT
MOV DL,AL ;from table to DL
MOV AH,5 ;printer output
INT 21H
POP AX ;get original back, increment it,
INC AL ;save this, + xlat + send to print
LOOP PRINTIT
RET ;return to DOS
SETMX ENDP ;close procedure
CODE ENDS ;close segment
END BEGIN ;close assembly