1 line
6.0 KiB
Plaintext
1 line
6.0 KiB
Plaintext
|
\ Long filename support Long filename support for Windows95+ \ Long filename support forth definitions decimal application blk @ 1+ #screens 1- thru \ Long filename support \ Return true if DOS version 7 or greater : dos7 ( -- flag ) dosver nip 6 > ; \ Return error code : lfnerr ( -- ior ) 'AX @ $7100 - if doserr? else $FEFF then ; \ buffer for asciiz strings create zbuf 260 2 + allot \ CREATE-FILE OPEN-FILE \ open/create long filename : lopen ( c-addr u fam mode -- fid ior ) 'DX ! 'BX ! zbuf zplace zbuf 'SI ! 0 'CX ! 0 'DI ! $6C 'AX c! $71 doscall 'AX @ lfnerr ; -? : CREATE-FILE ( c-addr u fam -- fid ior ) dos7 if $12 lopen else create-file then ; -? : OPEN-FILE ( c-addr u fam -- fid ior ) dos7 if $01 lopen else open-file then ;
|