home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 236 / 236.d81 / t.dbdocs3 < prev    next >
Text File  |  2022-08-26  |  9KB  |  331 lines

  1. u
  2.         DOTBASIC DOCUMENTATION
  3.                 Part 4
  4.  
  5.  
  6.     We're BACK...and ready for DISK
  7. ACCESS!
  8.  
  9.  
  10.   BLOAD: .BL,file$,dv,location
  11.   ----------------------------
  12.  
  13.     BLOAD will load file$ from device
  14. DV to any memory location, except
  15. $d000-dfff. E$ returns the error
  16. message. F% returns the end location
  17. (plus 1) of the BLOADed file. Note
  18. that values above 32767 cause the
  19. integer F% to be negative. [NOTE:] Yet
  20. again a great place for .IU,F% -- with
  21. the full positive value returned in
  22. the variable FP. DMM
  23.  
  24.  
  25.   BSAVE: .BS,name$,dv,start,end+1
  26.   -------------------------------
  27.  
  28.     This will SAVE a chunk of memory
  29. to device DV under the given name.
  30. Only memory accessible by the CPU may
  31. be saved - meaning you can't save data
  32. hidden under the ROMS or I/O. The
  33. error message is returned in E$.
  34.  
  35.  
  36.   DISK COMMAND: .DV,command$,dv
  37.   -----------------------------
  38.  
  39.     This will send your string to
  40. device DV via the command channel. The
  41. error message is returned in E$. To
  42. only read the error channel, send a
  43. null string ("").
  44.  
  45.  
  46.   MULTI-COLUMN MENU:
  47.   .MZ,nc,x1,x2,y1,y2,u,h,hot$
  48.   ---------------------------
  49.  
  50.     This routine has a lot in common
  51. with the regular menu, with a few
  52. exceptions. NC is the number of
  53. columns in your menu, which can be
  54. from 1 to 5. You must follow that with
  55. an X1 and X2 value for each column of
  56. your menu. Y1 and Y2 apply to all
  57. columns.
  58.  
  59. NOTE: The width of each column can be
  60. different!
  61.  
  62.     U is the color of unhighlighted
  63. items in the menu. The highlight bar
  64. is colored H. If you don't want the
  65. text to reverse or un-reverse as the
  66. bar moves, add 128 to H.
  67.  
  68.     The user can move the mouse or
  69. joystick right to the desired item, or
  70. use the CRSR keys to change rows and
  71. columns. The items are numbered in
  72. this order: down the first column,
  73. then the next, and so on. So, if you
  74. had 3 columns with 7 items in each
  75. column, the 2nd column would start
  76. with item number 8.
  77.  
  78.     Items can be directly selected by
  79. pressing the appropriate HOTKEY. The
  80. highlight bar is moved to that item
  81. number, unless it doesn't exist.
  82. Pressing the Global Escape key (MV+12)
  83. ALWAYS returns a zero in SL%.
  84.  
  85.     The selected item's number is
  86. returned in SL%. The maximum number of
  87. columns is 5, making the highest
  88. possible SL% (25 rows) equal to 125.
  89. There's a reason for this!
  90.  
  91.    Related Variable:  (default is 192)
  92.  
  93.    MV+11  Multi-Menu Type
  94.  
  95.     Just like MV+10, this byte has
  96. eight features attached to it. Note
  97. that bit 4's feature is different.
  98.  
  99.    +128  Automatic Caging of Mouse
  100.    + 64  Automatic Point-to-First
  101.    + 32  Must Select
  102.    + 16  Regions Active
  103.    +  8  Honor Hotkey Colors
  104.    +  4  Dual Response
  105.    +  2  Un-highlight after Select
  106.    +  1  Stray-to-Exit
  107.  
  108.   +16 allows the user to click on ANY
  109.     active region. If this happens,
  110.     128 is added to the region number
  111.     and that value is returned in SL%.
  112.     The region is not "highlighted" in
  113.     any way as the pointer moves over
  114.     it.
  115.  
  116.     This feature has limited uses and
  117.     does require some setup on your
  118.     part. You probably won't want to
  119.     use the same ol' regions as the
  120.     main portion of your program.
  121.     Special regions should be defined,
  122.     making sure that only THEY are the
  123.     active ones, and labelled in some
  124.     way to inform the user that these
  125.     areas are clickable.
  126.  
  127.     If regions are active, the HOTKEYS
  128.     no longer select individual items
  129.     in the menu, but regions! 128 will
  130.     be added to the hotkey's number
  131.     and that value is returned in SL%.
  132.     Even the fanciest menu can still
  133.     have complete keyboard
  134.     compatibility!
  135.  
  136.   +32 is especially valuable for
  137.     multi-column menus. Since clicks
  138.     that occur nowhere can be ignored,
  139.     you don't have to make the columns
  140.     touch. This is made even better if
  141.     regions are active. Only regions
  142.     and items of the menu could then
  143.     be clicked on.
  144.  
  145.     If you are using regions, you
  146.     probably shouldn't enable the
  147.     CAGE. Point-to-First might not
  148.     even be a good idea. If you are
  149.     clicking on a region to flip
  150.     through "pages" of items, it would
  151.     be bothersome to have the pointer
  152.     yanked away with each press.
  153.     Experiment with it.
  154.  
  155.  
  156.   BLOAD WITH ZERO:
  157.   .B0,file$,dv,location
  158.   ---------------------
  159.  
  160.     The only difference between this
  161. and a regular BLOAD is that a zero
  162. will be placed at the end of the
  163. BLOADED file. If the load is not
  164. successful for ANY reason, the zero
  165. will NOT be placed, since the real end
  166. location can't be known for sure.
  167.  
  168.     Some routines in this later
  169. section use EDSTAR files which must
  170. terminate with 0. This routine saves
  171. you the hassle of BLOADing and then
  172. using F% to POKE the zero manually.
  173.  
  174.  
  175.   RACK EDSTAR FILE: .RK,location
  176.   ------------------------------
  177.  
  178.     This routine takes an EDSTAR file
  179. (terminated by a zero) and "racks it
  180. up". A table of pointers is created
  181. right after the zero cap of the text,
  182. enabling you to use INDEX to grab or
  183. print individual lines of the file.
  184.  
  185.     The file can be located anywhere
  186. in memory, even under I/O. Racking
  187. needs 3 bytes per line at the end of
  188. the file for its pointers. The total
  189. number of items is returned in N%.
  190.  
  191.  
  192.   INDEX ITEM: .RI,number
  193.   ----------------------
  194.  
  195.     Once you've racked up an EDSTAR
  196. file, you can index it. The indexed
  197. item is returned in W$. F$ is also set
  198. by indexing, and will always return a
  199. null unless you happen to be looking
  200. at a directory, in which case it
  201. contains the entry's filename.
  202.  
  203.  
  204.   PRINT ITEM: .PI,x,y,number
  205.   --------------------------
  206.  
  207.     This routine indexes an item and
  208. prints it anywhere on the screen. The
  209. string is NOT returned in W$ or F$.
  210.  
  211.  
  212.   PRINT NAME: .PN,x,y,number
  213.   --------------------------
  214.  
  215.     If you've used GET DIRECTORY and
  216. have racked up the resulting text, you
  217. can print the filenames.
  218.  
  219.  
  220.   SORT RACKED DATA: .AZ,position
  221.   ------------------------------
  222.  
  223.     This command and the next was
  224. added through DotBASIC. Racked data
  225. can be sorted, beginning the the given
  226. position. For example,
  227.  
  228.     .AZ,3
  229.  
  230.     would consider the third character
  231. in the string as the first. Normally,
  232. you will use .AZ,1. (An exception
  233. would be if you are sorting a
  234. directory and want to "ignore" the
  235. "B.*" or "T.*" and just sort the
  236. actual filenames. In that case, you
  237. would use .AZ,4.)
  238.  
  239.  
  240.   SORT DIRECTORY: .A$
  241.   -------------------
  242.  
  243.     This alphabetizes the directory
  244. loaded with .B$ and Racked.
  245.  
  246.  
  247.   DEFINE REGION TEXT:
  248.   .NT,number,"static string"
  249.   --------------------------
  250.  
  251.     The concept of "region text" for
  252. LOADSTAR programs is credited to both
  253. Jeff Jones and myself. CASH FLOWER (LS
  254. #161), the LOADSTAR Presenter, and
  255. QUICKSMITH (LS #164) both used the
  256. concept, and it's interesting to note
  257. that neither of us knew what the other
  258. was up to.
  259.  
  260.     "Region text" is when the user
  261. moves the mouse pointer around the
  262. screen, and a message bar at the
  263. bottom of the screen informs the user
  264. of what will happen if he or she
  265. clicks on that particular area. These
  266. strings don't have to be associated
  267. with regions - it's just likely that
  268. this will be their most common use.
  269.  
  270.    Related Variables:     (& defaults)
  271.  
  272.   MV+20  Region Text Zone (LB)     (0)
  273.   MV+21  Region Text Zone (HB)     (4)
  274.   MV+22  Region Text Color / Flags (1)
  275.   MV+23  Region Text Row          (24)
  276.  
  277.  
  278.     Strings defined as region text
  279. must NOT be made by combining smaller
  280. strings. The string's POINTER will be
  281. stored in its proper slot in the
  282. Region Text Zone. Be sure this zone is
  283. safe from BASIC and other data. The
  284. Zone will never exceed 3 pages.
  285.  
  286.     All region text will be printed in
  287. MV+22's color. Add 128 to MV+22 for
  288. REVERSE printing.
  289.  
  290.     Add 32 to MV+22 and all your
  291. region text will be CENTERED. Add 16
  292. instead, and each string will be
  293. printed after a forced leading SPACE.
  294.  
  295.  
  296.   EDSTAR TO REGION TEXT:
  297.   .NE,location
  298.   ----------------------
  299.  
  300.     This command defines ALL region
  301. text with a single command! It takes
  302. an EDSTAR file (terminated by 0),
  303. racks it up, and POKEs MV+24 and
  304. MV+25. The number of lines in the file
  305. is returned in N%.
  306.  
  307.     Keep in mind that the FIRST line
  308. of the EDSTAR file will be referenced
  309. by number zero. You can have as many
  310. lines as you want (memory available).
  311.  
  312.  
  313.   PRINT REGION TEXT:
  314.   .NP,number
  315.   ------------------
  316.  
  317.     This prin