home *** CD-ROM | disk | FTP | other *** search
/ Oakland CPM Archive / oakcpm.iso / sigm / vol237 / pilot-p.lbr / TUTORIAL.PLT < prev    next >
Encoding:
Text File  |  1986-02-10  |  2.0 KB  |  98 lines

  1. R:FILE: TUTORIAL.PLT
  2. R: READS AN EXTERNAL DATA FILE AND DISPLAYS THE TEXT ON THE CONSOLE
  3. R: A SCREENFUL AT A TIME.
  4.  
  5. %: pause
  6. t:@$h@
  7. r:home down 21 lines.
  8. c:for #i:=1 to 21 do writeln
  9. t:@$s:27@Press any key to continue;
  10. u:keyin(ch)
  11. e:
  12.  
  13. %: do_process
  14.  t:@$c@;
  15.  c:done := FALSE
  16.  c:while not done do begin
  17.  u:readln(f2,ans)
  18.  x:ans[1]='.'
  19. tn:@ans@
  20. jn:*break
  21.  x:ans = '.end'
  22. cy:done := TRUE
  23. jy:*break
  24.  x:ans = '.pause'
  25. uy:pause
  26. jy:*break
  27.  x:ans = '.break'
  28. ty:@$c@
  29. *break
  30. c:end{while}
  31. E:
  32.  
  33. *BEGIN
  34. r: a space character
  35. c:$s := ' '
  36.  
  37. r: STRING TO CLEAR THE SCREEN AND HOME UP THE CURSOR.
  38. c:$c[1] := chr(27); $c[2] := 'E'; setlength($c,2)
  39.  
  40. r: STRING TO HOME UP THE CURSOR BUT NOT CLEAR THE SCREEN.
  41. c:$h[1] := chr(27); $h[2] := 'H'; setlength($h,2)
  42.  
  43. r: THE INPUT DATA FILE.
  44. c:$n := 'CPM.HLP'
  45.  
  46. r:ATTEMPT TO OPEN FILE $n FOR READ.
  47. u:reset($n,f2)
  48. x:eof(f2)
  49. ty:CP/M HELP FILE NOT FOUND.
  50. jy:*END
  51.  
  52. *MENU
  53. t:@$c@
  54. t:        A - General Information on CP/M
  55. t:        B - CP/M File References
  56. t:        C - CP/M Line Editing and Output Control
  57. t:        D - CP/M Built-In Commands
  58. t:        E - CP/M Transient Commands
  59. t:        F - Physical Device Assignments for ARIES-1
  60. t:        G - CP/M STAT Command
  61. t:        H - CP/M PIP Command
  62. t:        I - CP/M ED Command
  63. t:        J - CP/M ASM Command
  64. t:        K - CP/M LOAD Command
  65. t:        L - The UNLOAD Command
  66. t:        M - CP/M DDT Command
  67. t:        N - The ZDT Command
  68. t:        O - CP/M SYSGEN Command
  69. t:        P - CP/M SUBMIT and XSUB Commands
  70. t:        Q - CP/M BIOS -- Basic I/O Operations
  71. t:        R - CP/M BDOS -- Basic Disk Operations
  72. t:        S - CP/M File Types
  73. t:        T - CP/M BIOS Jump Vector
  74. t:@$s:10@Which would you like to review?<escape to end>;
  75.  u:repeat keyin(ch)
  76.  x:  ord(ch)=27
  77. jy:  *END
  78.  c:  ch:=toupper(ch)
  79.  u:until ch in ['A'..'T']
  80.  c:#F := ord(ch)
  81.  
  82.  r:REWIND THE DATA FILE.
  83.  u:reset($n,f2)
  84.  
  85.  c:while not eof(f2) do begin
  86.  u:   readln(f2,ans)
  87.  x:   isdigit(ans[1])
  88. jn:   *around
  89.  x:   ivalue(ans,1)=#F
  90. uy:   do_process
  91. jy:   *quitloop
  92. *around
  93.  c:end{while}
  94. *quitloop
  95.  j:*MENU
  96. *END
  97.  E:
  98.