diff options
| author | Tianhao Wang <shrik3@riseup.net> | 2023-03-14 10:47:25 +0100 |
|---|---|---|
| committer | Tianhao Wang <shrik3@riseup.net> | 2023-03-14 10:47:25 +0100 |
| commit | 383c203d77404b4f74723d7a89be691744f41c25 (patch) | |
| tree | 1061f01ed975a2c6b37015567b27cccac9f9f87b /src/machine | |
| parent | 4eae38a6ce9110a155715575adcf12bdf45703cb (diff) | |
add delay between IOs
Diffstat (limited to 'src/machine')
| -rw-r--r-- | src/machine/cgascr.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/machine/cgascr.rs b/src/machine/cgascr.rs index 2748e67..dd019d7 100644 --- a/src/machine/cgascr.rs +++ b/src/machine/cgascr.rs @@ -1,4 +1,5 @@ use crate::arch::x86_64::io_port::*; +use crate::arch::x86_64::misc::*; const CGA_BUFFER_START:*mut u8 = 0xb8000 as *mut u8; const IR_PORT:u16 = 0x3d4; @@ -44,10 +45,14 @@ impl CGAScreen{ // set lower byte outb(IR_PORT, 15 as u8); + delay(); outb(DR_PORT, offset as u8); + delay(); // set higher byte outb(IR_PORT, 14 as u8); + delay(); outb(DR_PORT, (offset >> 8) as u8); + delay(); } |
