home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / jsage / znode3 / uploads / mouse-ex.lbr / COW.MZE / COW.MSE
Encoding:
Text File  |  1993-06-07  |  1.6 KB  |  71 lines

  1.  
  2. ~ COW.MSE, Lee Bradley, 17 Nov 90
  3. ~
  4. ~ Myz80 version, 2/20/93
  5. ~
  6. ~ Note: Changed all uses of '" to 34. The Z80 interpreter is not smart enuf 
  7. ~ to handle '".
  8.  
  9. 1000 y : ~ set delay parameter
  10. #C; ~ turn cursor off
  11. #D,y.2*;
  12. #Z; #P,22,28; "COW, Myz80 Version 0.1" #D,y.2*; ~ announce program
  13. #P,22,1; #E; ~ clear the line
  14. #P,12,8; ~ ask how long a run they want
  15. "How many " '" !' "cow frames" '" !' " do you want? " #O; ?
  16. #P,12,1; #D,y.; #E; ~ clear the line
  17. #C; r : ~ set repetitions
  18. 0 1 - d: ~ initialze "color"
  19.  
  20. (
  21. r. ^ r. 1 - r : ~ main loop
  22. #Z; ~ clear screen between frames
  23. 0 j :  ~ initialize row
  24. (
  25. 15 j. - ^ ~ loop on row
  26. 8 i : ~ initialize col
  27. (
  28. 47 i. - ^ ~ loop on col
  29. d. 1 + 7 \ d : ~ change "color"
  30. #P,j.1+,i.; "               (  )"
  31. #P,j.2+,i.; "               (" #A,12; "oo" #A,0; ")"
  32. #P,j.3+,i.; "        /-------\/"
  33. #P,j.4+,i.; "       / |  "d. 48 + !' "  ||"
  34. #P,j.5+,i.; "      *  ||----||"
  35. #P,j.6+,i.; "         **    **"
  36. i. 19 + i : ~ bump col
  37. #D,y.10/;
  38. j. 7 + j : ~ bump row
  39. )
  40. #D,y.3*;
  41. )
  42.  
  43. #P,22,28; "COW, Myz80 Version 0.1" #D,y.;
  44. #P,22,1;
  45. #O; ~ turn cursor back on
  46.  
  47. ~ macros follow ...
  48.  
  49. $D ~ delay macro
  50. 1% w : ( w. ^ w. 1 - w : ) @
  51.  
  52. $P ~ position cursor macro (Myz80)
  53. 2% '  + 1% '  + '= '[ '@ - !' !' !' !' @
  54.  
  55. $Z ~ clear screen (Myz80) (esc +)
  56. '+ '[ '@ - !' !' @
  57.  
  58. $C ~ cursor off macro (Myz80) (esc " 6)
  59. '6 34 '[ '@ - !' !' !' @
  60.  
  61. $O ~ cursor on macro (Myz80) (esc " 3)
  62. '3 34 '[ '@ - !' !' !' @
  63.  
  64. $A ~ attribute macro (Myz80) (esc G 0-8)
  65. 1% '0 + 'G '[ '@ - !' !' !' @  ~ 0=nml, 1=unl, 2=dim, 4=rev, 8=blk
  66.  
  67. $E ~ erase to end of line (Myz80) (^X)
  68. 'X '@ - !' @
  69.  
  70.