Changeset 69


Ignore:
Timestamp:
Sep 14, 2010, 12:19:42 PM (9 years ago)
Author:
mulligan
Message:

PUSH implemented.

File:
1 edited

Legend:

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

    r68 r69  
    858858*)
    859859 | SETB a -> set_arg1 status true a
    860 (* | PUSH (`DIRECT b) ->*)
     860 | PUSH (`DIRECT b) ->
     861     let status = { status with pc = status.pc ++ 1 } in
     862     let memory = Byte7Map.add (byte7_of_byte status.sp) b status.low_internal_ram in
     863     let status = { status with low_internal_ram = memory } in
     864       status
    861865 | POP (`DIRECT b) ->
    862866     let contents = Byte7Map.find (byte7_of_byte status.sp) status.low_internal_ram in
Note: See TracChangeset for help on using the changeset viewer.