Returns the address of an ASCIIZ (null-terminated) string identifying the local computer. This function call is only available when Microsoft Networks is running.
Call with:
AH = 5EH
AL = 00H
DS:DX = segment:offset of buffer to receive string
Returns:
If function successful
Carry flag = clear
CH = 00H if name not defined
<> 00H if name defined
CL = netBIOS name number (if CH <> 0)
DX:DX = segment:offset of identifier (if CH <> 0 )
If function unsuccessful
Carry flag = set
AX = error code
Notes:
The computer identifier is a 15-byte string, padded with spaces and terminated with a null (00H) byte.
The effect of this call is unpredictable if the file-sharing support module is not loaded.
Example:
Get the machine name of the local computer into the buffer named mname.
mname db 16 dup (?)
.
.
.
mov ax,5e00h ; function & subfunction
mov dx,seg mname ; address of buffer
mov ds,dx
mov dx,offset mname
int 21h ; transfer to MS-DOS
jc error ; jump if function failed
or ch,ch ; make sure name exists
jz error ; jump if no name defined
.
.
.