Question: Write the following print Pep/9 code to pseudo code . Help is greatly appreciated. BR main0 vector: .BLOCK 280 i: .BLOCK 2 j: .BLOCK 2

Write the following print Pep/9 code to pseudo code. Help is greatly appreciated.

BR main0 vector: .BLOCK 280 i: .BLOCK 2 j: .BLOCK 2 k: .BLOCK 2 stack: .BLOCK 2 stack2: .BLOCK 2

;PRINT FUNCTION STARTS HERE ; print: MOVSPA STWA stack,d STWA stack2, d SUBSP stack2,d nl: LDWA 0,i LDBA 8,i STBA i,d LDBA 10,i STBA j,d LDBA 10,i STBA k,d

for1p: LDBX i,d ;for loop for printing the first name CPBX 0,i BREQ endfor1p LDBA vector,s STBA charOut,d ADDSP 1,i LDBA 0,i LDBX i,d SUBX 1,i STBX i,d BR for1p endfor1p:LDBA '\t',i STBA 0XFC16,d LDBA 0,i BR for2p

for2p: LDBX j,d ;for loop for printing the last name CPBX 0,i BREQ endfor2p LDBA vector,s STBA charOut,d ADDSP 1,i LDBA 0,i LDBX j,d SUBX 1,i STBX j,d BR for2p endfor2p:LDBA '\t',i STBA 0XFC16,d LDBA 0,i BR for3p

for3p: LDBX k,d ;for loop for printing the number CPBX 0,i BREQ endfor3p LDBA vector,s STBA charOut,d ADDSP 1,i LDBA 0,i LDBX k,d SUBX 1,i STBX k,d BR for3p endfor3p:LDBA ' ',i STBA charOut,d LDWA m,d ADDA 1,i STWA m,d CPWA n,d BREQ main BR nl ; makes the counters = 0 for the next print option ;

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!