1064 OPT opt 1064 ; 1064 ; Space for the environment string. This routine cannot cope 1064 ; with an environment string longer than maxlen% bytes. 1064 ; 1064 .strng_buff 1464 OPT opt 1464 ; 1464 ; Get the Environment String (MS-DOS SET). 1464 ; **************************************** 1464 ; 1464 ; Return the number of items in the environment, with the 1464 ; strings stored beginning at strng_buff. 1464 ; 1464 ._get_ENV 1464 1E push ds 1465 B8 00 62 mov ax,&6200 1468 CD 21 int &21 146A 8B C3 mov ax,bx 146C 8E D8 mov ds,ax 146E A1 2C 00 mov ax,[&2C] 1471 8E D8 mov ds,ax 1473 33 F6 xor si,si 1475 B8 64 10 mov ax,strng_buff 1478 8B F8 mov di,ax 147A 0E push cs 147B 07 pop es 147C 33 C0 xor ax,ax 147E 33 DB xor bx,bx 1480 B9 00 04 mov cx,maxlen% 1483 ; 1483 FC cld 1484 .get_ENV1 1484 AC lodsb 1485 3D 00 0D cmp ax,&0D00 1488 74 0E jz get_ENV3 148A 0A C0 or al,al 148C 75 03 jnz get_ENV2 148E B0 0D mov al,&0D 1490 43 inc bx 1491 ; 1491 .get_ENV2 1491 AA stosb 1492 8A E0 mov ah,al 1494 E2 EE loop get_ENV1 1496 33 DB xor bx,bx 1498 ; 1498 .get_ENV3 1498 1F pop ds 1499 ; 1499 8B C3 mov ax,bx 149B 33 D2 xor dx,dx 149D 33 C9 xor cx,cx 149F CB retf 14A0 ; 14A0 .the_end COMSPEC=C:\COMMAND.COM OS=DRDOS VER=5.0 PROMPT=$P$G PATH=C:\LIB;C:\PACIFIC\BIN;C:\DRDOS TEMP=C:\TEMP TMP=C:\TEMP TEMPFILE=C:\TEMP\TEMP.TMP