User : DonHopkins

  • Created: 2303 days ago
  • Karma: 13453
  •     \ don@donhopkins.com
    
        FORTH ?KNOW IF HONK ELSE FORTH LEARN THEN
    
        : C(-; LICK SMILE NOSE WINK ;
    
        \ FORTH PAPER TAPE PUNCHER:
    
        : PT# ( L --- L/2 )
          DUP 1 AND IF 
            ASCII @ 
          ELSE BL THEN
          HOLD
          2/
        ;
    
        : PT. ( N --- )
          <# PT# PT# PT# 
             ASCII . HOLD
             PT# PT# PT# PT#
          #> TYPE
        ;
    
        : CUT
          ." -----------" CR
        ;
    
        : PTAPE
          CUT
          BEGIN
            KEY ?DUP WHILE
            DUP ." |" PT. ." |"  SPACE EMIT CR
          REPEAT
          CUT
        ;