|
Well, this months item isn't really undocumented, but it is an interesting item.
The following code returns the path and filename of the swap file.
.external prtstring
.model tiny
.186
.code
mov ax,440Dh ; generic ioctl
mov cx,086Eh ; (cat code 08h, minor code 6Eh)
mov bl,03 ; drive (3 = C:)
mov dx,offset Buffer ; buffer to hold path and filename
int 21h
; on return (if no carry)
; cx:bx = size in 4k pages
push offset Buffer ; print a string
call prtstring
ret
Buffer dup 128,0
.end
Notice that I used the library routine included with NBASM instead of writing my own prtstring routine. To learn more about this feature of NBASM, read the
NBASM.DOC file included with your NBASM package.
¥
|