home *** CD-ROM | disk | FTP | other *** search
/ Team Palmtops 7 / Palmtops_numero07.iso / Ti / Magazine / Tests / DOORSOSD.ZIP / grey7.asm < prev    next >
Encoding:
Assembly Source File  |  1999-12-22  |  2.7 KB  |  72 lines

  1.     include "doorsos.h"
  2.     include "graphlib.h"
  3.     include "userlib.h"
  4.     xdef    _ti89
  5.     xdef     _ti92plus
  6.     xdef    _comment
  7.     xdef    _main
  8. _main:
  9.     jsr    graphlib::gray7        ;switches to 7 grayscale mode
  10.     move.w    #1,graphlib::choosescreen    ;set all graphlib functions to grayscale
  11.  
  12.     move.l    graphlib::plane0,a1    ;address of the 1st bitplane (plane0)
  13.     jsr    graphlib::clr_scr    ;clears the first bitplane (main screen)
  14.     move.l    graphlib::plane1,a1    ;address of the 2nd bitplane (plane1)
  15.     jsr    graphlib::clr_scr    ;clears the second bitplane
  16.     move.l    graphlib::plane2,a1    ;address of the 3rd bitplane (plane2)
  17.     jsr    graphlib::clr_scr    ;clears the third bitplane
  18.  
  19.     move.l    graphlib::plane0,a0    ;address of the 1st bitplane
  20.     lea    1260(a0),a0        ;42nd line ((14 * 3)lines * 30 bytes = 1260)
  21.     move.w    #419,d0            ;\
  22. \loop1    move.l    #$FFFFFFFF,(a0)+    ; >7.5 longwords per line * (14 * 4)lines = 420
  23.     dbra    d0,\loop1        ;/  (419 because we include 0)
  24.  
  25.     move.l    graphlib::plane1,a0    ;address of the 2nd bitplane
  26.     lea    420(a0),a0        ;14th line ((14 * 1)lines * 30 bytes = 420)
  27.     move.w    #104,d0            ;\
  28. \loop2    move.l    #$FFFFFFFF,(a0)+    ; >7.5 longwords per line * (14 * 1)lines = 105
  29.     dbra    d0,\loop2        ;/  (104 because we include 0)
  30.  
  31.     move.l    graphlib::plane1,a0    ;address of the 2nd bitplane
  32.     lea    1680(a0),a0        ;56th line ((14 * 4)lines * 30 bytes = 1680)
  33.     move.w    #104,d0            ;\
  34. \loop3    move.l    #$FFFFFFFF,(a0)+    ; >7.5 longwords per line * (14 * 1)lines = 105
  35.     dbra    d0,\loop3        ;/  (104 because we include 0)
  36.  
  37.     move.l    graphlib::plane1,a0    ;address of the 2nd bitplane
  38.     lea    2520(a0),a0        ;84th line ((14 * 6)lines * 30 bytes = 2520)
  39.     move.w    #104,d0            ;\
  40. \loop4    move.l    #$FFFFFFFF,(a0)+    ; >7.5 longwords per line * (14 * 1)lines = 105
  41.     dbra    d0,\loop4        ;/  (104 because we include 0)
  42.  
  43.     move.l    graphlib::plane2,a0    ;address of the 2nd bitplane
  44.     lea    840(a0),a0        ;28th line ((14 * 2)lines * 30 bytes = 840)
  45.     move.w    #104,d0            ;\
  46. \loop5    move.l    #$FFFFFFFF,(a0)+    ; >7.5 longwords per line * (14 * 1)lines = 105
  47.     dbra    d0,\loop5        ;/  (104 because we include 0)
  48.  
  49.     move.l    graphlib::plane2,a0    ;address of the 2nd bitplane
  50.     lea    2100(a0),a0        ;70th line ((14 * 5)lines * 30 bytes = 2100)
  51.     move.w    #209,d0            ;\
  52. \loop6    move.l    #$FFFFFFFF,(a0)+    ; >7.5 longwords per line * (14 * 2)lines = 210
  53.     dbra    d0,\loop6        ;/  (209 because we include 0)
  54.  
  55.         ; 0 1 2 <--planes
  56.  
  57.         ; 0 0 0 <--white            14 pixel lines per text line
  58.         ; 0 1 0 <--light light grey
  59.         ; 0 0 1 <--light grey
  60.         ; 1 0 0 <--light dark grey (0 1 1 <--dark light grey [same])
  61.         ; 1 1 0 <--dark grey
  62.         ; 1 0 1 <--dark dark grey
  63.         ; 1 1 1 <--black
  64.  
  65.     clr.w    graphlib::choosescreen    ;set all graphlib functions to Black and White mode
  66.     jsr    userlib::idle_loop    ;waits for a key
  67.     jsr    graphlib::gray2        ;restores Black and White mode
  68.     rts
  69.  
  70.  
  71. _comment   dc.b    "Gray7 test",0
  72.         end