3. Introduction
SMACO is not a real machine but used to illustrate features of machine
language and techniques used in assembler. It is a hypothetical decimal
machine.
The program of SMACO contains the statements or instructions having
decimal number.
Features
Memory address is range from 000 to 999.
It has 4 internal register called general purpose register AREG,BREG,CREG
& DREG.
Hypothetical machine used 6 condition code LT, LE, EQ,GT,GE & ANY
respectively.
4. Instruction Format
Opcode Register Operands
The machine instruction contains the opcode of 2 digits,
the register operand of 1 digit, and the memory operand
of 3 digits.
5. Instruction Set
Instruction
Opcode
Assembly
Mnemonics
Description
00 STOP Terminates the execution
01 ADD Add contents of register to address
02 SUB Subtract contents of address from register
03 MULT Multiply both operand
04 MOVER Assign the content of memory to register
05 MOVEM Assign the content of register to memory
06 COMP Compares contents of register with memory location and sets
condition code.
07 BC Branch on condition
08 DIV Divide first operand with second
09 READ Read the number from the standard input & store address
10 PRINT Output the number stored at address on the standard output
device