         Edinburgh IMP77 Compiler - Version 8.4
    1 ! Code to test %string
		.Ltext0:
				.align	2
		TEST.7690:
		.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:
				mov	x16, 5200
				sub	sp, sp, x16
				stp	x29, x30, [sp]
				add	x29, sp, 0
				stp	x19, x20, [sp, 16]
				stp	x21, x22, [sp, 32]
				str	x23, [sp, 48]
				adrp	x2, :got:__stack_chk_guard
				ldr	x2, [x2, #:got_lo12:__stack_chk_guard]
				ldr	x3, [x2]
				str	x3, [x29, 5192]
				mov	x3,0
    5
				bl	_imp_initialise
		.LVL8:
		.LBB52:
    6   %routine test(%name param)         ;! ia1          ia2
		.LVL0:
				stp	x29, x30, [sp, -16]!
				add	x29, sp, 0
    7     write(addr(param),0)  ; newline  ;! 2145833816   2145833816
				mov	w1, 0
				bl	_imp_writelong
		.LVL1:
		.LBB46:
		.LBB47:
				bl	_imp_newline
		.LVL2:
		.LBE47:
		.LBE46:
    8     write(sizeof(param),0); newline  ;! 32           8
				mov	w1, 0
				mov	x0, 16
				bl	_imp_writelong
		.LVL3:
		.LBB48:
		.LBB49:
				bl	_imp_newline
		.LVL4:
		.LBE49:
		.LBE48:
    9     write(typeof(param),0); newline  ;! 3            3
				mov	w1, 0
				mov	w0, 4
				bl	_imp_writeint
		.LVL5:
		.LBB50:
		.LBB51:
				bl	_imp_newline
		.LVL6:
		.LBE51:
		.LBE50:
   10   %end
   11
				ldp	x29, x30, [sp], 16
				ret
		.LFE186:
				.align	2
				.global	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
				adrp	x23, .LANCHOR0
				add	x23, x23, :lo12:.LANCHOR0
				add	x19, x29, 2120
				mov	x20, 256
				mov	x2, x20
				mov	x1, x23
				mov	x0, x19
				bl	memcpy
		.LVL9:
				add	x21, x29, 328
				mov	x2, x20
				mov	x1, x19
				mov	x0, x21
				bl	memcpy
		.LVL10:
				add	x22, x29, 1096
				mov	x2, x20
				mov	x1, x21
				mov	x0, x22
				bl	memcpy
		.LVL11:
		.LBE52:
		.LBB53:
		.LBB54:
				add	x21, x29, 64
				mov	x2, x20
				mov	x1, x22
				mov	x0, x21
				bl	memcpy
		.LVL12:
				mov	x0, x21
				bl	_imp_printstring
		.LVL13:
		.LBE54:
		.LBE53:
		.LBB55:
		.LBB56:
				bl	_imp_newline
		.LVL14:
		.LBE56:
		.LBE55:
   16   write(addr(ia1),0); newline     ;! 2145833816
				add	x22, x29, 1352
				mov	w1, 0
				mov	x0, x22
				bl	_imp_writelong
		.LVL15:
		.LBB57:
		.LBB58:
				bl	_imp_newline
		.LVL16:
		.LBE58:
		.LBE57:
   17   write(addr(ia1(3)),0); newline  ;! 2145833612
				mov	w1, 0
				mov	x0, x22
				bl	_imp_writelong
		.LVL17:
		.LBB59:
		.LBB60:
				bl	_imp_newline
		.LVL18:
		.LBE60:
		.LBE59:
   18   write(sizeof(ia1),0); newline   ;! 32
				mov	w1, 0
				mov	x0, x20
				bl	_imp_writelong
		.LVL19:
		.LBB61:
		.LBB62:
				bl	_imp_newline
		.LVL20:
		.LBE62:
		.LBE61:
   19   write(typeof(ia1),0); newline   ;! 3
				mov	w1, 0
				mov	w0, 4
				bl	_imp_writeint
		.LVL21:
		.LBB63:
		.LBB64:
				bl	_imp_newline
		.LVL22:
		.LBE64:
		.LBE63:
   20   test(ia1)
				mov	x0, x22
				bl	TEST.7690
		.LVL23:
		.LBB65:
   21
   22   printstring( "Testing ia2"); newline
				mov	x2, x20
				add	x1, x23, x20
				mov	x0, x19
				bl	memcpy
		.LVL24:
				add	x23, x29, 584
				mov	x2, x20
				mov	x1, x19
				mov	x0, x23
				bl	memcpy
		.LVL25:
				add	x22, x29, 840
				mov	x2, x20
				mov	x1, x23
				mov	x0, x22
				bl	memcpy
		.LVL26:
		.LBE65:
		.LBB66:
		.LBB67:
				mov	x2, x20
				mov	x1, x22
				mov	x0, x21
				bl	memcpy
		.LVL27:
				mov	x0, x21
				bl	_imp_printstring
		.LVL28:
		.LBE67:
		.LBE66:
		.LBB68:
		.LBB69:
				bl	_imp_newline
		.LVL29:
		.LBE69:
		.LBE68:
   23   write(addr(ia2),0); newline      ;! 2145833816   again same as ia1
				mov	w1, 0
				mov	x0, x19
				bl	_imp_writelong
		.LVL30:
		.LBB70:
		.LBB71:
				bl	_imp_newline
		.LVL31:
		.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	w1, 0
				mov	x0, x19
				bl	_imp_writelong
		.LVL32:
		.LBB72:
		.LBB73:
				bl	_imp_newline
		.LVL33:
		.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	w1, 0
				mov	x0, 1024
				bl	_imp_writelong
		.LVL34:
		.LBB74:
		.LBB75:
				bl	_imp_newline
		.LVL35:
		.LBE75:
		.LBE74:
   27   write(typeof(ia2),0); newline    ;! 3
				mov	w1, 0
				mov	w0, 4
				bl	_imp_writeint
		.LVL36:
		.LBB76:
		.LBB77:
				bl	_imp_newline
		.LVL37:
		.LBE77:
		.LBE76:
   28   test(ia2)
				mov	x0, x19
				bl	TEST.7690
		.LVL38:
		.LBB78:
		.LBB79:
				mov	w0, 0
				bl	exit
		.LVL39:
		.LBE79:
		.LBE78:
		.LFE185:
				.section	.rodata
				.align	3
				.set	.LANCHOR0,. + 0
		.LC0:
				.byte	11
				.string	"Testing ia1"
				.zero	243
		.LC1:
				.byte	11
				.string	"Testing ia2"
				.zero	243
		.Letext0:
   29
   30 %endofprogram
   34 Statements compiled
