home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 231 / 231.d81 / t.dotcomlist < prev    next >
Text File  |  2022-08-26  |  18KB  |  923 lines

  1. u
  2.         DOTBASIC COMMAND LIST
  3.            by Dave Moorman
  4.  
  5.  
  6.  
  7. START
  8.     Syntax: SYS 4608,MED Page
  9.  
  10.     Turns on DOTBASIC, Event Senser,
  11.     Mr.Mouse, and displays MED screen
  12.     (which was loaded to MED Page --
  13.     usually 224). If the Event Regions
  14.     have not been attached, the Event
  15.     Handling subroutine line numbers
  16.     are displayed with default RETURN
  17.     commands.
  18.  
  19. STOP
  20.     Syntax: SYS 4611
  21.  
  22.     Turns off DOTBASIC, restores BASIC
  23.     2.0 to previous settings. This is
  24.     the same as the .OF command.
  25.  
  26.  
  27. DO
  28.     Syntax: .DO
  29.  
  30.     Begins DO-Loop. A DO-Loop is
  31.     faster than a GOTO loop, because
  32.     the line number is pre-calculated.
  33.     It is more efficient than
  34.  
  35.         FOR X = 0 TO 1
  36.         X = -(condition)
  37.         NEXT
  38.  
  39.     because there is less floating
  40.     point arithmetic.
  41.  
  42.  
  43. UNTIL
  44.     Syntax: .UN condition
  45.  
  46.     Loops back to .do until CONDITION
  47.     is not 0 or is true.
  48.  
  49.  
  50. WHILE
  51.     Syntax: .WH condition
  52.  
  53.     Loops back to .do until CONDITION
  54.     is 0 or is false.
  55.  
  56.  
  57.     DO-LOOP SYNTAX
  58.  
  59.     i=0:.do:i=i+1:.wh i<10
  60.  
  61.     i=0:.do:i=i+1:.un i=9
  62.  
  63.  
  64. OFF
  65.     Syntax: .OF
  66.  
  67.     Turns off all DOTBASIC background
  68.     functions, returning BASIC 2.0 to
  69.     its previous settings.
  70.  
  71.  
  72. EVENT ENABLE
  73.     Syntax: .EE
  74.  
  75.     Enables Event Sensing. Used in the
  76.     Main Loop to restart Event Sensing
  77.     after Event Handling Routine is
  78.     finished.
  79.  
  80.  
  81. EVENT DISABLE
  82.     Syntax: .ED
  83.  
  84.     Disables Event Sensing. Not really
  85.     necessary, but here it is.
  86.  
  87.  
  88. WAIT BACK ARROW
  89.     Syntax: .WB
  90.     Returns: E%
  91.  
  92.     When .WB senses a <BACK ARROW>
  93.     keypress, -1 is put in E%. Used in
  94.     the Main Loop to sense an "Escape"
  95.     exit from the loop and/or program.
  96.  
  97.  
  98. YESNO
  99.     Syntax: .YN,x,y,u,h
  100.     Returns: I%
  101.  
  102.     Puts "Yes No" on the screen at
  103.     X,Y, using color U  (unhighlight),
  104.     with Yes in color H (highlight).
  105.     Highlight shifts with mouse arrow
  106.     rollover or cursor key press.
  107.     Click, Fire, <RETURN> select
  108.     current highlighted option. <Y>
  109.     and <N> select option. If
  110.     selection is No, I% contains 0.
  111.     For Yes, I%=-1
  112.  
  113.  
  114. RUSURE
  115.     Syntax: .RU,u,h
  116.     Returns: I%
  117.  
  118.     Puts box on screen in color U,
  119.     asking "Are You Sure?", with a
  120.     "Yes No" response control as in
  121.     .YN above, with the same results
  122.     in I%.
  123.  
  124.     For an unreverse box and text for
  125.     .YN and .RU, use just  the color
  126.     values. To make a reverse box,
  127.     with reverse highlight, add 144 to
  128.     both U and H. To make the
  129.     highlight item unreversed, add 208
  130.     to both U and H.
  131.  
  132.  
  133. STRING LOCATION
  134.     Syntax: .$L,loc
  135.  
  136.     Sets the location in memory where
  137.     .$P will begin putting strings.
  138.  
  139.  
  140. STRING PUT
  141.     Syntax: .$p,string
  142.     Returns: FP
  143.  
  144.     Puts string in memory, beginning
  145.     with location set with .$L, adding
  146.     a 13 (return) byte and a 0 byte
  147.     afterwards. The pointer for the
  148.     next string is automatically moved
  149.     to the location of the 0 byte,
  150.     ready for the next $P. The pointer
  151.     memory value is returned in FP.
  152.  
  153.     To save a collection of Put
  154.     Strings, use FP+1 as the End
  155.     location.
  156.  
  157.  
  158. INSTRING
  159.     Syntax: .$I,search$,target$
  160.     Returns: I%
  161.  
  162.     Finds the first occurance of the
  163.     search string in target string and
  164.     reports the position in I%. Case
  165.     insensative.
  166.  
  167.  
  168. WAIT KEY
  169.     Syntax: .WK
  170.     Returns I%
  171.  
  172.     Waits for a keystroke, putting
  173.     ASCII value in I%. Same as
  174.  
  175.       POKE198,0:WAIT198,1:GETZ$:
  176.       I%=ASC(Z$)
  177.  
  178.  
  179. OBJECT SET LOCATION
  180.     Syntax: .OS,location
  181.  
  182.     Sets beginning location in memory
  183.     for storing Screen Objects and
  184.     clears index value.
  185.  
  186.  
  187. OBJECT LINK LOCATION
  188.     Syntax: .OL,location
  189.  
  190.     Links beginning location in memory
  191.     for stored or BLOADed screen
  192.     objects, but does not clear index.
  193.     Use .OL to link to BLOADed Screen
  194.     Object Collection, and .OS to
  195.     start a new Collection.
  196.  
  197.  
  198. OBJECT CUT
  199.     Syntax: .OC,x1,x2,y1,y2
  200.     Returns: FP
  201.  
  202.     Stores screen text and color in
  203.     defined area to memory beginning
  204.     with location set with .OS or .OL.
  205.     Index is incremented with each
  206.     Object Cut. Object can be
  207.     retrieved to the screen with .OP.
  208.     The location after the last byte
  209.     used by this command is returned
  210.     in FP.
  211.  
  212.  
  213. OBJECT PASTE
  214.     Syntax: .OP,index,x,y
  215.  
  216.     Screen Objects cut with .OC are
  217.     indexed, and the width and height
  218.     are stored with the data. .OP will
  219.     put object INDEX at any legal
  220.     X,Y on the screen. If the object
  221.     should "fall off" the screen, an
  222.     error is generated.
  223.  
  224.  
  225. OBJECT DELETE
  226.     Syntax: .OD
  227.  
  228.     Removes the last indexed object
  229.     from the Object Collection in
  230.     memory.
  231.  
  232.  
  233. OBJECT NUMBER
  234.     Syntax: .O#
  235.     Returns: I%
  236.  
  237.     Returns the number of objects in
  238.     the Object Collection in I%.
  239.  
  240.  
  241. IRQ OFF
  242.     Syntax: .QS
  243.  
  244.     Turns off Mr.Mouse IRQ wedge and
  245.     sprites. Should be used before any
  246.     disk access.
  247.  
  248.  
  249. IRQ ON
  250.     Syntax: .QR
  251.  
  252.     Restores Mr.Mouse IRQ wedge and
  253.     arrow sprites. Use after disk
  254.     access.
  255.  
  256.  
  257. SIGNED INTEGER TO UNSIGNED
  258.     Syntax: .IU,val
  259.     Returns: FP
  260.  
  261.     Returns the unsigned two-byte
  262.     value of an integer variable in
  263.     FP. Example:
  264.  
  265.         .IU,FRE(0):?FP
  266.  
  267.  
  268. POKE TWO-BYTES
  269.     Syntax: .P2,loc,val
  270.  
  271.     "Pokes" VAL as a two-byte un-
  272.     signed integer to LOC/LOC+1 in
  273.     Low/High format.
  274.  
  275.  
  276. GET TWO-BYTES
  277.     Syntax: .G2,loc
  278.     Returns: FP
  279.  
  280.     Gets bytes at LOC/LOC+1 and
  281.     returns them in FP.
  282.  
  283.  
  284. POKE ONE BYTE
  285.     Syntax: .P1,loc,byte
  286.  
  287.     Just like a POKE, but looks
  288.     better!
  289.  
  290.  
  291. GET ONE BYTE
  292.     Syntax: .G1,loc
  293.     Returns: I%
  294.  
  295.     Like a PEEK, except returns byte
  296.     in I%.
  297.  
  298.  
  299. TEXT COLOR
  300.     Syntax: .TX,color
  301.  
  302.  
  303. BACKGROUND COLOR
  304.     Syntax: .BG,color
  305.  
  306.  
  307. BORDER COLOR
  308.     Syntax: .BR,color
  309.  
  310.     These commands just look better
  311.     than the traditional POKEs.
  312.  
  313.  
  314.  
  315.           MR. MOUSE COMMANDS
  316.  
  317.  
  318. WEDGE IN
  319.     Syntax: .MM
  320.  
  321.     Turns on Mr.Mouse IRQ Driver. This
  322.     command is performed by SYS 5120.
  323.  
  324.  
  325. WEDGE OUT
  326.     Syntax: .MX
  327.  
  328.     Turns off Mr.Mouse IRQ Driver.
  329.     Performed by .OF or SYS 5123.
  330.  
  331.  
  332. EASY SPRITE
  333.     Syntax: .MS,location
  334.  
  335.     Creates mouse arrow sprite, with
  336.     sprite image at LOCATION. SYS 5120
  337.     does this for you -- puting the
  338.     arrow sprite image at 18*256. The
  339.     two pages pages beginning at 18
  340.     are reserved for sprites.
  341.  
  342.  
  343. ASK BASIC
  344.     Syntax: .MA
  345.  
  346.     Updates Mr.Mouse variables.
  347.  
  348. The above Mr.Mouse commands are
  349. performed automatically by DOTBASIC's
  350. START and .OF commands and Event
  351. Sensing.
  352.  
  353.  
  354. PRINT AT
  355.     Syntax: .P@,x,y,string
  356.  
  357.     Prints STRING (only strings) at
  358.     X,Y.
  359.  
  360.  
  361. DEFINE REGION
  362.     Syntax: .RD,region#,x1,x2,y1,y2
  363.  
  364.     Defines mouse regions. You can
  365.     define up to 64 regions (see Mr.
  366.     Mouse 2.1 docs) -- but remember
  367.     that the Event Regions are
  368.     regions! An alternative, is to use
  369.     .P2,MV,loc before the SYS 5120 and
  370.     Main Loop to set up a different
  371.     set of regions, with the data at
  372.     LOC. In the Event Handling
  373.     subroutine, use the same LOC to
  374.     access your custom regions. When
  375.     the program RETURNs to the Main
  376.     Loop, the Event Regions are
  377.     automatically reconnected. (The
  378.     location variable MV is set in the
  379.     START routine.)
  380.  
  381.  
  382. CAGE MOUSE
  383.     Syntax: .MC,x1,x2,y1,y2
  384.  
  385.     Keeps mouse arrow within defined
  386.     text area.
  387.  
  388.  
  389. POSITION MOUSE
  390.     Syntax: .MP,x,y
  391.  
  392.     Puts mouse arrow at X,Y.
  393.  
  394.  
  395. PAUSE
  396.     Syntax: @Z,jiffies
  397.  
  398.     Program waits for JIFFIES (1/60
  399.     second per jiffy).
  400.  
  401.  
  402. PRINT CENTER
  403.     Syntax: .PC,y,string
  404.  
  405.     Prints at center of screen on row
  406.     Y.
  407.  
  408.  
  409. TEXT BLOCK
  410.     Syntax: .BX,x1,x2,y1,y2,sc,col
  411.  
  412.     Fills area with SC (screen code)
  413.     character in COL (color).
  414.  
  415.     Block:       all normal
  416.     Paint:       sc  = 255
  417.     Shade:       col = 255
  418.    *Flip:        col + 192
  419.    *Reverse:     col + 128
  420.    *Un-reverse:  col + 64
  421.     Frame:       col + 32
  422.     Box:         col + 16
  423.     (* add 16 more for color set)
  424.  
  425.  
  426. AFFECT REGION
  427.     Syntax: .RA,region#,sc,col
  428.  
  429.     Just like TEXT BLOCK, except the
  430.     area is defined as a region with
  431.     .RD.
  432.  
  433.  
  434. SCREEN STASH
  435.     Syntax: .SS,page
  436.  
  437.     Copies the text screen and color
  438.     memory to memory beginning at
  439.     PAGE. Requires 8 pages of memory.
  440.  
  441.  
  442. SCREEN RESTORE
  443.     Syntax: .SR,page
  444.  
  445.     Puts stashed text and color back
  446.     on the screen.
  447.  
  448.  
  449. EVENT RESTORE
  450.     Syntax: .ER
  451.  
  452.     Restores the main screen, which is
  453.     automat