Changeset 77 for Deliverables/D4.1
- Timestamp:
- Sep 15, 2010, 11:57:38 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Deliverables/D4.1/ASMInterpret.ml
r76 r77 15 15 high_internal_ram: byte Byte7Map.t; 16 16 external_ram: byte WordMap.t; 17 18 17 19 18 20 pc: word; … … 968 970 let status = { status with sp = new_sp } in 969 971 { status with pc = (high_bits, low_bits) } 970 (* 971 | ACALL of addr11 972 | LCALL of addr16 973 *) 972 | ACALL (`ADDR11 (b1,b2,b3,b)) -> 973 let status = { status with pc = status.pc ++ 2 } in 974 let status = { status with sp = byte_of_int ((int_of_byte status.sp) + 1) } in 975 let (bh, bl) = status.pc in 976 let lower_mem = Byte7Map.add (byte7_of_byte status.sp) bl status.low_internal_ram in 977 let status = { status with low_internal_ram = lower_mem } in 978 let status = { status with sp = byte_of_int ((int_of_byte status.sp) + 1) } in 979 let lower_mem = Byte7Map.add (byte7_of_byte status.sp) bh status.low_internal_ram in 980 let status = { status with low_internal_ram = lower_mem } in 981 let ((p1,p2,p3,p4),(p5,_,_,_)),b = status.pc in 982 let addr = (((p1,p2,p3,p4),(p5,b1,b2,b3)),b) in 983 { status with pc = addr } 984 (* | LCALL (`ADDR16 addr) ->*) 974 985 | AJMP (`ADDR11 (b1,b2,b3,b)) -> 975 986 let status = { status with pc = status.pc ++ 2 } in 976 let (((p1,p2,p3,p4),(p5, p6,p7,p8)),(_,_)) = status.pc in987 let (((p1,p2,p3,p4),(p5,_,_,_)),(_,_)) = status.pc in 977 988 let addr = (((p1,p2,p3,p4),(p5,b1,b2,b3)),b) in 978 989 let new_pc = word_of_int ((int_of_word status.pc) + (int_of_word addr)) in
Note: See TracChangeset
for help on using the changeset viewer.