home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / intelmdsb / mdssho.p80 < prev    next >
Text File  |  2020-01-01  |  4KB  |  171 lines

  1. $TITLE ('SHOW MODULE')
  2. show$module:
  3. /* SHOW: Display the values of the KERMIT parameters which can be */
  4. /* altered by the user. */
  5.  
  6. /* COPYRIGHT (C) 1985, Trustees of Columbia University in the City of New */
  7. /* York.  Permission is granted to any individual or institution to use,  */
  8. /* copy, or redistribute this software so long as it is not sold for      */
  9. /* profit, provided this copyright notice is retained. /*
  10.  
  11. /* Future changes: Allow selective show. */
  12.  
  13. /* Contains the following public routines: shohelp, show */
  14. do;
  15.  
  16. declare port byte external;
  17. declare debug byte external;
  18. declare escchar byte external;
  19. declare def$drive(5) byte external;
  20. declare baudrate address external;
  21. declare parity byte external;
  22. declare maxtry byte external;
  23. declare halfduplex byte external;
  24. declare warning$flag byte external;
  25. declare take$echo byte external;
  26. declare prompt(20) byte external;
  27.  
  28. declare true literally '0FFH';
  29. declare false literally '00H';
  30. declare lf literally '0AH';
  31. declare cr literally '0DH';
  32. declare null literally '000H';
  33. declare crlf literally 'cr,lf,null';
  34.  
  35. print:    procedure(msg) external;
  36.     declare msg address;
  37. end print;
  38.  
  39. nout:    procedure(n) external;
  40.     declare n address;
  41. end nout;
  42.  
  43. newline: procedure external; end newline;
  44.  
  45. ctl: procedure(char) byte external;
  46.     declare char byte;
  47. end ctl;
  48.  
  49. co: procedure(char) external;
  50.     declare char byte;
  51. end co;
  52.  
  53. baudshow: procedure;
  54.     call print(.('  Baud rate = $'));
  55.     call nout(baudrate);
  56.     call newline;
  57. end baudshow;
  58.  
  59. debshow: procedure;
  60.     call print(.('  Debugging mode = $'));
  61.     if debug then
  62.       call print(.('ON$'));
  63.     else
  64.       call print(.('OFF$'));
  65.     call newline;
  66. end debshow;
  67.  
  68. diskshow: procedure;
  69.     call print(.('  Default disk = $'));
  70.     if def$drive(0) = null then /* no default */
  71.       call print(.('(none)$'));
  72.     else
  73.       call print(.def$drive(0));
  74.     call newline;
  75. end diskshow;
  76.  
  77. duplshow: procedure;
  78.     call print(.('  Duplex mode = $'));
  79.     if halfduplex then
  80.       call print(.('HALF$'));
  81.     else
  82.       call print(.('FULL$'));
  83.     call newline;
  84. end duplshow;
  85.  
  86. escshow: procedure;
  87.     call print(.('  Escape character = $'));
  88.     if escchar < ' ' then do; /* escape char is a cntrl char */
  89.       call print(.('CTRL-$'));
  90.       call co(ctl(escchar));
  91.     end;
  92.     else call co(escchar);
  93.     call newline;
  94. end escshow;
  95.  
  96. parshow: procedure;
  97.     call print(.('  Parity = $'));
  98.     do case parity;
  99.       call print(.('NONE\$'));
  100.       call print(.('MARK\$'));
  101.       call print(.('SPACE\$'));
  102.       call print(.('EVEN\$'));
  103.       call print(.('ODD\$'));
  104.     end;
  105. end parshow;
  106.  
  107. portshow: procedure;
  108.     call print(.('  Port = $'));
  109.     call nout(port);
  110.     call newline;
  111. end portshow;
  112.  
  113. promshow: procedure;
  114.     call print(.('  Prompt = "$'));
  115.     call print(.prompt);
  116.     call print(.('"\$'));
  117. end promshow;
  118.  
  119. tryshow: procedure;
  120.     call print(.('  Number of retries = $'));
  121.     call nout(maxtry);
  122.     call newline;
  123. end tryshow;
  124.  
  125. echoshow: procedure;
  126.     call print(.('  Take echo mode = $'));
  127.     if take$echo then
  128.       call print(.('ON$'));
  129.     else
  130.       call print(.('OFF$'));
  131.     call newline;
  132. end echoshow;
  133.  
  134. warnshow: procedure;
  135.     call print(.('  File warning mode = $'));
  136.     if warning$flag then
  137.       call print(.('ON$'));
  138.     else
  139.       call print(.('OFF$'));
  140.     call newline;
  141. end warnshow;
  142.  
  143. /* Display help for the SHOW command */
  144. shohelp:procedure public;
  145.     call print(.('  SHOW                     $'));
  146.     call print(.('    Show the values of the SET parameters\\$'));
  147.     call print(.('SHOW\\$'));
  148.     call print(.('  The SHOW command causes KERMIT to display the $'));
  149.     call print(.('values of the SET parameters.\\$'));
  150.     call print(.('Syntax:\\$'));
  151.     call print(.('    SHOW\\$'));
  152. end shohelp;
  153.  
  154. show:
  155.     procedure public;
  156.     call print(.('Current KERMIT parameter values are:\$'));
  157.     call baudshow;
  158.     call debshow;
  159.     call diskshow;
  160.     call duplshow;
  161.     call escshow;
  162.     call parshow;
  163.     call portshow;
  164.     call promshow;
  165.     call tryshow;
  166.     call echoshow;
  167.     call warnshow;
  168. end show;
  169.  
  170. end show$module;
  171.