revise File device according to new tests
This commit is contained in:
parent
cf31dc5564
commit
35b0a4f6dd
5 changed files with 106 additions and 57 deletions
|
|
@ -28,14 +28,14 @@ let run m pc =
|
|||
let dev = Machine.dev m in
|
||||
try Machine.dispatch m pc with
|
||||
| effect Machine.BRK, _ -> ()
|
||||
| effect Machine.DEI (`Byte, port), k -> begin
|
||||
| effect Machine.DEI port, k -> begin
|
||||
try
|
||||
let module Device = (val Hashtbl.find devices_dei port : Device.DEVICE)
|
||||
in
|
||||
continue k (Device.dei m port)
|
||||
with Not_found -> continue k (Bytes.get_uint8 dev port)
|
||||
end
|
||||
| effect Machine.DEI (`Short, port), k -> begin
|
||||
| effect Machine.DEI2 port, k -> begin
|
||||
try
|
||||
let module Device = (val Hashtbl.find devices_dei port : Device.DEVICE)
|
||||
in
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue