Subversion Repositories SvarDOS

Rev

Rev 533 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 533 Rev 989
Line 1... Line 1...
1
/* This file is part of the SvarCOM project and is published under the terms
1
/* This file is part of the SvarCOM project and is published under the terms
2
 * of the MIT license.
2
 * of the MIT license.
3
 *
3
 *
4
 * Copyright (C) 2021 Mateusz Viste
4
 * Copyright (C) 2021-2022 Mateusz Viste
5
 *
5
 *
6
 * Permission is hereby granted, free of charge, to any person obtaining a
6
 * Permission is hereby granted, free of charge, to any person obtaining a
7
 * copy of this software and associated documentation files (the "Software"),
7
 * copy of this software and associated documentation files (the "Software"),
8
 * to deal in the Software without restriction, including without limitation
8
 * to deal in the Software without restriction, including without limitation
9
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
9
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
Line 27... Line 27...
27
 */
27
 */
28
 
28
 
29
static enum cmd_result cmd_verify(struct cmd_funcparam *p) {
29
static enum cmd_result cmd_verify(struct cmd_funcparam *p) {
30
 
30
 
31
  if (cmd_ishlp(p)) {
31
  if (cmd_ishlp(p)) {
32
    outputnl("Tells DOS whether to verify that files are written correctly to disk.");
32
    nls_outputnl(19,0); /* "Tells DOS whether to verify that files are written correctly to disk." */
-
 
33
    outputnl("");
33
    outputnl("\r\nVERIFY [ON | OFF]\r\n");
34
    outputnl("VERIFY [ON | OFF]");
-
 
35
    outputnl("");
34
    outputnl("Type VERIFY without a parameter to display its current setting.");
36
    nls_outputnl(19,1); /* "Type VERIFY without a parameter to display its current setting." */
35
    return(CMD_OK);
37
    return(CMD_OK);
36
  }
38
  }
37
 
39
 
38
  if (p->argc > 1) {
40
  if (p->argc > 1) {
39
    outputnl("Too many parameters");
41
    nls_outputnl(0,4); /* "Too many parameters" */
40
    return(CMD_FAIL);
42
    return(CMD_FAIL);
41
  }
43
  }
42
 
44
 
43
  if (p->argc == 0) {
45
  if (p->argc == 0) {
44
    unsigned char verstate = 0;
46
    unsigned char verstate = 0;
Line 48... Line 50...
48
      int 0x21       /* AL == 0 (off) or AL == 1 (on) */
50
      int 0x21       /* AL == 0 (off) or AL == 1 (on) */
49
      mov [verstate], al
51
      mov [verstate], al
50
      pop ax
52
      pop ax
51
    }
53
    }
52
    if (verstate == 0) {
54
    if (verstate == 0) {
53
      outputnl("VERIFY is off");
55
      nls_outputnl(19,2); /* "VERIFY is off" */
54
    } else {
56
    } else {
55
      outputnl("VERIFY is on");
57
      nls_outputnl(19,3); /* "VERIFY is on" */
56
    }
58
    }
57
    return(CMD_OK);
59
    return(CMD_OK);
58
  }
60
  }
59
 
61
 
60
  /* argc == 1*/
62
  /* argc == 1*/
Line 77... Line 79...
77
      int 0x21
79
      int 0x21
78
      pop dx
80
      pop dx
79
      pop ax
81
      pop ax
80
    }
82
    }
81
  } else {
83
  } else {
82
    outputnl("Must specify ON or OFF");
84
    nls_outputnl(19,4); /* "Must specify ON or OFF" */
83
    return(CMD_FAIL);
85
    return(CMD_FAIL);
84
  }
86
  }
85
 
87
 
86
  return(CMD_OK);
88
  return(CMD_OK);
87
}
89
}