source: Deliverables/D4.1/Pretty.ml @ 84

Last change on this file since 84 was 84, checked in by mulligan, 10 years ago

Lots of work on tidying up code.

File size: 483 bytes
Line 
1open ASM;;
2
3let pretty_bit =
4  function true -> "1"
5         | false -> "0"
6
7let pretty_nibble =
8  function (b1,b2,b3,b4) ->
9    pretty_bit b1 ^ pretty_bit b2 ^ pretty_bit b3 ^ pretty_bit b4
10
11let pretty_byte =
12  function (n1, n2) -> pretty_nibble n1 ^ " " ^ pretty_nibble n2
13
14let pretty_word =
15  function (b1,b2) -> pretty_byte b1 ^ " " ^ pretty_byte b2
16
17let pretty_word11 =
18  function (b1,b2,b3,b) ->
19    "word11: " ^ pretty_word (((false,false,false,false),(false,b1,b2,b3)),b)
20;;
Note: See TracBrowser for help on using the repository browser.