all the videos on your channel are perfect ,explanation is damn good.I recommend this channel to engineering studends who want to learn the concepts of Processor architecture interface(PAI)
Hello. I need to know the disk space free or abailable. I know the number of the function is 0x36. The result is at AX register ? I so, what happens if the amount is higher than 32 bits, since the actual disk have 16 Terabytes. I ask this to you because I think this intdos () function is not feasible with actual 64 bits systems. Thank you
Part of Ralph Browns Interrupt list. --------D-2139------------------------------- INT 21 - DOS 2+ - "MKDIR" - CREATE SUBDIRECTORY AH = 39h DS:DX -> ASCIZ pathname Return: CF clear if successful AX destroyed CF set on error AX = error code (03h,05h) (see #01680 at AH=59h/BX=0000h) Notes: all directories in the given path except the last must exist fails if the parent directory is the root and is full DOS 2.x-3.3 allow the creation of a directory sufficiently deep that it is not possible to make that directory the current directory because the path would exceed 64 characters under the FlashTek X-32 DOS extender, the pointer is in DS:EDX SeeAlso: AH=3Ah,AH=3Bh,AH=6Dh,AX=7139h,AH=E2h/SF=0Ah,AX=43FFh/BP=5053h SeeAlso: INT 2F/AX=1103h,INT 60/DI=0511h --------D-213A------------------------------- INT 21 - DOS 2+ - "RMDIR" - REMOVE SUBDIRECTORY AH = 3Ah DS:DX -> ASCIZ pathname of directory to be removed Return: CF clear if successful AX destroyed CF set on error AX = error code (03h,05h,06h,10h) (see #01680 at AH=59h/BX=0000h) Notes: directory must be empty (contain only '.' and '..' entries) under the FlashTek X-32 DOS extender, the pointer is in DS:EDX SeeAlso: AH=39h,AH=3Bh,AX=713Ah,AH=E2h/SF=0Bh,INT 2F/AX=1101h,INT 60/DI=0512h --------D-213B------------------------------- INT 21 - DOS 2+ - "CHDIR" - SET CURRENT DIRECTORY AH = 3Bh DS:DX -> ASCIZ pathname to become current directory (max 64 bytes) Return: CF clear if successful AX destroyed CF set on error AX = error code (03h) (see #01680 at AH=59h/BX=0000h) Notes: if new directory name includes a drive letter, the default drive is not changed, only the current directory on that drive changing the current directory also changes the directory in which FCB file calls operate under the FlashTek X-32 DOS extender, the pointer is in DS:EDX SeeAlso: AH=47h,AX=713Bh,INT 2F/AX=1105h --------D-213C------------------------------- INT 21 - DOS 2+ - "CREAT" - CREATE OR TRUNCATE FILE AH = 3Ch CX = file attributes (see #01401) DS:DX -> ASCIZ filename Return: CF clear if successful AX = file handle CF set on error AX = error code (03h,04h,05h) (see #01680 at AH=59h/BX=0000h) Notes: if a file with the given name exists, it is truncated to zero length under the FlashTek X-32 DOS extender, the pointer is in DS:EDX DR DOS checks the system password or explicitly supplied password at the end of the filename against the reserved field in the directory entry before allowing access SeeAlso: AH=16h,AH=3Dh,AH=5Ah,AH=5Bh,AH=93h,INT 2F/AX=1117h Bitfields for file attributes: Bit(s) Description (Table 01401) 0 read-only 1 hidden 2 system 3 volume label (ignored) 4 reserved, must be zero (directory) 5 archive bit 7 if set, file is shareable under Novell NetWare --------D-213D------------------------------- INT 21 - DOS 2+ - "OPEN" - OPEN EXISTING FILE AH = 3Dh AL = access and sharing modes (see #01402) DS:DX -> ASCIZ filename CL = attribute mask of files to look for (server call only) Return: CF clear if successful AX = file handle CF set on error AX = error code (01h,02h,03h,04h,05h,0Ch,56h) (see #01680 at AH=59h) Notes: file pointer is set to start of file ......... --------D-213E------------------------------- INT 21 - DOS 2+ - "CLOSE" - CLOSE FILE AH = 3Eh BX = file handle Return: CF clear if successful AX destroyed CF set on error AX = error code (06h) (see #01680 at AH=59h/BX=0000h) Notes: if the file was written to, any pending disk writes are performed, the time and date stamps are set to the current time, and the directory entry is updated recent versions of DOS preserve AH because some versions of Multiplan had a bug which depended on AH being preserved SeeAlso: AH=10h,AH=3Ch,AH=3Dh,INT 2F/AX=1106h,INT 2F/AX=1227h --------D-213F------------------------------- INT 21 - DOS 2+ - "READ" - READ FROM FILE OR DEVICE AH = 3Fh BX = file handle CX = number of bytes to read DS:DX -> buffer for data Return: CF clear if successful AX = number of bytes actually read (0 if at EOF before call) CF set on error AX = error code (05h,06h) (see #01680 at AH=59h/BX=0000h) Notes: data is read beginning at current file position, and the file position is updated after a successful read the returned AX may be smaller than the request in CX if a partial read occurred if reading from CON, read stops at first CR under the FlashTek X-32 DOS extender, the pointer is in DS:EDX BUG: Novell NETX.EXE v3.26 and 3.31 do not set CF if the read fails due to a record lock (see AH=5Ch), though it does return AX=0005h; this has been documented by Novell SeeAlso: AH=27h,AH=40h,AH=93h,INT 2F/AX=1108h,INT 2F/AX=1229h --------D-2140------------------------------- INT 21 - DOS 2+ - "WRITE" - WRITE TO FILE OR DEVICE AH = 40h BX = file handle CX = number of bytes to write DS:DX -> data to write Return: CF clear if successful AX = number of bytes actually written CF set on error AX = error code (05h,06h) (see #01680 at AH=59h/BX=0000h) Notes: if CX is zero, no data is written, and the file is truncated or extended to the current position data is written beginning at the current file position, and the file position is updated after a successful write for FAT32 drives, the file must have been opened with AX=6C00h with the "extended size" flag in order to expand the file beyond 2GB; otherwise the write will fail with error code 0005h (access denied) the usual cause for AX < CX on return is a full disk BUG: a write of zero bytes will appear to succeed when it actually failed if the write is extending the file and there is not enough disk space for the expanded file (DOS 5.0-6.0); one should therefore check whether the file was in fact extended by seeking to 0 bytes from the end of the file (INT 21/AX=4202h/CX=0000h/DX=0000h) under the FlashTek X-32 DOS extender, the pointer is in DS:EDX SeeAlso: AH=28h,AH=3Fh"DOS",AH=93h,INT 2F/AX=1109h --------D-2141------------------------------- INT 21 - DOS 2+ - "UNLINK" - DELETE FILE AH = 41h DS:DX -> ASCIZ filename (no wildcards, but see notes) CL = attribute mask for deletion (server call only, see notes) Return: CF clear if successful AX destroyed (DOS 3.3) AL seems to be drive of deleted file CF set on error AX = error code (02h,03h,05h) (see #01680 at AH=59h/BX=0000h) Notes: (DOS 3.1+) wildcards are allowed if invoked via AX=5D00h, in which case the filespec must be canonical (as returned by AH=60h), and only files matching the attribute mask in CL are deleted DR DOS 5.0-6.0 returns error code 03h if invoked via AX=5D00h; DR DOS 3.41 crashes if called via AX=5D00h with wildcards DOS does not erase the file's data; it merely becomes inaccessible because the FAT chain for the file is cleared deleting a file which is currently open may lead to filesystem corruption. Unless SHARE is loaded, DOS does not close the handles referencing the deleted file, thus allowing writes to a nonexistant file. under DR DOS and DR Multiuser DOS, this function will fail if the file is currently open under the FlashTek X-32 DOS extender, the pointer is in DS:EDX BUG: DR DOS 3.41 crashes if called via AX=5D00h SeeAlso: AH=13h,AX=4301h,AX=4380h,AX=5D00h,AH=60h,AX=7141h,AX=F244h SeeAlso: INT 2F/AX=1113h
Batch file using DOS software interrupts: DX=0x0108 AH=9 int 0x21 ret int 0x20 @echo off echo e cs:100>tmp.deb echo ba 08 01 b4 09 cd 21 c3>>tmp.deb echo.>>tmp.deb echo a cs:108>>tmp.deb echo db "Hello World!$">>tmp.deb echo.>>tmp.deb echo n Hello.com>>tmp.deb echo rcx>>tmp.deb echo 17>>tmp.deb echo wcs:100>>tmp.deb echo q>>tmp.deb debugnul del tmp.deb Hello.com echo. del Hello.com
These are just 2 different variants...in int86x we can also pass the object of struct segregs ...which allows us to pass value of segment register to the interrupt...