         Edinburgh IMP77 Compiler - Version 8.4
    1 ! Code to test %string
				NO_APP
		.Ltext0:
				.align	2
		TEST.5987:
		.LFB186:
    2 ! Would be interesting to try %string(30) to test alignment
    3 ! Also similar test for %record (say 21 bytes per record?)
    4 %begin
		.LVL7:
		 		link.w %fp,#-4864
		 		movem.l #15420,-(%sp)
    5
		 		move.l 12(%fp),-(%sp)
		 		move.l 8(%fp),-(%sp)
		 		jsr _imp_initialise
		.LVL8:
		.LBB52:
    6   %routine test(%name param)         ;! ia1          ia2
		.LVL0:
		 		link.w %fp,#0
		 		move.l %a3,-(%sp)
		 		move.l %a2,-(%sp)
    7     write(addr(param),0)  ; newline  ;! 2145833816   2145833816
		 		clr.l -(%sp)
		 		move.l 8(%fp),-(%sp)
		 		lea _imp_writeint,%a3
		 		jsr (%a3)
		.LVL1:
		.LBB46:
		.LBB47:
		 		lea _imp_newline,%a2
		 		jsr (%a2)
		.LVL2:
		.LBE47:
		.LBE46:
    8     write(sizeof(param),0); newline  ;! 32           8
		 		clr.l -(%sp)
		 		pea 12.w
		 		jsr (%a3)
		.LVL3:
		.LBB48:
		.LBB49:
		 		jsr (%a2)
		.LVL4:
		.LBE49:
		.LBE48:
    9     write(typeof(param),0); newline  ;! 3            3
		 		clr.l -(%sp)
		 		pea 4.w
		 		jsr (%a3)
		.LVL5:
		.LBB50:
		.LBB51:
		 		jsr (%a2)
		.LVL6:
		.LBE51:
		.LBE50:
   10   %end
		 		lea (24,%sp),%sp
   11
		 		move.l -8(%fp),%a2
		 		move.l -4(%fp),%a3
		 		unlk %fp
		 		rts
		.LFE186:
				.section	.rodata
		.LC0:
		 		.byte	11
		 		.string	"Testing ia1"
		 		.zero	243
		.LC1:
		 		.byte	11
		 		.string	"Testing ia2"
		 		.zero	243
				.align	2
				.globl	main
		main:
		.LFB185:
   12   %string(31)%array ia1(3:5)
   13   %string(7)%array ia2(2:4,3:6)
   14
   15   printstring( "Testing ia1"); newline
		 		move.l %fp,%d3
		.LVL9:
		 		add.l #-4096,%d3
		.LVL10:
		 		move.l #256,%d2
		 		move.l %d2,-(%sp)
		 		pea .LC0
		 		move.l %d3,-(%sp)
		 		lea memcpy,%a4
		 		jsr (%a4)
		.LVL11:
		 		move.l %fp,%d4
		.LVL12:
		 		add.l #-4864,%d4
		.LVL13:
		 		move.l %d2,-(%sp)
		 		move.l %d3,-(%sp)
		 		move.l %d4,-(%sp)
		 		jsr (%a4)
		.LVL14:
		 		lea (32,%sp),%sp
		 		move.l %d2,-(%sp)
		 		move.l %d4,-(%sp)
		 		move.l %d3,-(%sp)
		 		jsr (%a4)
		.LVL15:
		.LBE52:
		.LBB53:
		.LBB54:
		 		lea (-256,%sp),%sp
		 		move.l %sp,%d0
		 		move.l %d2,-(%sp)
		 		move.l %d3,-(%sp)
		 		move.l %d0,-(%sp)
		 		jsr (%a4)
		.LVL16:
		 		lea (12,%sp),%sp
		 		move.l #_imp_printstring,%d4
		.LVL17:
		 		move.l %d4,%a0
		 		jsr (%a0)
		.LVL18:
		.LBE54:
		.LBE53:
		.LBB55:
		.LBB56:
		 		lea (268,%sp),%sp
		 		lea _imp_newline,%a2
		 		jsr (%a2)
		.LVL19:
		.LBE56:
		.LBE55:
   16   write(addr(ia1),0); newline     ;! 2145833816
		 		clr.l -(%sp)
		 		add.l #3328,%d3
		.LVL20:
		 		move.l %d3,-(%sp)
		 		lea _imp_writeint,%a3
		 		jsr (%a3)
		.LVL21:
		.LBB57:
		.LBB58:
		 		jsr (%a2)
		.LVL22:
		.LBE58:
		.LBE57:
   17   write(addr(ia1(3)),0); newline  ;! 2145833612
		 		clr.l -(%sp)
		 		move.l %d3,-(%sp)
		 		jsr (%a3)
		.LVL23:
		.LBB59:
		.LBB60:
		 		jsr (%a2)
		.LVL24:
		.LBE60:
		.LBE59:
   18   write(sizeof(ia1),0); newline   ;! 32
		 		clr.l -(%sp)
		 		move.l %d2,-(%sp)
		 		jsr (%a3)
		.LVL25:
		.LBB61:
		.LBB62:
		 		jsr (%a2)
		.LVL26:
		.LBE62:
		.LBE61:
   19   write(typeof(ia1),0); newline   ;! 3
		 		clr.l -(%sp)
		 		pea 4.w
		 		jsr (%a3)
		.LVL27:
		.LBB63:
		.LBB64:
		 		lea (32,%sp),%sp
		 		jsr (%a2)
		.LVL28:
		.LBE64:
		.LBE63:
   20   test(ia1)
		 		move.l %d3,-(%sp)
		 		lea TEST.5987,%a5
		 		jsr (%a5)
		.LVL29:
		.LBB65:
   21
   22   printstring( "Testing ia2"); newline
		 		add.l #-3584,%d3
		.LVL30:
		 		move.l %d2,-(%sp)
		 		pea .LC1
		 		move.l %d3,-(%sp)
		 		jsr (%a4)
		.LVL31:
		 		move.l %fp,%d5
		.LVL32:
		 		add.l #-4608,%d5
		.LVL33:
		 		move.l %d2,-(%sp)
		 		move.l %d3,-(%sp)
		 		move.l %d5,-(%sp)
		 		jsr (%a4)
		.LVL34:
		 		move.l %d2,-(%sp)
		 		move.l %d5,-(%sp)
		 		move.l %d3,-(%sp)
		 		jsr (%a4)
		.LVL35:
		.LBE65:
		.LBB66:
		.LBB67:
		 		lea (-216,%sp),%sp
		 		move.l %sp,%d0
		 		move.l %d2,-(%sp)
		 		move.l %d3,-(%sp)
		 		move.l %d0,-(%sp)
		 		jsr (%a4)
		.LVL36:
		 		lea (12,%sp),%sp
		 		move.l %d4,%a0
		 		jsr (%a0)
		.LVL37:
		.LBE67:
		.LBE66:
		.LBB68:
		.LBB69:
		 		add.l %d2,%sp
		 		jsr (%a2)
		.LVL38:
		.LBE69:
		.LBE68:
   23   write(addr(ia2),0); newline      ;! 2145833816   again same as ia1
		 		clr.l -(%sp)
		 		move.l %fp,%d2
		.LVL39:
		 		add.l #-3840,%d2
		.LVL40:
		 		move.l %d2,-(%sp)
		 		jsr (%a3)
		.LVL41:
		.LBB70:
		.LBB71:
		 		jsr (%a2)
		.LVL42:
		.LBE71:
		.LBE70:
   24   write(addr(ia2(2,3)),0); newline ;! 2145833708   96 bytes past address of first element of ia1, i.e. ia1(3)
		 		clr.l -(%sp)
		 		move.l %d2,-(%sp)
		 		jsr (%a3)
		.LVL43:
		.LBB72:
		.LBB73:
		 		jsr (%a2)
		.LVL44:
		.LBE73:
		.LBE72:
   25                                     !              i.e. 3 elements of 32 bytes (%string(31)), ie complete contents of array ia1
   26   write(sizeof(ia2),0); newline    ;! 8
		 		clr.l -(%sp)
		 		pea 1024.w
		 		jsr (%a3)
		.LVL45:
		.LBB74:
		.LBB75:
		 		jsr (%a2)
		.LVL46:
		.LBE75:
		.LBE74:
   27   write(typeof(ia2),0); newline    ;! 3
		 		clr.l -(%sp)
		 		pea 4.w
		 		jsr (%a3)
		.LVL47:
		.LBB76:
		.LBB77:
		 		lea (32,%sp),%sp
		 		jsr (%a2)
		.LVL48:
		.LBE77:
		.LBE76:
   28   test(ia2)
		 		move.l %d2,-(%sp)
		 		jsr (%a5)
		.LVL49:
		.LBB78:
		.LBB79:
		 		clr.l -(%sp)
		 		jsr exit
		.LVL50:
		.LBE79:
		.LBE78:
		.LFE185:
		.Letext0:
   29
   30 %endofprogram
   34 Statements compiled
