First question:
The memory unit data is subtracted from the contents of the memory unit represented by the absolute address addr, and the result is saved to the memory unit specified by the DR content.
1. instruction Format
Instruction format: |
D4 |
DR |
X |
|
ADDR |
|
DATA |
2. instruction function
function: data-[ADDR]→[DR]
3. Design Analysis
According to the instruction function and instruction format, the first reading address addr unit content is temporarily placed in the Q Register, and then pc+1→pc, and the value of the PC is assigned to AR. Data is stored in the mem. At this point you only need to implement MEM-Q→Q and send the DR to AR. The command function can be completed simply by writing the Q register contents to the memory mem. Finally, the PC+1→PC operation must be implemented in the micro-program to ensure the correct trend of PC.
4. Micro- programs
100:pc→ar,pc+1→pc:0000 0E00 a0b5 5402
101:mem→ar:0000 0E00 10f0 0002
102:mem→q:0000 0E00 00f0 0000
103:pc→ar,pc+1→pc:0000 0E00 a0b5 5402
105:mem-q→q:0000 0E01 02E0 0000
106:dr→ar:0000 0E00 90b0 000A
107:q→mem,cc#=0:0029 0300 1020 0010
5. loading into the micro-register program segment
Description: The microcode is stored in a memory unit that starts with a 900H (or an internal storage element)
>a0800
0800:mov r1,900; microcode in-memory first address
0802:mov r2,7; micro-instruction Bar number
0804:mov r3,100; microcode in the micro-control memory of the first address
0806:LDMC; load microcode instructions to load microcode instructions into micro-control memory
0807:ret
0808:
>a0800
6. Run the program segment
>a0820
0820:mov r0,0011
0822:mov [0890],r0
0824:mov r2,0891
0826:nop
0827:nop
0828:nop
0829:ret
>e0826
Then enter the following:
D420 0890 1111
7. Running Results
>g0820
>d0891
0891:1100
The second question:
Add the contents of the absolute Address addr unit to the [SR] content and save the result to the Dr Deposit.
1. instruction Format
Instruction format: |
D4 |
DR |
SR |
|
ADDR |
2. instruction function
function: [ADDR] + [SR]→DR
3. Design Analysis
Depending on the function and instruction format of the instruction, the read address addr unit content is temporarily placed in the Q Register, and the SR element content is assigned to the data in the Ar,mem that holds the SR. At this point, you only need to implement Q+MEM and assign the result to Dr to complete the instruction function. Finally, the PC+1→PC operation must be implemented in the micro-program to ensure the correct trend of PC.
4. Micro- programs
100:pc→ar,pc+1→pc:0000 0E00 a0b5 5402
101:mem→ar:0000 0E00 10f0 0002
102:mem→q:0000 0E00 00f0 0000
103:sr→ar:0000 0E00 90c0 0082
104:mem+q→q:0000 0E01 00E0 0000
105:q→dr,cc#=0:0029 0300 B020 0018
5. loading into the micro-register program segment
Description: The microcode is stored in a memory unit that starts with a 900H (or an internal storage element)
>a0800
0800:mov r1,900; microcode in-memory first address
0802:mov r2,6; micro-instruction Bar number
0804:mov r3,100; microcode in the micro-control memory of the first address
0806:LDMC; load microcode instructions to load microcode instructions into micro-control memory
0807:ret
0808:
>a0800
6. Run the program segment
>a0820
0820:mov r0,0011
0822:mov [0890],r0
0824:mov r0,0100
0826:mov [0891], R0
0828:mov R3, 0891
082a:nop
082b:nop
082c:ret
>e082a
Then enter the following:
D413 0890
7. Running Results
>g0820
>rr1
0111:-
TEC-2 Machine Micro Programming