ivanizag / iz-cpm

Portable CP/M emulation to run CP/M 2.2 binaries for Z80
BSD 3-Clause "New" or "Revised" License
87 stars 11 forks source link

Fixed off-by-one in handling of drive P: in CLI args. #20

Closed skx closed 4 months ago

skx commented 4 months ago

The command-line interface allows the specification of local directories to be used as CP/M drives.

I accidentally noticed that the final drive is not specified as expected because I happen to have a P-drive setup for Turbo-Pascal:

$ ./target/debug/iz-cpm --disk-p /home/skx/Repos/github.com/skx/cpm-dist/P
iz-cpm https://github.com/ivanizag/iz-cpm
CP/M 2.2 Emulation
Press ctrl-c ctrl-c Y to return to host

A>p:
P>dir
Bdos Err On P: Bad Sector

No File

There is a loop setup which runs from 0-15, but it excludes the last value. This PR updates to use 0-16, so that drive 15 (P:) is included.

ivanizag commented 4 months ago

You are right. Thanks!