Category : Files from Magazines
Archive   : TINYLIB.ZIP
Filename : GETDRV.ASM

 
Output of file : GETDRV.ASM contained in archive : TINYLIB.ZIP
include compiler.inc

ttl GETDRV, 1.01, 11-21-86, cr

; gets current drive or current directory to DST

dseg
cseg

;getdrv(dst) char *dst;
procdef getdrv,<>
pushreg
pushds
mov ax,1900h ; get drive code
int 21h
add al,'A' ; convert to alpha
ldptr di,dst
cld
stosb
mov al,':' ; separator
stosb
xor al,al ; set in EOS
stosb
pret
pend getdrv

;getdir(dst) char *dst;
procdef getdir,<>

pushreg
pushds
ldptr si,dst1
mov ax,'\' ; set in leading separator
mov [si], ax
mov ax,4700h ; get current dir to DS:SI
inc si ; past '\'
xor dl,dl
int 21h
pret
pend getdir
finish


  3 Responses to “Category : Files from Magazines
Archive   : TINYLIB.ZIP
Filename : GETDRV.ASM

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/