Question: 1. For a PDP-8, generate assembly code to multiply the number in hex address 0x200 by 4, and store the result in address 0x201. The

 1. For a PDP-8, generate assembly code to multiply the number

in hex address 0x200 by 4, and store the result in address0x201. The program should start in address 0x100. You can assume thenumber in 0x200 is positive and less than 0x100. You will need

1. For a PDP-8, generate assembly code to multiply the number in hex address 0x200 by 4, and store the result in address 0x201. The program should start in address 0x100. You can assume the number in 0x200 is positive and less than 0x100. You will need to consult the PDP-8 programming card for mnemonics and instruction formats. Note in particular that the PDP-8 has no multiply instruction. Be sure to give the address of each instruction. byte 1 op. byte 2 op. status bits mnem RLC RRC RAL RAR meaning rot acc I toc rot acc r w/c rot acc | thru rot acc r thru opcode 00 000 111 00 001 111 00 010 111 00 011 111 BC=00 DE=01 HL=10 flags, A=11 push pop PUSH POP DAD INX DCX XCHG XTHL SPHL inrcr rp decr rp 11 rpo 101 11 rpo 001 00 rp1 001 00 rpo 011 00 rp1 011 11 101 011 11 100 011 11 111 001 unaffected unaffected unaffected unaffected unaffected unaffected unaffected exchange exch stk load sp fr hl B=000 E=011 H=100 L=101 C=001 (HL)=110 D=010 A=111 incr reg decr reg INR DCR DAA MOV ADD ADC SUB SBB ANA XRA ORA CMP compl acc dec adj acc move ssS->ddd acc + reg -> acc acc+reg+c->acc acc-reg->acc acc-reg-c->acc acc & reg -> acc acc xor reg -> acc acc or reg -> acc acc==reg -> acc 00 reg 100 00 reg 101 00 101 111 00 100 111 01 ddd sss 10 000 reg 10 001 reg 10 010 reg 10 011 reg 10 100 reg 10 101 reg 10 110 reg 10 111 reg z,s,p,ac z,s,p,ac unaffected Z,,P,c,ac unaffected c,s,z,p,ac c,s,z,p,ac cs,zip,ac cs,z,p,ac C,2,S,P c,s,2,P c,s,2,P c,s,2,P BC=00 DE=01 HL=10 SP=11 hi byte data LXI MVI ADI ACI SUI SBI ANI XRI ORI CPI data -> rp data-> reg acc + data -> acc acc+c+data->acc acc-data -> acc acc-data-C->acc acc&data->aco acc xor data->acc acc or data -> acc acc==data->acc 00 rpo 001 00 reg 110 11 000 110 11 001 110 11 010 110 11 011 110 11 100 110 11 101 110 11 110 110 11 111 110 lo byte data data data data data data data data data data unaffected unaffected c,s,z,p,ac C,S,zip,ac cs,zip,ac C,S,z,p,ac c,s,2,P C,s,zip c,s,2,p c,s,,P mnem STAX LDAX STA LDA SHLD LHLD CMC STC meaning opcode byte1 op. byte2 op. flags X=0=>bc,x=1=>de move acc->(x) 00 Oxo 010 unaffected move (x)->acc 00 Ox1 010 unaffected move acc->(addr) 00 110 010 lo byte addr hi byte addrunaffected mov (addr)->acc 00 111 010 To byte addr hi byte addrunaffected mov HL->(addr) 00 100 010 lo byte addr hi byte addrunaffected mov (addr)->HL 00 101 010 lo byte addrhi byte addr hi byte addr unaffected compl carry 00 111 111 set carry 00 110 111 NOP EI Di HLT RST IN OUT no operation enable int disable int halt restart input output 00 000 000 11 111 011 11 110 011 01 110 110 11 exp 111 11 011 011 11 010 011 unaffected unaffected unaffected unaffected unaffected unaffeced unaffected dev number dev number PCHL JMP JC INC JZ INZ JM JP JPE JPO jump to HL jump to addr jmp addr if c=1 jmp addr if c!=1 jmp addr if z=1 jmp addr if z!=1 jmp addr if s=1 jmp addr if s=0 jmp addr if p=1 jmp addr if p=0 11 101 001 unaffected 11 000 011 lo addr byte hi addr byte unaffected 11 011 010 lo addr byte hi addr byte unaffected 11 010 010 lo addr byte hi addr byte unaffected 11 001 010 lo addr byte hi addr byte unaffected 11 000 010 lo addr byte hi addr byte unaffected 11 111 010 lo addr byte hi addr byte unaffected 11 110 010 lo addr byte hi addr byte unaffected 11 101 010 lo addr byte hi addr byte unaffected 11 100 010 lo addr byte hi addr byte unaffected CALL CC CNC CZ CNZ CM CP CPE CPO jmp addr, push pc 11 001 101 To addr byte hi addr byte unaffected call if c=1 11 011 100 lo addr byte hi addr byte unaffected call if c=0 11 010 100 lo addr byte hi addr byte unaffected call if z=1 11 001 100 lo addr byte hi addr byte hi addr byte unaffected call if z=0 11 000 100 lo addr byte hi addr byte unaffected call if s=1 11 111 100 lo addr byte hi addr byte unaffected call if s=0 11 110 100 lo addr byte hi addr byte unaffected call if p=1 11 101 100 lo addr byte hi addr byte unaffected call if p=0 11 100 100 lo addr byte hi addr byte unaffected RET RC RNC RZ RNZ RM RP RPE RPO jmp to pop sp return if c=1 return if c=0 return if z=1 return if z=0 return if s=1 return if s=0 return if p=1 return if p=0 11 001 001 11 011 000 11 010 000 11 001 000 11 000 000 11 111 000 11 110 000 11 101 000 11 100 000 unaffected unaffected unaffected unaffected unaffected unaffected unaffected unaffected unaffected 1. For a PDP-8, generate assembly code to multiply the number in hex address 0x200 by 4, and store the result in address 0x201. The program should start in address 0x100. You can assume the number in 0x200 is positive and less than 0x100. You will need to consult the PDP-8 programming card for mnemonics and instruction formats. Note in particular that the PDP-8 has no multiply instruction. Be sure to give the address of each instruction. byte 1 op. byte 2 op. status bits mnem RLC RRC RAL RAR meaning rot acc I toc rot acc r w/c rot acc | thru rot acc r thru opcode 00 000 111 00 001 111 00 010 111 00 011 111 BC=00 DE=01 HL=10 flags, A=11 push pop PUSH POP DAD INX DCX XCHG XTHL SPHL inrcr rp decr rp 11 rpo 101 11 rpo 001 00 rp1 001 00 rpo 011 00 rp1 011 11 101 011 11 100 011 11 111 001 unaffected unaffected unaffected unaffected unaffected unaffected unaffected exchange exch stk load sp fr hl B=000 E=011 H=100 L=101 C=001 (HL)=110 D=010 A=111 incr reg decr reg INR DCR DAA MOV ADD ADC SUB SBB ANA XRA ORA CMP compl acc dec adj acc move ssS->ddd acc + reg -> acc acc+reg+c->acc acc-reg->acc acc-reg-c->acc acc & reg -> acc acc xor reg -> acc acc or reg -> acc acc==reg -> acc 00 reg 100 00 reg 101 00 101 111 00 100 111 01 ddd sss 10 000 reg 10 001 reg 10 010 reg 10 011 reg 10 100 reg 10 101 reg 10 110 reg 10 111 reg z,s,p,ac z,s,p,ac unaffected Z,,P,c,ac unaffected c,s,z,p,ac c,s,z,p,ac cs,zip,ac cs,z,p,ac C,2,S,P c,s,2,P c,s,2,P c,s,2,P BC=00 DE=01 HL=10 SP=11 hi byte data LXI MVI ADI ACI SUI SBI ANI XRI ORI CPI data -> rp data-> reg acc + data -> acc acc+c+data->acc acc-data -> acc acc-data-C->acc acc&data->aco acc xor data->acc acc or data -> acc acc==data->acc 00 rpo 001 00 reg 110 11 000 110 11 001 110 11 010 110 11 011 110 11 100 110 11 101 110 11 110 110 11 111 110 lo byte data data data data data data data data data data unaffected unaffected c,s,z,p,ac C,S,zip,ac cs,zip,ac C,S,z,p,ac c,s,2,P C,s,zip c,s,2,p c,s,,P mnem STAX LDAX STA LDA SHLD LHLD CMC STC meaning opcode byte1 op. byte2 op. flags X=0=>bc,x=1=>de move acc->(x) 00 Oxo 010 unaffected move (x)->acc 00 Ox1 010 unaffected move acc->(addr) 00 110 010 lo byte addr hi byte addrunaffected mov (addr)->acc 00 111 010 To byte addr hi byte addrunaffected mov HL->(addr) 00 100 010 lo byte addr hi byte addrunaffected mov (addr)->HL 00 101 010 lo byte addrhi byte addr hi byte addr unaffected compl carry 00 111 111 set carry 00 110 111 NOP EI Di HLT RST IN OUT no operation enable int disable int halt restart input output 00 000 000 11 111 011 11 110 011 01 110 110 11 exp 111 11 011 011 11 010 011 unaffected unaffected unaffected unaffected unaffected unaffeced unaffected dev number dev number PCHL JMP JC INC JZ INZ JM JP JPE JPO jump to HL jump to addr jmp addr if c=1 jmp addr if c!=1 jmp addr if z=1 jmp addr if z!=1 jmp addr if s=1 jmp addr if s=0 jmp addr if p=1 jmp addr if p=0 11 101 001 unaffected 11 000 011 lo addr byte hi addr byte unaffected 11 011 010 lo addr byte hi addr byte unaffected 11 010 010 lo addr byte hi addr byte unaffected 11 001 010 lo addr byte hi addr byte unaffected 11 000 010 lo addr byte hi addr byte unaffected 11 111 010 lo addr byte hi addr byte unaffected 11 110 010 lo addr byte hi addr byte unaffected 11 101 010 lo addr byte hi addr byte unaffected 11 100 010 lo addr byte hi addr byte unaffected CALL CC CNC CZ CNZ CM CP CPE CPO jmp addr, push pc 11 001 101 To addr byte hi addr byte unaffected call if c=1 11 011 100 lo addr byte hi addr byte unaffected call if c=0 11 010 100 lo addr byte hi addr byte unaffected call if z=1 11 001 100 lo addr byte hi addr byte hi addr byte unaffected call if z=0 11 000 100 lo addr byte hi addr byte unaffected call if s=1 11 111 100 lo addr byte hi addr byte unaffected call if s=0 11 110 100 lo addr byte hi addr byte unaffected call if p=1 11 101 100 lo addr byte hi addr byte unaffected call if p=0 11 100 100 lo addr byte hi addr byte unaffected RET RC RNC RZ RNZ RM RP RPE RPO jmp to pop sp return if c=1 return if c=0 return if z=1 return if z=0 return if s=1 return if s=0 return if p=1 return if p=0 11 001 001 11 011 000 11 010 000 11 001 000 11 000 000 11 111 000 11 110 000 11 101 000 11 100 000 unaffected unaffected unaffected unaffected unaffected unaffected unaffected unaffected unaffected

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!