Dec 062017
 
Programmer's Journal Volume 8 Number 3 source code disk.
File PJ83.ZIP from The Programmer’s Corner in
Category Files from Magazines
Programmer’s Journal Volume 8 Number 3 source code disk.
File Name File Size Zip Size Zip Type
386.MAK 309 114 deflated
386_ASM.ASM 366 229 deflated
386_C.C 103 57 deflated
386_MSC.ASM 386 215 deflated
386_TRAP.ASM 2442 882 deflated
ASM.INC 1280 416 deflated
BIOS.ASM 14398 4851 deflated
BIOS.COM 488 452 deflated
DIRTEST.EXE 11008 6195 deflated
DIRTEST.PAS 644 357 deflated
ELLIPSE1.C 4835 1528 deflated
ELLIPSE2.C 1051 538 deflated
ELLIPSE3.C 907 467 deflated
ELLIPSE4.C 4051 1151 deflated
HIMEM.ASM 12453 3907 deflated
HITTEST 396 174 deflated
HITTEST.C 6310 1778 deflated
HITTEST.DEF 180 139 deflated
HITTEST.EXE 11876 4352 deflated
HITTEST.OBJ 8389 2805 deflated
IOCTLT.C 1171 433 deflated
IOCTLT.EXE 6660 4251 deflated
LASTMIN.DOC 1623 513 deflated
LIBRARY.PRM 936 420 deflated
LNKTBL1.ASM 1868 829 deflated
LNKTBL2.ASM 81 74 deflated
LNKTBL3.ASM 1252 580 deflated
LNKTBL4.ASM 236 169 deflated
LNKTBL5.ASM 906 459 deflated
README8.3 7331 2552 deflated
README8.BAK 7318 2556 deflated
STD_TST.C 937 415 deflated
TEST1.EXE 9360 5320 deflated
TEST1.PAS 112 98 deflated
TEST2.EXE 10000 5508 deflated
TEST2.PAS 120 102 deflated
UCMDS.PAS 707 329 deflated
UCMDS.TPU 1088 557 deflated
UDIR.PAS 1844 714 deflated
UDIR.TPU 2032 970 deflated
UFILES.PAS 1369 492 deflated
UFILES.TPU 2272 944 deflated
UHELP.PAS 553 310 deflated
UHELP.TPU 1232 589 deflated
UITEM.PAS 994 391 deflated
UITEM.TPU 1296 540 deflated
UKEYS.PAS 878 375 deflated
UKEYS.TPU 928 410 deflated
ULIST.PAS 3674 1029 deflated
ULIST.TPU 3008 1251 deflated
UMENU.PAS 5778 1695 deflated
UMENU.TPU 4096 1756 deflated
UNEW.PAS 399 244 deflated
UNEW.TPU 976 482 deflated
UPROGRAM.PAS 1095 524 deflated
UPROGRAM.TPU 1248 610 deflated
USCREEN.PAS 1502 461 deflated
USCREEN.TPU 1328 553 deflated
USELECT.PAS 6442 1687 deflated
USELECT.TPU 5744 2481 deflated
USTRITEM.PAS 1791 673 deflated
USTRITEM.TPU 1760 801 deflated
WCLDLG.H 148 78 deflated
WINCEL 837 364 deflated
WINCEL.C 7319 2683 deflated
WINCEL.DEF 712 416 deflated
WINCEL.DLG 1816 574 deflated
WINCEL.EXE 17504 10365 deflated
WINCEL.H 1550 746 deflated
WINCEL.OBJ 3053 2066 deflated
WINCEL.RC 619 357 deflated
WINCEL.RES 696 432 deflated
WINCELMS.C 3938 1338 deflated
WINCELMS.OBJ 1513 973 deflated
WINCELNT.C 4090 1579 deflated
WINCELNT.OBJ 1403 964 deflated
XCALL.ASM 25144 5894 deflated
XCALL.COM 1251 843 deflated

Download File PJ83.ZIP Here

Contents of the LASTMIN.DOC file


HERE IS THE OLD ROUTINE - DOESN'T PROPERLY SET UP ES FOR SCASB:
check_command_string proc near
push di
cld;Check for first quotation mark -
mov al,'"'; replace with null (20h) if present.
mov di,82h;Command tail starts at 82h.
xor ch,ch
mov cl,byte ptr ds:[080h];Length of command tail stored at 80h
repne scasb
jcxz end_check
mov byte ptr [di-1],20h

std;Change direction & check for
add di,cx; last quotation mark.
dec di
dec di
repne scasb
jcxz end_check
mov byte ptr [di+1],20h

end_check:
cld
pop di
ret
check_command_string endp



HERE IS THE NEW ROUTINE - DOES PROPERLY SET UP ES
;-------------------------------------------------------------------------------;Check_command_string removes first & last quotation marks from command
;string. This lets xcall pass redirection request to COMMAND.COM. This
;routine saves ES & DI.
;-------------------------------------------------------------------------------
check_command_string proc near
push di
push es
mov ax,ds
mov es,ax

xor ch,ch
mov cl,byte ptr ds:[080h];Length of command tail stored at 80h
jcxz end_check;All done if no command tail
cld;Check for first quotation mark -
mov al,'"'; replace with null (20h) if present.
mov di,82h;Command tail starts at 82h.
repne scasb
jnz end_check
mov byte ptr [di-1],20h

std;Change direction & check for
add di,cx; last quotation mark.
dec di
dec di
repne scasb
cld
jnz end_check
mov byte ptr [di+1],20h

end_check:
pop es
pop di
ret
check_command_string endp


 December 6, 2017  Add comments

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)