home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
assemblr
/
library
/
lib4a86
/
lib
/
print.lib
< prev
next >
Wrap
Text File
|
1992-02-02
|
2KB
|
178 lines
#IF !LIB4A86
#ELSE
#IF !INTERN_LIB4A86_S
INTERN_LIB4A86_S EQU 01
JMP START
#ENDIF
#ENDIF
PRINT_NOTLOADED EQU 00H
PRINT_INVALIDFUNCTION EQU 01H
PRINT_FILENOTFOUND EQU 02H
PRINT_PATHNOTFOUND EQU 03H
PRINT_NOFREEHANDLE EQU 04H
PRINT_ACCESDENIED EQU 05H
PRINT_NOFREEENTRY EQU 08H
PRINT_BUSY EQU 09H
PRINT_NAMETOLONG EQU 0CH
PRINT_INVALIDDRIVE EQU 0FH
PRINTLOADED?:
MOV AX,0100H
INT 02FH
OR AL,AL
CLC
IF Z STC
RET
PRINTFILE:
CALL PRINTLOADED?
JNC >L1
RET
L1:
PUSH SI,DX,DS
PUSH BP
MOV BP,SP
SUB SP,5
CLD
XOR AH,AH
MOV [BP-5],AH
MOV DX,SI
INC DX
MOV [BP-4],DX
MOV [BP-2],DS
LODSB
ADD SI,AX
XCHG [SI],AH
PUSH AX
MOV DS,SS
LEA DX,[BP-5]
MOV AX,0101H
INT 02FH
POP DX
MOV [SI],DH
MOV SP,BP
POP BP
POP DS,DX,SI
RET
DELETEPRINTQUEUEENTRY:
CALL PRINTLOADED?
JNC >L1
RET
L1:
PUSH DX,SI
CLD
XOR AH,AH
LODSB
MOV DX,SI
ADD SI,AX
XCHG [SI],AH
PUSH AX
MOV AX,0102H
INT 02FH
POP DX
MOV [SI],DH
POP SI,DX
RET
DELETEPRINTQUEUEENTRYS:
CALL PRINTLOADED?
JNC >L1
RET
L1:
MOV AX,0103H
INT 02FH
RET
GETPRINTQUEUEENTRYS:
CLD
JCXZ >L1
PUSH DI,CX
XOR AL,AL
L0:
STOSB
ADD DI,64XD
LOOP L0
POP CX,DI
L1:
CALL PRINTLOADED?
JNC >L1
RET
L1:
PUSH DS,SI,DI,DX,BX,CX
PUSH BP
MOV BP,SP
MOV AX,0104H
INT 02FH
JC >L8
XOR DX,DX
XOR AL,AL
PUSH DS,SI
L0:
CMP [SI],AL
JZ >L01
INC DX
ADD SI,64XD
JMP L0
L01:
POP SI,DS
MOV [BP+2],DX
CMP CX,DX
IF A MOV CX,DX
JCXZ >L8
L0:
MOV BX,DI
INC DI
MOV DX,SI
LODSB
OR AL,AL
JZ >L8
XOR AH,AH
L00:
STOSB
INC AH
LODSB
OR AL,AL
JNZ L00
L01:
MOV ES:[BX],AH
LEA DI,[BX+65XD]
MOV SI,DX
ADD SI,64XD
LOOP L0
L8:
PUSH AX
PUSHF
MOV AX,0105H
INT 02FH
POPF
POP AX
POP BP
POP CX,BX,DX,DI,SI,DS
RET
#IF !INTERN_CMARK0
INTERN_CMARK0 EQU 01H
INTERN_CMARK1:
PUSH BP
MOV BP,SP
MOV BX,06H
SUB CH,[BP+SI]
SUB AH,[BX+SI]
DEC SP
DEC CX
INC DX
XOR AL,041H
CMP B[02820H],DH
INC BX
SUB W[BX+SI],SP
INC DX
CS AND B[BP+DI+043H],DL
DEC AX
INC BP
DEC BP
DEC BP
INC BP
PUSH DX
AND B[BP+SI],CH
SUB CH,[BP+SI]
POP DX
MOV SP,BP
POP BP
RET
#ENDIF