Subversion Repositories SvarDOS

Rev

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

Rev 989 Rev 1823
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-2022 Mateusz Viste
4
 * Copyright (C) 2021-2024 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 153... Line 153...
153
  }
153
  }
154
 
154
 
155
  /* display current date if no args */
155
  /* display current date if no args */
156
  if (p->argc == 0) {
156
  if (p->argc == 0) {
157
    /* get cur date */
157
    /* get cur date */
158
    _asm {
-
 
159
      push ax
-
 
160
      push cx
-
 
161
      push dx
-
 
162
 
-
 
163
      mov ah, 0x2a  /* DOS 1+ -- Query DOS Date */
-
 
164
      int 0x21      /* CX=year DH=month DL=day */
-
 
165
      mov [year], cx
158
    dos_get_date(&year, &mo, &dy);
166
      mov [mo], dh
-
 
167
      mov [dy], dl
-
 
168
 
159
 
169
      pop dx
-
 
170
      pop cx
-
 
171
      pop ax
-
 
172
    }
-
 
173
    buff[0] = ' ';
160
    buff[0] = ' ';
174
    nls_format_date(buff + 1, year, mo, dy, nls);
161
    nls_format_date(buff + 1, year, mo, dy, nls);
175
    nls_output(32,4); /* "Current date is" */
162
    nls_output(32,4); /* "Current date is" */
176
    outputnl(buff);
163
    outputnl(buff);
177
    year = 0;
164
    year = 0;