home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Boston 2
/
boston-2.iso
/
DOS
/
PROGRAM
/
BASIC
/
POWBASIC
/
LIBRARY2
/
SPOOL.ZIP
/
DOSPOOL.ASM
next >
Wrap
Assembly Source File
|
1990-07-09
|
2KB
|
116 lines
; SPOOL.ASM
;
; Written By B. Jones 04/01/90
;
; Demonstrates use of the MS-DOS Multiplex Interrupt
;
; This program is distributed as an example only. No claims of
; merchantability or fitness for any application are supported by
; the author.
Public Spool
Extrn GET$LOC:far
Code Segment Byte
assume cs:code
Spool Proc Far
push bp
mov bp,sp
push ds
les di,[bp + 6] ; string variable if needed
push word ptr es:[di]
les di,[bp + 0ah] ; user selected function
mov bx,word ptr es:[di]
cmp bx,0
jz status
cmp bx,1
jz submit
cmp bx,2
jz remove
cmp bx,3
jz cancel
cmp bx,4
jz hold
cmp bx,5
jz endhold
mov ax,0ffffh ; choice invalid
pop bx
pop ds
pop bp
retf 8
status:
mov ax,0100h ; return install status
int 2fh
mov ah,0
jmp done
submit:
pop bx ; submit file to spooler
push bx
push bx
call GET$LOC
mov ds,dx
mov dx,ax
mov ax,0101h
int 2fh
mov ah,0
jc done
mov ax,0
jmp done
remove:
pop bx ; remove file from spooler
push bx
push bx
call GET$LOC
mov ds,dx
mov dx,ax
mov ax,0102h
int 2fh
mov ah,0
jc done
mov ax,0
jmp done
cancel:
mov ax,0103h ; cancell all files in spooler
int 2fh
mov ah,0
jc done
mov ax,0
jmp done
hold:
mov ax,0104h ; hold for status read
int 2fh ; {ds:si points to files in spooler}
mov ah,0 ; {dx = error count}
jc done
mov ax,0
jmp done
endhold:
mov ax,0105h ; resume after status read
int 2fh
mov ah,0
jc done
mov ax,0
done:
pop bx ; return to caller
pop ds
pop bp
retf 8
Spool EndP
Code EndS
End