Pl2 EXOS 3.DOC

From Atari Wiki
Jump to navigation Jump to search
     
                           -------------------          
                             EXERCISES NR° 3

                               the LineAs
          
                           -------------------


1) Exercise nr°1:
   --------------
   Create a program that changes the shape of the MOUSE cursor.


   Indications:
   ------------
   . You may give the cursor any shape you want.
   . Simply refer to the chapter on LineAs to 
     find answers to your questions if you run into 
     problems...

 
2) Exercise nr°2:
   --------------
   Create a program using the H-LINE and LINE routines that
   draws a grid on the screen.
   (Preferably large squares)

     
   Indications:
   ------------
   .The program must work in MEDIUM resolution
   .Pay attention to respect the graphic constraints of this
    resolution (For the coordinates).


3) Exercise nr°3:
   --------------
   Write a program that draws a large rectangle, approximately
   in the middle of the screen.
   Also modify the PAT and use the program from the previous exercise
   to draw the rectangle on a grid surface.
   
   Indications:
   ------------
   .Your program must modify the PAT, you may choose the filling pattern.
   .The program must work in MEDIUM resolution (because the program of the 
    previous exercise is designed for this resolution).  
   .Instead of completing the previous program, use the 
    PEXEC function of GEMDOS to load the grid program and draw the 
    rectangle upon the program's return.


4) Exercise nr°4:
   --------------
   Create a program that moves a SPRITE from the left to the
   right of the screen and then from the right back to its starting point on the
   left. (In Medium resolution)

  
   Indications:
   ------------
   .Do not use MASK (data = 0) for the SPRITE, it will 
    greatly simplify the task...
   .The design of the SPRITE is left to your imagination.       
   .You must use DRAW SPRITE to display the SPRITE on the screen
    and UNDRAW SPRITE when you need to erase it to display it further
    on the screen.
   .The SPRITE must be in VDI format


5) Exercise nr°5:
   --------------
   Write a program that works in LOW resolution and displays
   points of any of the 16 available colors randomly on the screen.
   The entire screen will be filled with color dots assigned
   at random.

   Once this is done, rotate the color palette.


   Indications:
   ------------
   .To display the points on the screen, use the PUT PIXEL routine.
    You can create a macro instruction from this routine
    to simplify the work...
   .To get random colors for each of these points, use
    the RANDOM macro instruction.
    (See the chapter on GEMDOS)
   .For a rotation of colors, use the PALETTE macro instruction
    (See the chapter on GEMDOS) and you can call it
    providing various parameters the data defining
    the colors of which you have rotated by one unit each time.
 

6) Exercise nr°6:
   --------------  
   Create a program that draws a diamond on the screen.
   Also modify the PAT according to your tastes.
   
   The program must first display the diamond without CLIPPING then
   it must display the same diamond using CLIPPING in such
   way that only the left half of the diamond remains visible.

   
   Indications:
   ------------
   .To draw the diamond use the FILLED POLYGON routine.
   .If you encounter problems, refer to the chapter on
    LineAs and look closely at the explanations of routine $A006
   



                              -------------------


  PIECHOCKI  Laurent
  8,impasse Bellevue         Corrections in the file:CORRIG_3.DOC
  57980  TENTELING                                       ------------          




   

Back to ASM_Tutorial