Date: Tue, 11 Nov 1997 18:00:19 -0500 (EST)
To: yap@cs.nyu.edu
From: peterjr@interport.net (Peter Worth)
Subject: Assembly Program

It was good to meet with you today.  I will let you know of any further
developments.  By the by, here is some sample assembly code generated by the
GNAT Ada95 compiler on Windows NT 4.0:

Sample Ada95 program:

with Text_IO; use Text_IO;

procedure Hello is
begin
   Put_Line ("Hello WORLD!");
end Hello;

Assembly code generated from the gcc -S hello.adb command:

	.file	"hello.adb"
/ GNU Ada version 2.7.2 (i586-pc-mingw32) compiled by GNU C version 2.7.2.
/ options passed: 
/ options enabled:  -fpeephole -ffunction-cse -fkeep-static-consts
/ -fpcc-struct-return -fexceptions -fsjlj-exceptions -fcommon -fverbose-asm
/ -fgnu-linker -m80387 -mhard-float -mno-soft-float -mieee-fp
/ -mfp-ret-in-387 -mschedule-prologue -mstack-arg-probe -mcpu=pentium
/ -march=pentium

gcc2_compiled.:
___gnu_compiled_ada:
.text
LC0:
	.ascii "Hello WORLD!\0"
	.align 4
LC1:
	.long 1
	.long 12
	.align 4
LC2:
	.long LC0
	.long LC1
	.align 4
.globl __ada_hello
__ada_hello:
	pushl %ebp
	movl %esp,%ebp
	movl LC2+4,%eax
	pushl %eax
	movl LC2,%eax
	pushl %eax
	call _ada__text_io__put_line$2
	addl $8,%esp
	jmp L1
	.align 2,0x90
L1:
	movl %ebp,%esp
	popl %ebp
	ret



(-: Pete :-)


