Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BDOS Function 3 - A_READ should not echo input #15

Closed
skx opened this issue Jun 20, 2024 · 1 comment
Closed

BDOS Function 3 - A_READ should not echo input #15

skx opened this issue Jun 20, 2024 · 1 comment

Comments

@skx
Copy link
Contributor

skx commented Jun 20, 2024

I put together a simple input-testing binary, because I spent a lot of time fighting with console input, the source and binary can be found here:

Your emulator fails two tests, I think. This bug report is for the first failure.

Not true - second issue is a non-issue - I thought you were behaving incorrectly by terminating input of function 10: Read Console Buffer when the buffer is full, but I think on reflection that if the input size is 10 bytes you should return when the user enters 10 characters - without the need for RETURN. I guess I did the wrong thing in mine :)

I think reading the documentation that Function 3 / A_READ should not echo input. I'm basing that upon reading this guide:

Here we see:

  • BDOS function 1 (C_READ) - Console input
    • Wait for a character from the keyboard; then echo it to the screen and return it.
  • BDOS function 3 (A_READ) - Auxiliary (Reader) input
    • Reads a character from the console without checking for ^S / ^Q.

Specifically note that in the second entry there is no reference to "echo".

Similarly in the bigger manual, http://www.gaby.de/cpm/manuals/archive/cpm22htm/ch5.htm#Section_5.2 we see a similar writeup. There is a reference to echo in C_READ but not in A_READ.

So I think my behaviour is correct, but I appreciate this might be a matter of interpretation.

Output from my emulator:

 ./cpmulator samples/intest.com 
Simple input-test program, by Steve.


C_READ Test:
  This test allows you to enter FIVE characters, one by one.
  The characters SHOULD be echoed as you type them.
12345
  Test complete - you entered '12345'.

A_READ Test:
  This test allows you to enter FIVE characters, one by one.
  The characters should NOT be echoed as you type them.
  Test complete - you entered '12345'.

C_RAWIO Test:
  This uses polling to read characters.
  Echo should NOT be enabled.
  Press 'q' to proceed/complete this test.
+

Output from yours:

$ ./target/debug/iz-cpm /home/skx/Repos/github.com/skx/cpmulator/samples/intest.com 
Simple input-test program, by Steve.


C_READ Test:
  This test allows you to enter FIVE characters, one by one.
  The characters SHOULD be echoed as you type them.
12345
  Test complete - you entered '12345'.

A_READ Test:
  This test allows you to enter FIVE characters, one by one.
  The characters should NOT be echoed as you type them.
12345  Test complete - you entered '12345'.

C_RAWIO Test:
  This uses polling to read characters.
  Echo should NOT be enabled.
  Press 'q' to proceed/complete this test.
+

Note the echo'd characters in the section section.

@ivanizag
Copy link
Owner

I'll agree with you. There is no reference to an echo there.

ivanizag added a commit that referenced this issue Jun 23, 2024
@ivanizag ivanizag closed this as completed Jul 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants