Skip to content

Commit

Permalink
Addied paged mode to the hexdump tool.
Browse files Browse the repository at this point in the history
Allows files to be viewed in an interactive mode which can be paged forward and back.
  • Loading branch information
sijnstra authored Jun 13, 2023
1 parent 5cfa588 commit 250561b
Show file tree
Hide file tree
Showing 12 changed files with 818 additions and 382 deletions.
3 changes: 2 additions & 1 deletion hexdump/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# strings

Usage: `hexdump <file>`
Usage: `hexdump [-i] <file>`

A simple `mos` utility to dump the content of any file, with columns showing file location, hex contents and printable characters.

The option `-i` enables paging mode, allowing you to page forward and backward through the file.
Binary file modified hexdump/Release/hexdump.bin
Binary file not shown.
25 changes: 16 additions & 9 deletions hexdump/Release/hexdump.hex
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,20 @@
:40008000DDE15BD15BC1F15BFDE1FDF95BFDE149C9014500CDEF005BDD0F005BDD235BDD235BDD23CDE600010100060FC55BE5CDD500795BD1C1B7C85BDD1F005BE55BD15C
:4000C000CDE600AF5B125BDD235BDD235BDD230C79B838D8C90E005B7EB7C8FE0DC8FE20C85B230C18F15B7EFE20C05B2318F75BE55BC55B210200005B395B775BC15BE178
:40010000C95BDDE55BDD210200005BDD395BDD77005BDDE1C9000000000000000000000000000000000000000000000000000000000000000000000000000000000000007C
:400140000000000000211300C9793DCA7C02FE03D282025BDD27030E013E0A49CFB7200E210400C90E003E0B49CF210000C93251033E0849CFDD7E1932BB035B21F0FFFF7E
:400180005B2252030B5B2156030B5B111000003A51034F3E1A49CF7BB7CA2E02475B2A52030B5B111000005B195B2252030BC5CD2903C13E3AD72156030E0079E6032007B5
:4001C0003E20E5C5D7C1E17EE5C5CD3E03C1E1230C79FE10CAE801B838E13E20D7D779E60320033E20D718E83E20D73E7CD72156030E007ECD3702E5C5D7C1E1230C79FE0B
:4002000010CA0B02B838EC3E2018ECCD41027C0D0A00C385011156031AD71310FBCD4D02CD37022803D718F5CD41020D0A00CD41020D0A00C36401FE203803FE7FD83E2E73
:40024000C9E1CD4802E9D7237EB720FAC9CD59023A51034F3E0C49CFC93E013DE60F325A02C03E0849CF5BDD7E1921BB03BEC8775BDD7E05FE03C0E1E1C36401CD8802C34A
:400280006A01CD8802C34501CD41020D0A68657864756D70207574696C69747920666F722041676F6E20627920536861776E2053696A6E737472612031312D4A756E2D324C
:4002C0003032330D0A0D0A55736167653A0D0A20202068657864756D70203C66696C653E0D0A0D0A53746F72652068657864756D702E62696E20696E202F6D6F7320646921
:40030000726563746F72792E204D696E696D756D204D4F532076657273696F6E20312E30332E0D0A0D0A00C9045BE55B210200005B395B7E5BE1CD3E037CCD3E037D4F1F61
:110340001F1F1FCD470379E60FC69027CE4027D7C978
:400140000000000000211300C9793DCA8802FE03D28E025BDD27035B7EFE2D200C5B235B7EFE69C28E02C371030E013E0A49CFB7200E210400C90E003E0B49CF210000C9A1
:400180003232053E0849CFDD7E19323E075B21F0FFFF5B2233050B5B213D050B5B111000003A32054F3E1A49CF7BB7CA2702475B2A33050B5B111000005B195B2233050B0A
:4001C000C5CD0A05C13E3AD7213D050E0079E60320073E20E5C5D7C1E17EE5C5CD1F05C1E1230C79FE10CAFA01B838E13E20D7D779E60320033E20D718E83E20D73E7CD740
:40020000213D050E007ECD4702E5C5D7C1E1230C79FE10CA1D02B838EC3E2018ECCD51027C0D0A00C39701CD51020D0A00C37601CD51025061737420656E64206F662066B0
:40024000696C650D0A00C9FE203803FE7FD83E2EC9E1CD5802E9D7237EB720FAC9D7237EFE2030F9C93E013DE60F326602C03E0849CF5BDD7E19213E07BEC8775BDD7E05E0
:40028000FE03C0E1E1C37601CD9402C37C01CD9402C34501CD51020D0A68657864756D70207574696C69747920666F722041676F6E20627920536861776E2053696A6E73BD
:4002C0007472612031312D4A756E2D323032330D0A0D0A55736167653A0D0A20202068657864756D70205B2D695D203C66696C653E0D0A0D0A096F7074696F6E616C207043
:400300006172616D746572206920757365732068657864756D7020696E20696E746572616374697665206D6F64652E0D0A53746F72652068657864756D702E62696E206976
:400340006E202F6D6F73206469726563746F72792E204D696E696D756D204D4F532076657273696F6E20312E30332E0D0A0D0A00C95BDD27060E013E0A49CFB72004210442
:4003800000C93232055B210000005B2233050BCD51020C110A68657864756D70207574696C697479202D20696E746572616374697665206D6F6465110F0D0A46696C656E64
:4003C000616D653A005BDD2706CD5F02CD51020D0A0D0A557361676520696E737472756374696F6E733A0D0A70202D2070726576696F75730D0A6E202D206E6578740D0AF2
:4004000071202D20717569740D0A0D0A00CD25043E0049CFFE6ECAD604FE70CAF204FE7120EEC37C015B210000005B2237050B5B213D050B5B110001003A32054F3E1A49CF
:40044000CF7BB2CA3002430E005B2A33050B5BED5B37050B5B19C5CD0A05C1C53E3AC5D7C1213D051979E60320053E20C5D7C178B7280BB930083E20C5D7D7C118097EE5EA
:40048000C5CD1F05C1E1230C79E60FCA900418D53E20D7C13E7CC5D7C1213D051978B72807B930043E2018047ECD4702E5C5D7C1E1230C79E60F20E5CD51027C0D0A005B47
:4004C0002A37050B5B111000005B195B2237050B7DB7C24904C95B2A33050B5B110001005B195B2233050B3A32054F3E1C49CFC38F035B2A33050B5B11000100B75BED5255
:3205000030E05B2100000018D9045BE55B210200005B395B7E5BE1CD1F057CCD1F057D4F1F1F1F1FCD280579E60FC69027CE4027D7C981
:00000001FF
Binary file modified hexdump/Release/hexdump.lod
Binary file not shown.
40 changes: 20 additions & 20 deletions hexdump/Release/hexdump.map
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Copyright (C) 1999-2008 Zilog, Inc. All Rights Reserved

