Changeset 31


Ignore:
Timestamp:
Sep 3, 2010, 12:08:16 PM (8 years ago)
Author:
mulligan
Message:

Instructions J--M complete.

Location:
Deliverables/D4.1
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • Deliverables/D4.1/ASM.mli

    r30 r31  
    7575 | JC of rel
    7676 | JNC of rel
    77  | JB of rel
     77 | JB of bit * rel
    7878 | JNB of bit * rel
    7979 | JBC of bit * rel
  • Deliverables/D4.1/ASMInterpret.ml

    r29 r31  
    165165         INC `DPTR, pc, 2
    166166   | (false,false,true,false),(false,false,false,false) ->
    167        let pc,b1 = next pc in
    168        let pc b2 = next pc in
    169          JB (`BIT)
     167       let pc,b1 = next7 pc in
     168       let pc,b2 = next pc in
     169         JB (`BIT b1, `REL b2), pc, 2
     170   | (false,false,false,true),(false,false,false,false) ->
     171       let pc,b1 = next7 pc in
     172       let pc,b2 = next pc in
     173         JBC (`BIT b1, `REL b2), pc, 2
     174   | (false,true,false,false),(false,false,false,false) ->
     175       let pc,b1 = next pc in
     176         JC (`REL b1), pc, 2
     177   | (false,true,true,true),(false,false,true,true) ->
     178         JMP `IND_DPTR, pc, 2
     179   | (false,false,true,true),(false,false,false,false) ->
     180       let pc,b1 = next7 pc in
     181       let pc,b2 = next pc in
     182         JNB (`BIT b1, `REL b2), pc, 2
     183   | (false,true,false,true),(false,false,false,false) ->
     184       let pc,b1 = next pc in
     185         JNC (`REL b1), pc, 2
     186   | (false,true,true,true),(false,false,false,false) ->
     187       let pc,b1 = next pc in
     188         JNZ (`REL b1), pc, 2
     189   | (false,true,true,false),(false,false,false,false) ->
     190       let pc,b1 = next pc in
     191         JZ (`REL b1), pc, 2
     192   | (false,false,false,true),(false,false,true,false) ->
     193       let pc,b1 = next pc in
     194       let pc,b2 = next pc in
     195         LCALL (`ADDR16 (b1,b1)), pc, 2
     196   | (false,false,false,false),(false,false,true,false) ->
     197       let pc,b1 = next pc in
     198       let pc,b2 = next pc in
     199         LJMP (`ADDR16 (b1,b1)), pc, 2
    170200 with
    171201  Not_found -> raise BOO
Note: See TracChangeset for help on using the changeset viewer.