]>
wirehaze git hosting - MS-DOS.git/blob - v4.0/src/MAPPER/IOCTL.ASM
3 title CP
/DOS DosDevIOCTl mapper
5 dosxxx
segment byte public 'dos'
6 assume
cs:dosxxx
,ds:nothing
,es:nothing
,ss:nothing
8 ;**********************************************************************
10 ;* MODULE: dosdevioctl
12 ;* FILE NAME: dos007.asm
17 ;* push@ dword Paramlist
20 ;* push@ word Devicehandle
24 ;* MODULES CALLED: PC-DOS Int 21h, ah=42h, move file pointer
26 ;*********************************************************************
38 Category dw ?
; device category
39 Function dw ?
; device function
40 Parmlist dd ?
; command arguments
45 Enter dosdevioctl
; push registers
47 mov bx,[bp].handle
; get handle
49 cmp bx,0ffe5h ; is it a device handle ??
50 jl filehandle
; branch if not
52 ; Convert DASD device handle to drive number as follows:
54 ; Letter Handle DASD #
55 ; -----------------------------
61 neg bx ; convert dev handle to
65 mov ax,[bp].function
; get function code
66 cmp ax,020H ; check for right function
67 je continue1
; continue if right function code
68 mov ax,01H ; else, load error code
71 continue1: ; only category 8 is supported
72 mov ax,[bp].category
; set category
76 jnc continue
; check for error
78 cmp ax,1 ; if error and return code = 1
79 jne exit
; then it is network drive
82 lds si,[bp].data ; media changable
83 mov byte ptr [si],al ; save in data area
84 xor ax,ax ; set no error coe
86 exit: mexit
; pop registers
87 ret size
str - 6 ; return