Difference between revisions of "CSC103 Basic Instructions"
(→Basic Instructions for the Pocessor Simulator) |
(→Basic Instructions for the Pocessor) |
||
(8 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | =Basic Instructions for the Pocessor | + | =Annotated Simulator= |
+ | [[Image:CSC103_Annotated_Simulator.png]] | ||
+ | |||
+ | =Basic Instructions for the Pocessor= | ||
Note "-C" means ''Constant'' | Note "-C" means ''Constant'' | ||
− | + | ADD Add to Acc ADD-C Add C to Acc | |
− | ADD | + | SUB Sub from Acc SUB-C Sub C from Acc |
− | SUB | + | AND And with Acc AND-C And C with Acc |
− | AND | + | OR Or with Acc OR-C Or C with Acc |
− | OR | + | NOT invert Acc LOD-C Load C in Acc |
− | NOT | + | SHL Shift left Acc ADD-I Add-indirect |
− | SHL | + | SHR Shift right Acc SUB-I Sub-indirect |
− | SHR | + | INC Increment Acc AND-I And-indirect |
− | INC | + | DEC Decrement Acc OR-I Or-indirect |
− | DEC | + | LOD Load Acc from mem LOD-I Load indirect |
− | LOD | + | HLT Stop! STO-I Store indirect |
− | HLT | + | JMP Jmp to address JMP-I Jmp indirect |
− | JMP | + | JMZ Jmp if Acc=0 JMZ-I Jmp zero indirect |
− | JMZ | + | JMN Jmp if negative JMN-I Jmp negative indirect |
− | JMN | + | JMF Jmp on flag JMF-I Jmp flag indirect |
− | JMF | + | STO Store Acc in mem |
− | |||
− | |||
− | + | <br /> | |
− | [[ | + | [[Category:CSC103]] |
Latest revision as of 06:48, 17 September 2013
Annotated Simulator
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