Temp file generator question

From: Andrew Kennedy (andrewkennedy2_at_LOGev1.net)
Date: 02/13/04


Date: Fri, 13 Feb 2004 19:41:25 +0000 (UTC)


Ralf's Int List didn't give any details on file naming strategy
using by the temp file generator.

It looks like it's always a 8 character filename with
no extension and I'd like to use it but have to make sure that's it indeed
always has 8 characters exactly.

Thanks.

; temp.asm Create a temporary file with a unique name,
; it must be deleted manually
;
                 
.model small
.stack 200h ; 512 byte stack
.data

path db 'c:\borlandc\files\',13 dup(0)

.code

start:
             mov ax,@data
             mov ds,ax
             mov ah,5ah
             
; Bitfields for file attributes: Decimal Equivalent
; Bit(s) Description (Table 01420)
; 7 shareable (Novell NetWare)
; 7 pending deleted files (Novell DOS, OpenDOS)
; 6 unused
; 5 archive 32
; 4 directory 16
; 3 volume label
; execute-only (Novell NetWare)
; 2 system 4
; 1 hidden 2
; 0 read-only 1

             mov cx,00100000b ; file attributes, archive bit set
             mov dx,offset path
             int 21h ; ax contains the file handle

exit:
             mov ax,4c00h
             int 21h

end start