Index: trunk/sw/test.dump
===================================================================
--- trunk/sw/test.dump	(revision 19)
+++ trunk/sw/test.dump	(revision 19)
@@ -0,0 +1,169 @@
+
+test.o:     file format elf64-sparc
+
+
+Disassembly of section .text:
+
+0000000000000000 <main>:
+   0:	9d e3 bf 50 	save  %sp, -176, %sp
+   4:	01 00 00 00 	nop 
+   8:	01 00 00 00 	nop 
+   c:	01 00 00 00 	nop 
+  10:	01 00 00 00 	nop 
+  14:	03 00 00 00 	sethi  %hi(0), %g1
+  18:	05 00 01 00 	sethi  %hi(0x40000), %g2
+  1c:	82 10 60 00 	mov  %g1, %g1
+  20:	84 10 a0 c0 	or  %g2, 0xc0, %g2
+  24:	83 28 70 20 	sllx  %g1, 0x20, %g1
+  28:	84 10 80 01 	or  %g2, %g1, %g2
+  2c:	81 c0 80 00 	jmp  %g2
+  30:	01 00 00 00 	nop 
+  34:	01 00 00 00 	nop 
+  38:	01 00 00 00 	nop 
+  3c:	01 00 00 00 	nop 
+  40:	01 00 00 00 	nop 
+  44:	b5 80 20 05 	wr  %g0, 5, %asr26
+  48:	a2 10 20 00 	clr  %l1
+  4c:	82 10 20 a9 	mov  0xa9, %g1
+  50:	83 28 70 20 	sllx  %g1, 0x20, %g1
+  54:	e2 70 60 00 	stx  %l1, [ %g1 ]
+  58:	e2 70 60 40 	stx  %l1, [ %g1 + 0x40 ]
+  5c:	e2 70 60 80 	stx  %l1, [ %g1 + 0x80 ]
+  60:	e2 70 60 c0 	stx  %l1, [ %g1 + 0xc0 ]
+  64:	a2 10 20 00 	clr  %l1
+  68:	82 10 20 10 	mov  0x10, %g1
+  6c:	e2 f0 48 40 	stxa  %l1, [ %g1 ] #ASI_DCACHE_INVALIDATE
+  70:	a2 10 20 03 	mov  3, %l1
+  74:	e2 f0 08 a0 	stxa  %l1, [ %g0 ] #ASI_LSU_CONTROL_REG
+  78:	a3 48 00 00 	rdhpr  %hpstate, %l1
+  7c:	81 9c 68 20 	wrhpr  %l1, 0x820, %hpstate
+  80:	87 80 20 25 	wr  %g0, 0x25, %asi
+  84:	c0 f0 23 c0 	stxa  %g0, [ 0x3c0 ] %asi
+  88:	c0 f0 23 c8 	stxa  %g0, [ 0x3c8 ] %asi
+  8c:	c0 f0 23 d0 	stxa  %g0, [ 0x3d0 ] %asi
+  90:	c0 f0 23 d8 	stxa  %g0, [ 0x3d8 ] %asi
+  94:	c0 f0 23 e0 	stxa  %g0, [ 0x3e0 ] %asi
+  98:	c0 f0 23 e8 	stxa  %g0, [ 0x3e8 ] %asi
+  9c:	c0 f0 23 f0 	stxa  %g0, [ 0x3f0 ] %asi
+  a0:	c0 f0 23 f8 	stxa  %g0, [ 0x3f8 ] %asi
+  a4:	8f 90 20 00 	wrpr  0, %tl
+  a8:	a1 90 20 00 	wrpr  0, %gl
+  ac:	8d 80 20 00 	wr  %g0, 0, %fprs
+  b0:	85 80 20 00 	wr  %g0, 0, %ccr
+  b4:	87 80 20 00 	wr  %g0, 0, %asi
+  b8:	84 10 20 00 	clr  %g2
+  bc:	89 90 80 00 	wrpr  %g2, %tick
+  c0:	84 10 20 00 	clr  %g2
+  c4:	b1 80 80 00 	mov  %g2, %asr24
+  c8:	84 10 20 01 	mov  1, %g2
+  cc:	85 28 b0 3f 	sllx  %g2, 0x3f, %g2
+  d0:	af 80 80 00 	mov  %g2, %asr23
+  d4:	b3 80 80 00 	mov  %g2, %asr25
+  d8:	bf 98 80 00 	wrhpr  %g2, %hstick_cmpr
+  dc:	81 80 00 00 	mov  %g0, %y
+  e0:	91 90 20 0f 	wrpr  0xf, %pil
+  e4:	93 90 20 00 	wrpr  0, %cwp
+  e8:	95 90 20 06 	wrpr  6, %cansave
+  ec:	97 90 20 00 	wrpr  0, %canrestore
+  f0:	9b 90 20 00 	wrpr  0, %otherwin
+  f4:	99 90 20 07 	wrpr  7, %cleanwin
+  f8:	9d 90 20 07 	wrpr  7, %wstate
+  fc:	82 10 20 18 	mov  0x18, %g1
+ 100:	c0 f0 0a 01 	stxa  %g0, [ %g0 + %g1 ] #ASI_IMMU
+ 104:	c0 f0 0b 01 	stxa  %g0, [ %g0 + %g1 ] #ASI_DMMU
+ 108:	a2 10 20 03 	mov  3, %l1
+ 10c:	e2 f0 09 60 	stxa  %l1, [ %g0 ] #ASI_ESTATE_ERROR_EN
+ 110:	a2 10 20 03 	mov  3, %l1
+ 114:	82 10 20 aa 	mov  0xaa, %g1
+ 118:	83 28 70 20 	sllx  %g1, 0x20, %g1
+ 11c:	e2 70 60 00 	stx  %l1, [ %g1 ]
+ 120:	e2 70 60 40 	stx  %l1, [ %g1 + 0x40 ]
+ 124:	e2 70 60 80 	stx  %l1, [ %g1 + 0x80 ]
+ 128:	e2 70 60 c0 	stx  %l1, [ %g1 + 0xc0 ]
+ 12c:	a3 46 80 00 	rd  %asr26, %l1
+ 130:	03 00 00 07 	sethi  %hi(0x1c00), %g1
+ 134:	82 10 63 00 	or  %g1, 0x300, %g1	! 1f00 <main+0x1f00>
+ 138:	a2 0c 40 01 	and  %l1, %g1, %l1
+ 13c:	a3 34 70 08 	srlx  %l1, 8, %l1
+ 140:	03 00 00 00 	sethi  %hi(0), %g1
+ 144:	05 00 01 30 	sethi  %hi(0x4c000), %g2
+ 148:	82 10 60 00 	mov  %g1, %g1
+ 14c:	84 10 a0 00 	mov  %g2, %g2
+ 150:	83 28 70 20 	sllx  %g1, 0x20, %g1
+ 154:	84 10 80 01 	or  %g2, %g1, %g2
+ 158:	a3 2c 70 03 	sllx  %l1, 3, %l1
+ 15c:	c4 58 80 11 	ldx  [ %g2 + %l1 ], %g2
+ 160:	82 10 20 80 	mov  0x80, %g1
+ 164:	c4 f0 4b 00 	stxa  %g2, [ %g1 ] #ASI_DMMU
+ 168:	2f 00 02 00 	sethi  %hi(0x80000), %l7
+ 16c:	8b 9d c0 00 	wrhpr  %l7, %htba
+ 170:	21 00 00 00 	sethi  %hi(0), %l0
+ 174:	03 00 01 30 	sethi  %hi(0x4c000), %g1
+ 178:	a0 14 20 00 	mov  %l0, %l0
+ 17c:	82 10 61 40 	or  %g1, 0x140, %g1
+ 180:	a1 2c 30 20 	sllx  %l0, 0x20, %l0
+ 184:	82 10 40 10 	or  %g1, %l0, %g1
+ 188:	85 28 b0 07 	sllx  %g2, 7, %g2
+ 18c:	82 00 40 02 	add  %g1, %g2, %g1
+ 190:	e2 58 40 00 	ldx  [ %g1 ], %l1
+ 194:	e2 f0 06 e0 	stxa  %l1, [ %g0 ] (55)
+ 198:	e2 58 60 08 	ldx  [ %g1 + 8 ], %l1
+ 19c:	e2 f0 07 e0 	stxa  %l1, [ %g0 ] (63)
+ 1a0:	e2 58 60 10 	ldx  [ %g1 + 0x10 ], %l1
+ 1a4:	e2 f0 06 a0 	stxa  %l1, [ %g0 ] (53)
+ 1a8:	e2 58 60 20 	ldx  [ %g1 + 0x20 ], %l1
+ 1ac:	e2 f0 06 c0 	stxa  %l1, [ %g0 ] (54)
+ 1b0:	e2 58 60 18 	ldx  [ %g1 + 0x18 ], %l1
+ 1b4:	e2 f0 07 a0 	stxa  %l1, [ %g0 ] (61)
+ 1b8:	e2 58 60 28 	ldx  [ %g1 + 0x28 ], %l1
+ 1bc:	e2 f0 07 c0 	stxa  %l1, [ %g0 ] (62)
+ 1c0:	e2 58 60 40 	ldx  [ %g1 + 0x40 ], %l1
+ 1c4:	e2 f0 06 60 	stxa  %l1, [ %g0 ] #ASI_PCACHE_SNOOP_TAG
+ 1c8:	e2 58 60 48 	ldx  [ %g1 + 0x48 ], %l1
+ 1cc:	e2 f0 07 60 	stxa  %l1, [ %g0 ] #ASI_WCACHE_SNOOP_TAG
+ 1d0:	e2 58 60 50 	ldx  [ %g1 + 0x50 ], %l1
+ 1d4:	e2 f0 06 20 	stxa  %l1, [ %g0 ] #ASI_PCACHE_DATA
+ 1d8:	e2 58 60 60 	ldx  [ %g1 + 0x60 ], %l1
+ 1dc:	e2 f0 06 40 	stxa  %l1, [ %g0 ] #ASI_PCACHE_TAG
+ 1e0:	e2 58 60 58 	ldx  [ %g1 + 0x58 ], %l1
+ 1e4:	e2 f0 07 20 	stxa  %l1, [ %g0 ] #ASI_WCACHE_DATA
+ 1e8:	e2 58 60 68 	ldx  [ %g1 + 0x68 ], %l1
+ 1ec:	e2 f0 07 40 	stxa  %l1, [ %g0 ] #ASI_WCACHE_TAG
+ 1f0:	94 10 20 80 	mov  0x80, %o2
+ 1f4:	c0 f2 8a e0 	stxa  %g0, [ %o2 ] #ASI_IMMU_DEMAP
+ 1f8:	c0 f2 8b e0 	stxa  %g0, [ %o2 ] #ASI_DMMU_DEMAP
+ 1fc:	a2 10 20 08 	mov  8, %l1
+ 200:	c0 f4 44 20 	stxa  %g0, [ %l1 ] #ASI_MMU
+ 204:	a2 10 20 10 	mov  0x10, %l1
+ 208:	c0 f4 44 20 	stxa  %g0, [ %l1 ] #ASI_MMU
+ 20c:	a2 10 20 0f 	mov  0xf, %l1
+ 210:	e2 f0 08 a0 	stxa  %l1, [ %g0 ] #ASI_LSU_CONTROL_REG
+ 214:	03 00 00 00 	sethi  %hi(0), %g1
+ 218:	05 00 05 10 	sethi  %hi(0x144000), %g2
+ 21c:	82 10 60 00 	mov  %g1, %g1
+ 220:	84 10 a0 00 	mov  %g2, %g2
+ 224:	83 28 70 20 	sllx  %g1, 0x20, %g1
+ 228:	84 10 80 01 	or  %g2, %g1, %g2
+ 22c:	87 48 00 00 	rdhpr  %hpstate, %g3
+ 230:	8f 90 20 01 	wrpr  1, %tl
+ 234:	88 10 20 00 	clr  %g4
+ 238:	83 99 00 00 	wrhpr  %g4, %htstate
+ 23c:	8f 90 20 00 	wrpr  0, %tl
+ 240:	90 10 20 00 	clr  %o0
+ 244:	81 c0 80 00 	jmp  %g2
+ 248:	81 98 28 00 	wrhpr  0x800, %hpstate
+ 24c:	01 00 00 00 	nop 
+ 250:	01 00 00 00 	nop 
+ 254:	82 10 20 0f 	mov  0xf, %g1	! f <main+0xf>
+ 258:	c2 f0 08 a0 	stxa  %g1, [ %g0 ] #ASI_LSU_CONTROL_REG
+ 25c:	c0 f0 08 60 	stxa  %g0, [ %g0 ] #ASI_DCACHE_UTAG
+ 260:	83 48 00 00 	rdhpr  %hpstate, %g1
+ 264:	01 00 00 00 	nop 
+ 268:	01 00 00 00 	nop 
+ 26c:	01 00 00 00 	nop 
+ 270:	01 00 00 00 	nop 
+ 274:	82 10 20 00 	clr  %g1	! 0 <main>
+ 278:	83 38 60 00 	sra  %g1, 0, %g1
+ 27c:	b0 10 00 01 	mov  %g1, %i0
+ 280:	81 cf e0 08 	rett  %i7 + 8
+ 284:	01 00 00 00 	nop 
Index: trunk/sw/compila
===================================================================
--- trunk/sw/compila	(revision 18)
+++ trunk/sw/compila	(revision 19)
@@ -7,3 +7,6 @@
 
 ## fa il dump del file
