Changeset 67 for Deliverables/D4.1
- Timestamp:
- Sep 13, 2010, 4:15:00 PM (10 years ago)
- Location:
- Deliverables/D4.1
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
Deliverables/D4.1/8051Series.ml
r66 r67 14 14 15 15 type processor_status 16 type program_counter 16 17 17 18 type asm_instruction … … 20 21 21 22 val power_up: processor_status 23 val next: program_counter -> processor_status -> 22 24 end;; -
Deliverables/D4.1/ASMInterpret.ml
r62 r67 942 942 else 943 943 { status with psw = (new_carry, b2, b3, b4),n2 } 944 (* 945 | DJNZ of [ reg | direct ] * rel 946 *) 944 | DJNZ (ag, (`REL rel)) -> 945 let ag_val = fetch_arg8 status ag in 946 let new_ag_val = byte_of_int ((int_of_byte ag_val) - 1) in 947 if ag_val <> ((false,false,false,false),(false,false,false,false)) then 948 { status with pc = status.pc ++ (int_of_byte rel) } 949 else 950 status 947 951 | NOP -> status 948 952 ;; -
Deliverables/D4.1/Byte.ml
r66 r67 50 50 end 51 51 52 module ByteFunctor(Bit: BIT) (Nibble: NIBBLE with type bit = Bit.bit): BYTE 52 module ByteFunctor(Bit: BIT) 53 (Nibble: NIBBLE with type bit = Bit.bit): BYTE 53 54 with type bit = Bit.bit 54 55 and type nibble = Nibble.nibble = -
Deliverables/D4.1/Word.ml
r66 r67 7 7 (*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*) 8 8 9 open "Bit.ml";;10 open "Nibble.ml";;11 open "Byte.ml";;9 open Bit;; 10 open Nibble;; 11 open Byte;; 12 12 13 13 module type WORD = … … 19 19 end;; 20 20 21 module Word(Bit: BIT ,22 Nibble: NIBBLE,23 Byte: BYTE)21 module Word(Bit: BIT) 22 (Nibble: NIBBLE with type bit = Bit.bit) 23 (Byte: BYTE with type bit = Bit.bit and type nibble = Nibble.nibble): WORD 24 24 with type bit = Bit.bit 25 25 and type nibble = Nibble.nibble
Note: See TracChangeset
for help on using the changeset viewer.