Академический Документы
Профессиональный Документы
Культура Документы
(0) LOD Ri,X Load contents of memory location X into Register Ri.
(1) LOD Ri,’L Load contents of literal L into Register Ri.
(2) STR Ri,X Load contents of Register Ri into memory location X.
(3) ADD Ri,Rj Ri = Ri + Rj;
(4) ADD Ri,’L; Ri = Ri + L;
(5) SUB Ri,Rj Ri = Ri - Rj;
(6) SUB Ri,’L; Ri = Ri – L;
(7) MUL Ri,Rj Ri = Ri * Rj;
(8) MUL Ri,’L; Ri = Ri * L;
(9) DIV Ri,Rj Ri = DIV (Ri,Rj) (Integer Division);Ri+1 = MOD (Ri,Rj)
(10) DIV Ri,’L Ri = DIV (Ri,L) (Integer Division);Ri+1 = MOD (Ri,L)
(11) PRT X Print contents of memory location X.
(12) JMP label Jump to instruction labeled by label in columns 1 through 5.
(13)TST Ri,Rj,label If (Ri=Rj) jump to instruction labeled by label in columns 1 through 5.
otherwise, execute the next instruction.
(14)TST Ri,’L,label; If (Ri=L) jump to instruction labeled by label in columns 1 through 5.
otherwise, execute the next instruction.
(15) CMP Ri,Rj,Rk If (Ri < Rj) then Rk = -1; If (Ri > Rj) then Rk = 1;
If (Ri = Rj) then Rk = 0;
(16) CMP Ri,’L,Rk If (Ri < L) then Rk = -1; If (Ri > L) then Rk = 1;
If (Ri=L) then Rk = 0;
(17) STP STOP the program from executing.
(18) END End of the assembly language program.
Comments can be placed in the program after placing a * (star) character in the first column. The memory variables
used appear after the END statement of the program. For example, if ANS is a memory variable, then the operator label
will be ANS and the operand will be INT indicating that this variable is an integer variable.
You are not allowed to communicate in any form or action about this project with anyone else in the class. Good Luck!