LINK MAP:

DATE: Sun Jun 11 21:44:53 2023
DATE: Tue Jun 13 11:11:10 2023
PROCESSOR: assembler
FILES: .\init.obj .\main.obj .\output.obj

Expand Down Expand Up @@ -72,10 +72,10 @@ SPACE ALLOCATION:

Space Base Top Size Used Unused
------------------ ----------- ----------- --------- --------- ---------
RAM D:040000 D:0403BB 80000H 3BCH 7FC44H
( 524288 956 523332)
ROM C:000000 C:0003BB 20000H 3BCH 1FC44H
( 131072 956 130116)
RAM D:040000 D:04073E 80000H 73FH 7F8C1H
( 524288 1855 522433)
ROM C:000000 C:00073E 20000H 73FH 1F8C1H
( 131072 1855 129217)


SEGMENTS WITHIN SPACE:
Expand All @@ -84,39 +84,39 @@ SEGMENTS WITHIN SPACE:
RAM Type Base Top Size
------------------ ------------------- ----------- ----------- ---------
__VECTORS * segment copy * D:040000 D:040144 145h
CODE * segment copy * D:040145 D:040350 20ch
LORAM * segment copy * D:040351 D:0403BB 6bh
CODE * segment copy * D:040145 D:040531 3edh
LORAM * segment copy * D:040532 D:04073E 20dh


