Source Code
[0] Z{<-}HEXDUMP F;B;E;H;N;P;Q;V;#IO
[1] @ Hex dump of file F
[2] #IO{<-}0 @ use index origin 0
[3]
[4] @ Read the file (using APL*PLUS operations)
[5] N{<-}-1+0{max}{max}/-#NNUMS @ available tie number
[6] F #NTIE N @ open the file
[7] E{<-}#NSIZE N @ file size
[8] V{<-}#NREAD N,82,E,0 @ read file as character data
[9] #NUNTIE N @ close the file
[10]
[11] @ Form the hex dump
[12] Q{<-}16 @ display 16 bytes/line
[13] N{<-}{ceiling}E{divide}Q @ number of lines
[14] Z{<-}8 HEX Q{times}{iota}N @ addresses
[15] Z{<-}(0 2+{shape}Z){take}Z @ add two blank columns
[16] H{<-},' ',2 HEX #AV{iota}V @ data in hex
[17] P{<-}(Q{times}3){reshape}' ' @ padding for short last row
[18] H{<-}(N,Q{times}3){reshape}H,P @ turn hex display into a matrix
[19] Z{<-}Z,(0 3+{shape}H){take}H @ append it to the result
[20] B{<-}#AV[127],32{take}#AV @ nonprinting chars
[21] V[(V{epsilon}B)/{iota}{shape}V]{<-}'.' @ change 'em to "."
[22] Z{<-}Z,(N,Q){reshape}V,P @ append ASCII display to result
[0] Z{<-}N HEX V
[1] @ N-digit hex representation of values V
[2] Z{<-}'0123456789ABCDEF'[{transpose}(N{reshape}16){represent}V]