flat assembler
Message board for the users of flat assembler.
Index
> DOS > can't write file? |
Author |
|
Picnic 11 Jan 2013, 06:50
INT 21h / AH= 3Dh opens an existing file so you have to create it first.
|
|||
11 Jan 2013, 06:50 |
|
kty11 11 Jan 2013, 06:51
Picnic wrote: INT 21h / AH= 3Dh opens an existing file so you have to create it first. I got it thanks! _________________ since 1990 November 4th |
|||
11 Jan 2013, 06:51 |
|
freecrac 11 Jan 2013, 08:12
kty11 wrote:
RBIL->inter61b.zip->INTERRUP.F Code: --------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 Dirk |
|||
11 Jan 2013, 08:12 |
|
ACP 11 Jan 2013, 12:35
Two more tips:
- always check for error before proceeding and processing return data further as you migth work with invalid file handle for example. Int 21h file functions tend to use Carry Flag (CF) to inform you there is something wrong with your call. - Win7 does not support DOS COM files - this support is long gone from modern Windows system so DosBox or virtual machines like VMWare with DOS or FreeDOS installed are the only way to go Hopes it will help you. |
|||
11 Jan 2013, 12:35 |
|
AsmGuru62 11 Jan 2013, 13:22
I am using DOSBOX to debug some code for 320x200x256.
Really cool program that DOSBOX! |
|||
11 Jan 2013, 13:22 |
|
baldr 11 Jan 2013, 21:48
|
|||
11 Jan 2013, 21:48 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.