Changeset 203


Ignore:
Timestamp:
Oct 21, 2010, 1:32:46 PM (9 years ago)
Author:
mulligan
Message:

Serial input test: seems to work correctly (small bug corrected where
SCON.4 was not being set when there was input on the serial line).

Location:
Deliverables/D4.1
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • Deliverables/D4.1/ASMInterpret.ml

    r202 r203  
    4949
    5050let rec debug_continuation =
    51  None, `Out (
     51 (Some (`In (65536, (`SerialBuff (`Eight (vect_of_int 5 `Eight))), debug_continuation))), `Out (
    5252  fun time line ->
    5353    let _ = prerr_endline <*> string_of_line $ line in
     
    15871587           (match in_cont with
    15881588             Some (`In(time, line, cont)) when time >= status.clock && get_bit status.scon 4 ->
    1589                let status =
     1589               (let status =
    15901590                 match line with
    1591                    `P1 b ->
    1592                       { status with p1 = b; p1_latch = b; }
     1591                   `P1 b -> { status with p1 = b; p1_latch = b; }
    15931592                 | `P3 b -> { status with p3 = b; p3_latch = b; }
    15941593                 | `SerialBuff (`Eight b) ->
     
    16141613                              status
    16151614               in
    1616                  { status with io = cont }
     1615                 { status with io = cont })
     1616           | Some (`In(time, line, cont)) when time >= status.clock ->
     1617               (* DPM: if there's something on the line, we need to let the program know by setting SCON.4 *)
     1618               { status with scon = set_bit status.scon 4 true }
    16171619           | _ -> status) in
    16181620           (* Serial port output, part one *)
  • Deliverables/D4.1/Test.hex

    r199 r203  
    11:03000000020008F3
    22:0300610002000397
    3 :050003001200BA80FEAE
     3:050003001200C680FEA2
    44:09006400AA82AB83EA4BB401004F
    55:0B006D00E433FCE4BA0104BB00010412
     
    77:0E007F00EA24FFF582EB34FFF583C002C003D4
    88:08008D001200648582088583DE
    9 :0C00950009D003D0028A828B830200D6BF
     9:0C00950009D003D0028A828B830200E5B0
    1010:0D00A100439840438920758DFD43878022E0
    1111:0800AE00AA82AB83C2998A9972
    1212:0400B6003099FD225E
    13 :0D00BA001200A190000A1200AE9000141276
    14 :0900C70000AE9000031200641267
    15 :0600D00000AE90000522C5
     13:0C00BA003098FDAA997B008A828B83227B
     14:0D00C6001200A190000A1200AE900014126A
     15:0900D30000AE900003120064125B
     16:0900DC0000AE1200BA90000522EA
    1617:06003700E478FFF6D8FD9D
    1718:080015007900E94400601B7A48
    18 :05001D00009000F778DF
     19:05001D000090010678CF
    1920:030022000075A0C6
    2021:0A00250000E493F2A308B8000205FE
    2122:08002F00A0D9F4DAF275A0FF7C
    22 :0B00D600E5828508F0A4C582C0F0851B
    23 :0A00E10009F0A4D0F025F0C58385D6
    24 :0800EB0008F0A42583F583222F
     23:0B00E500E5828508F0A4C582C0F0850C
     24:0A00F00009F0A4D0F025F0C58385C7
     25:0800FA0008F0A42583F5832220
    2526:08003D007800E84400600A7934
    2627:030045000075A0A3
     
    2930:0B00560000900000E4F0A3D8FCD9FAF1
    3031:03000800758109F6
    31 :0A000B001200F3E582600302000317
    32 :0400F30075820022F0
     32:0A000B00120102E582600302000307
     33:0401020075820022E0
    3334:00000001FF
Note: See TracChangeset for help on using the changeset viewer.