Changeset 213
- Timestamp:
- Nov 3, 2010, 3:23:03 PM (9 years ago)
- Location:
- Deliverables/D4.1
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
Deliverables/D4.1/ASMInterpret.ml
r212 r213 1440 1440 match status.serial_k_out with 1441 1441 None -> assert false (* correct? *) 1442 | Some k' -> { status with io = k';1442 | Some k' -> { status with io = k'; 1443 1443 scon = set_bit status.scon 1 true; } 1444 1444 else 1445 1445 status 1446 1446 | _ -> assert false) 1447 ;; 1448 1449 let interrupts status = 1450 let (ea,_,_,es), (et1,ex1,et0,ex0) = bits_of_byte status.ie in 1451 let (_,_,_,ps), (pt1,px1,pt0,px0) = bits_of_byte status.ip in 1452 (* DPM: are interrupts enabled? *) 1453 if ea then 1454 match (es,et1,ex1,et0,ex0) with 1455 | (false,false,false,false,false) -> 1456 (* no interrupts set *) 1457 status 1458 | _ -> assert false 1459 else 1460 status 1447 1461 ;; 1448 1462 … … 1740 1754 let status = serial_port_input status in_cont in 1741 1755 let status = serial_port_output status out_cont in 1756 let status = interrupts status in 1742 1757 { status with previous_p1_val = get_bit status.p3 4; 1743 1758 previous_p3_val = get_bit status.p3 5 } -
Deliverables/D4.1/ASMInterpret.mli
r212 r213 95 95 module IntMap: Map.S with type key = int 96 96 97 val assembly: 98 ASM.assembly_program -> BitVectors.byte list (*ASM.instruction list * symbol_table *) * string IntMap.t 97 val assembly: ASM.assembly_program -> BitVectors.byte list (*ASM.instruction list * symbol_table *) * string IntMap.t 99 98 100 99 (*
Note: See TracChangeset
for help on using the changeset viewer.