         Edinburgh IMP77 Compiler - Version 8.4
    1 %begin
				.option nopic
		.Ltext0:
				.align	1
				.globl	main
		main:
		.LFB185:
		.LVL0:
				add	sp,sp,-1568
				sd	ra,1560(sp)
				lui	a5,%hi(__stack_chk_guard)
				ld	a5,%lo(__stack_chk_guard)(a5)
				sd	a5,1544(sp)
    2
				call	_imp_initialise
		.LVL1:
    3   ! %prim     %byte %integer  %map  %spec   charno( %string(255) s,%integer n )
    4
    5   %byteintegermap my charno(%string(255) s, %integer n)
    6     %result == BYTEINTEGER(ADDR(s)+n)
    7   %end
    8
    9   %string(255) string = "00"
   10
   11   my charno(string,1) = '1'   ;! <-- does not affect string
   12   charno(string, 2) = '2'     ;! <-- *does* modify string even though the prim
				li	a2,255
				add	a1,sp,520
				add	a0,sp,264
				call	_imp_strncpy
		.LVL2:
				li	a5,50
				sb	a5,266(sp)
				li	a2,256
				add	a1,sp,776
				add	a0,sp,1032
				call	memcpy
		.LVL3:
		.LBB33:
		.LBB34:
				li	a2,256
				add	a1,sp,1032
				mv	a0,sp
				call	memcpy
		.LVL4:
				mv	a0,sp
				call	_imp_printstring
		.LVL5:
		.LBE34:
		.LBE33:
		.LBB35:
		.LBB36:
				call	_imp_newline
		.LVL6:
		.LBE36:
		.LBE35:
		.LBB37:
		.LBB38:
				li	a0,0
				call	exit
		.LVL7:
		.LBE38:
		.LBE37:
		.LFE185:
		.Letext0:
   13                                !     declaration is the same as my local one.
   14
   15   printstring(string); newline  ;! This outputs: 02
				li	a5,49
				sb	a5,1289(sp)
   16
   17 %endofprogram
   10 Statements compiled
