home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / b / krtidx.bas < prev    next >
BASIC Source File  |  2020-01-01  |  2KB  |  56 lines

  1. 1 REM KRTIDX.BAS V03.63 27-SEP-97 \ L$=CHR$(13)+CHR$(10) \ I$=CHR$(9) \ B%=1
  2. 2 OPEN "DK:KRTHLP.HLP" FOR INPUT AS FILE #1 \ LINPUT #1,K$
  3. 3 OPEN "DK:KRTIDX.MAC" FOR OUTPUT AS FILE #2 \ X%=LEN(K$) \ Y%=Y%+X%+2
  4. 4 X$=I$+".title"+I$+"KRTIDX"+I$+"HELP RMS Index"+I$+DAT$+"  "+CLK$+L$
  5. 5 PRINT #2,X$; \ PRINT X$;
  6. 6 FOR X=1 TO 23 \ READ X$ \ PRINT #2,X$ \ PRINT X$ \ NEXT X
  7. 7 X$="hident::.asciz"+I$+'"'+K$+'"'+L$+I$+".even"+L$+L$+I$
  8. 8 PRINT #2,X$; \ PRINT X$;
  9. 9 X$=";"+I$+"address"+I$+",block"+I$+",offset"+I$+",string"+L$+"hlphead:"
  10. 10 PRINT #2,X$; \ PRINT X$;
  11. 25 IF END #1 THEN 99 \ LINPUT #1,X$
  12. 30 X%=LEN(X$) \ Y%=Y%+X%+2 \ IF Y%<512 THEN 40 \ Y%=Y%-512 \ Z%=Z%+1
  13. 40 T$=SEG$(X$,1,1) \ IF T$<"1" THEN 25 \ IF T$>"5" THEN 25
  14. 41 REM    hlphead:.word    L1$    ,block    ,offset
  15. 42 REM        .word    L2$    ,block    ,offset
  16. 43 Y$=".word"+I$+"L"+STR$(B%)+"$"+I$+","+STR$(Z%)+"."+I$+","
  17. 44 Y$=Y$+STR$(Y%)+"."+I$+"; "+X$+L$+I$
  18. 45 PRINT #2,Y$; \ PRINT Y$;
  19. 47 B%=B%+1 \ GOTO 25
  20. 99 RESTORE #1 \ B%=1 \ Y$=".word"+I$+"0"+I$+I$+I$+"; null terminator"+L$
  21. 100 PRINT #2,Y$ \ PRINT Y$
  22. 120 IF END #1 THEN 199 \ LINPUT #1,X$ \ X%=LEN(X$)
  23. 130 Y%=Y%+X%+2 \ IF Y%<512 THEN 140 \ Y%=Y%-512 \ Z%=Z%+1
  24. 140 T$=SEG$(X$,1,1) \ IF T$<"1" THEN 120 \ IF T$>"5" THEN 120
  25. 141 REM L1$:    .asciz    "1 ?"
  26. 142 REM L2$:    .asciz    "1 @"
  27. 143 Y$="L"+STR$(B%)+"$:"+I$+".asciz"+I$+'"'+X$+'"'
  28. 145 PRINT #2,Y$ \ PRINT Y$
  29. 147 B%=B%+1 \ GOTO 120
  30. 199 X$=I$+".even"+L$+L$+I$+".end"
  31. 200 PRINT #2,X$ \ PRINT X$
  32. 299 CLOSE \ A=SYS(4)
  33. 301 DATA '    .ident    "V03.63"'
  34. 302 DATA ""
  35. 303 DATA "; /63/    27-Sep-97  Billy Youdelman  V03.63"
  36. 304 DATA ";"
  37. 305 DATA ";    moved this into a module of its own as KRTHLP was > 4096. words"
  38. 306 DATA ""
  39. 307 DATA " "
  40. 308 DATA "    .psect    $code    ,ro,i,lcl,rel,con"
  41. 309 DATA "    .sbttl    Pass top of index back to caller"
  42. 310 DATA ""
  43. 311 DATA "loahlp::mov    #hlphead,r0        ; calling this also loads this overlay"
  44. 312 DATA "    return"
  45. 313 DATA ""
  46. 314 DATA " "
  47. 315 DATA "    .psect    $pdata    ,ro,d,lcl,rel,con"
  48. 316 DATA "    .sbttl    Fake RMS for help text file under RT-11"
  49. 317 DATA ""
  50. 318 DATA ';    Note here the "block" and "offset" point to the first line FOLLOWING'
  51. 319 DATA ";    the topic/subtopic line in the help text file (KRTHLP.HLP).  In other"
  52. 320 DATA ";    words, these data point to the first byte of the help text itself for"
  53. 321 DATA ";    the indicated topic or subtopic, which is directly AFTER the <cr><lf>"
  54. 322 DATA ";    tag on the topic/subtopic line."
  55. 323 DATA ""
  56.