Subversion Repositories SvarDOS

Rev

Rev 985 | Rev 1043 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 985 Rev 1001
Line 197... Line 197...
197
/* print s string and wait for a single key press from stdin. accepts only
197
/* print s string and wait for a single key press from stdin. accepts only
198
 * key presses defined in the c ASCIIZ string. returns offset of pressed key
198
 * key presses defined in the c ASCIIZ string. returns offset of pressed key
199
 * in string. keys in c MUST BE UPPERCASE! */
199
 * in string. keys in c MUST BE UPPERCASE! */
200
unsigned short askchoice(const char *s, const char *c) {
200
unsigned short askchoice(const char *s, const char *c) {
201
  unsigned short res;
201
  unsigned short res;
-
 
202
  char cstr[2] = {0,0};
202
  char key = 0;
203
  char key = 0;
203
 
204
 
204
  AGAIN:
205
  AGAIN:
205
  output(s);
206
  output(s);
206
  output(" ");
207
  output(" ");
-
 
208
  output("(");
-
 
209
  for (res = 0; c[res] != 0; res++) {
-
 
210
    if (res != 0) output("/");
-
 
211
    cstr[0] = c[res];
-
 
212
    output(cstr);
-
 
213
  }
-
 
214
  output(") ");
207
 
215
 
208
  _asm {
216
  _asm {
209
    push ax
217
    push ax
210
    push dx
218
    push dx
211
 
219