author | Rodrigo Campos
<rodrigo@sdfg.com.ar> 2011-04-16 02:08:07 UTC |
committer | Rodrigo Campos
<rodrigo@sdfg.com.ar> 2011-04-16 02:11:03 UTC |
parent | 7fe67d3ab74d4ca7e46812fa5245c537973fc91e |
bintree.asm | +3 | -1 |
test.c | +1 | -11 |
diff --git a/bintree.asm b/bintree.asm index 986b359..0380d8c 100644 --- a/bintree.asm +++ b/bintree.asm @@ -661,8 +661,10 @@ imprimirArbol: fstp qword [esp] ; pongo el id, 3º param - mov eax, 0 mov ax, .nId + ; le pongo bien el signo + shl eax, 16 + sar eax, 16 push eax ; formato, 2º param diff --git a/test.c b/test.c index a207fe5..f12bfe2 100644 --- a/test.c +++ b/test.c @@ -25,25 +25,15 @@ int main() nodo *e = NULL; - insertar(&e, "nodo1", 32, 7.5); + insertar(&e, "nodo1", -32, 7.5); insertar(&e, "nodo2", 30, 7.5); insertar(&e, "nodo3", 34, 7.5); insertar(&e, "nodo4", 31, 7.5); - printf("31 == %d\n", e->izq->der->id); - printf("Hola puto\n"); - printf("id de la raiz es: %d\n", e->id); - if (e->der == NULL) - printf("hijo der es NULL\n"); - else - printf("hijo der NO es NULL\n"); - printf("1º hijo: %d\n", e->izq->id); - printf("2º hijo: %d\n", e->izq->der->id); - // eliminar(&e, 32); // eliminar(&e, 30); // eliminar(&e, 31);