Gray Test ASM File.asm 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. ; Gray test program from DoorsOS
  2. include "doorsos.h"
  3. include "graphlib.h"
  4. include "userlib.h"
  5. xdef _ti89
  6. xdef _ti92plus
  7. xdef _comment
  8. xdef _main
  9. _main:
  10. jsr graphlib::gray4 ;switches to 4 grayshades mode
  11. move.w #1,graphlib::choosescreen ;set all graphlib functions to grayscale mode
  12. move.l graphlib::plane0,a1 ;adress of the 2nd bitplane
  13. jsr graphlib::clr_scr ;clears the main screen (1st bitplane)
  14. move.l graphlib::plane1,a1 ;adress of the 2nd bitplane
  15. jsr graphlib::clr_scr ;clears the second bitplane
  16. move.l graphlib::plane0,a0 ;adress of the 1st bitplane
  17. lea 1500(a0),a0 ;50th line
  18. move.w #374,d0
  19. \loop1 move.l #$FFFFFFFF,(a0)+ ;put black over the next 50 lines
  20. dbra d0,\loop1
  21. move.l graphlib::plane1,a0 ;adress of the 2nd bitplane
  22. lea 750(a0),a0 ;25th line
  23. move.w #374,d0
  24. \loop2 move.w #$FFFF,(a0)+ ;put black over the next 25 lines
  25. dbra d0,\loop2
  26. move.l graphlib::plane1,a0 ;adress of the 2nd bitplane
  27. lea 2250(a0),a0 ;75th line
  28. move.w #374,d0
  29. \loop3 move.w #$FFFF,(a0)+ ;put black over the next 25 lines
  30. dbra d0,\loop3
  31. ;so we get:
  32. ;25 lines : white
  33. ;25 lines : low gray
  34. ;25 lines : dark gray
  35. ;25 lines : black
  36. clr.w graphlib::choosescreen ;set all graphlib functions to Black and White mode
  37. jsr userlib::idle_loop
  38. jsr graphlib::gray2 ;restores Black and White mode
  39. rts
  40. _comment dc.b "Gray4 test",0
  41. end