
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Material Type: Assignment; Class: Computer Organization; Subject: Computer Science; University: Columbus State University; Term: Summer 2005;
Typology: Assignments
1 / 1
This page cannot be seen from the preview
Don't miss anything!

/ Example 4. ORG 100 Load X / Load the first number to be doubled. Store Temp / Use Temp as a parameter to pass value to Subr. JnS Subr / Store the return address, and jump to the procedure. Store X / Store the first number, doubled Load Y / Load the second number to be doubled. Store Temp JnS Subr / Store the return address and jump to the procedure. Loop, Store Y / Store the second number doubled. Halt / End program. X, DEC 20 Y, DEC 48 Temp, DEC 0 Subr, HEX 0 / Store return address here. Clear / Clear AC as it was modified by JnS. Load Temp / Actual subroutine to double numbers. Add Temp / AC now holds double the value of Temp. JumpI Subr / Return to calling code. END