         Edinburgh IMP77 Compiler - Version 8.4
    1 %begin
				NO_APP
		.Ltext0:
				.section	.rodata
		.LC0:
		 		.byte	46
		 		.string	"Please enter the word BUG when I ask for data:"
		 		.zero	208
		.LC3:
		 		.byte	14
		 		.string	"Call returned "
		 		.zero	240
		.LC1:
		 		.byte	16
		 		.string	"Test successful."
		 		.zero	238
		.LC2:
		 		.byte	39
		 		.string	"Test failed - getchar was called twice."
		 		.zero	215
				.align	2
				.globl	main
		main:
		.LFB185:
		.LVL0:
		 		link.w %fp,#-2048
		 		movem.l #14392,-(%sp)
    2
		 		move.l 12(%fp),-(%sp)
		 		move.l 8(%fp),-(%sp)
		 		jsr _imp_initialise
		.LVL1:
		.LBB58:
    3   %integerfn getchar
    4     %integer sym
    5     readsymbol(sym)
    6     printstring("Call returned "); printsymbol(sym); newline
		 		add.l #768,%d3
		.LVL14:
		 		move.l %d2,-(%sp)
		 		pea .LC3
		 		move.l %d3,-(%sp)
		 		jsr (%a2)
		.LVL15:
		 		move.l %d2,-(%sp)
		 		move.l %d3,-(%sp)
		 		move.l %d4,-(%sp)
		 		jsr (%a2)
		.LVL16:
		 		move.l %d2,-(%sp)
		 		move.l %d4,-(%sp)
		 		move.l %d3,-(%sp)
		 		jsr (%a2)
		.LVL17:
		.LBE68:
		.LBB69:
		.LBB70:
		 		lea (-216,%sp),%sp
		 		move.l %sp,%d0
		 		move.l %d2,-(%sp)
		 		move.l %d3,-(%sp)
		 		move.l %d0,-(%sp)
		 		jsr (%a2)
		.LVL18:
		 		lea (12,%sp),%sp
		 		jsr (%a4)
		.LVL19:
		.LBE70:
		.LBE69:
		.LBB71:
		.LBB72:
		 		add.l %d2,%sp
		 		move.b -765(%fp),%d0
		 		extb.l %d0
		 		move.l %d0,-(%sp)
		 		jsr _imp_printsymbol
		.LVL20:
		.LBE72:
		.LBE71:
		.LBB73:
		.LBB74:
		 		jsr (%a3)
		.LVL21:
		.LBE74:
		.LBE73:
		.LBE65:
		.LBE64:
    7     %result = sym
    8   %end
    9
   10   printstring("Please enter the word BUG when I ask for data:"); newline
		 		move.l %fp,%d4
		.LVL2:
		 		add.l #-256,%d4
		.LVL3:
		 		move.l #256,%d2
		 		move.l %d2,-(%sp)
		 		pea .LC0
		 		move.l %d4,-(%sp)
		 		lea memcpy,%a2
		 		jsr (%a2)
		.LVL4:
		 		lea (-2048,%fp),%a3
		 		move.l %d2,-(%sp)
		 		move.l %d4,-(%sp)
		 		move.l %a3,-(%sp)
		 		jsr (%a2)
		.LVL5:
		 		move.l %fp,%d3
		.LVL6:
		 		add.l #-1280,%d3
		.LVL7:
		 		lea (32,%sp),%sp
		 		move.l %d2,-(%sp)
		 		move.l %a3,-(%sp)
		 		move.l %d3,-(%sp)
		 		jsr (%a2)
		.LVL8:
		.LBE58:
		.LBB59:
		.LBB60:
		 		lea (-256,%sp),%sp
		 		move.l %sp,%d0
		 		move.l %d2,-(%sp)
		 		move.l %d3,-(%sp)
		 		move.l %d0,-(%sp)
		 		jsr (%a2)
		.LVL9:
		 		lea (12,%sp),%sp
		 		lea _imp_printstring,%a4
		 		jsr (%a4)
		.LVL10:
		.LBE60:
		.LBE59:
		.LBB61:
		.LBB62:
		 		lea (268,%sp),%sp
		 		lea _imp_newline,%a3
		 		jsr (%a3)
		.LVL11:
		.LBE62:
		.LBE61:
		.LBB63:
		.LBB64:
		.LBB65:
		.LBB66:
		.LBB67:
		 		pea -768(%fp)
		.LVL12:
		 		jsr _imp_readsymbol
		.LVL13:
		.LBE67:
		.LBE66:
		.LBB68:
   11
   12   %if 'A' <= getchar <= 'C' %start
   13     printstring("Test successful."); newline
		 		add.l #-256,%d3
		.LVL22:
		 		move.l %d2,-(%sp)
		 		pea .LC1
		 		move.l %d3,-(%sp)
		 		jsr (%a2)
		.LVL23:
		 		add.l #-1536,%d4
		 		move.l %d2,-(%sp)
		 		move.l %d3,-(%sp)
		 		move.l %d4,-(%sp)
		 		jsr (%a2)
		.LVL24:
		 		add.l #-256,%d3
		.LVL25:
		 		move.l %d2,-(%sp)
		 		move.l %d4,-(%sp)
		 		move.l %d3,-(%sp)
		 		jsr (%a2)
		.LVL26:
		.LBE75:
		.LBB76:
		.LBB77:
		 		lea (-220,%sp),%sp
		 		move.l %sp,%d0
		 		move.l %d2,-(%sp)
		 		move.l %d3,-(%sp)
		 		move.l %d0,-(%sp)
		 		jsr (%a2)
		.LVL27:
		 		lea (12,%sp),%sp
		 		jsr _imp_printstring
		.LVL28:
		.LBE77:
		.LBE76:
		.LBB78:
		.LBB79:
		 		add.l %d2,%sp
		 		jsr _imp_newline
		.LVL29:
		 		jra .L3
		.LVL30:
		.L2:
		.LBE79:
		.LBE78:
		.LBB80:
		 		move.l %fp,%d2
		.LVL31:
		 		add.l #-768,%d2
		.LVL32:
		 		move.l #256,%d3
		 		move.l %d3,-(%sp)
		 		pea .LC2
		 		move.l %d2,-(%sp)
		 		lea memcpy,%a2
		 		jsr (%a2)
		.LVL33:
		 		move.l %fp,%d4
		.LVL34:
		 		add.l #-1536,%d4
		.LVL35:
		 		move.l %d3,-(%sp)
		 		move.l %d2,-(%sp)
		 		move.l %d4,-(%sp)
		 		jsr (%a2)
		.LVL36:
		 		move.l %d3,-(%sp)
		 		move.l %d4,-(%sp)
		 		move.l %d2,-(%sp)
		 		jsr (%a2)
		.LVL37:
		.LBE80:
		.LBB81:
		.LBB82:
		 		lea (-220,%sp),%sp
		 		move.l %sp,%d0
		 		move.l %d3,-(%sp)
		 		move.l %d2,-(%sp)
		 		move.l %d0,-(%sp)
		 		jsr (%a2)
		.LVL38:
		 		lea (12,%sp),%sp
		 		jsr _imp_printstring
		.LVL39:
		.LBE82:
		.LBE81:
		.LBB83:
		.LBB84:
		 		add.l %d3,%sp
		 		jsr _imp_newline
		.LVL40:
		.L3:
		.LBE84:
		.LBE83:
		.LBB85:
		.LBB86:
		 		clr.l -(%sp)
		 		jsr exit
		.LVL41:
		.LBE86:
		.LBE85:
		.LFE185:
		.Letext0:
   14   %else
   15     printstring("Test failed - getchar was called twice."); newline
		 		moveq #-65,%d0
		 		add.l -768(%fp),%d0
		 		addq.l #4,%sp
		 		moveq #2,%d1
		 		cmp.l %d0,%d1
		 		jcs .L2
		.LBE63:
		.LBB75:
   16   %finish
   17
   18 %endofprogram
   19 Statements compiled
