Closed MiguelVis closed 3 years ago
This is a good catch. I did most of the research on the BDOS function over seasip.info, and they they say: "Returns A=0FFh if error (file not found, or CP/M 3 hardware error); otherwise A=0.".
I just removed the line: "result = 0x00" above for now. This should do it I guess. I should upload v5.7 soon.
I sent an email to John Elliot regarding the info. shown in his website about this BDOS fn., no reply yet, but the CP/M 2 manuals and the official BDOS from DR are the best source.
Thanks!
The implementation of the
BDOS function 35 - Compute file size
returns a success / error value in theA
/L
registers, but this does not follow the CP/M BDOS v2 rules.According to the CP/M v2 manual, this function does not return anything in any register after performing the operation.
I have tested it in an official CP/M BDOS v2 from Digital Research and in fact it always returns
FFh
in theA
register.On the other side, CP/M BDOS v3 returns the values implemented in RunCPM:
00h
on success.FFh
on failure.So, a program that tests the
A
register without having in mind the CP/M version will run ok in RunCPM and CP/M v3 but will fail in a real CP/M v2 due to a false failure (remember: CP/M v2 always returnFFh
in registerA
).I kown because I did it!
RunCPM code:
CP/M v2 manual:
CP/M v3 manual: