.LIST TTM .TITLE ODT1 ; ; The following programs are used in the RT-11 User and RT-11 ; Programmer self paced instruction courses for RT-11 V4.They are also ; similar to programs used in the Programming with RT-11 series for ; RT-11 V5.0 or later. The name of the files are as specified in the ; self paced course. ; ; The code is supplied as a service as Digital does not supply these ; on diskette. ; Any copyright is the property of Digital Equipment Corporartion ; ;PROGRAM TO MULTIPLY TWO ;INTEGERS TOGETHER BY REPEATED ;ADDITION. ;RO HOLDS PRODUCT ;R1 HOLDS MULTIPLICAND ;R2 HOLDS MULTIPLIER (COUNTER) .GLOBL START ;MAKE ENTRY POINT GLOBAL ;SO ADDRESS IS PRINTED IN LOAD MAP START: CLR R0 ;CLEAR RESULT REGISTER MOV #4,R1 ;LET'S TRY MULTIPLYING 4 BY 2 MOV #2,R2 ;MULTIPLIER LOOP: ADD R1,R0 ;ADD NEXT TERM DEC R2 ;DONE? BNE LOOP ;IF NOT, LOOP .END START .LIST TTM .TITLE ODTST .GLOBL ST ST: MOV #1,COUNT MOV #5,SUBT LOOP: SUB COUNT,SUBT BR LOOP COUNT: .WORD 0 SUBT: .WORD 0 .END ST