         Edinburgh IMP77 Compiler - Version 8.4
    1
				NO_APP
		.Ltext0:
				.align	2
		_imp_SQRT:
		.LFB61:
		.LVL0:
		 		link.w %fp,#0
		 		fmovem #4,-(%sp)
		 		fmove.d 8(%fp),%fp0
		 		fsqrt.x %fp0,%fp2
		 		ftst.x %fp0
		 		fjolt .L3
		.L1:
		 		fmove.x %fp2,%fp0
		 		fmovem -12(%fp),#32
		 		unlk %fp
		 		rts
		.L3:
		 		fmove.d %fp0,-(%sp)
		 		jsr sqrt
		.LVL1:
		 		addq.l #8,%sp
		 		jra .L1
		.LFE61:
				.align	2
		_imp_SIN:
		.LFB42:
		.LVL2:
		 		link.w %fp,#0
		 		move.l 12(%fp),-(%sp)
		 		move.l 8(%fp),-(%sp)
		 		jsr sin
		.LVL3:
		 		addq.l #8,%sp
		 		unlk %fp
		 		rts
		.LFE42:
				.section	.rodata.str1.1,"aMS",@progbits,1
		.LC3:
		 		.string	"Illegal cycle I = 0, 1, STEPS"
				.section	.rodata
		.LC2:
		 		.byte	17
		 		.string	"test-new/rt28.imp"
		 		.zero	237
				.align	2
		TABULATE.5991:
		.LFB186:
    2 %begin
		.LVL30:
		 		link.w %fp,#-1024
		 		movem.l #14392,-(%sp)
    3 %routine Tabulate (%longrealfn func(%longreal x),%longreal from,to,
		.LVL4:
		 		link.w %fp,#-768
		 		fmovem #4,-(%sp)
		 		movem.l #15928,-(%sp)
		 		move.l 8(%fp),%a4
		 		fmove.d 12(%fp),%fp2
		 		move.l 28(%fp),%d3
		 		move.l 12(%fp),-(%sp)
		 		move.l 8(%fp),-(%sp)
		 		jsr _imp_initialise
		.LVL31:
		.LBB34:
    4    %integer steps)
    5 ! func(x) is the dummy formal function
    6 %real value,inc
    7 %integer i
    8 !
    9 inc=(to-from)/steps
		 		fmove.d 20(%fp),%fp0
		 		fsub.x %fp2,%fp0
		 		fdiv.l %d3,%fp0
		 		fmove.s %fp0,%d6
		.LVL5:
   10 !
   11 value=from
		 		fmove.s %fp2,%d0
		 		fmove.s %d0,%fp2
		.LVL6:
		.LBB21:
   12 %for i=0,1,steps %cycle
   13    print(value,4,2) ; print(func(value),10,4) ; newline
		 		fmove.d %fp2,-(%sp)
		 		move.l (%sp)+,%d4
		 		move.l (%sp)+,%d5
		.LVL10:
		.LBB28:
		.LBB24:
		 		pea 2.w
		 		pea 4.w
		 		move.l %d5,-(%sp)
		 		move.l %d4,-(%sp)
		 		jsr (%a2)
		.LVL11:
		.LBE24:
		.LBE28:
   14    value=value+inc
		 		tst.l %d3
		 		jlt .L14
		.LVL7:
		.L6:
		 		move.l %d5,-(%sp)
		 		move.l %d4,-(%sp)
		 		jsr (%a4)
		.LVL12:
		.LBB29:
		.LBB30:
		 		pea 4.w
		 		pea 10.w
		 		fmove.d %fp0,-(%sp)
		 		jsr (%a2)
		.LVL13:
		.LBE30:
		.LBE29:
		.LBB31:
		.LBB27:
		 		lea (40,%sp),%sp
		 		jsr (%a3)
		.LVL14:
		.LBE27:
		.LBE31:
		 		fadd.s %d6,%fp2
		.LVL15:
		 		pea .LC3
		 		lea (-512,%fp),%a1
		 		jsr _imp_c2istr
		.LVL20:
		 		move.l _imp_current_line,%d2
		 		addq.l #4,%sp
		 		jne .L7
		 		moveq #14,%d2
		.L7:
		 		move.l _imp_current_file,%d0
		 		jeq .L8
		 		move.l %d0,-(%sp)
		 		lea (-256,%fp),%a1
		 		jsr _imp_c2istr
		.LVL21:
		 		addq.l #4,%sp
		.L9:
		 		clr.l -(%sp)
		 		pea 1.w
		 		pea 5.w
		 		lea (-256,%sp),%sp
		 		move.l %sp,%d0
		 		move.l #256,%d4
		 		move.l %d4,-(%sp)
		 		pea -512(%fp)
		 		move.l %d0,-(%sp)
		 		lea memcpy,%a2
		 		jsr (%a2)
		.LVL22:
		 		lea (12,%sp),%sp
		 		move.l %d2,-(%sp)
		 		lea (-256,%sp),%sp
		 		move.l %sp,%d0
		 		move.l %d4,-(%sp)
		 		pea -256(%fp)
		 		move.l %d0,-(%sp)
		 		jsr (%a2)
		.LVL23:
		 		lea (12,%sp),%sp
		 		jsr _signal_event
		.LVL24:
		 		lea (528,%sp),%sp
		 		jra .L6
		.L8:
		.LBB32:
		 		move.l %fp,%d4
		.LVL25:
		 		add.l #-256,%d4
		.LVL26:
		 		move.l #256,%d5
		 		move.l %d5,-(%sp)
		 		pea .LC2
		 		move.l %d4,-(%sp)
		 		lea memcpy,%a2
		 		jsr (%a2)
		.LVL27:
		 		lea (-768,%fp),%a3
		 		move.l %d5,-(%sp)
		 		move.l %d4,-(%sp)
		 		move.l %a3,-(%sp)
		 		jsr (%a2)
		.LVL28:
		.LBE32:
		 		move.l %d5,-(%sp)
		 		move.l %a3,-(%sp)
		 		move.l %d4,-(%sp)
		 		jsr (%a2)
		.LVL29:
		 		lea (36,%sp),%sp
		 		jra .L9
		.LBE33:
		.LFE186:
				.section	.rodata
		.LC0:
		 		.byte	29
		 		.string	"\n    x               sine(x)\n"
		 		.zero	225
		.LC1:
		 		.byte	29
		 		.string	"\n    x         squareroot(x)\n"
		 		.zero	225
				.align	2
				.globl	main
		main:
		.LFB185:
   15 %repeat
   16 %end ;!  of routine tabulate
   17 !
		 		moveq #-1,%d0
		 		cmp.l %d3,%d0
		 		jeq .L5
		 		moveq #-1,%d2
		.LBB22:
		.LBB23:
		 		lea _imp_print,%a2
		.LBE23:
		.LBE22:
		.LBB25:
		.LBB26:
		 		lea _imp_newline,%a3
		.LVL8:
		.L11:
		.LBE26:
		.LBE25:
		 		cmp.l %d3,%d2
		 		jne .L11
		.L10:
		.LVL16:
		.L5:
		.LBE21:
		 		movem.l -812(%fp),#7292
		.LVL17:
		 		fmovem -780(%fp),#32
		.LVL18:
		 		unlk %fp
		 		rts
		.LVL19:
		.L14:
		.LBB33:
   18 ! now call with some functions....
		 		addq.l #1,%d2
		.LVL9:
   19 printstring("
		 		move.l %fp,%d3
		.LVL32:
		 		add.l #-256,%d3
		.LVL33:
		 		move.l #256,%d2
		 		move.l %d2,-(%sp)
		 		pea .LC0
		 		move.l %d3,-(%sp)
		 		lea memcpy,%a2
		 		jsr (%a2)
		.LVL34:
		 		move.l %fp,%d4
		.LVL35:
		 		add.l #-1024,%d4
		.LVL36:
		 		move.l %d2,-(%sp)
		 		move.l %d3,-(%sp)
		 		move.l %d4,-(%sp)
		 		jsr (%a2)
		.LVL37:
		 		lea (32,%sp),%sp
		 		move.l %d2,-(%sp)
		 		move.l %d4,-(%sp)
		 		move.l %d3,-(%sp)
		 		jsr (%a2)
		.LVL38:
		.LBE34:
		.LBB35:
		.LBB36:
		 		lea (-256,%sp),%sp
		 		move.l %sp,%d0
		 		move.l %d2,-(%sp)
		 		move.l %d3,-(%sp)
		 		move.l %d0,-(%sp)
		 		jsr (%a2)
		.LVL39:
		 		lea (12,%sp),%sp
		 		lea _imp_printstring,%a4
		 		jsr (%a4)
		.LVL40:
		.LBE36:
		.LBE35:
   20     x               sine(x)
   21 ")
   22 tabulate ( sin, 0.0,pi/2,10)
		 		lea (268,%sp),%sp
		 		pea 10.w
		 		move.l #1413754136,-(%sp)
		 		move.l #1073291771,-(%sp)
		 		clr.l -(%sp)
		 		clr.l -(%sp)
		 		pea _imp_SIN
		 		lea TABULATE.5991,%a3
		 		jsr (%a3)
		.LVL41:
		.LBB37:
   23 ! note that the function name appears WITHOUT parameters in the call
   24 !
   25 printstring("
		 		add.l #-256,%d3
		 		move.l %d2,-(%sp)
		 		pea .LC1
		 		move.l %d3,-(%sp)
		 		jsr (%a2)
		.LVL42:
		 		add.l #256,%d4
		.LVL43:
		 		lea (36,%sp),%sp
		 		move.l %d2,-(%sp)
		 		move.l %d3,-(%sp)
		 		move.l %d4,-(%sp)
		 		jsr (%a2)
		.LVL44:
		 		move.l %d2,-(%sp)
		 		move.l %d4,-(%sp)
		 		move.l %d3,-(%sp)
		 		jsr (%a2)
		.LVL45:
		.LBE37:
		.LBB38:
		.LBB39:
		 		lea (-256,%sp),%sp
		 		move.l %sp,%d0
		 		move.l %d2,-(%sp)
		 		move.l %d3,-(%sp)
		 		move.l %d0,-(%sp)
		 		jsr (%a2)
		.LVL46:
		 		lea (12,%sp),%sp
		 		jsr (%a4)
		.LVL47:
		.LBE39:
		.LBE38:
   26     x         squareroot(x)
   27 ")
   28 tabulate( sqrt, 0.0,10.0,5)
		 		lea (280,%sp),%sp
		 		pea 5.w
		 		clr.l -(%sp)
		 		move.l #1076101120,-(%sp)
		 		clr.l -(%sp)
		 		clr.l -(%sp)
		 		pea _imp_SQRT
		 		jsr (%a3)
		.LVL48:
		.LBB40:
		.LBB41:
		 		clr.l -(%sp)
		 		jsr exit
		.LVL49:
		.LBE41:
		.LBE40:
		.LFE185:
		.Letext0:
   29 !
   30 %endofprogram
   18 Statements compiled
