Skip to content

Conversation

@ThomasFok
Copy link
Contributor

@ThomasFok ThomasFok commented Jan 23, 2023

I have made some enhancements to the dump command.

  1. Instruction Set selection. The disassembler, acdasm, already supports 6502, 6502S, 6502X, 65C02 and SWEET16 instruction sets. So, it is easy to enable those instruction sets in the disassembler.

  2. For hex dump, the address is fixed at 0. I think it makes more sense to use address 0 instead of 0x800.

Offset   Hex Data                                          Characters
=======  ================================================  =================
$000000  01 38 B0 03 4C 32 A1 86  43 C9 03 08 8A 29 70 4A  .80.L2!. CI...)pJ
$000010  4A 4A 4A 09 C0 85 49 A0  FF 84 48 28 C8 B1 48 D0  [email protected]  ..H(H1HP
$000020  3A B0 0E A9 03 8D 00 08  E6 3D A5 49 48 A9 5B 48  :0.).... f=%IH)[H
$000030  60 85 40 85 48 A0 63 B1  48 99 94 09 C8 C0 EB D0  `[email protected] c1 H...H@kP
$000040  F6 A2 06 BC 1D 09 BD 24  09 99 F2 09 BD 2B 09 9D  v".<..=$ ..r.=+..
$000050  7F 0A CA 10 EE A9 09 85  49 A9 86 A0 00 C9 F9 B0  ..J.n).. I). .Iy0
$000060  2F 85 48 84 60 84 4A 84  4C 84 4E 84 47 C8 84 42  /.H.`.J. L.N.GH.B
  1. Revamp the help message
Usage: acx dump [-h] -d=<disk> [--disassembly | --hex] ([-t=<track>
                -s=<sector>] | [[-b=<block>]]) [[-a=<address>] [-o=<offset>]
                [--6502S | --6502 | --65C02 | --6502X | --SWEET16]]

Dump a block or sector.

Options:
  -h, --help                Show help for subcommand.
  -d, --disk=<disk>         Image to process [$ACX_DISK_NAME].

Output Selection:
      --disassembly         Disassembly.
      --hex                 Hex dump. (default)

Coordinate Selection:
  -t, --track=<track>       Track number.
  -s, --sector=<sector>     Sector number.
  -b, --block=<block>       Block number.

Disassembler Options:
  -a, --address=<address>   Starting Address.
  -o, --offset=<offset>     Number of bytes to skip into file before
                              disassembling.
      --6502                MOS 6502. (default)
      --65C02               WDC 65C02.
      --6502X               MOS 6502 + 'illegal' instructions.
      --SWEET16             SWEET16.
      --6502S               MOS 6502 with SWEET16 switching.

@a2geek
Copy link
Contributor

a2geek commented Feb 19, 2023

I like this! I would like to keep the address for the hex dump. I think that you're right and it should default to 0 but still be able to modify the hex dump.

@a2geek a2geek merged commit da8358e into AppleCommander:main Oct 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants