diff options
Diffstat (limited to 'v4.0/src/CMD/CHKDSK/CHKPRMT.ASM')
| -rw-r--r-- | v4.0/src/CMD/CHKDSK/CHKPRMT.ASM | 93 |
1 files changed, 93 insertions, 0 deletions
diff --git a/v4.0/src/CMD/CHKDSK/CHKPRMT.ASM b/v4.0/src/CMD/CHKDSK/CHKPRMT.ASM new file mode 100644 index 0000000..48ec463 --- /dev/null +++ b/v4.0/src/CMD/CHKDSK/CHKPRMT.ASM | |||
| @@ -0,0 +1,93 @@ | |||
| 1 | TITLE CHKPRMT - Procedures called from chkdsk which prompt ;an000;bgb | ||
| 2 | page ,132 ; ;an000;bgb | ||
| 3 | ;an000;bgb | ||
| 4 | .xlist ;an000;bgb | ||
| 5 | include chkseg.inc ;an000;bgb | ||
| 6 | INCLUDE CHKCHNG.INC ;an000;bgb | ||
| 7 | INCLUDE SYSCALL.INC ;an000;bgb | ||
| 8 | INCLUDE CHKEQU.INC ;an000;bgb | ||
| 9 | INCLUDE CHKMACRO.INC ;an000;bgb | ||
| 10 | include pathmac.inc ;an000;bgb | ||
| 11 | .list ;an000;bgb | ||
| 12 | ;an000;bgb | ||
| 13 | ;an000;bgb | ||
| 14 | CONST SEGMENT PUBLIC PARA 'DATA' ;an000;bgb | ||
| 15 | EXTRN YES_BYTE:BYTE,NO_BYTE:BYTE ;an000;bgb | ||
| 16 | EXTRN YN_ARG:WORD ;an000;bgb | ||
| 17 | EXTRN HECODE:byte,CONBUF:byte ;an000;bgb | ||
| 18 | CONST ENDS ;an000;bgb | ||
| 19 | ;an000;bgb | ||
| 20 | ;an000;bgb | ||
| 21 | CODE SEGMENT PUBLIC PARA 'CODE' ;an000;bgb | ||
| 22 | ASSUME CS:DG,DS:DG,ES:DG,SS:DG ;an000;bgb | ||
| 23 | EXTRN PRINTF_CRLF:NEAR,DOCRLF:NEAR ;an000;bgb | ||
| 24 | ;an000;bgb | ||
| 25 | pathlabl chkprmt ;an000;bgb | ||
| 26 | ;***************************************************************************** ;an000;bgb | ||
| 27 | ;Routine name:PromptYN ;an000;bgb | ||
| 28 | ;***************************************************************************** ;an000;bgb | ||
| 29 | ; ;an000;bgb | ||
| 30 | ;description: Validate that input is valid Y/N for the country dependent info ;an000;bgb | ||
| 31 | ; Return Z flag if 'Y' entered ;an000;bgb | ||
| 32 | ;Called Procedures: Message (macro) ;an000;bgb | ||
| 33 | ; User_String ;an000;bgb | ||
| 34 | ; ;an000;bgb | ||
| 35 | ;Change History: Created 5/10/87 MT ;an000;bgb | ||
| 36 | ; ;an000;bgb | ||
| 37 | ;Input: DX = offset to message ;an000;bgb | ||
| 38 | ; ;an000;bgb | ||
| 39 | ;Output: Z flag if 'Y' entered ;an000;bgb | ||
| 40 | ; ;an000;bgb | ||
| 41 | ;Psuedocode ;an000;bgb | ||
| 42 | ;---------- ;an000;bgb | ||
| 43 | ; ;an000;bgb | ||
| 44 | ; DO ;an000;bgb | ||
| 45 | ; Display prompt and input character ;an000;bgb | ||
| 46 | ; IF got character ;an000;bgb | ||
| 47 | ; Check for country dependent Y/N (INT 21h, AX=6523h Get Ext Country;an000;bgb) | ||
| 48 | ; IF NC (Yes or No) ;an000;bgb | ||
| 49 | ; Set Z if Yes, NZ if No ;an000;bgb | ||
| 50 | ; ENDIF ;an000;bgb | ||
| 51 | ; ELSE (nothing entered) ;an000;bgb | ||
| 52 | ; stc ;an000;bgb | ||
| 53 | ; ENDIF ;an000;bgb | ||
| 54 | ; ENDDO NC ;an000;bgb | ||
| 55 | ; ret ;an000;bgb | ||
| 56 | ;***************************************************************************** ;an000;bgb | ||
| 57 | Procedure PromptYN ; ;an000;bgb;AN000; | ||
| 58 | push si ;Save reg ;an000;bgb | ||
| 59 | ; $DO ; ;an000;bgb;AC000; | ||
| 60 | $$DO1: | ||
| 61 | Call Display_Interface ;Display the message ;an000;bgb;AC000; | ||
| 62 | MOV DX,OFFSET DG:CONBUF ;Point at input buffer ;an000;bgb | ||
| 63 | DOS_Call Std_Con_String_Input ;Get input ;an000;bgb;AC000; | ||
| 64 | CALL DOCRLF ; ;an000;bgb | ||
| 65 | MOV SI,OFFSET DG:CONBUF+2 ;Point at contents of buffer ;an000;bgb | ||
| 66 | CMP BYTE PTR [SI-1],0 ;Was there input? ;an000;bgb | ||
| 67 | ; $IF NE ;Yep ;an000;bgb;AC000; | ||
| 68 | JE $$IF2 | ||
| 69 | mov al,23h ;See if it is Y/N ;an000;bgb;AN000; | ||
| 70 | mov dl,[si] ;Get character ;an000;bgb;AN000; | ||
| 71 | DOS_Call GetExtCntry ;Get country info call ;an000;bgb;AN000; | ||
| 72 | ; $IF NC ;Yes or No entered ;an000;bgb;AN000; | ||
| 73 | JC $$IF3 | ||
| 74 | cmp ax,Yes_Found ;Set Z if Yes, NZ if No ;an000;bgb;AN000; | ||
| 75 | clc ;CY=0 means Y/N found ;an000;bgb | ||
| 76 | ; $ENDIF ;CY set if neither ;an000;bgb;AN000; | ||
| 77 | $$IF3: | ||
| 78 | ; $ELSE ;No characters input ;an000;bgb | ||
| 79 | JMP SHORT $$EN2 | ||
| 80 | $$IF2: | ||
| 81 | stc ;CY means not Y/N ;an000;bgb | ||
| 82 | ; $ENDIF ; ;an000;bgb | ||
| 83 | $$EN2: | ||
| 84 | ; $ENDDO NC ; ;an000;bgb;AN000; | ||
| 85 | JC $$DO1 | ||
| 86 | pop si ; ;an000;bgb | ||
| 87 | ret ; ;an000;bgb | ||
| 88 | PromptYN endp ; ;an000;bgb;AN000; | ||
| 89 | pathlabl chkprmt ;an000;bgb | ||
| 90 | ;an000;bgb | ||
| 91 | CODE ENDS ;an000;bgb | ||
| 92 | END ;an000;bgb | ||
| 93 | \ No newline at end of file | ||