home *** CD-ROM | disk | FTP | other *** search
/ SPACE 2 / SPACE - Library 2 - Volume 1.iso / demos / 11 / general / quest2.rpt < prev    next >
Encoding:
Text File  |  1986-04-17  |  12.9 KB  |  263 lines

  1.             "Most Asked Questions #2"
  2.      
  3. This was posted on COMPUSERVE, and it is being re-posted on Usenet:
  4.      
  5.          ------------------------------------------------------------
  6.          |                                                          |
  7.          | AAA  TTTTT  AAA  RRRR   III       ****         SSS  TTTTT|
  8.          |A   A   T   A   A R   R   I        ****        S   S   T  |
  9.          |A   A   T   A   A R   R   I        ****        S       T  |
  10.          |AAAAA   T   AAAAA RRRR    I       ******        SSS    T  |
  11.          |A   A   T   A   A R   R   I      ** ** **          S   T  |
  12.          |A   A   T   A   A R   R   I     **  **  **     S   S   T  |
  13.          |A   A   T   A   A R   R  III  **    **    **    SSS    T  |
  14.          |                                                          |
  15.          |DDDD  EEEEE V   V EEEEE L     OOO  PPPP  EEEEE RRRR   SSS |
  16.          |D   D E     V   V E     L    O   O P   P E     R   R S   S|
  17.          |D   D E     V   V E     L    O   O P   P E     R   R S    |
  18.          |D   D EEEE  V   V EEEE  L    O   O PPPP  EEEE  RRRR   SSS |
  19.          |D   D E     V   V E     L    O   O P     E     R   R     S|
  20.          |D   D E      V V  E     L    O   O P     E     R   R S   S|
  21.          |DDDD  EEEEE   V   EEEEE LLLL  OOO  P     EEEEE R   R  SSS |
  22.          |                                                          |
  23.          ------------------------------------------------------------
  24.          Question and Answer Bulletin                     March  1986
  25.          Copyright (C) 1986 by Atari Corp.      "all rights reserved"
  26.          1196 Borregas Ave.,          Sunnyvale, Ca.            94086
  27.          ------------------------------------------------------------
  28.      
  29.          Here  are  the  latest  questions  from  the Atari developers
  30.          mailbag  as  answered  by  John Feagans, Director of Software
  31.          Technology.  Leave questions on Compuserve for PIN 70007,1072
  32.          or GO PCS57 for Atari developer SIG information.
  33.      
  34.          How can I print the special characters in the Atari character
  35.          set  between codes 0 and 31?
  36.      
  37.          You  can use either the bios or the VDI.  Device 5 on Bconout
  38.          is  a  raw  character  output  device  that  does  not  do an
  39.  
  40.          interpretation of character codes.  You can alternate between
  41.          output  to  console  and this device to do cursor positioning
  42.          and new lines.  The VDI call to use is v_gtext.  This routine
  43.          accepts  character  indices  between 0 and 255. You should be
  44.          careful  in using these character codes because they are only
  45.          defined  in the three system fonts: 6 x 6, 8 x 8, and 8 x 16.
  46.          The VDI specification does not require loadable fonts to have
  47.          characters in these positions.
  48.      
  49.          When  I  dump  a  file  to  my printer, the first line prints
  50.          across  and then printing hangs up at the right margin.  What
  51.          is going on?
  52.      
  53.          Check  if  your  printer  has  a  switch  select position for
  54.          generating  a  line feed after a carriage return is received.
  55.          Some  software  will  generate only a return and count on the
  56.          Bios  to  generate  the  line-feed--TOS does not do this.  If
  57.          your  printer does not have this facility, some programs such
  58.          as  STWriter  and  1st  Word  have  configuration files which
  59.          define  the end of line sequence which you can set for proper
  60.          operation with your printer.
  61.      
  62.      
  63.  
  64.          ____________________________________________________________
  65.          ATARI ST DEVELOPERS          -1-                  March 1986
  66.      
  67.      
  68.      
  69.          Question and Answer Bulletin
  70.          ____________________________________________________________
  71.      
  72.      
  73.      
  74.          Why  don't the numeric pad and the cursor keys work in the VT
  75.          52 emulator?
  76.      
  77.          The  layout  of the ST keyboard is patterned after the DEC VT
  78.          220.   The  VT  52 is an older but still popular terminal and
  79.          there is a dramatic difference--there are no cursor keys or a
  80.          numeric  pad.   The VT-52 emulator is a faithful reproduction
  81.          of  this  terminal--it  does  not  use the cursor keys or the
  82.          numeric pad.  Here is a brief summary of cursor escapes.  The
  83.          full list is contained in the Hitchhiker's Guide.
  84.      
  85.                   ESC A     Cursor up
  86.                   ESC B     Cursor down
  87.                   ESC C     Cursor forward
  88.  
  89.                   ESC D     Cursor backward
  90.      
  91.          I  am  writing a terminal emulator program.  How can I smooth
  92.          scroll the screen?
  93.      
  94.          Refer  to  section 6 of the VDI manual on raster operations.
  95.          You   can  use  the  copy  raster  functions,  vro_cpyfm  and
  96.          vrt_cpyfm,  to  move  blocks  of data on the screen.  You may
  97.          also  want  to double buffer the screen.  Furthermore you can
  98.          move the pointer to the start of display memory.
  99.      
  100.  
  101.          My  C program compiles fine but I get the following undefined
  102.          symbols  in  the link68 step -- getscanf, printf, fpmult, and
  103.          iob.  I am linking with GEMLIB and LIBF.
  104.      
  105.          There  is  no  symbol getscanf.  Perhaps you mean getchar and
  106.          scanf?   To  resolve  the other undefined symbols you must be
  107.          sure  to #include stdio.h and also be sure the start file you
  108.          link with is gemstart.o
  109.      
  110.          How  can  I write boot sector information?  Is there an entry
  111.          in the DOS or BIOS for doing this?
  112.      
  113.          Use the protobt() extended BIOS call to create a boot sector.
  114.          The  disktype  parameter  should  be  2 or 3 for 1 or 2 sided
  115.          media  respectively.   The  serialno  parameter  should  be a
  116.          random  number.   The  execflag  should  be  zero  unless the
  117.          prototyping  buffer  contains  code  (such  as  a copy of the
  118.          loader)  that  you  want  executed  when the disk is booted.
  119.          Write the boot sector protyped in the buffer to track 0, side
  120.          0,  sector 1 of the new disk.  Use the extended bios function
  121.          flopwr().
  122.      
  123.          I am using funtion 7 of line-A.  I am trying to use a pattern
  124.          but  I  don't know what to put in the variable pattern_mask.
  125.          pattern_address  seems  to  be  set  up  correctly because my
  126.          pattern seems to almost come through.
  127.      
  128.          The  pattern_mask  variable  is  actually  the  length of the
  129.          pattern.  That should be what will make your pattern work.
  130.      
  131.      
  132.          ____________________________________________________________
  133.          ATARI ST DEVELOPERS          -2-                  March 1986
  134.      
  135.      
  136.      
  137.          Question and Answer Bulletin
  138.          ____________________________________________________________
  139.      
  140.      
  141.      
  142.          How can I put an icon on the desktop?
  143.      
  144.          There  is no way to place an icon other than those built into
  145.          the  system  onto the desktop.  The desktop is an application
  146.          program  and  it  was not designed to interface the other way
  147.          from GEM AES.  If you write your own application and create a
  148.          new  desktop, there is nothing to prevent you from using your
  149.          own   icons.    A  good  example  of  this  is  the  Resource
  150.          Construction  Set.  If you want to represent a desk accessory
  151.          by an icon you could open a nearly invisible window and print
  152.          the  icon on it.  The limitation on this method would be that
  153.          you could not drag other icons to it and be able to tell what
  154.          was  moved.   If  you  want to be able to drag things to your
  155.          program  you  must use the system icons.  The procedure is to
  156.          build a loadable driver and change the desktop.inf to contain
  157.          the proper label information.
  158.      
  159.          In  the  resource  construction  set,  what is the difference
  160.          between a free-tree and a dialog box?
  161.      
  162.  
  163.          A  dialog  box is a fixed format object list whose net result
  164.          when  you  draw it is obviously--a dialog box.  Its format is
  165.          designed  to  work  with  the form library.  The free tree is
  166.          used  to  define  other  object  lists.   Of course you could
  167.          define  a  structure  for a dialog box with it--but you could
  168.          also  define  a  dialog  box  that had a different border and
  169.          worked with your own form handler.
  170.      
  171.          P_exec  has  two parameters which the documentation does make
  172.          clear.   They  are the pointer to an environment string and a
  173.          pointer to a command tail.  What are these strings and how do
  174.          I construct them?
  175.      
  176.          The command tail is an array of strings terminated by a zero.
  177.          If  you  do  not use it then point to two consecutive zeros.
  178.          The  command  tail  is used by the run application dialog box
  179.          for  a  TTP application.  What you type in is inserted in the
  180.  
  181.          command  tail.   The  environment string is something that is
  182.          inherited by a process.  It is just a simple string.
  183.      
  184.          How can I display two dialog boxes at the same time?
  185.      
  186.          The  form library routines are designed for handling only one
  187.          dialog  box at a time.  If you want to simultaneously display
  188.          two  of  them  then  you  will  have  to  write your own form
  189.          handler.   They  can  be  displayed  using  the  object  draw
  190.          commands.    You   may  also  want  to  try  form_button  and
  191.          form_keyboard  which do not grab control of the screen.  Look
  192.          for documentation on these functions in this space soon.
  193.      
  194.          My  menus  seem  to  have  so many entries that they are of a
  195.          certain  size  which prevents the AES from restoring what was
  196.          under  them  when  they  pop back.  What are the maximum size
  197.          menus that I can have?
  198.      
  199.      
  200.          ____________________________________________________________
  201.          ATARI ST DEVELOPERS          -3-                  March 1986
  202.      
  203.      
  204.      
  205.          Question and Answer Bulletin
  206.          ____________________________________________________________
  207.      
  208.      
  209.      
  210.          The total width times height in pixels cannot exceed 8k bytes
  211.          for  hi-res,  4k  bytes for medioum res, and 2k bytes for low
  212.          res.   Assuming  and  8  x 8 font or 8 bytes per character, a
  213.          maximum for low res might be 256 characters--16 entries of 16
  214.          characters each.
  215.      
  216.          What  is the mechanism by which ST Writer reads the directory
  217.          and prints the file names?
  218.      
  219.          STWriter  uses the F_sfirst and F_snext to read the directory
  220.          entries.   Furthermore,  it  uses  some  special  data at the
  221.          beginning  of  each  file  to indicate that it is an STWriter
  222.          file.
  223.      
  224.          How do I get the command tail from my C program?
  225.      
  226.          TOS  passes  your program a count of parameters and a pointer
  227.          to  the  array.  Here is an example of how to declare them in
  228.          your program:
  229.      
  230.              main(argc,argv)
  231.                   int  argc;
  232.                   char *argv[];
  233.                   {
  234.  
  235.                    /*    your program   */
  236.                   }
  237.      
  238.          Are  there  any variables around so I can get the position of
  239.          the cursor?
  240.      
  241.          Since  the  orignal  line-a variables offsets were frozen, we
  242.          decided  to  expand  the list.  At a negative offset from the
  243.          line  a  address there are two variables.  v_cur_cx is at -14
  244.          words and v_cur_cy is at -13 words.
  245.      
  246.          How  can  I  ring a bell without going through the trouble of
  247.          do_sound?
  248.      
  249.          Send a control-G to console output:  Bconout(2,7).
  250.      
  251.          How  do  I access the data in an editable field from a dialog
  252.          box that was created by the Resource Construction Set?
  253.      
  254.          When you create the dialog box, use the Name function to give
  255.          both  the tree and the object a name which you can use later.
  256.          Have  the RCS create a .h file for your resource and #include
  257.          it  in your program.  Define a pointer of type OBJECT and use
  258.          rsc_gaddr  with  this  pointer and the label for your tree to
  259.          get  the  address  of  the  start  of the object list for the
  260.          dialog.   Later,  you  can index [label of object].ob_spec to
  261.          get  the  pointer  to  the  tedinfo  structure.   Do one more
  262.          indirection to get the pointer to the actual string.
  263.      
  264.      
  265.      
  266.      
  267.          ____________________________________________________________
  268.          ATARI ST DEVELOPERS          -4-                  March 1986
  269.  
  270. ə