[gforth] / gforth / filedump.fs  

gforth: gforth/filedump.fs

File: [gforth] / gforth / filedump.fs (download)
Revision: 1.3, Sun Aug 27 19:56:28 1995 UTC (17 years, 9 months ago) by pazsan
Branch: MAIN
CVS Tags: gforth-0_1beta
Changes since 1.2: +2 -2 lines
Made kernal generation saver
added automatic creation of makefile.dos
newer version texinfo.tex
fixed some inconsistencies (don't know, what happend with model?)

#! /usr/users/bernd/bin/gforth
\ file hex dump

Create buffer $10 allot

: dumpline ( addr handle -- flag )
  buffer $10 rot read-file throw
  dup /dump !  $10 <> swap 6 u.r ." : "  buffer .line cr ;

: init  cr $10 base ! ;

: filedump  ( addr count -- )  init r/o bin open-file throw >r
  0  BEGIN  $10 bounds  r@ dumpline  UNTIL  drop
  r> close-file throw ;

script? [IF]
   : alldump argc @ 2 ?DO I arg 2dup type ." :" filedump LOOP ;
   alldump bye
[THEN]

CVS Admin

Powered by ViewCVS 1.0-dev
(Powered by ViewCVS)

ViewCVS and CVS Help