home *** CD-ROM | disk | FTP | other *** search
/ The CDPD Public Domain Collection for CDTV 3 / CDPDIII.bin / bbs / ff887.lha / SegTextMaster / SegTextMaster.DOC < prev    next >
Text File  |  1993-07-16  |  5KB  |  165 lines

  1. SegTextMasterV1.0.DOC - (c)93 by Titus v. Kraft
  2.  
  3.  
  4. *---------------------------- Distribution --------------------------------*
  5.  
  6.  
  7. Excuse my bad english. I hope you understand it.
  8.  
  9. Note: SegTextMaster is freeware
  10.  
  11. you can freely copying and mailboxing the program as long as all files
  12. being together without sending me any fee, and you can use all the sources
  13. in your program anyway if you want to sell it, too. But making any profit by
  14. distributing SegTextMaster is stricktly prohibited. Thank you.
  15.  
  16. This files going along with SegTextMaster:
  17.  
  18. SegTextMaster.DOC            : introducion
  19. SegTextMaster                : executable version 1.0 of SegTextMaster
  20.  
  21.  directory "Examples"
  22.  
  23. example                      : executable example (CLI)
  24. example.c                    : source of the example
  25. example.asm                  : source of an assembly example
  26. example-text.asc             : a sample text
  27. example-text.stf             : the sample text coded by SegTextMaster
  28.  
  29.  
  30. *------------------------------ Programing --------------------------------*
  31.  
  32.  
  33. SegTextMaster is written in 100% assembly source. You know the reason why I
  34. cannot guarantee for the functionallity of the program. I don't be res-
  35. ponsible for bad consequences which may damage anything of your system. So
  36. use the program on your own risk!
  37.  
  38. I guess SegTextMaster is real-good coded at all since I don't found a bug.
  39. If there is anything let me know. SegTextMaster needs eigther the asl-
  40. or the arp-library to run. It's a bit font-sensitiv and works very quickly.
  41.  
  42. SegTextMastersV1.00's len  : 8900 bytes
  43. required stack             : 4000 bytes
  44. working with               : workbench or shell
  45.  
  46.  
  47. *---------------------- What's about SegTextMaster? -----------------------*
  48.  
  49.  
  50. Maybe you want to write a text-adventure or a spell-checker. In any case
  51. your program have to handle with a great amont of text.
  52.  
  53. The next difficult thing is how can be included the text directly in your
  54. program if every text-string should be seperately coded. SegTextMaster
  55. does this job. It minimizes the compiling- or assembling-time.
  56.  
  57. SegTextMaster reads a pre-formated text and build up an array of char with
  58. a header on the top of it.
  59.  
  60.  
  61. This shows you the header:
  62.  
  63. base:     ULONG ID           ; "STF"+0-byte
  64.           ULONG Segments     ; Segments
  65.           ULONG Flags
  66.           ULONG NULL         ; it's reserved for later use
  67.  
  68.           ULONG longword-offsets ...
  69.  
  70.  
  71. Every longword offset added to the base points to a text segment in each
  72. case. A text segment is nothing else as a c-string. SegTextMaster writes
  73. only offsets not pointers! your program may jump in the MakeSegTextPtrs-
  74. routine to change all them offsets to pointers. Now it's simple to add new
  75. pointers to the array.
  76.  
  77.  
  78. For reading a segment in your program there's a function:
  79.  
  80.  SegMemPtr = GetTextSeg(Segment,Segment-Base,Password)
  81.  
  82.  
  83. *------------------------- The pre-formated text --------------------------*
  84.  
  85.  
  86. SegTextMaster accepts texts like this:
  87.  
  88.  
  89. @1 this is a example of a text-segment@
  90.  
  91. @0002 this is the next text-example@
  92.  
  93. this is a coment.
  94.  
  95. @0003 and this are the last one
  96. @
  97.  
  98. The numbers after the '@'-char are the segment numbers. SegTextMaster will
  99. sort the offsets by the number values. In the sample above the '@'-char is
  100. reserved for SegTextMaster and cannot used in the text segments (RBYTE).
  101. However, you are able to insert or cut off a text segment on every place in
  102. your text without destroing the order of the array.
  103.  
  104.  
  105. *------------------------- Important conditions ---------------------------*
  106.  
  107.  
  108. Every text-segment have to lie between two reserved bytes like '@'-chars.
  109. The first reserved byte have to directly followed by a decimal segment
  110. number. This number have to followed by a blank byte for optical reasons.
  111. Realize: the segment's first number is 1 not 0!
  112. The password have to be at least 2 bytes long.
  113.  
  114.  
  115. *--------------------------- Preferences ----------------------------------*
  116.  
  117.  
  118. you can change the preferences of SegTextMaster in the tool-types of
  119. it's icon. Click in the default-tools and input in the variables.
  120. SegTextMaster defaults to every record.
  121.  
  122.  
  123.         CODING=ON/OFF          : switch on/off coding of the text
  124.  
  125.         PASSWORD=HokusPokus    : the password
  126.  
  127.         RBYTE=@                : the reserved byte
  128.  
  129.         MAXEMPTYSLOTS=30       : maximum of empty slots
  130.  
  131.         STATISTICS=CON:0/0/...  : the window/file for the statistics
  132.  
  133.  
  134. *----------------------------- Statistics ---------------------------------*
  135.  
  136.  
  137. A really important thing is you overlook your text. The statistics-window
  138. will show you all the empty text-slots. If SegTextMaster find failures
  139. in your text like double numbers it will output a request with a message
  140. on it.
  141.  
  142.  
  143. *-------------------------------- Hints -----------------------------------*
  144.  
  145.  
  146. It's the best way you write the segment numbers with four digits.
  147. your editor will find them better.
  148.  
  149. The  finally used password should be contain as much as possible cryptic
  150. bytes but it's also clever to take a failure-message of your program.
  151.  
  152.  
  153. *------------------------------ Support -----------------------------------*
  154.  
  155.  
  156. If there is enough of interest response about this software I will improve
  157. the features of SegTextMaster in future realeases.
  158.  
  159.  
  160. Send suggestings, bug reports and greatings to this adress:
  161.  
  162. Titus v. Kraft, c/o Emme
  163. Bahrenfelder Marktplatz 17
  164. 22761 Hamburg, GERMANY
  165.