ROM Type Base Top Size
------------------ ------------------- ----------- ----------- ---------
__VECTORS normal data C:000000 C:000144 145h
CODE normal data C:000145 C:000350 20ch
LORAM normal data C:000351 C:0003BB 6bh
CODE normal data C:000145 C:000531 3edh
LORAM normal data C:000532 C:00073E 20dh

SEGMENTS WITHIN MODULES:
========================

Module: D:\agon\agon-projects-main\ASM\hexdump\init.asm (File: init.obj) Version: 1:0 06/11/2023 21:44:53
Module: D:\agon\agon-projects-main\ASM\hexdump\init.asm (File: init.obj) Version: 1:0 06/13/2023 11:11:09

Name Base Top Size
--------------------------------------- ----------- ----------- ---------
Segment: __VECTORS C:000000 C:000144 145h


Module: D:\agon\agon-projects-main\ASM\hexdump\main.asm (File: main.obj) Version: 1:0 06/11/2023 21:44:53
Module: D:\agon\agon-projects-main\ASM\hexdump\main.asm (File: main.obj) Version: 1:0 06/13/2023 11:11:09

Name Base Top Size
--------------------------------------- ----------- ----------- ---------
Segment: CODE C:000145 C:000328 1e4h
Segment: LORAM C:000351 C:0003BB 6bh
Segment: CODE C:000145 C:000509 3c5h
Segment: LORAM C:000532 C:00073E 20dh


Module: D:\agon\agon-projects-main\ASM\hexdump\output.asm (File: output.obj) Version: 1:0 06/11/2023 21:44:53
Module: D:\agon\agon-projects-main\ASM\hexdump\output.asm (File: output.obj) Version: 1:0 06/13/2023 11:11:10

Name Base Top Size
--------------------------------------- ----------- ----------- ---------
Segment: CODE C:000329 C:000350 28h
Segment: CODE C:00050A C:000531 28h

EXTERNAL DEFINITIONS:
=====================
Expand Down Expand Up @@ -146,9 +146,9 @@ __RAM_ADDR_U_INIT_PARAM 000000FF (User Defined)
__RAM_CTL_INIT_PARAM 00000080 (User Defined)
_main C:000149 main CODE
_SYS_CLK_FREQ 01194000 (User Defined)
Print_Hex16 C:000339 output CODE
Print_Hex24 C:000329 output CODE
Print_Hex8 C:00033E output CODE
Print_Hex16 C:00051A output CODE
Print_Hex24 C:00050A output CODE
Print_Hex8 C:00051F output CODE

26 external symbol(s).

Expand Down Expand Up @@ -188,8 +188,8 @@ Print_Hex8 Defined D:\agon\agon-projects-main\ASM\hex

OUTPUT CHECKSUM
===============
hexdump.hex 01235B
hexdump.lod 01235B
hexdump.hex 01C081
hexdump.lod 01C081



Expand Down
2 changes: 1 addition & 1 deletion hexdump/Release/init.lst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Zilog eZ80 Macro Assembler Version 4.3 (19073001) RELISTED11-Jun-23 21:44:53 page: 1
Zilog eZ80 Macro Assembler Version 4.3 (19073001) RELISTED13-Jun-23 11:11:10 page: 1


PC Object I Line Source
Expand Down
Binary file modified hexdump/Release/init.obj
Binary file not shown.
Loading

0 comments on commit 250561b

Please sign in to comment.