home *** CD-ROM | disk | FTP | other *** search
/ GEMini Atari / GEMini_Atari_CD-ROM_Walnut_Creek_December_1993.iso / files / language / forst / conout.s < prev    next >
Encoding:
Text File  |  1993-10-23  |  451 b   |  24 lines

  1. ( conout)
  2.  
  3. decimal
  4.  
  5. : count  ( addr--addr+1,cnt) to a0  a0 inc c@ to d0  a0 d0 ;
  6.  
  7. : even  to a1  a1 1 and addto a1  a1 ;
  8. : (")  r> count  over over + 1+ even  >r ;
  9.  
  10. : abs  to a1  a1 0< if 0 a1 -  else a1 then ;
  11.  
  12. : emit
  13.   a7 dec w! ( char) 2 a7 dec w! gemdos
  14.   4 addto a7 ;
  15.   
  16. : cr 13 emit 10 emit ;
  17. : space  32 emit ;
  18. : cls  27 emit [ascii] E emit ;
  19.   
  20. : type  ( ptr,len)
  21.   { 2 args ptr len }
  22.   for len  ptr inc c@ emit next ;
  23.  
  24.