home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / zsys / znode-12 / a / cows.mse < prev    next >
Encoding:
Text File  |  1993-06-12  |  2.0 KB  |  75 lines

  1.  
  2. ~ COWS.MSE, Lee Bradley, Sysop, Z-Node #12, 203 665-1100, 10/02/90
  3.  
  4. ~ 11/90 Recoded/recommented cursor macros. Changed prompt. 
  5. ~ Renamed program. Color logic fancied up.
  6. ~ Added clear screen, version, and attribute code.
  7. ~ Fine tuned.
  8.  
  9. #Z,2,7;#P,22,50;"COWS, Version 3.141592654"
  10.  
  11. #D,300;                      ~ delay
  12.  
  13. #P,22,6;"Please enter a number: " ?' 48 -
  14.  
  15. r :                          ~ set number of repetitions
  16. 7 c :  0 d :                 ~ set initial colors
  17. #C;                          ~ cursor off
  18. ( r. ^ r. 1 - r :            ~ main loop
  19. #D,300;                      ~ delay
  20. #Z,d.,c.;                    ~ clear screen
  21. #P,22,50;"COWS,"
  22. " Version 3.141592654"
  23. d. 1 + 7 \ d:                ~ change color
  24. 0 j :                        ~ initialize row
  25. ( 18 j. - ^                  ~ loop on row
  26. 10 i :                       ~ initialize col
  27. ( 34 i. - ^                  ~ loop on col                     
  28. ~ display cow at appointed place
  29. #P,j.1+,i.;
  30. "               (  )"   
  31. #P,j.2+,i.;
  32. "               ("#A,2;"oo"#A,0;")"  ~ inverse eyes
  33. #P,j.3+,i.;
  34. "        /-------\/ "
  35. #P,j.4+,i.;
  36. "       / |  Z  ||             Z-Festival"
  37. #P,j.5+,i.;
  38. "      *  ||----||"
  39. #P,j.6+,i.;
  40. "         **    **"
  41. #P,j.7+,i.;
  42. "           ..."
  43. i. 6 + i :                   ~ bump col
  44. )
  45. j. 7 + j :                   ~ bump row
  46. #D,100;                      ~ delay
  47. ))
  48. #O;                          ~ cursor on
  49.  
  50. ~ Macros 
  51.  
  52. $P ~ position cursor macro (Royal specific)
  53. 2% '  + 1% '  + 'Y '[ '@ - !' !' !' !' 
  54. @
  55.  
  56. $Z ~ clear screen (w/ fore/back ground colors) macro (Royal RGB)
  57. 2% '0 + 1% '0 + 'T '[ '@ - !' !' !' !'
  58. @
  59.  
  60. $C ~ cursor off macro (Royal) (ESC ^R)
  61. 'R '@ - '[ '@ - !' !'
  62. @
  63.  
  64. $O ~ cursor on macro (Royal) (ESC ^S)
  65. 'S '@ - '[ '@ - !' !'
  66. @
  67.  
  68. $D ~ delay macro
  69. 1% w : ( w. ^ w. 1 - w : )
  70. @
  71.  
  72. $A ~ attribute macro (Royal)            (ESC ^V 0-3)
  73. 1% '0 + 'V '[ '@ - !' !' !'  ~ 0 = normal, 1 = blink, 2 = inverse
  74. @                            ~ 3 = blink and inverse
  75.