14 lines
254 B
OCaml
14 lines
254 B
OCaml
type t = {
|
|
cla : int;
|
|
ins : int;
|
|
p1 : int;
|
|
p2 : int;
|
|
}
|
|
|
|
let parse command = {
|
|
cla = Bytes.get command 0 |> Char.code;
|
|
ins = Bytes.get command 1 |> Char.code;
|
|
p1 = Bytes.get command 2 |> Char.code;
|
|
p2 = Bytes.get command 3 |> Char.code;
|
|
}
|