>>6194688>>6194695У меня и сама архитектура простая как тапок. Память программ и данных общая, есть 32 команды, полный список которых я в конце поста налеплю. Разрядность шины данных и адреса одинаковая - 16 бит, есть 32 регистра общего назначения, абсолютно все команды выполняются за 4 такта. А ещё верхние 16 килослов памяти можно переключать между 256 банками. Вроде всё описала.
А вот, собсна, команды. Описание на ингрише, потому что мне так захотелось.
X - Unused bit
N,M,K - Number of register or external device or parameter
--------------------------------------------
SLEEP 00000XXXXXXXXXXX - Do nothing
RAWLOAD 00001NNNNNNNNMXX - Load N to upper or lower byte if M=1 or 0 to the memory pointer register
UPTODOWN 00010NNNNNMMMMMK - Copy upper byte of register N to register M or to memory if K=1
DLOAD 00011NNNNNXXXXXX - Load data from memory cell to register number N
ALOAD 00100NNNNNXXXXXX - Load address of selected memory cell to register number N
DULOAD 00101NNNNNXXXXXX - Load data from register number N to selected memory cell
GOTOA 00110NNNNNXXXXXX - Go to address stored in register number N
RCOPY 00111NNNNNMMMMMX - Load data from register number N to register number M
EXRLOAD 01000NNNNNMMMMMM - Load data to register number N from external device number M
EXRULOAD 01001NNNNNMMMMMM - Load data from register number N to external device number M
EXMLOAD 01010MMMMMMXXXXX - Load data to memory from external device number M
EXMULOAD 01011MMMMMMXXXXX - Load data from memory to external device number M
INC 01100NXXXXXXXXXX - Add 1 to memory cell or address if N = 1
DEC 01101NXXXXXXXXXX - Subtract 1 from memory cell or address if N = 1
INCR 01110NNNNNXXXXXX - Add 1 to register nuber N
DECR 01111NNNNNXXXXXX - Subtract 1 from register nuber N
RADD 10000NNNNNMMMMMK - Add number stored in stored in register M to number stored in register N and put result into memory and if k=1 then consider the carry flag
RSUB 10001NNNNNMMMMMK - Subtract number stored in register M from number stored in register N and put result into memory and if k=1 then consider the carry flag
SLOAD 10010XXXXXXXXXXX - Load data to the shift register from memory
SULOAD 10011XXXXXXXXXXX - Load data from the shift register to memory
SHIFTREG 10100NMXXXXXXXXX - Shift data in the shift register to the right or left if M=1 or 0 without or with looping if N=0 or 1
BNKSWTCH 10101NNNNNNNNXXX - Switch upper 16kb to bank N
ORRRM 10110NNNNNMMMMMX - Do bitwise OR operation on register N and register M and put result into memory
ANDRRM 10111NNNNNMMMMMX - Do bitwise AND operation on register N and register M and put result into memory
XORRRM 11000NNNNNMMMMMX - Do bitwise XOR operation on register N and register M and put result into memory
NOTRRN 11001NNNNNXXXXXX - Do bitwise NOT operation on register N and put result into memory
IFNOMDO 11010NNNNNMMMMMX - If N is greater than M do the next instruction, if else then skip it
IFNUMDO 11011NNNNNMMMMMX - If N is less than M do the next instruction, if else then skip it
IFNEMDO 11100NNNNNMMMMMX - If N is equal to M do the next instruction, if else then skip it
INSTRMV 11101NNNNNXXXXXX - Move the instruction pointer to the memory cell with address that is stored in register N and begin executing instructions at the next cycle
INRSTART 11110NNNNNNNXXXX - Beggining of instruction block executed during the interruption number N
INREND 11111XXXXXXXXXXX - Ending of instruction block executed during the interruption
АРРРГХ, РАЗМЕТКА