         Edinburgh IMP77 Compiler - Version 8.4
    1 %begin
				NO_APP
		.Ltext0:
				.section	.rodata
		.LC0:
		 		.byte	7
		 		.string	"TEST OK"
		 		.zero	247
				.align	2
				.globl	main
		main:
		.LFB185:
		.LVL0:
		 		link.w %fp,#-512
		 		movem.l #14368,-(%sp)
    2 %externalroutinespec phex %alias "s_phex" (%integer x)
		 		move.l 12(%fp),-(%sp)
		 		move.l 8(%fp),-(%sp)
		 		jsr _imp_initialise
		.LVL1:
		 		addq.l #8,%sp
		 		moveq #41,%d0
		.LVL2:
		.L2:
		.LDL1:
		.LDL2:
		.LDL3:
		.LDL4:
		.LDL5:
		.LDL6:
		 		subq.l #1,%d0
		.LVL3:
    3 %integer i,j,k,corr,fail
    4 %integerfn div(%integer x,y)
    5 %result=x//y
    6 %end
    7 fail=0
    8 %for k=20,-1,-20%cycle
    9       %if k//2#div(k,2) %then fail=1
   10       %if k//4#div(k,4) %then fail=1
   11       %if k//8#div(k,8) %then fail=1
		 		jne .L2
		.L3:
		.LBB32:
   12       %if k//16#div(k,16) %then fail=1
   13       %if k//1#div(k,1) %then fail=1
   14 %repeat
   15 %if fail=0 %then printstring("TEST OK") %else printstring("Divide in error")
   16 newline
		 		move.l %fp,%d2
		.LVL4:
		 		add.l #-256,%d2
		.LVL5:
		 		move.l #256,%d3
		 		move.l %d3,-(%sp)
		 		pea .LC0
		 		move.l %d2,-(%sp)
		 		lea memcpy,%a2
		 		jsr (%a2)
		.LVL6:
		 		move.l %fp,%d4
		.LVL7:
		 		add.l #-512,%d4
		.LVL8:
		 		move.l %d3,-(%sp)
		 		move.l %d2,-(%sp)
		 		move.l %d4,-(%sp)
		 		jsr (%a2)
		.LVL9:
		 		move.l %d3,-(%sp)
		 		move.l %d4,-(%sp)
		 		move.l %d2,-(%sp)
		 		jsr (%a2)
		.LVL10:
		.LBE32:
		.LBB33:
		.LBB34:
		 		lea (-220,%sp),%sp
		 		move.l %sp,%d0
		 		move.l %d3,-(%sp)
		 		move.l %d2,-(%sp)
		 		move.l %d0,-(%sp)
		 		jsr (%a2)
		.LVL11:
		 		lea (12,%sp),%sp
		 		jsr _imp_printstring
		.LVL12:
		.LDL7:
		.LBE34:
		.LBE33:
		.LBB35:
		.LBB36:
		 		add.l %d3,%sp
		 		jsr _imp_newline
		.LVL13:
		.LBE36:
		.LBE35:
		.LBB37:
		.LBB38:
		 		clr.l -(%sp)
		 		jsr exit
		.LVL14:
		.LBE38:
		.LBE37:
		.LFE185:
		.Letext0:
   17 %endofprogram
?CORR unused
?J unused
?I unused
?PHEX unused
   17 Statements compiled
