Changeset 949 for src/ASM/Status.ma


Ignore:
Timestamp:
Jun 13, 2011, 6:42:14 PM (9 years ago)
Author:
mulligan
Message:

resolved conflict, work from today

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ASM/Status.ma

    r935 r949  
    420420    let sfr ≝ special_function_registers_8051 ? s in
    421421    let psw ≝ get_index_v Byte 19 sfr (sfr_8051_index SFR_PSW) ? in
    422       get_index_v bool 8 psw (S O) ?.
     422      get_index_v bool 8 psw 1 ?.
    423423    normalize
    424424    repeat (@ (le_S_S ? ?))
     
    826826        λdirect: True.
    827827          let 〈 nu, nl 〉 ≝ split … 4 4 d in
    828           let bit_1 ≝ get_index_v … nu 1 ? in
    829             match bit_1 with
    830               [ true ⇒
    831                   let 〈 bit_one, three_bits 〉 ≝ split ? 1 3 nu in
     828          let bit_one ≝ get_index_v ? ? nu 0 ? in
     829          let 〈 ignore, three_bits 〉 ≝ split ? 1 3 nu in
     830            match bit_one with
     831              [ false ⇒
    832832                  let address ≝ three_bits @@ nl in
    833833                    lookup ? 7 address (low_internal_ram ? s) (zero 8)
    834               | false ⇒ get_bit_addressable_sfr ? s 8 d l
     834              | true ⇒ get_bit_addressable_sfr ? s 8 d l
    835835              ]
    836836      | INDIRECT i ⇒
     
    839839          let 〈 bit_one_v, three_bits 〉 ≝ split ? 1 3 nu in
    840840          let bit_1 ≝ get_index_v … bit_one_v O ? in
    841           match bit_1 with
    842             [ true ⇒
     841          match  bit_1 with
     842            [ false ⇒
    843843                lookup ? 7 (three_bits @@ nl) (low_internal_ram ? s) (zero 8)
    844             | false ⇒
     844            | true ⇒
    845845                lookup ? 7 (three_bits @@ nl) (high_internal_ram ? s) (zero 8)
    846846            ]
     
    865865        λdirect: True.
    866866          let 〈 nu, nl 〉 ≝ split … 4 4 d in
    867           let bit_1 ≝ get_index_v … nu 1 ? in
     867          let bit_one ≝ get_index_v ? ? nu 0 ? in
    868868          let 〈 ignore, three_bits 〉 ≝ split ? 1 3 nu in
    869             match bit_1 with
     869            match bit_one with
    870870              [ true ⇒ set_bit_addressable_sfr ? s d v
    871871              | false ⇒
     
    877877          let register ≝ get_register ? s [[ false; false; i ]] in
    878878          let 〈nu, nl〉 ≝ split ? 4 4 register in
    879           let bit_1 ≝ get_index_v … nu 1 ? in
     879          let bit_1 ≝ get_index_v … nu 0 ? in
    880880          let 〈ignore, three_bits〉 ≝ split ? 1 3 nu in
    881881            match bit_1 with
    882               [ true ⇒
     882              [ false ⇒
    883883                let memory ≝ insert … (three_bits @@ nl) v (low_internal_ram ? s) in
    884884                  set_low_internal_ram ? s memory
    885               | false ⇒
     885              | true ⇒
    886886                let memory ≝ insert … (three_bits @@ nl) v (high_internal_ram ? s) in
    887887                  set_high_internal_ram ? s memory
     
    972972        λbit_addr: True.
    973973          let 〈 nu, nl 〉 ≝ split … 4 4 b in
    974           let bit_1 ≝ get_index_v … nu 1 ? in
     974          let bit_1 ≝ get_index_v … nu 0 ? in
    975975          let 〈 bit_one_v, three_bits 〉 ≝ split ? 1 3 nu in
    976976            match bit_1 with
     
    991991        λn_bit_addr: True.
    992992          let 〈 nu, nl 〉 ≝ split … 4 4 n in
    993           let bit_1 ≝ get_index_v … nu 1 ? in
     993          let bit_1 ≝ get_index_v … nu 0 ? in
    994994          let 〈 bit_one_v, three_bits 〉 ≝ split ? 1 3 nu in
    995995            match bit_1 with
     
    10261026      [ BIT_ADDR b ⇒ λbit_addr: True.
    10271027          let 〈 nu, nl 〉 ≝ split ? 4 4 (get_8051_sfr ? s SFR_PSW) in
    1028           let bit_1 ≝ get_index_v … nu 1 ? in
     1028          let bit_1 ≝ get_index_v … nu 0 ? in
    10291029          let 〈 ignore, three_bits 〉 ≝ split ? 1 3 nu in
    10301030          match bit_1 with
Note: See TracChangeset for help on using the changeset viewer.