Changeset 107 for Deliverables/D4.1
 Timestamp:
 Sep 22, 2010, 3:52:58 PM (10 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

Deliverables/D4.1/ASMInterpret.ml
r106 r107 781 781 function 782 782 `BIT addr > 783 (match addr with 784 (false,r1,r2,r3),n1 > 785 let addr = (int_of_vect (mk_byte7 r1 r2 r3 n1)) in 783 let n1, n2 = from_byte addr in 784 (match from_nibble n1 with 785 (false,r1,r2,r3) > 786 let addr = (int_of_vect (mk_byte7 r1 r2 r3 n2)) in 786 787 let addr' = vect_of_int ((addr / 8) + 32) `Seven in 787 788 let n_bit = set_bit (Byte7Map.find addr' status.low_internal_ram) (addr mod 8) v in … … 790 791  Some n_bit' > 791 792 { status with low_internal_ram = Byte7Map.add addr' n_bit' status.low_internal_ram }) 792  (true,r1,r2,r3) ,n1>793  (true,r1,r2,r3) > 793 794 (*CSC: SFR access, TO BE IMPLEMENTED *) 794 795 (* assert false for now. Try to understand what DEC really does *) … … 947 948 let xor_val = get_arg_8 status (`DIRECT d) ^ get_arg_8 status ag in 948 949 set_arg8 status xor_val `A 950  `CLR `A > set_arg8 status (zero `Eight) `A 951  `CLR `C > set_arg1 status false `C 952  `CLR ((`BIT b) as a) > set_arg1 status false a 949 953 (* 950  CLR `A > set_arg8 status951 ((false,false,false,false),(false,false,false,false)) `A952  CLR `C >953 set_arg1 status false `C954  CLR ((`BIT b) as a) >955 set_arg1 status false a956 954  CPL `A > 957 955 let acc_val = get_arg_8 status `A in
Note: See TracChangeset
for help on using the changeset viewer.