Loading ...
Sorry, an error occurred while loading the content.
 

TI-85 Digicomp emulator

Expand Messages
  • Courtney
    I am currently working on a Digicomp I emulator on a Texas Instrument programmable calculator model TI-85. Phase I (completed and working): Emulate the
    Message 1 of 1 , Nov 6, 2012
      I am currently working on a Digicomp I emulator on a Texas Instrument programmable calculator model TI-85.

      Phase I (completed and working): Emulate the Digicomp using only AND gates for all 6 columns. However, it does not assure if any "jams" (due to logic conflict) occur; it merely assumes that the pegging runs smoothly.

      Phase II (not completed yet): include "jam" (logic conflict) indicator... sounds so simple, but harder than you think.

      Phase III (still-on-the-drawing-board-status): Add the use of OR gates.

      At the rate I'm going, the emulator will not see the light of day until December. In the meantime, I've attached a prototype of NIM (for the TI-85) for any of you users of yet another archariac (but wonderful) device.

      -cmcf

      PROGRAM:NIM for the TI-85

      Text code:

      --> store
      _ spacebar (inside string)
      <= "equal or less than" symbol
      => "equal or geater than" symbol
      <> "not equal to" symbol
      == equal/compare (exact type)

      :ClLCD:rand
      :Lbl NEW:ClLCD
      :For(I,1,4)
      :(int (rand*15))-->F
      :(F+1)-->N(I)
      :For(J,1,N(I))
      :Outpt(I,J,"O")
      :End:End
      :For(I,4,16,4)
      :Outpt(5,I,"|"):End
      :1-->L:(N(L)+1)-->M
      :Outpt(L,M,"X")
      :Lbl KEY:0-->K
      :While K==0
      :getKy-->K:End
      :If K==21:Then
      :Goto RES:End
      :If K==24:Then
      :Goto LT:End
      :If K==25:Then
      :Goto UP:End
      :If K==26:Then
      :Goto RT:End
      :If K==34:Then
      :Goto DN:End
      :If K==105:Then
      :Goto ENT:End
      :Goto KEY:End
      :
      :Lbl RES
      :(N(1) xor N(2) xor N
      (3) xor N(4))-->E
      :If E<>0:Then
      :Goto WIN:Else
      :Goto LOSE:End
      :Lbl LT
      :If M==1:Then
      :Goto KEY:End
      :(M-1)-->M
      :Outpt(L,M,"X_")
      :Goto KEY
      :Lbl UP
      :Outpt(L,M,"_")
      :For(I,1,N(L))
      :Outpt(L,I,"O"):End
      :(mod(L+2,4)+1)-->L
      :(N(L)+1)-->M
      :Outpt(L,M,"X")
      :Goto KEY
      :Lbl RT
      :If M==N(L)+1:Then
      :Goto KEY:End
      :(M+1)-->M
      :Outpt(L,M-1,"OX")
      :Goto KEY
      :Lbl DN
      :Outpt(L,M,"_")
      :For(I,1,N(L))
      :Outpt(L,I,"O"):End
      :(mod(L,4)+1)-->L
      :(N(L)+1)-->M
      :Outpt(L,M,"X")
      :Goto KEY
      :Lbl ENT
      :If M==N(L)+1:Then
      :Goto KEY:Else
      :(M-1)-->N(L):End
      :(N(1)+N(2))-->J
      :(N(3)+N(4)+J)-->J
      :If J==0:Then
      :Goto WIN:End
      :
      :(N(1) xor N(2) xor N
      (3) xor N(4))-->E
      :For(I,1,4)
      :(N(I) xor E)-->J
      :If J<=N(I):Then
      :I-->F:End:End
      :(N(F) xor E)-->J
      :If E==0:Then
      :For(I,1,4)
      :If N(I)=>1:Then
      :I-->F:End:End
      :(N(F)-1)-->J:End
      :Outpt(L,M,"_")
      :(N(F)+1)-->M
      :J-->N(F):F-->L
      :For(I,M,J+1,-1)
      :Outpt(L,I,"X_")
      :End:(J+1)-->M
      :(N(1)+N(2))-->J
      :(N(3)+N(4)+J)-->J
      :If J==0:Then
      :Goto LOSE:Else
      :Goto KEY:End
      :Lbl WIN
      :For(I,4,16,4)
      :Outpt(5,I,"_"):End
      :Outpt(6,4,"YOU_WIN,_
      I_LOSE")
      :Pause :Goto NEW
      :Lbl LOSE
      :For(I,4,16,4)
      :Outpt(5,I,"_"):End
      :Outpt(6,4,"YOU_LOSE,
      _I_WIN")
      :Pause :Goto NEW
      :Stop
      :
    Your message has been successfully submitted and would be delivered to recipients shortly.