Skip to content

Commit

Permalink
No echo on A_READ #15
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanizag committed Jun 23, 2024
1 parent 7487c25 commit 6f3040c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/bdos.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ impl Bdos {
},
3 => { // A_READ - Reader input
// Use the console as the reader
res8 = Some(bdos_console::read(env))
res8 = Some(bdos_console::read_reader(env))
},
4 => { // A_WRITE - Punch output
// Use the console as the punch
Expand Down
7 changes: 7 additions & 0 deletions src/bdos_console.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@ pub fn write(env: &mut BdosEnvironment, ch: u8) {
env.bios.write(ch);
}

pub fn read_reader(env: &mut BdosEnvironment) -> u8 {
// The Reader Input function reads the next character from the logical reader
// into register A. Control does not return until the character has been read.
let ch = env.bios.read();
ch
}

pub fn write_string(env: &mut BdosEnvironment, address: u16) {
// The Print String function sends the character string stored in memory at
// the location given by DE to the console device, until a $ is encountered
Expand Down

0 comments on commit 6f3040c

Please sign in to comment.