Task

Write a program that prints the integers from   1   to   100   (inclusive).



But:

   for multiples of three,   print   Fizz     (instead of the number)
   for multiples of five,   print   Buzz     (instead of the number)
   for multiples of both three and five,   print   FizzBuzz     (instead of the number) 


The   FizzBuzz   problem was presented as the lowest level of comprehension required to illustrate adequacy.



Also see

   (a blog)   dont-overthink-fizzbuzz
   (a blog)   fizzbuzz-the-programmers-stairway-to-heaven


                           00000008  0000     1 len	=8
                           00000008  0000     2 msg:	.blkb	len			;output buffer
                           0000000C  0008     3 desc:	.blkl	1			;descriptor lenght field
                           00000000' 000C     4 	.address msg			;pointer to buffer
                           00000012  0010     5 outlen:	.blkw	1
         4C 55 21 0000001A'010E0000' 0012     6 ctr:	.ascid	"!UL"
                                     001D     7 
                               0000  001D     8 .entry	start,0
                            52   7C  001F     9 	clrq	r2			;r2+r3 64bit
                            52   D6  0021    10 	incl	r2			;start index 1
                                     0023    11 loop:
                         E2 AF   B4  0023    12 	clrw	desc			;assume not fizz and or buzz
                    55   D7 AF   9E  0026    13 	movab	msg, r5			;pointer to message buffer
             54   50   52   03   7B  002A    14 	ediv	#3,r2,r0,r4		;divr.rl,divd.rq,quo.wl,rem.wl
                            54   D5  002F    15 	tstl	r4			;remainder
                            0B   12  0031    16 	bneq	not_fizz		;not equal zero
                                     0033    17 
              85   7A7A6966 8F   D0  0033    18 	movl	#^a"fizz", (r5)+	;add to message
                    CA AF   04   A0  003A    19 	addw2	#4, desc		;and update length
                                     003E    20 not_fizz:
             54   50   52   05   7B  003E    21 	ediv	#5,r2,r0,r4
                            54   D5  0043    22 	tstl	r4
                            0B   12  0045    23 	bneq	not_buzz
                                     0047    24 
              85   7A7A7562 8F   D0  0047    25 	movl	#^a"buzz", (r5)+
                    B6 AF   04   A0  004E    26 	addw2	#4, desc
                                     0052    27 not_buzz:
                         B3 AF   B5  0052    28 	tstw	desc			;fizz and or buzz?
                            1B   12  0055    29 	bneq	show_buffer		;neq - yes
                                     0057    30 
                    AD AF   08   B0  0057    31 	movw	#len, desc		;fao length limit
                                     005B    32 	$fao_s -			;eql -no
                                     005B    33 		 ctrstr = ctr, -	;show number
                                     005B    34 		 outlen = outlen, -
                                     005B    35 		 outbuf = desc, -
                                     005B    36 		 p1     = r2
                 96 AF   A0 AF   B0  006D    37 	movw	outlen, desc		;characters filled by fao
                                     0072    38 show_buffer:
                         93 AF   7F  0072    39 	pushaq	desc
              00000000'GF   01   FB  0075    40 	calls	#1, g^lib$put_output
           9F 52   00000064 8F   F3  007C    41 	AOBLEQ	#100,r2,loop		;limit.rl, index.ml
                                 04  0084    42 	ret
                                     0085    43 .end	start