home *** CD-ROM | disk | FTP | other *** search
- u
- DOTBASIC DOCUMENTATION
- Part 4
-
-
- We're BACK...and ready for DISK
- ACCESS!
-
-
- BLOAD: .BL,file$,dv,location
- ----------------------------
-
- BLOAD will load file$ from device
- DV to any memory location, except
- $d000-dfff. E$ returns the error
- message. F% returns the end location
- (plus 1) of the BLOADed file. Note
- that values above 32767 cause the
- integer F% to be negative. [NOTE:] Yet
- again a great place for .IU,F% -- with
- the full positive value returned in
- the variable FP. DMM
-
-
- BSAVE: .BS,name$,dv,start,end+1
- -------------------------------
-
- This will SAVE a chunk of memory
- to device DV under the given name.
- Only memory accessible by the CPU may
- be saved - meaning you can't save data
- hidden under the ROMS or I/O. The
- error message is returned in E$.
-
-
- DISK COMMAND: .DV,command$,dv
- -----------------------------
-
- This will send your string to
- device DV via the command channel. The
- error message is returned in E$. To
- only read the error channel, send a
- null string ("").
-
-
- MULTI-COLUMN MENU:
- .MZ,nc,x1,x2,y1,y2,u,h,hot$
- ---------------------------
-
- This routine has a lot in common
- with the regular menu, with a few
- exceptions. NC is the number of
- columns in your menu, which can be
- from 1 to 5. You must follow that with
- an X1 and X2 value for each column of
- your menu. Y1 and Y2 apply to all
- columns.
-
- NOTE: The width of each column can be
- different!
-
- U is the color of unhighlighted
- items in the menu. The highlight bar
- is colored H. If you don't want the
- text to reverse or un-reverse as the
- bar moves, add 128 to H.
-
- The user can move the mouse or
- joystick right to the desired item, or
- use the CRSR keys to change rows and
- columns. The items are numbered in
- this order: down the first column,
- then the next, and so on. So, if you
- had 3 columns with 7 items in each
- column, the 2nd column would start
- with item number 8.
-
- Items can be directly selected by
- pressing the appropriate HOTKEY. The
- highlight bar is moved to that item
- number, unless it doesn't exist.
- Pressing the Global Escape key (MV+12)
- ALWAYS returns a zero in SL%.
-
- The selected item's number is
- returned in SL%. The maximum number of
- columns is 5, making the highest
- possible SL% (25 rows) equal to 125.
- There's a reason for this!
-
- Related Variable: (default is 192)
-
- MV+11 Multi-Menu Type
-
- Just like MV+10, this byte has
- eight features attached to it. Note
- that bit 4's feature is different.
-
- +128 Automatic Caging of Mouse
- + 64 Automatic Point-to-First
- + 32 Must Select
- + 16 Regions Active
- + 8 Honor Hotkey Colors
- + 4 Dual Response
- + 2 Un-highlight after Select
- + 1 Stray-to-Exit
-
- +16 allows the user to click on ANY
- active region. If this happens,
- 128 is added to the region number
- and that value is returned in SL%.
- The region is not "highlighted" in
- any way as the pointer moves over
- it.
-
- This feature has limited uses and
- does require some setup on your
- part. You probably won't want to
- use the same ol' regions as the
- main portion of your program.
- Special regions should be defined,
- making sure that only THEY are the
- active ones, and labelled in some
- way to inform the user that these
- areas are clickable.
-
- If regions are active, the HOTKEYS
- no longer select individual items
- in the menu, but regions! 128 will
- be added to the hotkey's number
- and that value is returned in SL%.
- Even the fanciest menu can still
- have complete keyboard
- compatibility!
-
- +32 is especially valuable for
- multi-column menus. Since clicks
- that occur nowhere can be ignored,
- you don't have to make the columns
- touch. This is made even better if
- regions are active. Only regions
- and items of the menu could then
- be clicked on.
-
- If you are using regions, you
- probably shouldn't enable the
- CAGE. Point-to-First might not
- even be a good idea. If you are
- clicking on a region to flip
- through "pages" of items, it would
- be bothersome to have the pointer
- yanked away with each press.
- Experiment with it.
-
-
- BLOAD WITH ZERO:
- .B0,file$,dv,location
- ---------------------
-
- The only difference between this
- and a regular BLOAD is that a zero
- will be placed at the end of the
- BLOADED file. If the load is not
- successful for ANY reason, the zero
- will NOT be placed, since the real end
- location can't be known for sure.
-
- Some routines in this later
- section use EDSTAR files which must
- terminate with 0. This routine saves
- you the hassle of BLOADing and then
- using F% to POKE the zero manually.
-
-
- RACK EDSTAR FILE: .RK,location
- ------------------------------
-
- This routine takes an EDSTAR file
- (terminated by a zero) and "racks it
- up". A table of pointers is created
- right after the zero cap of the text,
- enabling you to use INDEX to grab or
- print individual lines of the file.
-
- The file can be located anywhere
- in memory, even under I/O. Racking
- needs 3 bytes per line at the end of
- the file for its pointers. The total
- number of items is returned in N%.
-
-
- INDEX ITEM: .RI,number
- ----------------------
-
- Once you've racked up an EDSTAR
- file, you can index it. The indexed
- item is returned in W$. F$ is also set
- by indexing, and will always return a
- null unless you happen to be looking
- at a directory, in which case it
- contains the entry's filename.
-
-
- PRINT ITEM: .PI,x,y,number
- --------------------------
-
- This routine indexes an item and
- prints it anywhere on the screen. The
- string is NOT returned in W$ or F$.
-
-
- PRINT NAME: .PN,x,y,number
- --------------------------
-
- If you've used GET DIRECTORY and
- have racked up the resulting text, you
- can print the filenames.
-
-
- SORT RACKED DATA: .AZ,position
- ------------------------------
-
- This command and the next was
- added through DotBASIC. Racked data
- can be sorted, beginning the the given
- position. For example,
-
- .AZ,3
-
- would consider the third character
- in the string as the first. Normally,
- you will use .AZ,1. (An exception
- would be if you are sorting a
- directory and want to "ignore" the
- "B.*" or "T.*" and just sort the
- actual filenames. In that case, you
- would use .AZ,4.)
-
-
- SORT DIRECTORY: .A$
- -------------------
-
- This alphabetizes the directory
- loaded with .B$ and Racked.
-
-
- DEFINE REGION TEXT:
- .NT,number,"static string"
- --------------------------
-
- The concept of "region text" for
- LOADSTAR programs is credited to both
- Jeff Jones and myself. CASH FLOWER (LS
- #161), the LOADSTAR Presenter, and
- QUICKSMITH (LS #164) both used the
- concept, and it's interesting to note
- that neither of us knew what the other
- was up to.
-
- "Region text" is when the user
- moves the mouse pointer around the
- screen, and a message bar at the
- bottom of the screen informs the user
- of what will happen if he or she
- clicks on that particular area. These
- strings don't have to be associated
- with regions - it's just likely that
- this will be their most common use.
-
- Related Variables: (& defaults)
-
- MV+20 Region Text Zone (LB) (0)
- MV+21 Region Text Zone (HB) (4)
- MV+22 Region Text Color / Flags (1)
- MV+23 Region Text Row (24)
-
-
- Strings defined as region text
- must NOT be made by combining smaller
- strings. The string's POINTER will be
- stored in its proper slot in the
- Region Text Zone. Be sure this zone is
- safe from BASIC and other data. The
- Zone will never exceed 3 pages.
-
- All region text will be printed in
- MV+22's color. Add 128 to MV+22 for
- REVERSE printing.
-
- Add 32 to MV+22 and all your
- region text will be CENTERED. Add 16
- instead, and each string will be
- printed after a forced leading SPACE.
-
-
- EDSTAR TO REGION TEXT:
- .NE,location
- ----------------------
-
- This command defines ALL region
- text with a single command! It takes
- an EDSTAR file (terminated by 0),
- racks it up, and POKEs MV+24 and
- MV+25. The number of lines in the file
- is returned in N%.
-
- Keep in mind that the FIRST line
- of the EDSTAR file will be referenced
- by number zero. You can have as many
- lines as you want (memory available).
-
-
- PRINT REGION TEXT:
- .NP,number
- ------------------
-
- This prints region text on the
- line specified in MV+23. It fills up
- the unused part of the line with
- spaces, so you don't have to worry
- about erasing the old text before
- printing over it. The string will be
- printed as specified in MV+22, above.
- Usually the "number" will be RG%, but
- it doesn't have to be.
-
- Just one more section to go --
- then you will know all there is to
- know about DotBASIC!
-
-
-