home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
High Voltage Shareware
/
high1.zip
/
high1
/
DIR22
/
JORF21_2.ZIP
/
DUMP.J
< prev
next >
Wrap
Text File
|
1993-07-05
|
2KB
|
63 lines
Dump:Start
New (WildCard, FileList, Choice)
New (FileName, Char, Length, Pos, Col)
While (Ok)
| First get a wildcard for dir command
Win:Add ("Dump a File")
Input:"Directory WildCard: ", Field:"WildCard"
If (Kbd:Got = 'Esc_Key')
Return
| Read the directory
Win:Add("Reading Directory")
One Moment Please . . .
FileList = Arr:Dir(WildCard)
If Arr:Len(FileList) < 1
Msg:Add
No Files match the WildCard!
Else
While FileList != Null
| And ask to pick a file
Choice = Arr:Pick(FileList,Null,"Dump File", 0, 0, 0, Choice)
If Kbd:Got = 'Esc_Key'
Break
| Got a file name!
FileName = FileList[Choice]
FileName = Str:At (FileName 1, Str:In(FileName," "))
Length = File:Len (FileName)
Pos = 0
Win:Add (FileName, 2, 8, (Length/16)+2, 78, Here)
While (Pos < Length)
Col = (Pos % 16) | Set column position
If (Col == 0) | If beginning new line
If (Pos > 0) | If after first line
Move:By (1,0) | Start a new line
Move:To (0,1) |
Str:Put (To:Str(Pos,"0000:0000",16))
++Pos
| Read One Character
Char = File:Read (FileName,1,Pos)
| And Display It . . .
Move:To (0,13+(Col*3))
Str:Put (To:Str(To:Ascii(Char),'00',16))
Move:To (0,62+Col)
Char:Put (To:Ascii(Char))
If Kbd:Hit | If key hit
Char = Kbd:Get | See What it is
If Char = "Esc_Key"| If Escape
Break | Break
Win:Pause | Pause
Str:PutLine | One more line
Str:PutLine | One more line
Win:Msg("End of File") | Done!
Win:Pause | Wait
Win:Del | Delete window
Win:Del
Win:Del
Win:Del
Return | Exit