File:  [gforth] / gforth / arch / misc / fi2v.fs
Revision 1.1: download - view: text, annotated - select for diffs
Thu May 29 19:43:09 1997 UTC (26 years, 11 months ago) by pazsan
Branches: MAIN
CVS tags: v0-6-2, v0-6-1, v0-6-0, v0-5-0, v0-4-0, HEAD
Added port of gforth to misc (original version, slow) to CVS archive

\ kernel to verilog converter

: .## base @ >r hex 0 <# # # #> type r> base ! ;

create item 2 allot

: >v ( addr u -- ) r/o open-file throw >r
    ." @0"
    BEGIN  item 2 r@ read-file throw  WHILE
	cr item c@ .## item char+ c@ .##
    REPEAT
    cr r> close-file throw ;

script? [IF]
   : all2v argc @ 2 ?DO I arg >v LOOP ;
   all2v bye
[THEN]

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>