-/opt/sparc64-sun-solaris2.8-toolchain/sparc64-sun-solaris2.8/bin/objdump -d test.o
+/opt/sparc64-sun-solaris2.8-toolchain/sparc64-sun-solaris2.8/bin/objdump -d test.o >test.dump
+
+### crea memory.hex
+../tools/dump2hex.php <test.dump >../sim/memory.hex
Index: trunk/sw/hello.c
===================================================================
--- trunk/sw/hello.c	(revision 19)
+++ trunk/sw/hello.c	(revision 19)
@@ -0,0 +1,10 @@
+// Sample program that writes two words at a predefined address
+ 
+int main() {
+  unsigned long* address;
+  address = (unsigned long*)0x0000CAC0;
+  (*address) = 0xC1A0C1A0;  // First store
+  address = (unsigned long*)0x0000CAC0;
+  (*address) = 0xFABA1210;  // Second store
+  return 0;
+}
Index: trunk/sw/hello.dump
===================================================================
--- trunk/sw/hello.dump	(revision 19)
+++ trunk/sw/hello.dump	(revision 19)
@@ -0,0 +1,27 @@
+
+hello.o:     file format elf64-sparc
+
+
+Disassembly of section .text:
+
+0000000000000000 <main>:
+   0:	9d e3 bf 40 	save  %sp, -192, %sp
+   4:	82 10 23 2b 	mov  0x32b, %g1
+   8:	83 28 70 06 	sllx  %g1, 6, %g1
+   c:	c2 77 a7 f7 	stx  %g1, [ %fp + 0x7f7 ]
+  10:	c2 5f a7 f7 	ldx  [ %fp + 0x7f7 ], %g1
+  14:	05 30 68 30 	sethi  %hi(0xc1a0c000), %g2
+  18:	84 10 a1 a0 	or  %g2, 0x1a0, %g2	! c1a0c1a0 <main+0xc1a0c1a0>
+  1c:	c4 70 40 00 	stx  %g2, [ %g1 ]
+  20:	82 10 23 2b 	mov  0x32b, %g1
+  24:	83 28 70 06 	sllx  %g1, 6, %g1
+  28:	c2 77 a7 f7 	stx  %g1, [ %fp + 0x7f7 ]
+  2c:	c2 5f a7 f7 	ldx  [ %fp + 0x7f7 ], %g1
+  30:	05 3e ae 84 	sethi  %hi(0xfaba1000), %g2
+  34:	84 10 a2 10 	or  %g2, 0x210, %g2	! faba1210 <main+0xfaba1210>
+  38:	c4 70 40 00 	stx  %g2, [ %g1 ]
+  3c:	82 10 20 00 	clr  %g1
+  40:	83 38 60 00 	sra  %g1, 0, %g1
+  44:	b0 10 00 01 	mov  %g1, %i0
+  48:	81 cf e0 08 	rett  %i7 + 8
+  4c:	01 00 00 00 	nop 
