Difference between revisions of "CSC103 Basic Instructions"

From dftwiki3
Jump to: navigation, search
(New page: =Basic Instructions for the Pocessor [http://maven.smith.edu/~thiebaut/classes/103/applets.htm Simulator]= <code><pre> ADD Add to Acc ADD-C Add C to Acc SUB Sub from Acc...)
 
(Basic Instructions for the Pocessor)
 
(16 intermediate revisions by the same user not shown)
Line 1: Line 1:
=Basic Instructions for the Pocessor [http://maven.smith.edu/~thiebaut/classes/103/applets.htm Simulator]=
+
=Annotated Simulator=
 +
[[Image:CSC103_Annotated_Simulator.png]]
  
<code><pre>
+
=Basic Instructions for the Pocessor=
ADD  Add to Acc            ADD-C  Add C to Acc
 
SUB  Sub from Acc          SUB-C  Sub C from Acc
 
AND  And with Acc          AND-C  And C with Acc
 
OR    Or with Acc          OR-C    Or  C with Acc
 
NOT  invert Acc            LOD-C  Load C in Acc
 
SHL  Shift left Acc        ADD-I  Add-indirect
 
SHR  Shift right Acc       SUB-I  Sub-indirect
 
INC  Increment Acc        AND-I  And-indirect
 
DEC  Decrement Acc        OR-I    Or-indirect
 
LOD  Load Acc from mem       LOD-I  Load indirect
 
HLT  Stop!              STO-I  Store indirect
 
JMP  Jmp to address        JMP-I  Jmp indirect
 
JMZ  Jmp if Acc=0          JMZ-I  Jmp zero indirect
 
JMN  Jmp if negative       JMN-I  Jmp negative indirect
 
JMF  Jmp on flag            JMF-I  Jmp flag indirect
 
  
</pre></code>
+
Note "-C" means ''Constant''
 +
 
 +
ADD&nbsp;&nbsp;&nbsp;Add&nbsp;to&nbsp;Acc&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ADD-C&nbsp;&nbsp;&nbsp;Add&nbsp;C&nbsp;to&nbsp;Acc
 +
SUB&nbsp;&nbsp;&nbsp;Sub&nbsp;from&nbsp;Acc&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SUB-C&nbsp;&nbsp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p;Acc&nbsp;in&nbsp;mem
 +
 
 +
<br />
 +
[[Category:CSC103]]

Latest revision as of 06:48, 17 September 2013

Annotated Simulator

CSC103 Annotated Simulator.png

Basic Instructions for the Pocessor

Note "-C" means Constant

ADD   Add to Acc      	      ADD-C   Add C to Acc
SUB   Sub from Acc    	      SUB-C   Sub C from Acc
AND   And with Acc    	      AND-C   And C with Acc
OR    Or with Acc     	      OR-C    Or  C with Acc
NOT   invert Acc      	      LOD-C   Load C in	Acc
SHL   Shift left Acc  	      ADD-I   Add-indirect
SHR   Shift right Acc 	      SUB-I   Sub-indirect
INC   Increment Acc   	      AND-I   And-indirect
DEC   Decrement Acc   	      OR-I    Or-indirect
LOD   Load Acc from mem      LOD-I   Load indirect
HLT   Stop!   	      	       STO-I   Store indirect
JMP   Jmp to address  	      JMP-I   Jmp indirect
JMZ   Jmp if Acc=0    	      JMZ-I   Jmp zero indirect
JMN   Jmp if negative 	      JMN-I   Jmp negative indirect
JMF   Jmp on flag            JMF-I   Jmp flag indirect
                             STO     Store Acc in mem