         Edinburgh IMP77 Compiler - Version 8.4
    1 ! Code to test %string
		.Ltext0:
		TEST.6388:
		.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:
				pushq	%rbp
				pushq	%rbx
				subq	$4888, %rsp
				movq	%fs:40, %rax
				movq	%rax, 4872(%rsp)
				xorl	%eax, %eax
    5
				call	_imp_initialise@PLT
		.LVL8:
		.LBB52:
    6   %routine test(%name param)         ;! ia1          ia2
		.LVL0:
				subq	$8, %rsp
    7     write(addr(param),0)  ; newline  ;! 2145833816   2145833816
				movl	$0, %esi
				call	_imp_writelong@PLT
		.LVL1:
		.LBB46:
		.LBB47:
				call	_imp_newline@PLT
		.LVL2:
		.LBE47:
		.LBE46:
    8     write(sizeof(param),0); newline  ;! 32           8
				movl	$0, %esi
				movl	$16, %edi
				call	_imp_writelong@PLT
		.LVL3:
		.LBB48:
		.LBB49:
				call	_imp_newline@PLT
		.LVL4:
		.LBE49:
		.LBE48:
    9     write(typeof(param),0); newline  ;! 3            3
				movl	$0, %esi
				movl	$4, %edi
				call	_imp_writeint@PLT
		.LVL5:
		.LBB50:
		.LBB51:
				call	_imp_newline@PLT
		.LVL6:
		.LBE51:
		.LBE50:
   10   %end
   11
				addq	$8, %rsp
				ret
		.LFE186:
				.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
				movabsq	$2334956331019232596, %rax
				movl	$3236201, %edx
				movq	%rax, 1793(%rsp)
				movq	%rdx, 1801(%rsp)
				movl	$0, %ebp
				movb	$0, 1809(%rsp)
				movw	$0, 1810(%rsp)
				movl	$0, 1812(%rsp)
				leaq	1816(%rsp), %rdi
				movl	$29, %ecx
				movq	%rbp, %rax
				rep stosq
				movb	$11, 1792(%rsp)
				movq	1792(%rsp), %rax
				movq	1800(%rsp), %rdx
				movq	%rax, (%rsp)
				movq	%rdx, 8(%rsp)
		.LVL9:
				movb	$11, (%rsp)
		.LBE52:
		.LBB53:
		.LBB54:
				pushq	2040(%rsp)
				pushq	2040(%rsp)
				pushq	2040(%rsp)
				pushq	2040(%rsp)
				pushq	2040(%rsp)
				pushq	2040(%rsp)
				pushq	2040(%rsp)
				pushq	2040(%rsp)
				pushq	2040(%rsp)
				pushq	2040(%rsp)
				pushq	2040(%rsp)
				pushq	2040(%rsp)
				pushq	2040(%rsp)
				pushq	2040(%rsp)
				pushq	2040(%rsp)
				pushq	2040(%rsp)
				pushq	2040(%rsp)
				pushq	2040(%rsp)
				pushq	2040(%rsp)
				pushq	2040(%rsp)
				pushq	2040(%rsp)
				pushq	2040(%rsp)
				pushq	2040(%rsp)
				pushq	2040(%rsp)
				pushq	2040(%rsp)
				pushq	2040(%rsp)
				pushq	2040(%rsp)
				pushq	2040(%rsp)
				pushq	2040(%rsp)
				pushq	2040(%rsp)
				pushq	248(%rsp)
				pushq	248(%rsp)
				call	_imp_printstring@PLT
		.LVL10:
		.LBE54:
		.LBE53:
		.LBB55:
		.LBB56:
				addq	$256, %rsp
				call	_imp_newline@PLT
		.LVL11:
		.LBE56:
		.LBE55:
   16   write(addr(ia1),0); newline     ;! 2145833816
				leaq	1024(%rsp), %rbx
				movl	$0, %esi
				movq	%rbx, %rdi
				call	_imp_writelong@PLT
		.LVL12:
		.LBB57:
		.LBB58:
				call	_imp_newline@PLT
		.LVL13:
		.LBE58:
		.LBE57:
   17   write(addr(ia1(3)),0); newline  ;! 2145833612
				movl	$0, %esi
				movq	%rbx, %rdi
				call	_imp_writelong@PLT
		.LVL14:
		.LBB59:
		.LBB60:
				call	_imp_newline@PLT
		.LVL15:
		.LBE60:
		.LBE59:
   18   write(sizeof(ia1),0); newline   ;! 32
				movl	$0, %esi
				movl	$256, %edi
				call	_imp_writelong@PLT
		.LVL16:
		.LBB61:
		.LBB62:
				call	_imp_newline@PLT
		.LVL17:
		.LBE62:
		.LBE61:
   19   write(typeof(ia1),0); newline   ;! 3
				movl	$0, %esi
				movl	$4, %edi
				call	_imp_writeint@PLT
		.LVL18:
		.LBB63:
		.LBB64:
				call	_imp_newline@PLT
		.LVL19:
		.LBE64:
		.LBE63:
   20   test(ia1)
				movq	%rbx, %rdi
				call	TEST.6388
		.LVL20:
		.LBB65:
   21
   22   printstring( "Testing ia2"); newline
				movabsq	$2334956331019232596, %rax
				movl	$3301737, %edx
				movq	%rax, 1793(%rsp)
				movq	%rdx, 1801(%rsp)
				movb	$0, 1809(%rsp)
				movw	$0, 1810(%rsp)
				movl	$0, 1812(%rsp)
				leaq	1816(%rsp), %rdi
				movl	$29, %ecx
				movq	%rbp, %rax
				rep stosq
				movb	$11, 1792(%rsp)
				movq	1792(%rsp), %rax
				movq	1800(%rsp), %rdx
				movq	%rax, 256(%rsp)
				movq	%rdx, 264(%rsp)
		.LVL21:
				movb	$11, 256(%rsp)
		.LBE65:
		.LBB66:
		.LBB67:
				pushq	2040(%rsp)
				pushq	2040(%rsp)
				pushq	2040(%rsp)
				pushq	2040(%rsp)
				pushq	2040(%rsp)
				pushq	2040(%rsp)
				pushq	2040(%rsp)
				pushq	2040(%rsp)
				pushq	2040(%rsp)
				pushq	2040(%rsp)
				pushq	2040(%rsp)
				pushq	2040(%rsp)
				pushq	2040(%rsp)
				pushq	2040(%rsp)
				pushq	2040(%rsp)
				pushq	2040(%rsp)
				pushq	2040(%rsp)
				pushq	2040(%rsp)
				pushq	2040(%rsp)
				pushq	2040(%rsp)
				pushq	2040(%rsp)
				pushq	2040(%rsp)
				pushq	2040(%rsp)
				pushq	2040(%rsp)
				pushq	2040(%rsp)
				pushq	2040(%rsp)
				pushq	2040(%rsp)
				pushq	2040(%rsp)
				pushq	2040(%rsp)
				pushq	2040(%rsp)
				pushq	504(%rsp)
				pushq	504(%rsp)
				call	_imp_printstring@PLT
		.LVL22:
		.LBE67:
		.LBE66:
		.LBB68:
		.LBB69:
				addq	$256, %rsp
				call	_imp_newline@PLT
		.LVL23:
		.LBE69:
		.LBE68:
   23   write(addr(ia2),0); newline      ;! 2145833816   again same as ia1
				leaq	1792(%rsp), %rbx
				movl	$0, %esi
				movq	%rbx, %rdi
				call	_imp_writelong@PLT
		.LVL24:
		.LBB70:
		.LBB71:
				call	_imp_newline@PLT
		.LVL25:
		.LBE71:
		.LBE70:
   24   write(addr(ia2(2,3)),0); newline ;! 2145833708   96 bytes past address of first element of ia1, i.e. ia1(3)
				movl	$0, %esi
				movq	%rbx, %rdi
				call	_imp_writelong@PLT
		.LVL26:
		.LBB72:
		.LBB73:
				call	_imp_newline@PLT
		.LVL27:
		.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
				movl	$0, %esi
				movl	$1024, %edi
				call	_imp_writelong@PLT
		.LVL28:
		.LBB74:
		.LBB75:
				call	_imp_newline@PLT
		.LVL29:
		.LBE75:
		.LBE74:
   27   write(typeof(ia2),0); newline    ;! 3
				movl	$0, %esi
				movl	$4, %edi
				call	_imp_writeint@PLT
		.LVL30:
		.LBB76:
		.LBB77:
				call	_imp_newline@PLT
		.LVL31:
		.LBE77:
		.LBE76:
   28   test(ia2)
				movq	%rbx, %rdi
				call	TEST.6388
		.LVL32:
		.LBB78:
		.LBB79:
				movl	$0, %edi
				call	exit@PLT
		.LVL33:
		.LBE79:
		.LBE78:
		.LFE185:
		.Letext0:
   29
   30 %endofprogram
   34 Statements compiled
