home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
assemblr
/
disasm
/
uasm
/
uasm-dos.mac
< prev
next >
Wrap
Text File
|
1988-06-03
|
6KB
|
113 lines
;57h v1.05 MS-DOS Interrupt 21 service codes
;
;.RADIX 16
EXIT$ EQU 00 ; Terminate program
CIN$WE EQU 01 ; Return keyboard char. in AL /Wait & Echo
COUT$ EQU 02 ; Display char. in DL
AUXIN$W EQU 03 ; Receive Serial char. in DL /Wait
AUXOUT$W EQU 04 ; Send Serial char. in DL /Wait
LSTOUT$ EQU 05 ; Send Parallel char. in DL
CIO$N EQU 06 ; Display char. in DL. If =FF then CIN$. No ^C
CIN$WN EQU 07 ; Return keyboard char. in AL /Wait, No ^C
CIN$W EQU 08 ; Return keyboard char. in AL /Wait
PRINT$ EQU 09 ; Display string @DX till terminator
INSTR$ EQU 0A ; Input keyboard string (DX -> size,cnt,buffer)
KEY?$ EQU 0B ; Test for keyboard input (AL: FF=yes; 00=no)
CLEAR$KEYB EQU 0C ; Clear keyboard buffer (AL = srvc 1,6,7,8,A)
RESET$D EQU 0D ; Reset diskette system (default A:)
SELECT$D EQU 0E ; Select default drive DL (0=A, 1=B, etc.)
OPEN$ EQU 0F ; Open file
CLOSE$ EQU 10 ; Close file
SEARCH$DIR EQU 11 ; Search for first directory entry
SEARCH$NEXT EQU 12 ; Search for next directory entry
DELETE$ EQU 13 ; Delete file
READ$SEQ EQU 14 ; Read sequential file
WRITE$SEQ EQU 15 ; Write sequential file
CREATE$ EQU 16 ; Create file & open
RENAME$ EQU 17 ; Rename file
DOS$18 EQU 18 ; (DOS internal reserved)
DEF$DRIVE? EQU 19 ; Return default drive AL (0=A, 1=B, etc.)
SET$DTA EQU 1A ; Set Disk Transfer Address to DX
DEF$FAT? EQU 1B ; Return Default drive FAT info. (AL,BX,CX,DX)
FAT?$ EQU 1C ; Get FAT info for drive DL (0=def, 1=A, etc.)
DOS$1D EQU 1D ; (DOS internal reserved)
DOS$1E EQU 1E ; (DOS internal reserved)
DOS$1F EQU 1F ; (DOS internal reserved)
DOS$20 EQU 20 ; (DOS internal reserved)
READ$RND EQU 21 ; Read random disk record
WRITE$RND EQU 22 ; Write random disk record
SIZE?$ EQU 23 ; Return file size
RANDOM$ EQU 24 ; Switch to Random file mode
SET$INT EQU 25 ; Set interrupt vector (AL=INT, DS:DX=VECTOR)
BUILD$PS EQU 26 ; Create new program segment (DX=SEGMENT)
READ$BLOCK EQU 27 ; Read random block (DX -> FCB, CX=COUNT, AL=ERR)
WRITE$BLOCK EQU 28 ; Write random block(DX -> FCB, CX=CPUNT, AL=ERR)
PARSE$ EQU 29 ; Parse Filespec (SI -> LINE, DI -> FCB, AL=CODE)
DATE?$ EQU 2A ; Return system Date in CX:DX
SET$DATE EQU 2B ; Set system Date to CX:DX
TIME?$ EQU 2C ; Return system Time in CX:DX
SET$TIME EQU 2D ; Set system Time to CX:DX
SET$VER EQU 2E ; Set write verification to AL (0=off,1=on, DL=0)
;
; DOS 2.00 Service Codes
;
DTA?$ EQU 2F ;Return current DTA in BX
VERSION?$ EQU 30 ;Return DOS Version number (i.e. AL=2, AH=00)
STAY$RES EQU 31 ;Terminate stay resident (AL=code, DX=size)
DOS$31 EQU 32 ;DOS internal reserved
CTRL$C EQU 33 ;Get/set ^C checking (AL,DL)
DOS$34 EQU 34 ;DOS internal reserved
INTERRUPT?$ EQU 35 ;Return Interrupt vector AL in ES:BX
FREE$SPACE? EQU 36 ;Return free space for disk DL (0=def, 1=A, etc.)
DOS$37 EQU 37 ;DOS internal reserved
NATION?$ EQU 38 ;Return country dependent info (DX -> table)
MKDIR$ EQU 39 ;Make sub-directory (DX -> path)
RMDIR$ EQU 3A ;Remove sub-directory (DX -> path))
CHDIR$ EQU 3B ;Change directory (DX -> path)
CREATE$PATH EQU 3C ;Create file (DX -> path)
OPEN$PATH EQU 3D ;Open file (DX -> path)
CLOSE$H EQU 3E ;Close file (BX=handle)
READ$BYT EQU 3F ;Read CX Bytes (BX=handle, DX -> buff)(AX)
WRITE$BYT EQU 40 ;Write CX Bytes (BX=handle, DX -> buff)(AX)
DELETE$PATH EQU 41 ;Delete file (DX -> path)
LSEEK$ EQU 42 ;Move read/write ptr (AL=code, BX=handle, CX:DX=off)
FILE$ATTR EQU 43 ;Read/Set file attributes (AL=code,CX=attr,DX -> path)
IOCTL$ EQU 44 ;I/O Control for devices (AL=func, BX=handle)
DUP$HANDLE EQU 45 ;Duplicate file handle (BX=handle)(AX=new handle)
FORCE$DUP EQU 46 ;Force duplication(BX=handle, CX=handle 2)
DIRECTORY?$ EQU 47 ;Return current directory of DL (0=def, 1=A)(SI -> buff)
ALLOC$MEM EQU 48 ;Allocate memory (BX= # par)(AX)
FREE$MEM EQU 49 ;Free allocated memory (ES=seg)
SET$BLOCK EQU 4A ;Modify allocated memory blocks (ES=seg, BX=size)
EXECECUTE$ EQU 4B ;Execute program (AL=func, DX -> path, BX=parm)
EXIT$2 EQU 4C ;Terminate process (AL=code)
WAIT$ EQU 4D ;Retrieve return code of sub=process in AX
FIND$DIR EQU 4E ;Find first directory entry (DX -> path, CX=ATTR)
FIND$NEXT EQU 4F ;find next directory entry (uses DTA)
DOS$50 EQU 50 ;DOS internal reserved
DOS$51 EQU 51 ;DOS internal reserved
DOS$52 EQU 52 ;DOS internal reserved
DOS$53 EQU 53 ;DOS internal reserved
VERIFY?$ EQU 54 ;Return verification state in AL (0=off, 1=on)
DOS$55 EQU 55 ;DOS internal reserved
RENAME$PATH EQU 56 ;Rename file (DX -> path, DI -> new path)
DATE$TIME EQU 57 ;Get/Set file date and time in CX:DX (AL=0/1, BX=handle)
;END TABLE
.RADIX 16
IF1
DOSCALL MACRO FUNC,PARM1
.xcref
F_C = FUNC
IFNB <PARM1>
IF F_C EQ 2 OR (F_C GE 4 AND F_C LE 6) OR F_C EQ 0E OR F_C EQ 2E OR F_C EQ 33 OR F_C EQ 36 OR F_C EQ 47
MOV DL,PARM1
ELSE
MOV DX,OFFSET PARM1
ENDIF
ENDIF
MOV AH,FUNC
INT 21
.cref
ENDM
ENDIF