         Edinburgh IMP77 Compiler - Version 8.4
    1 ! Code to test %string
				.section	".text"
		.Ltext0:
				.align 4
				.proc	020
		TEST.6057:
		.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
				.register	%g7, #ignore
		.LVL8:
				save	%sp, -4096, %sp
		.LVL9:
				add	%sp, -1216, %sp
				ldx	[%g7+40], %g1
				stx	%g1, [%fp+2039]
				mov	0, %g1
    5
				mov	%i1, %o1
				call	_imp_initialise, 0
				 mov	%i0, %o0
		.LVL10:
		.LBB52:
    6   %routine test(%name param)         ;! ia1          ia2
		.LVL0:
				save	%sp, -176, %sp
		.LVL1:
    7     write(addr(param),0)  ; newline  ;! 2145833816   2145833816
				mov	0, %o1
				call	_imp_writelong, 0
				 mov	%i0, %o0
		.LVL2:
		.LBB46:
		.LBB47:
				call	_imp_newline, 0
				 nop
		.LVL3:
		.LBE47:
		.LBE46:
    8     write(sizeof(param),0); newline  ;! 32           8
				mov	0, %o1
				call	_imp_writelong, 0
				 mov	16, %o0
		.LVL4:
		.LBB48:
		.LBB49:
				call	_imp_newline, 0
				 nop
		.LVL5:
		.LBE49:
		.LBE48:
    9     write(typeof(param),0); newline  ;! 3            3
				mov	0, %o1
				call	_imp_writeint, 0
				 mov	4, %o0
		.LVL6:
		.LBB50:
		.LBB51:
				call	_imp_newline, 0
				 nop
		.LVL7:
		.LBE51:
		.LBE50:
   10   %end
   11
				return	%i7+8
				 nop
		.LFE186:
				.section	".rodata"
		.LC0:
				.byte	11
				.asciz	"Testing ia1"
				.skip	243
		.LC1:
				.byte	11
				.asciz	"Testing ia2"
				.skip	243
				.section	".text"
				.align 4
				.global main
				.proc	04
		main:
		.LFB185:
   12   %string(31)%array ia1(3:5)
   13   %string(7)%array ia2(2:4,3:6)
   14
   15   printstring( "Testing ia1"); newline
				mov	256, %o2
				sethi	%hi(.LC0), %o1
				or	%o1, %lo(.LC0), %o1
				call	memcpy, 0
				 add	%fp, -1033, %o0
		.LVL11:
				sethi	%hi(4096), %i5
				xor	%i5, -776, %i4
				add	%fp, 2047, %g1
				add	%g1, %i4, %i4
				mov	256, %o2
				add	%fp, -1033, %o1
				call	memcpy, 0
				 mov	%i4, %o0
		.LVL12:
				xor	%i5, -8, %i3
				add	%fp, 2047, %g1
				add	%g1, %i3, %i3
				mov	256, %o2
				mov	%i4, %o1
				call	memcpy, 0
				 mov	%i3, %o0
		.LVL13:
		.LBE52:
		.LBB53:
		.LBB54:
				sethi	%hi(5120), %i4
				xor	%i4, -16, %i4
				add	%fp, 2047, %g1
				add	%g1, %i4, %i4
				mov	256, %o2
				mov	%i3, %o1
				call	memcpy, 0
				 mov	%i4, %o0
		.LVL14:
				call	_imp_printstring, 0
				 mov	%i4, %o0
		.LVL15:
		.LBE54:
		.LBE53:
		.LBB55:
		.LBB56:
				call	_imp_newline, 0
				 xor	%i5, -520, %i3
		.LVL16:
		.LBE56:
		.LBE55:
   16   write(addr(ia1),0); newline     ;! 2145833816
				mov	0, %o1
				call	_imp_writelong, 0
				 add	%fp, -1801, %o0
		.LVL17:
		.LBB57:
		.LBB58:
				call	_imp_newline, 0
				 xor	%i5, -264, %i5
		.LVL18:
		.LBE58:
		.LBE57:
   17   write(addr(ia1(3)),0); newline  ;! 2145833612
				mov	0, %o1
				call	_imp_writelong, 0
				 add	%fp, -1801, %o0
		.LVL19:
		.LBB59:
		.LBB60:
				call	_imp_newline, 0
				 nop
		.LVL20:
		.LBE60:
		.LBE59:
   18   write(sizeof(ia1),0); newline   ;! 32
				mov	0, %o1
				call	_imp_writelong, 0
				 mov	256, %o0
		.LVL21:
		.LBB61:
		.LBB62:
				call	_imp_newline, 0
				 nop
		.LVL22:
		.LBE62:
		.LBE61:
   19   write(typeof(ia1),0); newline   ;! 3
				mov	0, %o1
				call	_imp_writeint, 0
				 mov	4, %o0
		.LVL23:
		.LBB63:
		.LBB64:
				call	_imp_newline, 0
				 nop
		.LVL24:
		.LBE64:
		.LBE63:
   20   test(ia1)
				call	TEST.6057, 0
				 add	%fp, -1801, %o0
		.LVL25:
		.LBB65:
   21
   22   printstring( "Testing ia2"); newline
				mov	256, %o2
				sethi	%hi(.LC1), %o1
				or	%o1, %lo(.LC1), %o1
				call	memcpy, 0
				 add	%fp, -1033, %o0
		.LVL26:
				add	%fp, 2047, %g1
				add	%g1, %i3, %i3
				mov	256, %o2
				add	%fp, -1033, %o1
				call	memcpy, 0
				 mov	%i3, %o0
		.LVL27:
				add	%fp, 2047, %g1
				add	%g1, %i5, %i5
				mov	256, %o2
				mov	%i3, %o1
				call	memcpy, 0
				 mov	%i5, %o0
		.LVL28:
		.LBE65:
		.LBB66:
		.LBB67:
				mov	256, %o2
				mov	%i5, %o1
				call	memcpy, 0
				 mov	%i4, %o0
		.LVL29:
				call	_imp_printstring, 0
				 mov	%i4, %o0
		.LVL30:
		.LBE67:
		.LBE66:
		.LBB68:
		.LBB69:
				call	_imp_newline, 0
				 nop
		.LVL31:
		.LBE69:
		.LBE68:
   23   write(addr(ia2),0); newline      ;! 2145833816   again same as ia1
				mov	0, %o1
				call	_imp_writelong, 0
				 add	%fp, -1033, %o0
		.LVL32:
		.LBB70:
		.LBB71:
				call	_imp_newline, 0
				 nop
		.LVL33:
		.LBE71:
		.LBE70:
   24   write(addr(ia2(2,3)),0); newline ;! 2145833708   96 bytes past address of first element of ia1, i.e. ia1(3)
				mov	0, %o1
				call	_imp_writelong, 0
				 add	%fp, -1033, %o0
		.LVL34:
		.LBB72:
		.LBB73:
				call	_imp_newline, 0
				 nop
		.LVL35:
		.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
				mov	0, %o1
				call	_imp_writelong, 0
				 mov	1024, %o0
		.LVL36:
		.LBB74:
		.LBB75:
				call	_imp_newline, 0
				 nop
		.LVL37:
		.LBE75:
		.LBE74:
   27   write(typeof(ia2),0); newline    ;! 3
				mov	0, %o1
				call	_imp_writeint, 0
				 mov	4, %o0
		.LVL38:
		.LBB76:
		.LBB77:
				call	_imp_newline, 0
				 nop
		.LVL39:
		.LBE77:
		.LBE76:
   28   test(ia2)
				call	TEST.6057, 0
				 add	%fp, -1033, %o0
		.LVL40:
		.LBB78:
		.LBB79:
				call	exit, 0
				 mov	0, %o0
		.LVL41:
		.LBE79:
		.LBE78:
				nop
		.LFE185:
		.Letext0:
   29
   30 %endofprogram
   34 Statements compiled
