306assignment3 - .orig x3000 lea r0, mess1 puts ld r1,...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
.orig x3000 lea r0, mess1 puts ld r1, block; r1 is D not r1,r1; add r1,r1,#1; r1 contains 2s comp of D ld r3, wood; r3 is E not r3,r3 add r3,r3,#1; r3 contains 2s comp of E and r4,r4,#0 and r5,r5,#0 lea r5, blank; address of first shifted character start getc and r2,r2,#0 add r2,r0,r1; compare input character to D brz SOP; branch if character is D to SOP and r2,r2,#0 add r2, r3,r0; compare input character to E brnp start; branch back to start if character is neither D or E soop out lea r0, mess2 puts loop getc out and r1,r1,#0 ld r1, enter add r1,r1,r0; comparing non shifted value to enter brz all; if not enter encrypt and r2,r2,#0 and r1,r1,#0 and r3,r3,#0 and r4,r4,#0 ld r1, NUM1; 1f ld r3, NUM2; e0 and r6,r6,#0; set counter for the rotation add r6,r6,#3; set counter " " and r2,r0,r1; r2 contains last 5bits and r3,r0,r3; r3 contains first 3bits OP ld r4, NUM3; 20 add r2,r2,r2; rotation of bits and r4,r2,r4; check to see if 6th bit is pos or zer brnz NEXT and r2,r2,r1 add r2,r2,#1; increment 1 to 5bit value
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 2

306assignment3 - .orig x3000 lea r0, mess1 puts ld r1,...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online