diff --git "a/DEFINITIVO/asm_morati_mirko_murr_no\303\250.tgz" "b/DEFINITIVO/asm_morati_mirko_murr_no\303\250.tgz" new file mode 100644 index 0000000..70d5753 Binary files /dev/null and "b/DEFINITIVO/asm_morati_mirko_murr_no\303\250.tgz" differ diff --git "a/DEFINITIVO/asm_morati_mirko_murr_no\303\250/elaborato.pdf" "b/DEFINITIVO/asm_morati_mirko_murr_no\303\250/elaborato.pdf" new file mode 100644 index 0000000..01a2bf0 Binary files /dev/null and "b/DEFINITIVO/asm_morati_mirko_murr_no\303\250/elaborato.pdf" differ diff --git "a/DEFINITIVO/asm_morati_mirko_murr_no\303\250/src/Makefile" "b/DEFINITIVO/asm_morati_mirko_murr_no\303\250/src/Makefile" new file mode 100644 index 0000000..6f4eb23 --- /dev/null +++ "b/DEFINITIVO/asm_morati_mirko_murr_no\303\250/src/Makefile" @@ -0,0 +1,46 @@ +# Progetto Assembly 2016 +# File: open_files.s +# Autori: Noè Murr, Mirko Morati +# +# Descrizione: Makefile per il progetto assembly + +AS:=as +ASFLAGS:=-gstabs --32 +LD:=ld +LDFLAGS:=-m elf_i386 +BINNAME=elaborato +OBJ= main.o open_files.o read_line.o check.o write_line.o itoa.o atoi.o close_files.o +HEADERS=syscall.inc +RM=rm -rf +ECHO=/bin/echo + +.PHONY: all run clean rebuild help + +%.o: %.s $(HEADERS) + @$(ECHO) -n "Compiling $< " + @$(AS) -c -o $@ $< $(ASFLAGS) + @$(ECHO) "[ ok ]" + +$(BINNAME): $(OBJ) + @$(ECHO) -n "Linking $(BINNAME) " + @$(LD) -o $@ $^ $(LDFLAGS) + @$(ECHO) "[ ok ]" + +all: $(BINNAME) + +debug: ASFLAGS += -g +debug: LDFLAGS += -g +debug: $(BINNAME) + +run: $(BINNAME) + @$(ECHO) "Running $(BINNAME)" + @./$(BINNAME) + +clean: + @$(ECHO) -n "Cleaning sources " + @$(RM) *.o + @$(RM) $(BINNAME) + @$(ECHO) "[ ok ]" + + +rebuild: clean $(BINNAME) diff --git "a/DEFINITIVO/asm_morati_mirko_murr_no\303\250/src/atoi.s" "b/DEFINITIVO/asm_morati_mirko_murr_no\303\250/src/atoi.s" new file mode 100644 index 0000000..d8fe9e8 --- /dev/null +++ "b/DEFINITIVO/asm_morati_mirko_murr_no\303\250/src/atoi.s" @@ -0,0 +1,43 @@ +# Progetto Assembly 2016 +# File: atoi.s +# Autori: Alessandro Righi, Noè Murr, Mirko Morati +# +# Descrizione: Funzione che converte una stringa in intero. + +.section .text + .globl _atoi + .type _atoi, @function + +# Funzione che converte una stringa di input in numero +# Prototipo C-style: +# uint32_t atoi(const char *string); +# Parametri di input: +# EDI - Stringa da convertire +# Parametri di output: +# EAX - Valore convertito + +_atoi: + xorl %eax, %eax # azzero il registro EAX per contenere il risultato + xorl %ebx, %ebx # azzero EBX + movl $10, %ecx # sposto 10 in ECX che conterrà il valore moltiplicativo + +_atoi_loop: + xorl %ebx, %ebx + movb (%edi), %bl # sposto un byte dalla stringa in BL + subb $48, %bl # sottraggo il valore ASCII dello 0 a BL + # per avere un valore intero + + cmpb $0, %bl # Se il numero è minore di 0 + jl _atoi_end # allora esco dal ciclo + cmpb $10, %bl # Se il numero è maggiore o uguale a 10 + jge _atoi_end # esco dal ciclo + + mull %ecx # altrimenti moltiplico EAX per 10 + # (10 messo precedentemente in ECX) + addl %ebx, %eax # aggiungo a EAX il valore attuale + incl %edi # incremento EDI + + jmp _atoi_loop # rieseguo il ciclo + +_atoi_end: + ret diff --git "a/DEFINITIVO/asm_morati_mirko_murr_no\303\250/src/check.s" "b/DEFINITIVO/asm_morati_mirko_murr_no\303\250/src/check.s" new file mode 100644 index 0000000..8c94174 --- /dev/null +++ "b/DEFINITIVO/asm_morati_mirko_murr_no\303\250/src/check.s" @@ -0,0 +1,106 @@ +# Progetto Assembly 2016 +# File: check.s +# Autori: Noè Murr, Mirko Morati +# +# Descrizione: Funzione che controlla le variabili +# init, reset, rpm e setta le variabili alm, mod e numb + +.section .data + +.section .text + .globl _check + .type _check, @function + +_check: + pushl %ebp + movl %esp, %ebp + + # Caso init == 0: alm = 0; mod = 0; numb = 0; + cmpl $0, init + je _init_0 + + # Caso SG: alm = 0; mod = 1; numb = reset == 1 ? 0 : numb + 1; + cmpl $2000, rpm + jl _sg + + # Caso OPT: alm = 0; mod = 2; numb = reset == 1 ? 0 : numb + 1; + cmpl $4000, rpm + jle _opt + + # Caso FG: alm = numb >= 15? 1 : 0; mod = 3; numb = reset == 1 ? 0 : numb + 1; +_fg: + # Salviamo la nuova modalita' in %eax e controlliamo reset + movl $3, %eax + cmpl $1, reset + je _reset_numb + + # Se la nuova modalità non è la stessa si resetta il numero di secondi + cmpl $3, mod + jne _reset_numb + + incl numb + movl %eax, mod + + # Se il numero di secondi è maggiore o uguale a 15 viene alzata l'allarme + cmpl $15, numb + jge _set_alm + + jmp _end_check + +_opt: + movl $2, %eax + cmpl $1, reset + je _reset_numb + + cmpl $2, mod + jne _reset_numb + + incl numb + movl %eax, mod + + jmp _end_check + +_sg: + movl $1, %eax + cmpl $1, reset + je _reset_numb + + cmpl $1, mod + jne _reset_numb + + incl numb + movl %eax, mod + + jmp _end_check + +_reset_numb: + movl %eax, mod + movl $0, numb + movl $0, alm + + jmp _end_check + +_set_alm: + movl $1, alm + + + jmp _end_check + +_init_0: + movl $0, alm + movl $0, numb + movl $0, mod + +_end_check: + + # Se il numero di secondi supera i 99 allora dobbiamo ricominciare il conteggio + cmpl $99, numb + jg _numb_overflow + movl %ebp, %esp + popl %ebp + + ret + +_numb_overflow: + movl $0, numb + jmp _end_check diff --git "a/DEFINITIVO/asm_morati_mirko_murr_no\303\250/src/close_files.s" "b/DEFINITIVO/asm_morati_mirko_murr_no\303\250/src/close_files.s" new file mode 100644 index 0000000..39e8fc1 --- /dev/null +++ "b/DEFINITIVO/asm_morati_mirko_murr_no\303\250/src/close_files.s" @@ -0,0 +1,32 @@ +# Progetto Assembly 2016 +# File: check.s +# Autori: Noè Murr, Mirko Morati +# +# Descrizione: Funzione che chiude i file aperti precedentemente + +.include "syscall.inc" + +.section .text + .globl _close_files # Dichiaro la funzione globale + .type _close_files, @function # Dichiaro l' etichetta come una funzione + +_close_files: + + pushl %ebp + movl %esp, %ebp + + # sys_close(input_fd); + movl $SYS_CLOSE, %eax + movl input_fd, %ebx + int $SYSCALL + + # sys_close(output_fd); + movl $SYS_CLOSE, %eax + movl output_fd, %ebx + int $SYSCALL + + + movl %ebp, %esp + popl %ebp + + ret diff --git "a/DEFINITIVO/asm_morati_mirko_murr_no\303\250/src/itoa.s" "b/DEFINITIVO/asm_morati_mirko_murr_no\303\250/src/itoa.s" new file mode 100644 index 0000000..b3866b5 --- /dev/null +++ "b/DEFINITIVO/asm_morati_mirko_murr_no\303\250/src/itoa.s" @@ -0,0 +1,52 @@ +# Progetto Assembly 2016 +# File: itoa.s +# Autori: Alessandro Righi, Noè Murr, Mirko Morati +# +# Descrizione: Funzione che converte un intero in stringa +# Prototipo C-style: +# u_int32_t itoa(uint32_t val, char *string); +# Parametri di input: +# EAX - Valore intero unsigned a 64bit da convertire +# EDI - Puntatore alla stringa su cui salvare il risultato +# Parametri di output: +# EAX - Lunghezza della stringa convertita (compresiva di \0 finale) + +.section .text + .global _itoa + .type _itoa, @function + +_itoa: + movl $10, %ecx # porto il fattore moltiplicativo in ECX + movl %eax, %ebx # salvo temporaneamente il valore di EAX in EBX + xorl %esi, %esi # azzero il registro ESI + +_itoa_dividi: + xorl %edx, %edx # azzero EDX per fare la divisione + divl %ecx # divide EAX per ECX, salva il resto in EDX + incl %esi # incrementa il contatore + testl %eax, %eax # se il valore di EAX non è zero ripeti il ciclo + jnz _itoa_dividi + + addl %esi, %edi # somma all'indirizzo del buffer + # il numero di caratteri del numero + movl %ebx, %eax # rimette il valore da convertire in EAX + movl %esi, %ebx # salvo il valore della lunghezza della stringa in EBX + + movl $0, (%edi) # aggiungo un null terminator alla fine della stringa + decl %edi # decremento il contatore della stringa di 1 + +_itoa_converti: + xorl %edx, %edx # azzero EDX per fare la divisione + divl %ecx # divido EAX per ECX, salvo il valore del resto in EDX + addl $48, %edx # sommo 48 a EDX + movb %dl, (%edi) # sposto il byte inferiore di EDX (DL) + # nella locazione di memoria puntata da EDI + decl %edi # decremento il puntatore della stringa + decl %esi # decremento il contatore + testl %esi, %esi # se il contatore non è 0 continua ad eseguire il loop + jnz _itoa_converti + + movl %ebx, %eax # porto il valore della lunghezza + # della stringa in EAX per ritornarlo + incl %eax # incremento di 1 EAX (in modo da includere il \0) + ret diff --git "a/DEFINITIVO/asm_morati_mirko_murr_no\303\250/src/main.s" "b/DEFINITIVO/asm_morati_mirko_murr_no\303\250/src/main.s" new file mode 100644 index 0000000..40e4fc3 --- /dev/null +++ "b/DEFINITIVO/asm_morati_mirko_murr_no\303\250/src/main.s" @@ -0,0 +1,95 @@ +# Progetto Assembly 2016 +# File: main.s +# Autori: Noè Murr, Mirko Morati +# +# Descrizione: File principale, punto di inizio del programma. +.include "syscall.inc" + +.section .data + input_fd: .long 0 # variabile globale che conterrà il file + # descriptor del file di input + + output_fd: .long 0 # variabile globale che conterrà il file + # descriptor del file di output + + # Variabili globali per i segnali di input + init: .long 0 + reset: .long 0 + rpm: .long 0 + + # Variabili globali per i segnali di output + alm: .long 0 + numb: .long 0 + mod: .long 0 + +# Codice del programma + +.section .text + .globl input_fd + .globl output_fd + .globl init + .globl reset + .globl rpm + .globl alm + .globl numb + .globl mod + .globl _start + + # Stringa per mostrare l'utilizzo del programma in caso di parametri errati + usage: .asciz "usage: programName inputFilePath outputFilePath\n" + .equ USAGE_LENGTH, .-usage + +_start: + # Recupero i parametri del main + popl %eax # Numero parametri + + # Controllo argomenti, se sbagliati mostro l'utilizzo corretto + cmpl $3, %eax + jne _show_usage + + popl %eax # Nome programma + popl %eax # Primo parametro (nome file di input) + popl %ebx # Secondo parametro (nome file di output) + + # NB: non salvo ebp in quanto non ha alcuna utilità + # nella funzione start che comunque non ritorna + + movl %esp, %ebp + + call _open_files # Apertura dei file + +_main_loop: + + call _read_line # Leggiamo la riga + + cmpl $-1, %ebx # EOF se ebx == -1 + je _end + + call _check # Controllo delle variabili + + call _write_line # Scrittura delle variabili di output su file + + jmp _main_loop # Leggi un altra riga finché non è EOF + +_end: + + call _close_files # Chiudi correttamente i file + + # sys_exit(0); + movl $SYS_EXIT, %eax + movl $0, %ebx + int $SYSCALL + +_show_usage: + # esce in caso di errore con codice 1 + # sys_write(stdout, usage, USAGE_LENGTH); + movl $SYS_WRITE, %eax + movl $STDOUT, %ebx + movl $usage, %ecx + movl $USAGE_LENGTH, %edx + int $SYSCALL + + # sys_exit(1); + movl $SYS_EXIT, %eax + movl $1, %ebx + int $SYSCALL diff --git "a/DEFINITIVO/asm_morati_mirko_murr_no\303\250/src/open_files.s" "b/DEFINITIVO/asm_morati_mirko_murr_no\303\250/src/open_files.s" new file mode 100644 index 0000000..afc1444 --- /dev/null +++ "b/DEFINITIVO/asm_morati_mirko_murr_no\303\250/src/open_files.s" @@ -0,0 +1,71 @@ +# Progetto Assembly 2016 +# File: open_files.s +# Autori: Noè Murr, Mirko Morati +# +# Descrizione: File contenente la funzione che si occupa di aprire i file di input e di +# output, i file descriptor vengono inseriti in variabili globali. +# Si suppone che il nome dei due file siano salvati negli indirizzi contenuti +# rispettivamente in %eax (input) ed in %ebx (output). + +.include "syscall.inc" + +.section .text + + error_opening_files: .asciz "errore nell' apertura dei file\n" + .equ ERROR_OPENING_LENGTH, .-error_opening_files + + .globl _open_files # Dichiaro la funzione globale + .type _open_files, @function # Dichiaro l'etichetta come una funzione + +_open_files: + + pushl %ebp + movl %esp, %ebp + + pushl %ebx # Pusho l' indirizzo del file di output + # sullo stack + + movl %eax, %ebx # Sposto l' indirizzo del file che vado + # ad aprire in %ebx + + movl $SYS_OPEN, %eax # Chiamata di sistema open + movl $0, %ecx # read-only mode + int $SYSCALL # Apro il file + + cmpl $0, %eax + jl _error_opening_files + + movl %eax, input_fd # Metto il file descriptor nella + # sua variabile + + popl %ebx # Riprendo l' indirizzo del nome del file + # di output che avevo messo sullo stack + + movl $SYS_OPEN, %eax # Chiamata di sistema open + movl $01101, %ecx # read and write mode + movl $0666, %edx # flags + int $SYSCALL # Apro il file + + cmpl $0, %eax + jl _error_opening_files + + movl %eax, output_fd # Metto il file descriptor nella + # sua variabile + + movl %ebp, %esp + popl %ebp + ret # Ritorna al chiamante + +_error_opening_files: + # Esce con codice di errore 2 + # sys_write(stdout, usage, USAGE_LENGTH); + movl $SYS_WRITE, %eax + movl $STDERR, %ebx + movl $error_opening_files, %ecx + movl $ERROR_OPENING_LENGTH, %edx + int $SYSCALL + + # sys_exit(2); + movl $SYS_EXIT, %eax + movl $2, %ebx + int $SYSCALL diff --git "a/DEFINITIVO/asm_morati_mirko_murr_no\303\250/src/read_line.s" "b/DEFINITIVO/asm_morati_mirko_murr_no\303\250/src/read_line.s" new file mode 100644 index 0000000..09c814a --- /dev/null +++ "b/DEFINITIVO/asm_morati_mirko_murr_no\303\250/src/read_line.s" @@ -0,0 +1,59 @@ +# Progetto Assembly 2016 +# File: read_line.s +# Autori: Noè Murr, Mirko Morati +# +# Descrizione: Funzione che legge una riga alla volta del file di input. + +.include "syscall.inc" + +.section .bss + .equ INPUT_BUFF_LEN, 9 + input_buff: .space INPUT_BUFF_LEN # Input buffer di 9 byte + +.section .text + .globl _read_line + .type _read_line, @function + +_read_line: + pushl %ebp + movl %esp, %ebp + + # Lettura riga + # sys_read(input_fd, input_buff, INPUT_BUFF_LEN); + movl input_fd, %ebx + movl $SYS_READ, %eax + leal input_buff, %ecx + movl $INPUT_BUFF_LEN, %edx + int $SYSCALL + + cmpl $0, %eax # Se eax == 0 EOF + je _eof + + # Estrazione dei valori di init, reset, rpm dal buffer + leal input_buff, %edi + call _atoi + movl %eax, init + + incl %edi # Salto il carattere ',' + + call _atoi + movl %eax, reset + + incl %edi # Salto il carattere ',' + + call _atoi + movl %eax, rpm + + movl %ebp, %esp + popl %ebp + + xorl %ebx, %ebx # ebx = 0 permette di proseguire + ret + +_eof: + # in caso di EOF %ebx = -1 + movl %ebp, %esp + popl %ebp + + movl $-1, %ebx + ret diff --git "a/DEFINITIVO/asm_morati_mirko_murr_no\303\250/src/syscall.inc" "b/DEFINITIVO/asm_morati_mirko_murr_no\303\250/src/syscall.inc" new file mode 100644 index 0000000..f6d0318 --- /dev/null +++ "b/DEFINITIVO/asm_morati_mirko_murr_no\303\250/src/syscall.inc" @@ -0,0 +1,17 @@ +# Progetto Assembly 2016 +# File: open_files.s +# Autori: Noè Murr, Mirko Morati +# +# Descrizione: File di definizione delle chiamate di sistema linux + +.equ SYS_EXIT, 1 +.equ SYS_READ, 3 +.equ SYS_WRITE, 4 +.equ SYS_OPEN, 5 +.equ SYS_CLOSE, 6 + +.equ STDIN, 0 +.equ STDOUT, 1 +.equ STDERR, 2 + +.equ SYSCALL, 0x80 diff --git "a/DEFINITIVO/asm_morati_mirko_murr_no\303\250/src/write_line.s" "b/DEFINITIVO/asm_morati_mirko_murr_no\303\250/src/write_line.s" new file mode 100644 index 0000000..05b6b5c --- /dev/null +++ "b/DEFINITIVO/asm_morati_mirko_murr_no\303\250/src/write_line.s" @@ -0,0 +1,108 @@ +# Progetto Assembly 2016 +# File: check.s +# Autori: Noè Murr, Mirko Morati +# +# Descrizione: Funzione che scrive una riga alla volta nel file di output + +.include "syscall.inc" + +.section .bss + .equ OUTPUT_BUFF_LEN, 8 + output_buff: .space OUTPUT_BUFF_LEN + +.section .text + .globl _write_line + .type _write_line, @function + MOD_00: .ascii "00" # motore spento + MOD_01: .ascii "01" # motore sotto giri + MOD_10: .ascii "10" # motore in stato ottimale + MOD_11: .ascii "11" # motore fuori giri + .equ MOD_LEN, 2 + +_write_line: + pushl %ebp + movl %esp, %ebp + + leal output_buff, %edi # spostiamo il puntatore + # del buffer di output in EDI + + cmpl $1, alm # se l'allarme è 1 stampiamo 1 + # altrimenti 0 senza chiamare funzioni + je _alm_1 + +_alm_0: + movl $48, (%edi) + jmp _print_mod + +_alm_1: + movl $49, (%edi) + +_print_mod: + movl $44, 1(%edi) # aggiungiamo la virgola dopo + # il segnale di allarme + addl $2, %edi # spostiamo un immaginario cursore + # nella posizione dove stampare la mod + + cmpl $1, mod # controlliamo il valore di mod + # e stampiamo la stringa corretta in base + # alla giusta modalita' di funzionamento + je _mod_1 + cmpl $2, mod + je _mod_2 + cmpl $3, mod + je _mod_3 + +_mod_0: + movl MOD_00, %eax + jmp _end_print_mod + +_mod_1: + movl MOD_01, %eax + jmp _end_print_mod + +_mod_2: + movl MOD_10, %eax + jmp _end_print_mod + +_mod_3: + movl MOD_11, %eax + +_end_print_mod: + movl %eax, (%edi) # mettiamo la stringa nell' output_buff + addl $MOD_LEN, %edi # spostato il cursore (la posizione di edi) + # nel punto esatto dove scrivere + movl $44, (%edi) # aggiungiamo la virgola + incl %edi # spostiamo il cursore + + cmpl $10, numb # controlliamo se il numero di secondi + # è ad una sola cifra, in tal caso + # aggiungiamola cifra 0 + jl _numb_one_digit + +_print_numb: + movl numb, %eax # prepariamo la chiamata per itoa + + call _itoa # chiamiamo itoa + + + leal output_buff, %edi # mettiamo il puntatore di output_buff in edi + addl $7, %edi # ci aggiungiamo 7 per arrivare + # alla fine della stringa, + movl $10, (%edi) # punto nel quale aggiungiamo un \n + + movl $SYS_WRITE, %eax + movl output_fd, %ebx + leal output_buff, %ecx + movl $OUTPUT_BUFF_LEN, %edx + int $SYSCALL + + + movl %ebp, %esp + popl %ebp + + ret + +_numb_one_digit: + movl $48, (%edi) + incl %edi + jmp _print_numb diff --git a/Scelte_progettuali.md b/Scelte_progettuali.md new file mode 100644 index 0000000..f329371 --- /dev/null +++ b/Scelte_progettuali.md @@ -0,0 +1,6 @@ +# Scelte progettuali progetto asm + +1. Per prima cosa si è scelto di utilizzare un sistema che sfruttasse in modo pesante le variabili globali, questo perché utilizzandole in un progetto di così ridotte dimensioni si è aumentata notevolmente la leggibilità del codice e nel contempo si è ridotta la complessità. Da sottolineare che se il progetto fosse stato di maggiore livello questo approccio non si sarebbe potuto utilizzare poiché sarebbero state compromesse le prestazioni totali del progetto compromettendone il corretto funzionamento in caso di un applicazione pratica. +2. Divisione in funzioni ridotta: Si è scelto di dividere il progetto in relativamente poche funzioni e di tenere tutti i controlli su input output in un unica funzione chiamata check. Sarebbe stato possibile utilizzare tranquillamente una divisione maggiore in funzioni minori, per esempio un check_rpm, check_init, etc. Ma al contrario è stato ritenuto più pratico e decisamente più leggibile mantenere il codice in un unico file. Oltre a leggibilità e praticità un altro vantaggio di questa divisione è la mantenibilità infatti la divisione in funzioni risulta logica ed immediata per un programmatore che dovesse trovarsi a modificare il codice senza che si debba eccessivamente saltare da un file ad un altro. +3. File .inc: Nonostante il linguaggio asm sia fortemente legato alla macchina sottostante, si è deciso, di utilizzare un "trucchetto" per permetterne, per quanto possibile, lo spostamento agevole su un altra piattaforma. Infatti sarà sufficiente cambiare i codici delle sys call nel file syscall.inc per chiamare le syscall di un altro sistema. Da far notare che questo trucco può essere usato solo su sistemi unix like poiché i parametri delle funzioni sono sempre gli stessi (probabilmente basati sullo standard posix ma da controllare prima di scriverlo). +4. Buffer di 9 byte con lettura di una riga alla volta: è stato scelto di utilizzare un buffer di 9 byte (lunghezza di una riga) leggendo ad ogni iterazione del programma una riga. Questa scelta è molto importante perché sfora un po' dalle consegne. Infatti la consegna prevedeva di utilizzare file di non più di 100 righe di lunghezza massima. sfruttando tale informazione si sarebbe potuta generare un codice semplicistico che leggesse in un buffer l'intero file. Questo metodo però era sembrato eccessivamente semplicistico. Un altra via prendibile era quella di leggere un byte alla volta del file di input, ma questa avrebbe richiesto un numero spropositato di chiamate al kernel cosa che avrebbe veramente compromesso le prestazioni totali del programma. Quindi l'unica altra scelta possibile è stata quella di leggere una riga per volta il file generando un buffer molto leggero 9 byte ma comodo, innanzi tutto questo metodo può essere utilizzato con file di dimensione decisamente arbitraria, mentre il primo non avrebbe funzionato con un file di dimensione superire a 100 righe (900b), in secondo luogo questo metodo risulta a nostro avviso il metodo ottimale poiché stabilisce un compromesso tra chiamata a syscall e flessibilità del codice. Oltre a questo si sarebbe potuto utilizzare un 3 metodo, quello di mappare in memoria il file ed accedervi come in un array, ma questo sforava dalle nozioni fornite dal corso. diff --git a/src/Makefile b/src/Makefile index af4f0e0..6f4eb23 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,11 +1,15 @@ -# Makefile per il progetto assembly +# Progetto Assembly 2016 +# File: open_files.s +# Autori: Noè Murr, Mirko Morati +# +# Descrizione: Makefile per il progetto assembly AS:=as ASFLAGS:=-gstabs --32 LD:=ld LDFLAGS:=-m elf_i386 BINNAME=elaborato -OBJ= main.o open_files.o read_line.o check.o write_line.o itoa.o atoi.o close_files.o +OBJ= main.o open_files.o read_line.o check.o write_line.o itoa.o atoi.o close_files.o HEADERS=syscall.inc RM=rm -rf ECHO=/bin/echo @@ -40,6 +44,3 @@ clean: rebuild: clean $(BINNAME) - -help: - @$(ECHO) "Cazzate sull'help scriverle qua" diff --git a/src/README.md b/src/README.md deleted file mode 100644 index 0251203..0000000 --- a/src/README.md +++ /dev/null @@ -1,46 +0,0 @@ -#Readme dell'elaborato - -Linee guida che vorrei venissero seguite (bhe poi fate come volete) - -- tutti i file del progetto devono avere estensione .s - (teniamola pure minuscola) - -- le funzioni in file separati (come da richiesta) - -- tutti i file sorgenti in un unica directory (non voglio diventare matto - per scrivere il Makefile, grazie) - -- per compilare si usa il Makefile - -- per compilare in modalità debug aggiustare le opzioni ASFLAGS ed LDFLAGS - (magari modifico il makefile e aggiungo un comando debug ?) - -- divisioni in funzioni sensata - -- codice indentato correttamente (indentazione 4 spazi, niente tab, a parte - nel Makefile dove i tab sono obbligatori) - -- codice commentato correttamente: un commento generale all'inizio di ogni - funzione più un commento all'inizio di ogni blocco di codice di 3/4 righe, - es questo codice apre il file, questo fa questo, questo fa ques'altro, - evitare per quanto possibile un commento ad ogni riga - -- per quanto possibile, non tenere righe troppo lunghe, ma allinearsi ad 80 - caratteri - -- i nomi dei file si passano dalla riga di comando, e mettiamo un nome di - default nel caso l'utente non abbia passato nulla (controllare argc) - -- fare controlli nel caso possano essrci errori - (file non esistenti, file malformattati,ecc) e in caso di errore, - stampare un messagggio e ritornare codice di errore - (1 va bene), il programma non deve andare in segfault se non usato - correttametne - -- i file vanno chiusi alla fine del programma - (anche in caso di errore possibilmente) - -- possibilmente definire come macro tutti i codici delle chiamate di sistema - che si usano con .equ, es .equ SYS_WRITE 4, .equ SYSCALL, 0x80, ecc - -- e poi bho basta, buon divertimento! diff --git a/src/atoi.s b/src/atoi.s index ac6d663..d8fe9e8 100644 --- a/src/atoi.s +++ b/src/atoi.s @@ -1,14 +1,12 @@ -# Progetto assembly 2016 +# Progetto Assembly 2016 # File: atoi.s -# Data: 2016 # Autori: Alessandro Righi, Noè Murr, Mirko Morati -# Descrizione: funzione che converte una stringa in intero +# +# Descrizione: Funzione che converte una stringa in intero. -.code32 - -.text -.global _atoi -.type _atoi, @function +.section .text + .globl _atoi + .type _atoi, @function # Funzione che converte una stringa di input in numero # Prototipo C-style: @@ -17,26 +15,29 @@ # EDI - Stringa da convertire # Parametri di output: # EAX - Valore convertito + _atoi: - xorl %eax, %eax # azzero il registro EAX per contenere il risultato - xorl %ebx, %ebx # azzero EBX - movl $10, %ecx # sposto 10 in ECX che conterrà il valore moltiplicativo + xorl %eax, %eax # azzero il registro EAX per contenere il risultato + xorl %ebx, %ebx # azzero EBX + movl $10, %ecx # sposto 10 in ECX che conterrà il valore moltiplicativo _atoi_loop: - xorl %ebx, %ebx - movb (%edi), %bl # sposto un byte dalla stringa in BL - subb $48, %bl # sottraggo il valore ASCII dello 0 a BL, per avere un valore intero - - cmpb $0, %bl # Se il numero è minore di 0 - jl _atoi_end # allora esco dal ciclo - cmpb $10, %bl # Se il numero è maggiore o uguale a 10 - jge _atoi_end # esco dal ciclo - - mull %ecx # altrimenti moltiplico EAX per 10 (10 messo precedentemente in ECX) - addl %ebx, %eax # aggiungo a EAX il valore attuale - incl %edi # incremento EDI - - jmp _atoi_loop # rieseguo il ciclo + xorl %ebx, %ebx + movb (%edi), %bl # sposto un byte dalla stringa in BL + subb $48, %bl # sottraggo il valore ASCII dello 0 a BL + # per avere un valore intero + + cmpb $0, %bl # Se il numero è minore di 0 + jl _atoi_end # allora esco dal ciclo + cmpb $10, %bl # Se il numero è maggiore o uguale a 10 + jge _atoi_end # esco dal ciclo + + mull %ecx # altrimenti moltiplico EAX per 10 + # (10 messo precedentemente in ECX) + addl %ebx, %eax # aggiungo a EAX il valore attuale + incl %edi # incremento EDI + + jmp _atoi_loop # rieseguo il ciclo _atoi_end: ret diff --git a/src/check.s b/src/check.s index 488538f..8c94174 100644 --- a/src/check.s +++ b/src/check.s @@ -1,7 +1,9 @@ -# Funzione che controlla le variabili init, reset, rpm e setta le variabili -# alm, mod e numb - -.code32 +# Progetto Assembly 2016 +# File: check.s +# Autori: Noè Murr, Mirko Morati +# +# Descrizione: Funzione che controlla le variabili +# init, reset, rpm e setta le variabili alm, mod e numb .section .data @@ -10,43 +12,41 @@ .type _check, @function _check: - pushl %ebp movl %esp, %ebp - # Caso init == 0 -> alm =0; mod = 0; numb = 0; + # Caso init == 0: alm = 0; mod = 0; numb = 0; cmpl $0, init je _init_0 - # Caso SG -> alm = 0; mod = 1; numb = reset == 1 ? 0 : numb + 1; + # Caso SG: alm = 0; mod = 1; numb = reset == 1 ? 0 : numb + 1; cmpl $2000, rpm jl _sg - # Caso OPT -> alm = 0; mod = 2; numb = reset == 1 ? 0 : numb + 1; + # Caso OPT: alm = 0; mod = 2; numb = reset == 1 ? 0 : numb + 1; cmpl $4000, rpm jle _opt - # Caso Fg -> alm = numb >= 15? 1 : 0; mod = 3; numb = reset == 1 ? 0 : numb + 1; + # Caso FG: alm = numb >= 15? 1 : 0; mod = 3; numb = reset == 1 ? 0 : numb + 1; _fg: - # salviamo la nuova modalita' in %eax e controlliamo reset - movl $3, %eax + # Salviamo la nuova modalita' in %eax e controlliamo reset + movl $3, %eax cmpl $1, reset je _reset_numb - # Se la nuova modalita' non e` la stessa si resetta il numero di secondi + # Se la nuova modalità non è la stessa si resetta il numero di secondi cmpl $3, mod jne _reset_numb incl numb movl %eax, mod - # Se il numero di secondi e' maggiore o uguale a 15 viene alzata l'allarme + # Se il numero di secondi è maggiore o uguale a 15 viene alzata l'allarme cmpl $15, numb jge _set_alm jmp _end_check - _opt: movl $2, %eax cmpl $1, reset @@ -60,7 +60,6 @@ _opt: jmp _end_check - _sg: movl $1, %eax cmpl $1, reset @@ -93,9 +92,9 @@ _init_0: movl $0, mod _end_check: - + # Se il numero di secondi supera i 99 allora dobbiamo ricominciare il conteggio - cmpl $99, numb + cmpl $99, numb jg _numb_overflow movl %ebp, %esp popl %ebp @@ -105,4 +104,3 @@ _end_check: _numb_overflow: movl $0, numb jmp _end_check - \ No newline at end of file diff --git a/src/close_files.s b/src/close_files.s index 8e25680..39e8fc1 100644 --- a/src/close_files.s +++ b/src/close_files.s @@ -1,11 +1,14 @@ -# funzione che chiude i file aperti precedentemente -.code32 # per indicare all' assemblatore di - # assemblare a 32 bit +# Progetto Assembly 2016 +# File: check.s +# Autori: Noè Murr, Mirko Morati +# +# Descrizione: Funzione che chiude i file aperti precedentemente + .include "syscall.inc" .section .text - .globl _close_files # dichiaro la funzione globale - .type _close_files, @function # dichiaro l' etichetta come una funzione + .globl _close_files # Dichiaro la funzione globale + .type _close_files, @function # Dichiaro l' etichetta come una funzione _close_files: @@ -15,16 +18,15 @@ _close_files: # sys_close(input_fd); movl $SYS_CLOSE, %eax movl input_fd, %ebx - int $SYSCALL + int $SYSCALL # sys_close(output_fd); movl $SYS_CLOSE, %eax movl output_fd, %ebx - int $SYSCALL + int $SYSCALL movl %ebp, %esp popl %ebp - ret - \ No newline at end of file + ret diff --git a/src/itoa.s b/src/itoa.s index 93097f0..b3866b5 100644 --- a/src/itoa.s +++ b/src/itoa.s @@ -1,14 +1,8 @@ -# Progetto assembly 2016 +# Progetto Assembly 2016 # File: itoa.s -# Data: 2016 # Autori: Alessandro Righi, Noè Murr, Mirko Morati -# Descrizione: converte un intero in stringa - -.text -.global _itoa -.type _itoa, @function - -# Funzione che converte un intero in stringa +# +# Descrizione: Funzione che converte un intero in stringa # Prototipo C-style: # u_int32_t itoa(uint32_t val, char *string); # Parametri di input: @@ -16,35 +10,43 @@ # EDI - Puntatore alla stringa su cui salvare il risultato # Parametri di output: # EAX - Lunghezza della stringa convertita (compresiva di \0 finale) + +.section .text + .global _itoa + .type _itoa, @function + _itoa: - movl $10, %ecx # porto il fattore moltiplicativo in ECX - movl %eax, %ebx # salvo temporaneamente il valore di EAX in EBX - xorl %esi, %esi # azzero il registro ESI + movl $10, %ecx # porto il fattore moltiplicativo in ECX + movl %eax, %ebx # salvo temporaneamente il valore di EAX in EBX + xorl %esi, %esi # azzero il registro ESI _itoa_dividi: - xorl %edx, %edx # azzero EDX per fare la divisione - divl %ecx # divide EAX per ECX, salva il resto in EDX - incl %esi # incrementa il contatore - testl %eax, %eax # se il valore di EAX non è zero ripeti il ciclo - jnz _itoa_dividi + xorl %edx, %edx # azzero EDX per fare la divisione + divl %ecx # divide EAX per ECX, salva il resto in EDX + incl %esi # incrementa il contatore + testl %eax, %eax # se il valore di EAX non è zero ripeti il ciclo + jnz _itoa_dividi - addl %esi, %edi # somma all'indirizzo del buffer il numero di caratteri del numero - movl %ebx, %eax # rimette il valore da convertire in EAX - movl %esi, %ebx # salvo il valore della lunghezza della stringa in EBX + addl %esi, %edi # somma all'indirizzo del buffer + # il numero di caratteri del numero + movl %ebx, %eax # rimette il valore da convertire in EAX + movl %esi, %ebx # salvo il valore della lunghezza della stringa in EBX - movl $0, (%edi) # aggiungo un null terminator alla fine della stringa - decl %edi # decremento il contatore della stringa di 1 + movl $0, (%edi) # aggiungo un null terminator alla fine della stringa + decl %edi # decremento il contatore della stringa di 1 _itoa_converti: - xorl %edx, %edx # azzero EDX per fare la divisione - divl %ecx # divido EAX per ECX, salvo il valore del resto in EDX - addl $48, %edx # sommo 48 a EDX - movb %dl, (%edi) # sposto il byte inferiore di EDX (DL) nella locazione di memoria puntata da EDI - decl %edi # decremento il puntatore della stringa - decl %esi # decremento il contatore - testl %esi, %esi # se il contatore non è 0 continua ad eseguire il loop - jnz _itoa_converti + xorl %edx, %edx # azzero EDX per fare la divisione + divl %ecx # divido EAX per ECX, salvo il valore del resto in EDX + addl $48, %edx # sommo 48 a EDX + movb %dl, (%edi) # sposto il byte inferiore di EDX (DL) + # nella locazione di memoria puntata da EDI + decl %edi # decremento il puntatore della stringa + decl %esi # decremento il contatore + testl %esi, %esi # se il contatore non è 0 continua ad eseguire il loop + jnz _itoa_converti - movl %ebx, %eax # porto il valore della lunghezza della stringa in EAX per ritornarlo - incl %eax # incremento di 1 EAX (in modo da includere il \0) + movl %ebx, %eax # porto il valore della lunghezza + # della stringa in EAX per ritornarlo + incl %eax # incremento di 1 EAX (in modo da includere il \0) ret diff --git a/src/main.s b/src/main.s index e909c2f..40e4fc3 100644 --- a/src/main.s +++ b/src/main.s @@ -1,107 +1,95 @@ -# Progetto assembly 2016 +# Progetto Assembly 2016 # File: main.s -# Data: 2016 -# Autori: Alessandro Righi, Noè Murr, Mirko Morati -# Descrizione: entry point del programma +# Autori: Noè Murr, Mirko Morati +# +# Descrizione: File principale, punto di inizio del programma. +.include "syscall.inc" -.include "syscall.inc" - -# variabili globali - -.section .data -#NB: per ora teniamo di default STDIN ed STDOUT, se uno non apre file -input_fd: .long 0 # variabile globale che conterra' il file +.section .data + input_fd: .long 0 # variabile globale che conterrà il file # descriptor del file di input -output_fd: .long 0 # variabile globale che conterra' il file + output_fd: .long 0 # variabile globale che conterrà il file # descriptor del file di output -# Variabili globali per i segnali di input -init: .long 0 -reset: .long 0 -rpm: .long 0 - -# Variabili globali per i sengali di output -alm: .long 0 -numb: .long 0 -mod: .long 0 - -.section .bss - -# codice del programma -.section .text - .globl input_fd - .globl output_fd - .globl init - .globl reset - .globl rpm - .globl alm - .globl numb - .globl mod - .globl _start + # Variabili globali per i segnali di input + init: .long 0 + reset: .long 0 + rpm: .long 0 + + # Variabili globali per i segnali di output + alm: .long 0 + numb: .long 0 + mod: .long 0 + +# Codice del programma + +.section .text + .globl input_fd + .globl output_fd + .globl init + .globl reset + .globl rpm + .globl alm + .globl numb + .globl mod + .globl _start # Stringa per mostrare l'utilizzo del programma in caso di parametri errati - usage: .asciz "usage: programName inputFilePath outputFilePath\n" - .equ USAGE_LENGTH, .-usage + usage: .asciz "usage: programName inputFilePath outputFilePath\n" + .equ USAGE_LENGTH, .-usage _start: - # recupero i parametri del main - popl %eax # numero parametri + # Recupero i parametri del main + popl %eax # Numero parametri - # Controllo argomenti se sbagliati mostro l'utilizzo corretto - cmpl $3, %eax - jne _show_usage + # Controllo argomenti, se sbagliati mostro l'utilizzo corretto + cmpl $3, %eax + jne _show_usage - popl %eax # nome programma - popl %eax # primo parametro - popl %ebx # secondo parametro + popl %eax # Nome programma + popl %eax # Primo parametro (nome file di input) + popl %ebx # Secondo parametro (nome file di output) - # NB: non salvo ebp in quanto non ha alcuna utilità farlo + # NB: non salvo ebp in quanto non ha alcuna utilità # nella funzione start che comunque non ritorna - movl %esp, %ebp - # Apertura dei file - call _open_files + movl %esp, %ebp - # 4) chiudo tutti i file, esco dal programma correttamente + call _open_files # Apertura dei file _main_loop: - # Leggiamo la riga - call _read_line + call _read_line # Leggiamo la riga - # Caso EOF - cmpl $-1, %ebx - je _end + cmpl $-1, %ebx # EOF se ebx == -1 + je _end - # Controllo delle variabili - call _check + call _check # Controllo delle variabili - # Scrittura della riga di output su file - call _write_line + call _write_line # Scrittura delle variabili di output su file - # Leggi un altra riga fino che non trovi la fine del file - jmp _main_loop + jmp _main_loop # Leggi un altra riga finché non è EOF _end: - - call _close_files + + call _close_files # Chiudi correttamente i file # sys_exit(0); - movl $SYS_EXIT, %eax - movl $0, %ebx - int $SYSCALL + movl $SYS_EXIT, %eax + movl $0, %ebx + int $SYSCALL _show_usage: - # esce in caso di errore + # esce in caso di errore con codice 1 # sys_write(stdout, usage, USAGE_LENGTH); - movl $SYS_WRITE, %eax - movl $STDOUT, %ebx - movl $usage, %ecx - movl $USAGE_LENGTH, %edx - int $SYSCALL + movl $SYS_WRITE, %eax + movl $STDOUT, %ebx + movl $usage, %ecx + movl $USAGE_LENGTH, %edx + int $SYSCALL # sys_exit(1); - movl $SYS_EXIT, %eax - movl $1, %ebx - int $SYSCALL + movl $SYS_EXIT, %eax + movl $1, %ebx + int $SYSCALL diff --git a/src/open_files.s b/src/open_files.s index 288e777..afc1444 100644 --- a/src/open_files.s +++ b/src/open_files.s @@ -1,64 +1,71 @@ -# file contenente la funzione che si occupa di aprire i file di input e di -# output, i file descriptor vengono inseriti in variabili globali -# si suppone che il nome dei due file siano salvati negli indirizzi contenuti -# rispettivamente in %eax(input) ed in %ebx(output) -.code32 # per indicare all' assemblatore di - # assemblare a 32 bit +# Progetto Assembly 2016 +# File: open_files.s +# Autori: Noè Murr, Mirko Morati +# +# Descrizione: File contenente la funzione che si occupa di aprire i file di input e di +# output, i file descriptor vengono inseriti in variabili globali. +# Si suppone che il nome dei due file siano salvati negli indirizzi contenuti +# rispettivamente in %eax (input) ed in %ebx (output). + .include "syscall.inc" .section .text + error_opening_files: .asciz "errore nell' apertura dei file\n" - .equ ERROR_OPENING_LENGHT, .-error_opening_files - .globl _open_files # dichiaro la funzione globale - .type _open_files, @function # dichiaro l' etichetta come una funzione + .equ ERROR_OPENING_LENGTH, .-error_opening_files + + .globl _open_files # Dichiaro la funzione globale + .type _open_files, @function # Dichiaro l'etichetta come una funzione _open_files: pushl %ebp movl %esp, %ebp - pushl %ebx # pusho l' indirizzo del file di output sullo - # stack + pushl %ebx # Pusho l' indirizzo del file di output + # sullo stack - movl %eax, %ebx # sposto l' indirizzo del file che vado + movl %eax, %ebx # Sposto l' indirizzo del file che vado # ad aprire in %ebx - movl $SYS_OPEN, %eax # chiamata di sistema open + movl $SYS_OPEN, %eax # Chiamata di sistema open movl $0, %ecx # read-only mode - int $SYSCALL # apro il file + int $SYSCALL # Apro il file cmpl $0, %eax jl _error_opening_files - movl %eax, input_fd # metto il file descriptor nella sua - # variabile + movl %eax, input_fd # Metto il file descriptor nella + # sua variabile - popl %ebx # riprendo l' indirizzo del nome del file + popl %ebx # Riprendo l' indirizzo del nome del file # di output che avevo messo sullo stack - movl $SYS_OPEN, %eax # chiamata di sistema open - movl $2, %ecx # read and write, mode - int $SYSCALL # apro il file + movl $SYS_OPEN, %eax # Chiamata di sistema open + movl $01101, %ecx # read and write mode + movl $0666, %edx # flags + int $SYSCALL # Apro il file cmpl $0, %eax jl _error_opening_files - movl %eax, output_fd # metto il file descriptor nella sua - # variabile come prima + movl %eax, output_fd # Metto il file descriptor nella + # sua variabile movl %ebp, %esp popl %ebp - ret # ritorna al chiamante + ret # Ritorna al chiamante _error_opening_files: - # sys_write(stdout, usage, USAGE_LENGHT); - movl $SYS_WRITE, %eax - movl $STDOUT, %ebx - movl $error_opening_files, %ecx - movl $ERROR_OPENING_LENGHT, %edx - int $SYSCALL - - # sys_exit(1); - movl $SYS_EXIT, %eax - movl $2, %ebx - int $SYSCALL + # Esce con codice di errore 2 + # sys_write(stdout, usage, USAGE_LENGTH); + movl $SYS_WRITE, %eax + movl $STDERR, %ebx + movl $error_opening_files, %ecx + movl $ERROR_OPENING_LENGTH, %edx + int $SYSCALL + + # sys_exit(2); + movl $SYS_EXIT, %eax + movl $2, %ebx + int $SYSCALL diff --git a/src/prova.txt b/src/prova.txt new file mode 100755 index 0000000..9275ab9 --- /dev/null +++ b/src/prova.txt @@ -0,0 +1,70 @@ +0,00,00 +0,00,00 +0,00,00 +0,00,00 +0,00,00 +0,00,00 +0,00,00 +0,01,00 +0,01,01 +0,01,02 +0,10,00 +0,10,01 +0,10,02 +0,11,00 +0,11,01 +0,11,02 +0,11,03 +0,11,04 +0,10,00 +0,10,01 +0,01,00 +0,01,01 +0,11,00 +0,11,01 +0,11,02 +0,01,00 +0,01,01 +0,01,02 +0,01,03 +0,01,04 +0,01,05 +0,10,00 +0,10,01 +0,10,02 +0,10,03 +0,10,04 +0,10,05 +0,10,06 +0,10,07 +0,10,08 +0,10,09 +0,10,10 +0,10,11 +0,10,12 +0,10,13 +0,10,14 +0,10,15 +0,10,16 +0,10,17 +0,11,00 +0,11,01 +0,11,02 +0,11,03 +0,11,04 +0,11,05 +0,11,06 +0,11,07 +0,11,08 +0,11,09 +0,11,10 +0,11,11 +0,11,12 +0,11,13 +0,11,14 +1,11,15 +1,11,16 +1,11,17 +0,11,00 +0,11,01 +0,11,02 diff --git a/src/read_line.s b/src/read_line.s index ca87c13..09c814a 100644 --- a/src/read_line.s +++ b/src/read_line.s @@ -1,53 +1,53 @@ -# Funzione che legge una riga alla volta del file di input +# Progetto Assembly 2016 +# File: read_line.s +# Autori: Noè Murr, Mirko Morati +# +# Descrizione: Funzione che legge una riga alla volta del file di input. -.code32 # Per indicare all' assemblatore di assemblare - # a 32 bit .include "syscall.inc" .section .bss - .equ INPUT_BUFF_LEN, 9 - input_buff: .space INPUT_BUFF_LEN + .equ INPUT_BUFF_LEN, 9 + input_buff: .space INPUT_BUFF_LEN # Input buffer di 9 byte .section .text - .globl _read_line + .globl _read_line .type _read_line, @function _read_line: - pushl %ebp movl %esp, %ebp - # Lettura riga - + # Lettura riga # sys_read(input_fd, input_buff, INPUT_BUFF_LEN); movl input_fd, %ebx - movl $SYS_READ, %eax + movl $SYS_READ, %eax leal input_buff, %ecx movl $INPUT_BUFF_LEN, %edx int $SYSCALL - # Controllo EOF - cmpl $0, %eax # Se eax == 0 eof + cmpl $0, %eax # Se eax == 0 EOF je _eof - # Estrazione valori dalla stringa + # Estrazione dei valori di init, reset, rpm dal buffer leal input_buff, %edi call _atoi movl %eax, init - incl %edi + incl %edi # Salto il carattere ',' + call _atoi movl %eax, reset - incl %edi + incl %edi # Salto il carattere ',' + call _atoi movl %eax, rpm - movl %ebp, %esp popl %ebp - xorl %ebx, %ebx + xorl %ebx, %ebx # ebx = 0 permette di proseguire ret _eof: diff --git a/src/syscall.inc b/src/syscall.inc index 6e7bab8..f6d0318 100644 --- a/src/syscall.inc +++ b/src/syscall.inc @@ -1,13 +1,17 @@ -# file di definizione delle chiamate di sistema linux +# Progetto Assembly 2016 +# File: open_files.s +# Autori: Noè Murr, Mirko Morati +# +# Descrizione: File di definizione delle chiamate di sistema linux -.equ SYS_EXIT, 1 -.equ SYS_READ, 3 -.equ SYS_WRITE, 4 -.equ SYS_OPEN, 5 -.equ SYS_CLOSE, 6 +.equ SYS_EXIT, 1 +.equ SYS_READ, 3 +.equ SYS_WRITE, 4 +.equ SYS_OPEN, 5 +.equ SYS_CLOSE, 6 -.equ STDIN, 0 -.equ STDOUT, 1 -.equ STDERR, 2 +.equ STDIN, 0 +.equ STDOUT, 1 +.equ STDERR, 2 -.equ SYSCALL, 0x80 +.equ SYSCALL, 0x80 diff --git a/src/write_line.s b/src/write_line.s index 193912d..05b6b5c 100644 --- a/src/write_line.s +++ b/src/write_line.s @@ -1,46 +1,52 @@ -# Funzione che scrive una riga alla volta nel file di output +# Progetto Assembly 2016 +# File: check.s +# Autori: Noè Murr, Mirko Morati +# +# Descrizione: Funzione che scrive una riga alla volta nel file di output -.code32 # per indicare all' assemblatore di assemblare - # a 32 bit .include "syscall.inc" .section .bss - - .equ OUTPUT_BUFF_LEN, 8 + .equ OUTPUT_BUFF_LEN, 8 output_buff: .space OUTPUT_BUFF_LEN .section .text .globl _write_line .type _write_line, @function - MOD_00: .ascii "00" # motore spento - MOD_01: .ascii "01" # motore sotto giri - MOD_10: .ascii "10" # motore in stato ottimale - MOD_11: .ascii "11" # motore fuori giri - .equ MOD_LEN, 2 + MOD_00: .ascii "00" # motore spento + MOD_01: .ascii "01" # motore sotto giri + MOD_10: .ascii "10" # motore in stato ottimale + MOD_11: .ascii "11" # motore fuori giri + .equ MOD_LEN, 2 _write_line: - pushl %ebp movl %esp, %ebp - leal output_buff, %edi # spostiamo il puntatore del buffer di output in EDI + leal output_buff, %edi # spostiamo il puntatore + # del buffer di output in EDI - cmpl $1, alm # se l'allarme e' stampiamo 1 altrimenti 0 senza chiamare funzioni + cmpl $1, alm # se l'allarme è 1 stampiamo 1 + # altrimenti 0 senza chiamare funzioni je _alm_1 _alm_0: movl $48, (%edi) jmp _print_mod + _alm_1: movl $49, (%edi) _print_mod: - - movl $44, 1(%edi) # aggiungiamo la virgola dopo il segnale di allarme - addl $2, %edi # spostiamo un immaginario cursore nella posizione dove stampare la mod - - cmpl $1, mod # controlliamo il valore di mod e stampiamo la stringa corretta - je _mod_1 # in base alla giusta modalita' di funzionamento + movl $44, 1(%edi) # aggiungiamo la virgola dopo + # il segnale di allarme + addl $2, %edi # spostiamo un immaginario cursore + # nella posizione dove stampare la mod + + cmpl $1, mod # controlliamo il valore di mod + # e stampiamo la stringa corretta in base + # alla giusta modalita' di funzionamento + je _mod_1 cmpl $2, mod je _mod_2 cmpl $3, mod @@ -62,25 +68,27 @@ _mod_3: movl MOD_11, %eax _end_print_mod: - movl %eax, (%edi) # mettiamo la stringa giusta nell' output_buff ricordando che prima - addl $MOD_LEN, %edi # spostato il cursore (la posizione di edi) nel punto esatto dove scrivere - movl $44, (%edi) # aggiungiamo la virgola - incl %edi # spostiamo il cursore - + movl %eax, (%edi) # mettiamo la stringa nell' output_buff + addl $MOD_LEN, %edi # spostato il cursore (la posizione di edi) + # nel punto esatto dove scrivere + movl $44, (%edi) # aggiungiamo la virgola + incl %edi # spostiamo il cursore - cmpl $10, numb # controlliamo se il numero di secondi e' ad una sola cifra in tal caso - jl _numb_one_digit # saltiamo in un punto in cui aggiungiamo uno 0 davanti al numero + cmpl $10, numb # controlliamo se il numero di secondi + # è ad una sola cifra, in tal caso + # aggiungiamola cifra 0 + jl _numb_one_digit _print_numb: + movl numb, %eax # prepariamo la chiamata per itoa - movl numb, %eax # prepariamo la chiamata per itoa - - call _itoa # chiamiamo itoa + call _itoa # chiamiamo itoa - leal output_buff, %edi # ricarichiamo il puntatore di output_buff in edi - addl $7, %edi # e ci aggiungiamo 7 per arrivare alla fine della stringa - movl $10, (%edi) # punto nel quale aggiungiamo un \n + leal output_buff, %edi # mettiamo il puntatore di output_buff in edi + addl $7, %edi # ci aggiungiamo 7 per arrivare + # alla fine della stringa, + movl $10, (%edi) # punto nel quale aggiungiamo un \n movl $SYS_WRITE, %eax movl output_fd, %ebx diff --git a/tex/_start_flow.pdf b/tex/_start_flow.pdf new file mode 100644 index 0000000..d67c228 Binary files /dev/null and b/tex/_start_flow.pdf differ diff --git a/tex/codice.aux b/tex/codice.aux new file mode 100644 index 0000000..743aafb --- /dev/null +++ b/tex/codice.aux @@ -0,0 +1,45 @@ +\relax +\providecommand\zref@newlabel[2]{} +\providecommand\hyper@newdestlabel[2]{} +\providecommand\HyperFirstAtBeginDocument{\AtBeginDocument} +\HyperFirstAtBeginDocument{\ifx\hyper@anchor\@undefined +\global\let\oldcontentsline\contentsline +\gdef\contentsline#1#2#3#4{\oldcontentsline{#1}{#2}{#3}} +\global\let\oldnewlabel\newlabel +\gdef\newlabel#1#2{\newlabelxx{#1}#2} +\gdef\newlabelxx#1#2#3#4#5#6{\oldnewlabel{#1}{{#2}{#3}}} +\AtEndDocument{\ifx\hyper@anchor\@undefined +\let\contentsline\oldcontentsline +\let\newlabel\oldnewlabel +\fi} +\fi} +\global\let\hyper@last\relax +\gdef\HyperFirstAtBeginDocument#1{#1} +\providecommand\HyField@AuxAddToFields[1]{} +\providecommand\HyField@AuxAddToCoFields[2]{} +\select@language{italian} +\@writefile{toc}{\select@language{italian}} +\@writefile{lof}{\select@language{italian}} +\@writefile{lot}{\select@language{italian}} +\select@language{italian} +\@writefile{toc}{\select@language{italian}} +\@writefile{lof}{\select@language{italian}} +\@writefile{lot}{\select@language{italian}} +\@writefile{toc}{\contentsline {section}{\numberline {1}main.s}{3}{section.1}} +\@writefile{toc}{\contentsline {section}{\numberline {2}open\_files.s}{4}{section.2}} +\@writefile{lol}{\contentsline {lstlisting}{../src/open\textunderscore files.s}{4}{lstlisting.-2}} +\@writefile{toc}{\contentsline {section}{\numberline {3}read\_line.s}{6}{section.3}} +\@writefile{lol}{\contentsline {lstlisting}{../src/read\textunderscore line.s}{6}{lstlisting.-3}} +\@writefile{toc}{\contentsline {section}{\numberline {4}atoi.s}{7}{section.4}} +\@writefile{lol}{\contentsline {lstlisting}{../src/atoi.s}{7}{lstlisting.-4}} +\@writefile{toc}{\contentsline {section}{\numberline {5}check.s}{8}{section.5}} +\@writefile{lol}{\contentsline {lstlisting}{../src/check.s}{8}{lstlisting.-5}} +\@writefile{toc}{\contentsline {section}{\numberline {6}itoa.s}{10}{section.6}} +\@writefile{lol}{\contentsline {lstlisting}{../src/itoa.s}{10}{lstlisting.-6}} +\@writefile{toc}{\contentsline {section}{\numberline {7}write\_line.s}{11}{section.7}} +\@writefile{lol}{\contentsline {lstlisting}{../src/write\textunderscore line.s}{11}{lstlisting.-7}} +\@writefile{toc}{\contentsline {section}{\numberline {8}close\_files.s}{13}{section.8}} +\@writefile{lol}{\contentsline {lstlisting}{../src/close\textunderscore files.s}{13}{lstlisting.-8}} +\newlabel{LastPage}{{}{14}{}{page.14}{}} +\xdef\lastpage@lastpage{14} +\xdef\lastpage@lastpageHy{14} diff --git a/tex/codice.log b/tex/codice.log new file mode 100644 index 0000000..cd3d426 --- /dev/null +++ b/tex/codice.log @@ -0,0 +1,1804 @@ +This is pdfTeX, Version 3.14159265-2.6-1.40.16 (TeX Live 2015) (preloaded format=pdflatex 2016.1.8) 10 JUL 2016 21:14 +entering extended mode + restricted \write18 enabled. + %&-line parsing enabled. +**codice.tex +(./codice.tex +LaTeX2e <2015/01/01> +Babel <3.9l> and hyphenation patterns for 79 languages loaded. +(/usr/local/texlive/2015/texmf-dist/tex/latex/base/article.cls +Document Class: article 2014/09/29 v1.4h Standard LaTeX document class +(/usr/local/texlive/2015/texmf-dist/tex/latex/base/size11.clo +File: size11.clo 2014/09/29 v1.4h Standard LaTeX file (size option) +) +\c@part=\count79 +\c@section=\count80 +\c@subsection=\count81 +\c@subsubsection=\count82 +\c@paragraph=\count83 +\c@subparagraph=\count84 +\c@figure=\count85 +\c@table=\count86 +\abovecaptionskip=\skip41 +\belowcaptionskip=\skip42 +\bibindent=\dimen102 +) +(/usr/local/texlive/2015/texmf-dist/tex/latex/base/fontenc.sty +Package: fontenc 2005/09/27 v1.99g Standard LaTeX package + +(/usr/local/texlive/2015/texmf-dist/tex/latex/base/t1enc.def +File: t1enc.def 2005/09/27 v1.99g Standard LaTeX file +LaTeX Font Info: Redeclaring font encoding T1 on input line 48. +)) +(/usr/local/texlive/2015/texmf-dist/tex/latex/base/inputenc.sty +Package: inputenc 2015/03/17 v1.2c Input encoding file +\inpenc@prehook=\toks14 +\inpenc@posthook=\toks15 + +(/usr/local/texlive/2015/texmf-dist/tex/latex/ucs/utf8x.def +File: utf8x.def 2004/10/17 UCS: Input encoding UTF-8 +)) +(/usr/local/texlive/2015/texmf-dist/tex/latex/ucs/ucs.sty +Package: ucs 2013/05/11 v2.2 UCS: Unicode input support + +(/usr/local/texlive/2015/texmf-dist/tex/latex/ucs/data/uni-global.def +File: uni-global.def 2013/05/13 UCS: Unicode global data +) +\uc@secondtry=\count87 +\uc@combtoks=\toks16 +\uc@combtoksb=\toks17 +\uc@temptokena=\toks18 +) +(/usr/local/texlive/2015/texmf-dist/tex/generic/babel/babel.sty +Package: babel 2014/09/25 3.9l The Babel package + +(/usr/local/texlive/2015/texmf-dist/tex/generic/babel-italian/italian.ldf +Language: italian 2015/03/26 v1.3n Italian support from the babel system + +(/usr/local/texlive/2015/texmf-dist/tex/generic/babel/babel.def +File: babel.def 2014/09/25 3.9l Babel common definitions +\babel@savecnt=\count88 +\U@D=\dimen103 +) +\it@lettering=\count89 +\it@doublequoteactive=\count90 +\it@ISOcompliance=\count91 +)) +(/usr/local/texlive/2015/texmf-dist/tex/latex/etoolbox/etoolbox.sty +Package: etoolbox 2015/05/04 v2.2 e-TeX tools for LaTeX (JAW) +\etb@tempcnta=\count92 +) +(/usr/local/texlive/2015/texmf-dist/tex/latex/amsmath/amsmath.sty +Package: amsmath 2013/01/14 v2.14 AMS math features +\@mathmargin=\skip43 + +For additional information on amsmath, use the `?' option. +(/usr/local/texlive/2015/texmf-dist/tex/latex/amsmath/amstext.sty +Package: amstext 2000/06/29 v2.01 + +(/usr/local/texlive/2015/texmf-dist/tex/latex/amsmath/amsgen.sty +File: amsgen.sty 1999/11/30 v2.0 +\@emptytoks=\toks19 +\ex@=\dimen104 +)) +(/usr/local/texlive/2015/texmf-dist/tex/latex/amsmath/amsbsy.sty +Package: amsbsy 1999/11/29 v1.2d +\pmbraise@=\dimen105 +) +(/usr/local/texlive/2015/texmf-dist/tex/latex/amsmath/amsopn.sty +Package: amsopn 1999/12/14 v2.01 operator names +) +\inf@bad=\count93 +LaTeX Info: Redefining \frac on input line 210. +\uproot@=\count94 +\leftroot@=\count95 +LaTeX Info: Redefining \overline on input line 306. +\classnum@=\count96 +\DOTSCASE@=\count97 +LaTeX Info: Redefining \ldots on input line 378. +LaTeX Info: Redefining \dots on input line 381. +LaTeX Info: Redefining \cdots on input line 466. +\Mathstrutbox@=\box26 +\strutbox@=\box27 +\big@size=\dimen106 +LaTeX Font Info: Redeclaring font encoding OML on input line 566. +LaTeX Font Info: Redeclaring font encoding OMS on input line 567. +\macc@depth=\count98 +\c@MaxMatrixCols=\count99 +\dotsspace@=\muskip10 +\c@parentequation=\count100 +\dspbrk@lvl=\count101 +\tag@help=\toks20 +\row@=\count102 +\column@=\count103 +\maxfields@=\count104 +\andhelp@=\toks21 +\eqnshift@=\dimen107 +\alignsep@=\dimen108 +\tagshift@=\dimen109 +\tagwidth@=\dimen110 +\totwidth@=\dimen111 +\lineht@=\dimen112 +\@envbody=\toks22 +\multlinegap=\skip44 +\multlinetaggap=\skip45 +\mathdisplay@stack=\toks23 +LaTeX Info: Redefining \[ on input line 2665. +LaTeX Info: Redefining \] on input line 2666. +) +(/usr/local/texlive/2015/texmf-dist/tex/latex/tools/calc.sty +Package: calc 2014/10/28 v4.3 Infix arithmetic (KKT,FJ) +\calc@Acount=\count105 +\calc@Bcount=\count106 +\calc@Adimen=\dimen113 +\calc@Bdimen=\dimen114 +\calc@Askip=\skip46 +\calc@Bskip=\skip47 +LaTeX Info: Redefining \setlength on input line 80. +LaTeX Info: Redefining \addtolength on input line 81. +\calc@Ccount=\count107 +\calc@Cskip=\skip48 +) +(/usr/local/texlive/2015/texmf-dist/tex/latex/geometry/geometry.sty +Package: geometry 2010/09/12 v5.6 Page Geometry + +(/usr/local/texlive/2015/texmf-dist/tex/latex/graphics/keyval.sty +Package: keyval 2014/10/28 v1.15 key=value parser (DPC) +\KV@toks@=\toks24 +) +(/usr/local/texlive/2015/texmf-dist/tex/generic/oberdiek/ifpdf.sty +Package: ifpdf 2011/01/30 v2.3 Provides the ifpdf switch (HO) +Package ifpdf Info: pdfTeX in PDF mode is detected. +) +(/usr/local/texlive/2015/texmf-dist/tex/generic/oberdiek/ifvtex.sty +Package: ifvtex 2010/03/01 v1.5 Detect VTeX and its facilities (HO) +Package ifvtex Info: VTeX not detected. +) +(/usr/local/texlive/2015/texmf-dist/tex/generic/ifxetex/ifxetex.sty +Package: ifxetex 2010/09/12 v0.6 Provides ifxetex conditional +) +\Gm@cnth=\count108 +\Gm@cntv=\count109 +\c@Gm@tempcnt=\count110 +\Gm@bindingoffset=\dimen115 +\Gm@wd@mp=\dimen116 +\Gm@odd@mp=\dimen117 +\Gm@even@mp=\dimen118 +\Gm@layoutwidth=\dimen119 +\Gm@layoutheight=\dimen120 +\Gm@layouthoffset=\dimen121 +\Gm@layoutvoffset=\dimen122 +\Gm@dimlist=\toks25 +) +(/usr/local/texlive/2015/texmf-dist/tex/latex/xcolor/xcolor.sty +Package: xcolor 2007/01/21 v2.11 LaTeX color extensions (UK) + +(/usr/local/texlive/2015/texmf-dist/tex/latex/latexconfig/color.cfg +File: color.cfg 2007/01/18 v1.5 color configuration of teTeX/TeXLive +) +Package xcolor Info: Package option `usenames' ignored on input line 216. +Package xcolor Info: Driver file: pdftex.def on input line 225. + +(/usr/local/texlive/2015/texmf-dist/tex/latex/pdftex-def/pdftex.def +File: pdftex.def 2011/05/27 v0.06d Graphics/color for pdfTeX + +(/usr/local/texlive/2015/texmf-dist/tex/generic/oberdiek/infwarerr.sty +Package: infwarerr 2010/04/08 v1.3 Providing info/warning/error messages (HO) +) +(/usr/local/texlive/2015/texmf-dist/tex/generic/oberdiek/ltxcmds.sty +Package: ltxcmds 2011/11/09 v1.22 LaTeX kernel commands for general use (HO) +) +\Gread@gobject=\count111 +) +Package xcolor Info: Model `cmy' substituted by `cmy0' on input line 1337. +Package xcolor Info: Model `hsb' substituted by `rgb' on input line 1341. +Package xcolor Info: Model `RGB' extended on input line 1353. +Package xcolor Info: Model `HTML' substituted by `rgb' on input line 1355. +Package xcolor Info: Model `Hsb' substituted by `hsb' on input line 1356. +Package xcolor Info: Model `tHsb' substituted by `hsb' on input line 1357. +Package xcolor Info: Model `HSB' substituted by `hsb' on input line 1358. +Package xcolor Info: Model `Gray' substituted by `gray' on input line 1359. +Package xcolor Info: Model `wave' substituted by `hsb' on input line 1360. + +(/usr/local/texlive/2015/texmf-dist/tex/latex/graphics/dvipsnam.def +File: dvipsnam.def 2014/10/14 v3.0j Driver-dependent file (DPC,SPQR) +)) +(/usr/local/texlive/2015/texmf-dist/tex/latex/fancyhdr/fancyhdr.sty +\fancy@headwidth=\skip49 +\f@ncyO@elh=\skip50 +\f@ncyO@erh=\skip51 +\f@ncyO@olh=\skip52 +\f@ncyO@orh=\skip53 +\f@ncyO@elf=\skip54 +\f@ncyO@erf=\skip55 +\f@ncyO@olf=\skip56 +\f@ncyO@orf=\skip57 +) +(/usr/local/texlive/2015/texmf-dist/tex/latex/lastpage/lastpage.sty +Package: lastpage 2015/03/29 v1.2m Refers to last page's name (HMM; JPG) +) +(/usr/local/texlive/2015/texmf-dist/tex/latex/fancyhdr/extramarks.sty +\@temptokenb=\toks26 +) +(/usr/local/texlive/2015/texmf-dist/tex/latex/graphics/graphicx.sty +Package: graphicx 2014/10/28 v1.0g Enhanced LaTeX Graphics (DPC,SPQR) + +(/usr/local/texlive/2015/texmf-dist/tex/latex/graphics/graphics.sty +Package: graphics 2014/10/28 v1.0p Standard LaTeX Graphics (DPC,SPQR) + +(/usr/local/texlive/2015/texmf-dist/tex/latex/graphics/trig.sty +Package: trig 1999/03/16 v1.09 sin cos tan (DPC) +) +(/usr/local/texlive/2015/texmf-dist/tex/latex/latexconfig/graphics.cfg +File: graphics.cfg 2010/04/23 v1.9 graphics configuration of TeX Live +) +Package graphics Info: Driver file: pdftex.def on input line 94. +) +\Gin@req@height=\dimen123 +\Gin@req@width=\dimen124 +) +(/usr/local/texlive/2015/texmf-dist/tex/latex/listings/listings.sty +\lst@mode=\count112 +\lst@gtempboxa=\box28 +\lst@token=\toks27 +\lst@length=\count113 +\lst@currlwidth=\dimen125 +\lst@column=\count114 +\lst@pos=\count115 +\lst@lostspace=\dimen126 +\lst@width=\dimen127 +\lst@newlines=\count116 +\lst@lineno=\count117 +\lst@maxwidth=\dimen128 + +(/usr/local/texlive/2015/texmf-dist/tex/latex/listings/lstmisc.sty +File: lstmisc.sty 2014/09/06 1.5e (Carsten Heinz) +\c@lstnumber=\count118 +\lst@skipnumbers=\count119 +\lst@framebox=\box29 +) +(/usr/local/texlive/2015/texmf-dist/tex/latex/listings/listings.cfg +File: listings.cfg 2014/09/06 1.5e listings configuration +)) +Package: listings 2014/09/06 1.5e (Carsten Heinz) + +(/usr/local/texlive/2015/texmf-dist/tex/latex/psnfss/courier.sty +Package: courier 2005/04/12 PSNFSS-v9.2a (WaS) +) +(/usr/local/texlive/2015/texmf-dist/tex/latex/lipsum/lipsum.sty +Package: lipsum 2014/07/27 v1.3 150 paragraphs of Lorem Ipsum dummy text +\c@lips@count=\count120 +) +(/usr/local/texlive/2015/texmf-dist/tex/latex/pdfpages/pdfpages.sty +Package: pdfpages 2015/05/11 v0.4x Insert pages of external PDF documents (AM) + +(/usr/local/texlive/2015/texmf-dist/tex/latex/base/ifthen.sty +Package: ifthen 2014/09/29 v1.1c Standard LaTeX ifthen package (DPC) +) +(/usr/local/texlive/2015/texmf-dist/tex/latex/eso-pic/eso-pic.sty +Package: eso-pic 2015/04/20 v2.0e eso-pic (RN) + +(/usr/local/texlive/2015/texmf-dist/tex/generic/oberdiek/atbegshi.sty +Package: atbegshi 2011/10/05 v1.16 At begin shipout hook (HO) +)) +\AM@pagewidth=\dimen129 +\AM@pageheight=\dimen130 + +(/usr/local/texlive/2015/texmf-dist/tex/latex/pdfpages/pppdftex.def +File: pppdftex.def 2015/05/11 v0.4x Pdfpages driver for pdfTeX (AM) +) +\AM@pagebox=\box30 +\AM@toc@title=\toks28 +\c@AM@survey=\count121 +\AM@templatesizebox=\box31 +) +(/usr/local/texlive/2015/texmf-dist/tex/latex/mdframed/mdframed.sty +Package: mdframed 2013/07/01 1.9b: mdframed + +(/usr/local/texlive/2015/texmf-dist/tex/latex/oberdiek/kvoptions.sty +Package: kvoptions 2011/06/30 v3.11 Key value format for package options (HO) + +(/usr/local/texlive/2015/texmf-dist/tex/generic/oberdiek/kvsetkeys.sty +Package: kvsetkeys 2012/04/25 v1.16 Key value parser (HO) + +(/usr/local/texlive/2015/texmf-dist/tex/generic/oberdiek/etexcmds.sty +Package: etexcmds 2011/02/16 v1.5 Avoid name clashes with e-TeX commands (HO) + +(/usr/local/texlive/2015/texmf-dist/tex/generic/oberdiek/ifluatex.sty +Package: ifluatex 2010/03/01 v1.3 Provides the ifluatex switch (HO) +Package ifluatex Info: LuaTeX not detected. +) +Package etexcmds Info: Could not find \expanded. +(etexcmds) That can mean that you are not using pdfTeX 1.50 or +(etexcmds) that some package has redefined \expanded. +(etexcmds) In the latter case, load this package earlier. +))) +(/usr/local/texlive/2015/texmf-dist/tex/latex/l3packages/xparse/xparse.sty +(/usr/local/texlive/2015/texmf-dist/tex/latex/l3kernel/expl3.sty +Package: expl3 2015/03/01 v5547 L3 programming layer (loader) + +(/usr/local/texlive/2015/texmf-dist/tex/latex/l3kernel/expl3-code.tex +Package: expl3 2015/03/01 v5547 L3 programming layer (code) +L3 Module: l3bootstrap 2015/02/28 v5542 L3 Bootstrap code +L3 Module: l3names 2015/02/24 v5535 L3 Namespace for primitives +L3 Module: l3basics 2015/01/27 v5500 L3 Basic definitions +L3 Module: l3expan 2014/11/27 v5472 L3 Argument expansion +L3 Module: l3tl 2015/01/27 v5500 L3 Token lists +L3 Module: l3str 2015/03/01 v5545 L3 Strings +L3 Module: l3seq 2014/08/23 v5354 L3 Sequences and stacks +L3 Module: l3int 2015/02/21 v5529 L3 Integers +\c_max_int=\count122 +\l_tmpa_int=\count123 +\l_tmpb_int=\count124 +\g_tmpa_int=\count125 +\g_tmpb_int=\count126 +L3 Module: l3quark 2014/08/23 v5354 L3 Quarks +L3 Module: l3prg 2014/08/23 v5354 L3 Control structures +\g__prg_map_int=\count127 +L3 Module: l3clist 2014/08/23 v5354 L3 Comma separated lists +L3 Module: l3token 2014/09/15 v5422 L3 Experimental token manipulation +L3 Module: l3prop 2014/08/23 v5354 L3 Property lists +L3 Module: l3msg 2015/02/26 v5537 L3 Messages +L3 Module: l3file 2014/08/24 v5369 L3 File and I/O operations +\l_iow_line_count_int=\count128 +\l__iow_target_count_int=\count129 +\l__iow_current_line_int=\count130 +\l__iow_current_word_int=\count131 +\l__iow_current_indentation_int=\count132 +L3 Module: l3skip 2014/08/23 v5354 L3 Dimensions and skips +\c_zero_dim=\dimen131 +\c_max_dim=\dimen132 +\l_tmpa_dim=\dimen133 +\l_tmpb_dim=\dimen134 +\g_tmpa_dim=\dimen135 +\g_tmpb_dim=\dimen136 +\c_zero_skip=\skip58 +\c_max_skip=\skip59 +\l_tmpa_skip=\skip60 +\l_tmpb_skip=\skip61 +\g_tmpa_skip=\skip62 +\g_tmpb_skip=\skip63 +\c_zero_muskip=\muskip11 +\c_max_muskip=\muskip12 +\l_tmpa_muskip=\muskip13 +\l_tmpb_muskip=\muskip14 +\g_tmpa_muskip=\muskip15 +\g_tmpb_muskip=\muskip16 +L3 Module: l3keys 2015/01/27 v5500 L3 Key-value interfaces +\g__keyval_level_int=\count133 +\l_keys_choice_int=\count134 +L3 Module: l3fp 2014/08/22 v5336 L3 Floating points +\c__fp_leading_shift_int=\count135 +\c__fp_middle_shift_int=\count136 +\c__fp_trailing_shift_int=\count137 +\c__fp_big_leading_shift_int=\count138 +\c__fp_big_middle_shift_int=\count139 +\c__fp_big_trailing_shift_int=\count140 +\c__fp_Bigg_leading_shift_int=\count141 +\c__fp_Bigg_middle_shift_int=\count142 +\c__fp_Bigg_trailing_shift_int=\count143 +L3 Module: l3box 2014/08/23 v5354 L3 Experimental boxes +\c_empty_box=\box32 +\l_tmpa_box=\box33 +\l_tmpb_box=\box34 +\g_tmpa_box=\box35 +\g_tmpb_box=\box36 +L3 Module: l3coffins 2014/08/23 v5354 L3 Coffin code layer +\l__coffin_internal_box=\box37 +\l__coffin_internal_dim=\dimen137 +\l__coffin_offset_x_dim=\dimen138 +\l__coffin_offset_y_dim=\dimen139 +\l__coffin_x_dim=\dimen140 +\l__coffin_y_dim=\dimen141 +\l__coffin_x_prime_dim=\dimen142 +\l__coffin_y_prime_dim=\dimen143 +\c_empty_coffin=\box38 +\l__coffin_aligned_coffin=\box39 +\l__coffin_aligned_internal_coffin=\box40 +\l_tmpa_coffin=\box41 +\l_tmpb_coffin=\box42 +\l__coffin_display_coffin=\box43 +\l__coffin_display_coord_coffin=\box44 +\l__coffin_display_pole_coffin=\box45 +\l__coffin_display_offset_dim=\dimen144 +\l__coffin_display_x_dim=\dimen145 +\l__coffin_display_y_dim=\dimen146 +L3 Module: l3color 2014/08/23 v5354 L3 Experimental color support +L3 Module: l3candidates 2015/03/01 v5544 L3 Experimental additions to l3kernel +\l__box_top_dim=\dimen147 +\l__box_bottom_dim=\dimen148 +\l__box_left_dim=\dimen149 +\l__box_right_dim=\dimen150 +\l__box_top_new_dim=\dimen151 +\l__box_bottom_new_dim=\dimen152 +\l__box_left_new_dim=\dimen153 +\l__box_right_new_dim=\dimen154 +\l__box_internal_box=\box46 +\l__coffin_bounding_shift_dim=\dimen155 +\l__coffin_left_corner_dim=\dimen156 +\l__coffin_right_corner_dim=\dimen157 +\l__coffin_bottom_corner_dim=\dimen158 +\l__coffin_top_corner_dim=\dimen159 +\l__coffin_scaled_total_height_dim=\dimen160 +\l__coffin_scaled_width_dim=\dimen161 +) +(/usr/local/texlive/2015/texmf-dist/tex/latex/l3kernel/l3unicode-data.def +File: l3unicode-data.def 2015/03/01 v5544 L3 Unicode data +) +(/usr/local/texlive/2015/texmf-dist/tex/latex/l3kernel/l3pdfmode.def +File: l3pdfmode.def 2015/03/01 v5544 L3 Experimental driver: PDF mode +\l__driver_color_stack_int=\count144 +)) +Package: xparse 2014/11/25 v5471 L3 Experimental document command parser +\l__xparse_current_arg_int=\count145 +\l__xparse_m_args_int=\count146 +\l__xparse_mandatory_args_int=\count147 +\l__xparse_processor_int=\count148 +\l__xparse_v_nesting_int=\count149 +) +(/usr/local/texlive/2015/texmf-dist/tex/latex/oberdiek/zref-abspage.sty +Package: zref-abspage 2012/04/04 v2.24 Module abspage for zref (HO) + +(/usr/local/texlive/2015/texmf-dist/tex/latex/oberdiek/zref-base.sty +Package: zref-base 2012/04/04 v2.24 Module base for zref (HO) + +(/usr/local/texlive/2015/texmf-dist/tex/generic/oberdiek/kvdefinekeys.sty +Package: kvdefinekeys 2011/04/07 v1.3 Define keys (HO) +) +(/usr/local/texlive/2015/texmf-dist/tex/generic/oberdiek/pdftexcmds.sty +Package: pdftexcmds 2011/11/29 v0.20 Utility functions of pdfTeX for LuaTeX (HO +) +Package pdftexcmds Info: LuaTeX not detected. +Package pdftexcmds Info: \pdf@primitive is available. +Package pdftexcmds Info: \pdf@ifprimitive is available. +Package pdftexcmds Info: \pdfdraftmode found. +) +(/usr/local/texlive/2015/texmf-dist/tex/latex/oberdiek/auxhook.sty +Package: auxhook 2011/03/04 v1.3 Hooks for auxiliary files (HO) +) +Package zref Info: New property list: main on input line 759. +Package zref Info: New property: default on input line 760. +Package zref Info: New property: page on input line 761. +) +\c@abspage=\count150 +Package zref Info: New property: abspage on input line 62. +) +(/usr/local/texlive/2015/texmf-dist/tex/latex/needspace/needspace.sty +Package: needspace 2010/09/12 v1.3d reserve vertical space +) +\mdf@templength=\skip64 +\c@mdf@globalstyle@cnt=\count151 +\mdf@skipabove@length=\skip65 +\mdf@skipbelow@length=\skip66 +\mdf@leftmargin@length=\skip67 +\mdf@rightmargin@length=\skip68 +\mdf@innerleftmargin@length=\skip69 +\mdf@innerrightmargin@length=\skip70 +\mdf@innertopmargin@length=\skip71 +\mdf@innerbottommargin@length=\skip72 +\mdf@splittopskip@length=\skip73 +\mdf@splitbottomskip@length=\skip74 +\mdf@outermargin@length=\skip75 +\mdf@innermargin@length=\skip76 +\mdf@linewidth@length=\skip77 +\mdf@innerlinewidth@length=\skip78 +\mdf@middlelinewidth@length=\skip79 +\mdf@outerlinewidth@length=\skip80 +\mdf@roundcorner@length=\skip81 +\mdf@footenotedistance@length=\skip82 +\mdf@userdefinedwidth@length=\skip83 +\mdf@needspace@length=\skip84 +\mdf@frametitleaboveskip@length=\skip85 +\mdf@frametitlebelowskip@length=\skip86 +\mdf@frametitlerulewidth@length=\skip87 +\mdf@frametitleleftmargin@length=\skip88 +\mdf@frametitlerightmargin@length=\skip89 +\mdf@shadowsize@length=\skip90 +\mdf@extratopheight@length=\skip91 +\mdf@subtitleabovelinewidth@length=\skip92 +\mdf@subtitlebelowlinewidth@length=\skip93 +\mdf@subtitleaboveskip@length=\skip94 +\mdf@subtitlebelowskip@length=\skip95 +\mdf@subtitleinneraboveskip@length=\skip96 +\mdf@subtitleinnerbelowskip@length=\skip97 +\mdf@subsubtitleabovelinewidth@length=\skip98 +\mdf@subsubtitlebelowlinewidth@length=\skip99 +\mdf@subsubtitleaboveskip@length=\skip100 +\mdf@subsubtitlebelowskip@length=\skip101 +\mdf@subsubtitleinneraboveskip@length=\skip102 +\mdf@subsubtitleinnerbelowskip@length=\skip103 + +(/usr/local/texlive/2015/texmf-dist/tex/latex/mdframed/md-frame-0.mdf +File: md-frame-0.mdf 2013/07/01\ 1.9b: md-frame-0 +) +\mdf@frametitlebox=\box47 +\mdf@footnotebox=\box48 +\mdf@splitbox@one=\box49 +\mdf@splitbox@two=\box50 +\mdf@splitbox@save=\box51 +\mdfsplitboxwidth=\skip104 +\mdfsplitboxtotalwidth=\skip105 +\mdfsplitboxheight=\skip106 +\mdfsplitboxdepth=\skip107 +\mdfsplitboxtotalheight=\skip108 +\mdfframetitleboxwidth=\skip109 +\mdfframetitleboxtotalwidth=\skip110 +\mdfframetitleboxheight=\skip111 +\mdfframetitleboxdepth=\skip112 +\mdfframetitleboxtotalheight=\skip113 +\mdffootnoteboxwidth=\skip114 +\mdffootnoteboxtotalwidth=\skip115 +\mdffootnoteboxheight=\skip116 +\mdffootnoteboxdepth=\skip117 +\mdffootnoteboxtotalheight=\skip118 +\mdftotallinewidth=\skip119 +\mdfboundingboxwidth=\skip120 +\mdfboundingboxtotalwidth=\skip121 +\mdfboundingboxheight=\skip122 +\mdfboundingboxdepth=\skip123 +\mdfboundingboxtotalheight=\skip124 +\mdf@freevspace@length=\skip125 +\mdf@horizontalwidthofbox@length=\skip126 +\mdf@verticalmarginwhole@length=\skip127 +\mdf@horizontalspaceofbox=\skip128 +\mdfsubtitleheight=\skip129 +\mdfsubsubtitleheight=\skip130 +\c@mdfcountframes=\count152 + +****** mdframed patching \endmdf@trivlist + +****** -- success****** + +................................................. +. LaTeX info: "xparse/define-command" +. +. Defining command \newmdtheoremenv with sig. 'O{} m o m o ' on line 601. +................................................. +................................................. +. LaTeX info: "xparse/define-command" +. +. Defining command \mdtheorem with sig. ' O{} m o m o ' on line 701. +................................................. +\mdf@envdepth=\count153 +\c@mdf@env@i=\count154 +\c@mdf@env@ii=\count155 +\c@mdf@zref@counter=\count156 +Package zref Info: New property: mdf@pagevalue on input line 895. +) +(/usr/local/texlive/2015/texmf-dist/tex/latex/enumitem/enumitem.sty +Package: enumitem 2011/09/28 v3.5.2 Customized lists +\labelindent=\skip131 +\enit@outerparindent=\dimen162 +\enit@toks=\toks29 +\enit@inbox=\box52 +\enitdp@description=\count157 +) +(/usr/local/texlive/2015/texmf-dist/tex/latex/float/float.sty +Package: float 2001/11/08 v1.3d Float enhancements (AL) +\c@float@type=\count158 +\float@exts=\toks30 +\float@box=\box53 +\@float@everytoks=\toks31 +\@floatcapt=\box54 +) +(/usr/local/texlive/2015/texmf-dist/tex/latex/tools/array.sty +Package: array 2014/10/28 v2.4c Tabular extension package (FMi) +\col@sep=\dimen163 +\extrarowheight=\dimen164 +\NC@list=\toks32 +\extratabsurround=\skip132 +\backup@length=\skip133 +) +(/usr/local/texlive/2015/texmf-dist/tex/latex/oberdiek/zref-xr.sty +Package: zref-xr 2012/04/04 v2.24 Module xr for zref (HO) +Package zref Info: New property: url on input line 55. +Package zref Info: New property: urluse on input line 56. +Package zref Info: New property: externaldocument on input line 57. +\ZREF@xr@URL=\count159 +) +Package zref Info: New property: anchor on input line 31. +Package zref Info: New property: title on input line 31. +Package zref-xr Info: Label (zref) import from `elaborato.aux' on input line 31 +. +Package zref-xr Info: Statistics for `elaborato.aux': +(zref-xr) 0 zref label(s) found. + +(/usr/local/texlive/2015/texmf-dist/tex/latex/inconsolata/zi4.sty +Package: zi4 2014/06/22 v1.05 + +`inconsolata-zi4' v1.05, 2014/06/22 Text macros for Inconsolata (msharpe) +(/usr/local/texlive/2015/texmf-dist/tex/latex/base/textcomp.sty +Package: textcomp 2005/09/27 v1.99g Standard LaTeX package +Package textcomp Info: Sub-encoding information: +(textcomp) 5 = only ISO-Adobe without \textcurrency +(textcomp) 4 = 5 + \texteuro +(textcomp) 3 = 4 + \textohm +(textcomp) 2 = 3 + \textestimated + \textcurrency +(textcomp) 1 = TS1 - \textcircled - \t +(textcomp) 0 = TS1 (full) +(textcomp) Font families with sub-encoding setting implement +(textcomp) only a restricted character set as indicated. +(textcomp) Family '?' is the default used for unknown fonts. +(textcomp) See the documentation for details. +Package textcomp Info: Setting ? sub-encoding to TS1/1 on input line 79. + +(/usr/local/texlive/2015/texmf-dist/tex/latex/base/ts1enc.def +File: ts1enc.def 2001/06/05 v3.0e (jk/car/fm) Standard LaTeX file +) +LaTeX Info: Redefining \oldstylenums on input line 334. +Package textcomp Info: Setting cmr sub-encoding to TS1/0 on input line 349. +Package textcomp Info: Setting cmss sub-encoding to TS1/0 on input line 350. +Package textcomp Info: Setting cmtt sub-encoding to TS1/0 on input line 351. +Package textcomp Info: Setting cmvtt sub-encoding to TS1/0 on input line 352. +Package textcomp Info: Setting cmbr sub-encoding to TS1/0 on input line 353. +Package textcomp Info: Setting cmtl sub-encoding to TS1/0 on input line 354. +Package textcomp Info: Setting ccr sub-encoding to TS1/0 on input line 355. +Package textcomp Info: Setting ptm sub-encoding to TS1/4 on input line 356. +Package textcomp Info: Setting pcr sub-encoding to TS1/4 on input line 357. +Package textcomp Info: Setting phv sub-encoding to TS1/4 on input line 358. +Package textcomp Info: Setting ppl sub-encoding to TS1/3 on input line 359. +Package textcomp Info: Setting pag sub-encoding to TS1/4 on input line 360. +Package textcomp Info: Setting pbk sub-encoding to TS1/4 on input line 361. +Package textcomp Info: Setting pnc sub-encoding to TS1/4 on input line 362. +Package textcomp Info: Setting pzc sub-encoding to TS1/4 on input line 363. +Package textcomp Info: Setting bch sub-encoding to TS1/4 on input line 364. +Package textcomp Info: Setting put sub-encoding to TS1/5 on input line 365. +Package textcomp Info: Setting uag sub-encoding to TS1/5 on input line 366. +Package textcomp Info: Setting ugq sub-encoding to TS1/5 on input line 367. +Package textcomp Info: Setting ul8 sub-encoding to TS1/4 on input line 368. +Package textcomp Info: Setting ul9 sub-encoding to TS1/4 on input line 369. +Package textcomp Info: Setting augie sub-encoding to TS1/5 on input line 370. +Package textcomp Info: Setting dayrom sub-encoding to TS1/3 on input line 371. +Package textcomp Info: Setting dayroms sub-encoding to TS1/3 on input line 372. + +Package textcomp Info: Setting pxr sub-encoding to TS1/0 on input line 373. +Package textcomp Info: Setting pxss sub-encoding to TS1/0 on input line 374. +Package textcomp Info: Setting pxtt sub-encoding to TS1/0 on input line 375. +Package textcomp Info: Setting txr sub-encoding to TS1/0 on input line 376. +Package textcomp Info: Setting txss sub-encoding to TS1/0 on input line 377. +Package textcomp Info: Setting txtt sub-encoding to TS1/0 on input line 378. +Package textcomp Info: Setting lmr sub-encoding to TS1/0 on input line 379. +Package textcomp Info: Setting lmdh sub-encoding to TS1/0 on input line 380. +Package textcomp Info: Setting lmss sub-encoding to TS1/0 on input line 381. +Package textcomp Info: Setting lmssq sub-encoding to TS1/0 on input line 382. +Package textcomp Info: Setting lmvtt sub-encoding to TS1/0 on input line 383. +Package textcomp Info: Setting lmtt sub-encoding to TS1/0 on input line 384. +Package textcomp Info: Setting qhv sub-encoding to TS1/0 on input line 385. +Package textcomp Info: Setting qag sub-encoding to TS1/0 on input line 386. +Package textcomp Info: Setting qbk sub-encoding to TS1/0 on input line 387. +Package textcomp Info: Setting qcr sub-encoding to TS1/0 on input line 388. +Package textcomp Info: Setting qcs sub-encoding to TS1/0 on input line 389. +Package textcomp Info: Setting qpl sub-encoding to TS1/0 on input line 390. +Package textcomp Info: Setting qtm sub-encoding to TS1/0 on input line 391. +Package textcomp Info: Setting qzc sub-encoding to TS1/0 on input line 392. +Package textcomp Info: Setting qhvc sub-encoding to TS1/0 on input line 393. +Package textcomp Info: Setting futs sub-encoding to TS1/4 on input line 394. +Package textcomp Info: Setting futx sub-encoding to TS1/4 on input line 395. +Package textcomp Info: Setting futj sub-encoding to TS1/4 on input line 396. +Package textcomp Info: Setting hlh sub-encoding to TS1/3 on input line 397. +Package textcomp Info: Setting hls sub-encoding to TS1/3 on input line 398. +Package textcomp Info: Setting hlst sub-encoding to TS1/3 on input line 399. +Package textcomp Info: Setting hlct sub-encoding to TS1/5 on input line 400. +Package textcomp Info: Setting hlx sub-encoding to TS1/5 on input line 401. +Package textcomp Info: Setting hlce sub-encoding to TS1/5 on input line 402. +Package textcomp Info: Setting hlcn sub-encoding to TS1/5 on input line 403. +Package textcomp Info: Setting hlcw sub-encoding to TS1/5 on input line 404. +Package textcomp Info: Setting hlcf sub-encoding to TS1/5 on input line 405. +Package textcomp Info: Setting pplx sub-encoding to TS1/3 on input line 406. +Package textcomp Info: Setting pplj sub-encoding to TS1/3 on input line 407. +Package textcomp Info: Setting ptmx sub-encoding to TS1/4 on input line 408. +Package textcomp Info: Setting ptmj sub-encoding to TS1/4 on input line 409. +) +\zifour@ocount=\count160 +) +(/usr/local/texlive/2015/texmf-dist/tex/latex/pgf/frontendlayer/tikz.sty +(/usr/local/texlive/2015/texmf-dist/tex/latex/pgf/basiclayer/pgf.sty +(/usr/local/texlive/2015/texmf-dist/tex/latex/pgf/utilities/pgfrcs.sty +(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/utilities/pgfutil-common.te +x +\pgfutil@everybye=\toks33 +\pgfutil@tempdima=\dimen165 +\pgfutil@tempdimb=\dimen166 + +(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/utilities/pgfutil-common-li +sts.tex)) +(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/utilities/pgfutil-latex.def +\pgfutil@abb=\box55 +(/usr/local/texlive/2015/texmf-dist/tex/latex/ms/everyshi.sty +Package: everyshi 2001/05/15 v3.00 EveryShipout Package (MS) +)) +(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/utilities/pgfrcs.code.tex +Package: pgfrcs 2013/12/20 v3.0.0 (rcs-revision 1.28) +)) +Package: pgf 2013/12/18 v3.0.0 (rcs-revision 1.14) +(/usr/local/texlive/2015/texmf-dist/tex/latex/pgf/basiclayer/pgfcore.sty +(/usr/local/texlive/2015/texmf-dist/tex/latex/pgf/systemlayer/pgfsys.sty +(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/systemlayer/pgfsys.code.tex +Package: pgfsys 2013/11/30 v3.0.0 (rcs-revision 1.47) +(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/utilities/pgfkeys.code.tex +\pgfkeys@pathtoks=\toks34 +\pgfkeys@temptoks=\toks35 + +(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/utilities/pgfkeysfiltered.c +ode.tex +\pgfkeys@tmptoks=\toks36 +)) +\pgf@x=\dimen167 +\pgf@y=\dimen168 +\pgf@xa=\dimen169 +\pgf@ya=\dimen170 +\pgf@xb=\dimen171 +\pgf@yb=\dimen172 +\pgf@xc=\dimen173 +\pgf@yc=\dimen174 +\w@pgf@writea=\write3 +\r@pgf@reada=\read1 +\c@pgf@counta=\count161 +\c@pgf@countb=\count162 +\c@pgf@countc=\count163 +\c@pgf@countd=\count164 +\t@pgf@toka=\toks37 +\t@pgf@tokb=\toks38 +\t@pgf@tokc=\toks39 + +(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/systemlayer/pgf.cfg +File: pgf.cfg 2008/05/14 (rcs-revision 1.7) +) +Driver file for pgf: pgfsys-pdftex.def + +(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-pdftex.d +ef +File: pgfsys-pdftex.def 2013/07/18 (rcs-revision 1.33) + +(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-common-p +df.def +File: pgfsys-common-pdf.def 2013/10/10 (rcs-revision 1.13) +))) +(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/systemlayer/pgfsyssoftpath. +code.tex +File: pgfsyssoftpath.code.tex 2013/09/09 (rcs-revision 1.9) +\pgfsyssoftpath@smallbuffer@items=\count165 +\pgfsyssoftpath@bigbuffer@items=\count166 +) +(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/systemlayer/pgfsysprotocol. +code.tex +File: pgfsysprotocol.code.tex 2006/10/16 (rcs-revision 1.4) +)) +(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/basiclayer/pgfcore.code.tex +Package: pgfcore 2010/04/11 v3.0.0 (rcs-revision 1.7) +(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/math/pgfmath.code.tex +(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/math/pgfmathcalc.code.tex +(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/math/pgfmathutil.code.tex) +(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/math/pgfmathparser.code.tex +\pgfmath@dimen=\dimen175 +\pgfmath@count=\count167 +\pgfmath@box=\box56 +\pgfmath@toks=\toks40 +\pgfmath@stack@operand=\toks41 +\pgfmath@stack@operation=\toks42 +) +(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.code. +tex +(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.basic +.code.tex) +(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.trigo +nometric.code.tex) +(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.rando +m.code.tex) +(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.compa +rison.code.tex) +(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.base. +code.tex) +(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.round +.code.tex) +(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.misc. +code.tex) +(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.integ +erarithmetics.code.tex))) +(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/math/pgfmathfloat.code.tex +\c@pgfmathroundto@lastzeros=\count168 +)) +(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepoints.co +de.tex +File: pgfcorepoints.code.tex 2013/10/07 (rcs-revision 1.27) +\pgf@picminx=\dimen176 +\pgf@picmaxx=\dimen177 +\pgf@picminy=\dimen178 +\pgf@picmaxy=\dimen179 +\pgf@pathminx=\dimen180 +\pgf@pathmaxx=\dimen181 +\pgf@pathminy=\dimen182 +\pgf@pathmaxy=\dimen183 +\pgf@xx=\dimen184 +\pgf@xy=\dimen185 +\pgf@yx=\dimen186 +\pgf@yy=\dimen187 +\pgf@zx=\dimen188 +\pgf@zy=\dimen189 +) +(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathconst +ruct.code.tex +File: pgfcorepathconstruct.code.tex 2013/10/07 (rcs-revision 1.29) +\pgf@path@lastx=\dimen190 +\pgf@path@lasty=\dimen191 +) +(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathusage +.code.tex +File: pgfcorepathusage.code.tex 2013/12/13 (rcs-revision 1.23) +\pgf@shorten@end@additional=\dimen192 +\pgf@shorten@start@additional=\dimen193 +) +(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/basiclayer/pgfcorescopes.co +de.tex +File: pgfcorescopes.code.tex 2013/10/09 (rcs-revision 1.44) +\pgfpic=\box57 +\pgf@hbox=\box58 +\pgf@layerbox@main=\box59 +\pgf@picture@serial@count=\count169 +) +(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/basiclayer/pgfcoregraphicst +ate.code.tex +File: pgfcoregraphicstate.code.tex 2013/09/19 (rcs-revision 1.11) +\pgflinewidth=\dimen194 +) +(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/basiclayer/pgfcoretransform +ations.code.tex +File: pgfcoretransformations.code.tex 2013/10/10 (rcs-revision 1.17) +\pgf@pt@x=\dimen195 +\pgf@pt@y=\dimen196 +\pgf@pt@temp=\dimen197 +) +(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/basiclayer/pgfcorequick.cod +e.tex +File: pgfcorequick.code.tex 2008/10/09 (rcs-revision 1.3) +) +(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreobjects.c +ode.tex +File: pgfcoreobjects.code.tex 2006/10/11 (rcs-revision 1.2) +) +(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathproce +ssing.code.tex +File: pgfcorepathprocessing.code.tex 2013/09/09 (rcs-revision 1.9) +) +(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/basiclayer/pgfcorearrows.co +de.tex +File: pgfcorearrows.code.tex 2013/11/07 (rcs-revision 1.40) +\pgfarrowsep=\dimen198 +) +(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreshade.cod +e.tex +File: pgfcoreshade.code.tex 2013/07/15 (rcs-revision 1.15) +\pgf@max=\dimen199 +\pgf@sys@shading@range@num=\count170 +) +(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreimage.cod +e.tex +File: pgfcoreimage.code.tex 2013/07/15 (rcs-revision 1.18) + +(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreexternal. +code.tex +File: pgfcoreexternal.code.tex 2013/07/15 (rcs-revision 1.20) +\pgfexternal@startupbox=\box60 +)) +(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/basiclayer/pgfcorelayers.co +de.tex +File: pgfcorelayers.code.tex 2013/07/18 (rcs-revision 1.7) +) +(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/basiclayer/pgfcoretranspare +ncy.code.tex +File: pgfcoretransparency.code.tex 2013/09/30 (rcs-revision 1.5) +) +(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepatterns. +code.tex +File: pgfcorepatterns.code.tex 2013/11/07 (rcs-revision 1.5) +))) +(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/modules/pgfmoduleshapes.cod +e.tex +File: pgfmoduleshapes.code.tex 2013/10/31 (rcs-revision 1.34) +\pgfnodeparttextbox=\box61 +) +(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/modules/pgfmoduleplot.code. +tex +File: pgfmoduleplot.code.tex 2013/07/31 (rcs-revision 1.12) +) +(/usr/local/texlive/2015/texmf-dist/tex/latex/pgf/compatibility/pgfcomp-version +-0-65.sty +Package: pgfcomp-version-0-65 2007/07/03 v3.0.0 (rcs-revision 1.7) +\pgf@nodesepstart=\dimen200 +\pgf@nodesepend=\dimen201 +) +(/usr/local/texlive/2015/texmf-dist/tex/latex/pgf/compatibility/pgfcomp-version +-1-18.sty +Package: pgfcomp-version-1-18 2007/07/23 v3.0.0 (rcs-revision 1.1) +)) +(/usr/local/texlive/2015/texmf-dist/tex/latex/pgf/utilities/pgffor.sty +(/usr/local/texlive/2015/texmf-dist/tex/latex/pgf/utilities/pgfkeys.sty +(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/utilities/pgfkeys.code.tex) +) (/usr/local/texlive/2015/texmf-dist/tex/latex/pgf/math/pgfmath.sty +(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/math/pgfmath.code.tex)) +(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/utilities/pgffor.code.tex +Package: pgffor 2013/12/13 v3.0.0 (rcs-revision 1.25) + +(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/math/pgfmath.code.tex) +\pgffor@iter=\dimen202 +\pgffor@skip=\dimen203 +\pgffor@stack=\toks43 +\pgffor@toks=\toks44 +)) +(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/frontendlayer/tikz/tikz.cod +e.tex +Package: tikz 2013/12/13 v3.0.0 (rcs-revision 1.142) + +(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/libraries/pgflibraryplothan +dlers.code.tex +File: pgflibraryplothandlers.code.tex 2013/08/31 v3.0.0 (rcs-revision 1.20) +\pgf@plot@mark@count=\count171 +\pgfplotmarksize=\dimen204 +) +\tikz@lastx=\dimen205 +\tikz@lasty=\dimen206 +\tikz@lastxsaved=\dimen207 +\tikz@lastysaved=\dimen208 +\tikzleveldistance=\dimen209 +\tikzsiblingdistance=\dimen210 +\tikz@figbox=\box62 +\tikz@figbox@bg=\box63 +\tikz@tempbox=\box64 +\tikz@tempbox@bg=\box65 +\tikztreelevel=\count172 +\tikznumberofchildren=\count173 +\tikznumberofcurrentchild=\count174 +\tikz@fig@count=\count175 + +(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/modules/pgfmodulematrix.cod +e.tex +File: pgfmodulematrix.code.tex 2013/09/17 (rcs-revision 1.8) +\pgfmatrixcurrentrow=\count176 +\pgfmatrixcurrentcolumn=\count177 +\pgf@matrix@numberofcolumns=\count178 +) +\tikz@expandcount=\count179 + +(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/frontendlayer/tikz/librarie +s/tikzlibrarytopaths.code.tex +File: tikzlibrarytopaths.code.tex 2008/06/17 v3.0.0 (rcs-revision 1.2) +))) +(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/frontendlayer/tikz/librarie +s/tikzlibraryautomata.code.tex +File: tikzlibraryautomata.code.tex 2008/07/14 v3.0.0 (rcs-revision 1.3) + +(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/frontendlayer/tikz/librarie +s/tikzlibraryshapes.multipart.code.tex +File: tikzlibraryshapes.multipart.code.tex 2008/01/09 v3.0.0 (rcs-revision 1.1) + + +(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/libraries/shapes/pgflibrary +shapes.multipart.code.tex +File: pgflibraryshapes.multipart.code.tex 2010/01/07 v3.0.0 (rcs-revision 1.2) +\pgfnodepartlowerbox=\box66 +\pgfnodeparttwobox=\box67 +\pgfnodepartthreebox=\box68 +\pgfnodepartfourbox=\box69 +\pgfnodeparttwentybox=\box70 +\pgfnodepartnineteenbox=\box71 +\pgfnodeparteighteenbox=\box72 +\pgfnodepartseventeenbox=\box73 +\pgfnodepartsixteenbox=\box74 +\pgfnodepartfifteenbox=\box75 +\pgfnodepartfourteenbox=\box76 +\pgfnodepartthirteenbox=\box77 +\pgfnodeparttwelvebox=\box78 +\pgfnodepartelevenbox=\box79 +\pgfnodeparttenbox=\box80 +\pgfnodepartninebox=\box81 +\pgfnodeparteightbox=\box82 +\pgfnodepartsevenbox=\box83 +\pgfnodepartsixbox=\box84 +\pgfnodepartfivebox=\box85 +))) +(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/frontendlayer/tikz/librarie +s/tikzlibraryarrows.code.tex +File: tikzlibraryarrows.code.tex 2008/01/09 v3.0.0 (rcs-revision 1.1) + +(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/libraries/pgflibraryarrows. +code.tex +File: pgflibraryarrows.code.tex 2013/09/23 v3.0.0 (rcs-revision 1.16) +\arrowsize=\dimen211 +)) +(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/frontendlayer/tikz/librarie +s/tikzlibrarypositioning.code.tex +File: tikzlibrarypositioning.code.tex 2008/10/06 v3.0.0 (rcs-revision 1.7) +) +(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/frontendlayer/tikz/librarie +s/tikzlibrarycalc.code.tex +File: tikzlibrarycalc.code.tex 2013/07/15 v3.0.0 (rcs-revision 1.9) +) +(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/frontendlayer/tikz/librarie +s/tikzlibrarymatrix.code.tex +File: tikzlibrarymatrix.code.tex 2013/07/12 v3.0.0 (rcs-revision 1.4) +) +(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/frontendlayer/tikz/librarie +s/tikzlibraryshapes.geometric.code.tex +File: tikzlibraryshapes.geometric.code.tex 2008/01/09 v3.0.0 (rcs-revision 1.1) + + +(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/libraries/shapes/pgflibrary +shapes.geometric.code.tex +File: pgflibraryshapes.geometric.code.tex 2008/06/26 v3.0.0 (rcs-revision 1.1) +)) +(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/frontendlayer/tikz/librarie +s/tikzlibrarychains.code.tex +File: tikzlibrarychains.code.tex 2013/07/15 v3.0.0 (rcs-revision 1.6) +) +(/usr/local/texlive/2015/texmf-dist/tex/latex/tools/verbatim.sty +Package: verbatim 2014/10/28 v1.5q LaTeX2e package for verbatim enhancements +\every@verbatim=\toks45 +\verbatim@line=\toks46 +\verbatim@in@stream=\read2 +) +(/usr/local/texlive/2015/texmf-dist/tex/latex/hyperref/hyperref.sty +Package: hyperref 2012/11/06 v6.83m Hypertext links for LaTeX + +(/usr/local/texlive/2015/texmf-dist/tex/generic/oberdiek/hobsub-hyperref.sty +Package: hobsub-hyperref 2012/05/28 v1.13 Bundle oberdiek, subset hyperref (HO) + + +(/usr/local/texlive/2015/texmf-dist/tex/generic/oberdiek/hobsub-generic.sty +Package: hobsub-generic 2012/05/28 v1.13 Bundle oberdiek, subset generic (HO) +Package: hobsub 2012/05/28 v1.13 Construct package bundles (HO) +Package hobsub Info: Skipping package `infwarerr' (already loaded). +Package hobsub Info: Skipping package `ltxcmds' (already loaded). +Package hobsub Info: Skipping package `ifluatex' (already loaded). +Package hobsub Info: Skipping package `ifvtex' (already loaded). +Package: intcalc 2007/09/27 v1.1 Expandable calculations with integers (HO) +Package hobsub Info: Skipping package `ifpdf' (already loaded). +Package hobsub Info: Skipping package `etexcmds' (already loaded). +Package hobsub Info: Skipping package `kvsetkeys' (already loaded). +Package hobsub Info: Skipping package `kvdefinekeys' (already loaded). +Package hobsub Info: Skipping package `pdftexcmds' (already loaded). +Package: pdfescape 2011/11/25 v1.13 Implements pdfTeX's escape features (HO) +Package: bigintcalc 2012/04/08 v1.3 Expandable calculations on big integers (HO +) +Package: bitset 2011/01/30 v1.1 Handle bit-vector datatype (HO) +Package: uniquecounter 2011/01/30 v1.2 Provide unlimited unique counter (HO) +) +Package hobsub Info: Skipping package `hobsub' (already loaded). +Package: letltxmacro 2010/09/02 v1.4 Let assignment for LaTeX macros (HO) +Package: hopatch 2012/05/28 v1.2 Wrapper for package hooks (HO) +Package: xcolor-patch 2011/01/30 xcolor patch +Package: atveryend 2011/06/30 v1.8 Hooks at the very end of document (HO) +Package hobsub Info: Skipping package `atbegshi' (already loaded). +Package: refcount 2011/10/16 v3.4 Data extraction from label references (HO) +Package: hycolor 2011/01/30 v1.7 Color options for hyperref/bookmark (HO) +) +\@linkdim=\dimen212 +\Hy@linkcounter=\count180 +\Hy@pagecounter=\count181 + +(/usr/local/texlive/2015/texmf-dist/tex/latex/hyperref/pd1enc.def +File: pd1enc.def 2012/11/06 v6.83m Hyperref: PDFDocEncoding definition (HO) +) +\Hy@SavedSpaceFactor=\count182 + +(/usr/local/texlive/2015/texmf-dist/tex/latex/latexconfig/hyperref.cfg +File: hyperref.cfg 2002/06/06 v1.2 hyperref configuration of TeXLive +) +Package hyperref Info: Hyper figures OFF on input line 4443. +Package hyperref Info: Link nesting OFF on input line 4448. +Package hyperref Info: Hyper index ON on input line 4451. +Package hyperref Info: Plain pages OFF on input line 4458. +Package hyperref Info: Backreferencing OFF on input line 4463. +Package hyperref Info: Implicit mode ON; LaTeX internals redefined. +Package hyperref Info: Bookmarks ON on input line 4688. +\c@Hy@tempcnt=\count183 + +(/usr/local/texlive/2015/texmf-dist/tex/latex/url/url.sty +\Urlmuskip=\muskip17 +Package: url 2013/09/16 ver 3.4 Verb mode for urls, etc. +) +LaTeX Info: Redefining \url on input line 5041. +\XeTeXLinkMargin=\dimen213 +\Fld@menulength=\count184 +\Field@Width=\dimen214 +\Fld@charsize=\dimen215 +Package hyperref Info: Hyper figures OFF on input line 6295. +Package hyperref Info: Link nesting OFF on input line 6300. +Package hyperref Info: Hyper index ON on input line 6303. +Package hyperref Info: backreferencing OFF on input line 6310. +Package hyperref Info: Link coloring OFF on input line 6315. +Package hyperref Info: Link coloring with OCG OFF on input line 6320. +Package hyperref Info: PDF/A mode OFF on input line 6325. +LaTeX Info: Redefining \ref on input line 6365. +LaTeX Info: Redefining \pageref on input line 6369. +\Hy@abspage=\count185 +\c@Item=\count186 +\c@Hfootnote=\count187 +) + +Package hyperref Message: Driver (autodetected): hpdftex. + +(/usr/local/texlive/2015/texmf-dist/tex/latex/hyperref/hpdftex.def +File: hpdftex.def 2012/11/06 v6.83m Hyperref driver for pdfTeX +\HyAnn@Count=\count188 +\Fld@listcount=\count189 +\c@bookmark@seq@number=\count190 + +(/usr/local/texlive/2015/texmf-dist/tex/latex/oberdiek/rerunfilecheck.sty +Package: rerunfilecheck 2011/04/15 v1.7 Rerun checks for auxiliary files (HO) +Package uniquecounter Info: New unique counter `rerunfilecheck' on input line 2 +82. +) +\Hy@SectionHShift=\skip134 +) +Package hyperref Info: Option `colorlinks' set `true' on input line 48. + +(./codice.aux) +\openout1 = `codice.aux'. + +LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 195. +LaTeX Font Info: ... okay on input line 195. +LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 195. +LaTeX Font Info: ... okay on input line 195. +LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 195. +LaTeX Font Info: ... okay on input line 195. +LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 195. +LaTeX Font Info: ... okay on input line 195. +LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 195. +LaTeX Font Info: ... okay on input line 195. +LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 195. +LaTeX Font Info: ... okay on input line 195. +LaTeX Font Info: Checking defaults for TS1/cmr/m/n on input line 195. +LaTeX Font Info: Try loading font information for TS1+cmr on input line 195. + + (/usr/local/texlive/2015/texmf-dist/tex/latex/base/ts1cmr.fd +File: ts1cmr.fd 2014/09/29 v2.5h Standard LaTeX font definitions +) +LaTeX Font Info: ... okay on input line 195. +LaTeX Font Info: Checking defaults for PD1/pdf/m/n on input line 195. +LaTeX Font Info: ... okay on input line 195. + +(/usr/local/texlive/2015/texmf-dist/tex/latex/ucs/ucsencs.def +File: ucsencs.def 2011/01/21 Fixes to fontencodings LGR, T3 +) +LaTeX Info: Redefining \it@ocap on input line 195. +LaTeX Info: Redefining \it@ccap on input line 195. + +*geometry* driver: auto-detecting +*geometry* detected driver: pdftex +*geometry* verbose mode - [ preamble ] result: +* driver: pdftex +* paper: a4paper +* layout: +* layoutoffset:(h,v)=(0.0pt,0.0pt) +* modes: +* h-part:(L,W,R)=(89.62709pt, 418.25368pt, 89.6271pt) +* v-part:(T,H,B)=(101.40665pt, 591.5302pt, 152.11pt) +* \paperwidth=597.50787pt +* \paperheight=845.04684pt +* \textwidth=451.6875pt +* \textheight=650.43pt +* \oddsidemargin=0.0pt +* \evensidemargin=0.0pt +* \topmargin=-32.52127pt +* \headheight=12.0pt +* \headsep=18.06749pt +* \topskip=11.0pt +* \footskip=30.0pt +* \marginparwidth=50.0pt +* \marginparsep=10.0pt +* \columnsep=10.0pt +* \skip\footins=10.0pt plus 4.0pt minus 2.0pt +* \hoffset=0.0pt +* \voffset=0.0pt +* \mag=1000 +* \@twocolumnfalse +* \@twosidefalse +* \@mparswitchfalse +* \@reversemarginfalse +* (1in=72.27pt=25.4mm, 1cm=28.453pt) + +(/usr/local/texlive/2015/texmf-dist/tex/context/base/supp-pdf.mkii +[Loading MPS to PDF converter (version 2006.09.02).] +\scratchcounter=\count191 +\scratchdimen=\dimen216 +\scratchbox=\box86 +\nofMPsegments=\count192 +\nofMParguments=\count193 +\everyMPshowfont=\toks47 +\MPscratchCnt=\count194 +\MPscratchDim=\dimen217 +\MPnumerator=\count195 +\makeMPintoPDFobject=\count196 +\everyMPtoPDFconversion=\toks48 +) +Package lastpage Info: Please have a look at the pageslts package at +(lastpage) https://www.ctan.org/pkg/pageslts +(lastpage) ! on input line 195. + (/usr/local/texlive/2015/texmf-dist/tex/latex/oberdiek/epstopdf-base.sty +Package: epstopdf-base 2010/02/09 v2.5 Base part for package epstopdf + +(/usr/local/texlive/2015/texmf-dist/tex/latex/oberdiek/grfext.sty +Package: grfext 2010/08/19 v1.1 Manage graphics extensions (HO) +) +Package grfext Info: Graphics extension search list: +(grfext) [.png,.pdf,.jpg,.mps,.jpeg,.jbig2,.jb2,.PNG,.PDF,.JPG,.JPE +G,.JBIG2,.JB2,.eps] +(grfext) \AppendGraphicsExtensions on input line 452. + +(/usr/local/texlive/2015/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg +File: epstopdf-sys.cfg 2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Liv +e +)) +\c@lstlisting=\count197 +\AtBeginShipoutBox=\box87 + +(/usr/local/texlive/2015/texmf-dist/tex/latex/upquote/upquote.sty +Package: upquote 2012/04/19 v1.3 upright-quote and grave-accent glyphs in verba +tim +) +ABD: EveryShipout initializing macros +Package hyperref Info: Link coloring ON on input line 195. + +(/usr/local/texlive/2015/texmf-dist/tex/latex/hyperref/nameref.sty +Package: nameref 2012/10/27 v2.43 Cross-referencing by name of section + +(/usr/local/texlive/2015/texmf-dist/tex/generic/oberdiek/gettitlestring.sty +Package: gettitlestring 2010/12/03 v1.4 Cleanup title references (HO) +) +\c@section@level=\count198 +) +LaTeX Info: Redefining \ref on input line 195. +LaTeX Info: Redefining \pageref on input line 195. +LaTeX Info: Redefining \nameref on input line 195. + +(./codice.out) (./codice.out) +\@outlinefile=\write4 +\openout4 = `codice.out'. + + +(/usr/local/texlive/2015/texmf-dist/tex/latex/ucs/data/uni-0.def +File: uni-0.def 2013/05/13 UCS: Unicode data U+0000..U+00FF +) + +LaTeX Warning: No \author given. + +[1 + + +{/usr/local/texlive/2015/texmf-var/fonts/map/pdftex/updmap/pdftex.map}] +(./codice.toc) +\tf@toc=\write5 +\openout5 = `codice.toc'. + + + +Package Fancyhdr Warning: \headheight is too small (12.0pt): + Make it at least 13.59999pt. + We now make it that large for the rest of the document. + This may cause the page layout to be inconsistent, however. + +[2] +! Missing \endcsname inserted. + + \protect +l.205 ...sting}[language=MyAssembler, style=MyAsm] + +The control sequence marked should +not appear between \csname and \endcsname. + +LaTeX Font Info: Try loading font information for T1+zi4 on input line 205. +(/usr/local/texlive/2015/texmf-dist/tex/latex/inconsolata/t1zi4.fd +File: t1zi4.fd 2014/06/22 T1/zi4 (Inconsolata) +) +! Missing \endcsname inserted. + + \protect +l.205 ...sting}[language=MyAssembler, style=MyAsm] + +The control sequence marked should +not appear between \csname and \endcsname. + +! Extra \endcsname. + \endcsname + +l.205 ...sting}[language=MyAssembler, style=MyAsm] + +I'm ignoring this, since I wasn't doing a \csname. + +! Extra \endcsname. +\lst@keywords6@list ...g\color {Violet}\endcsname + +l.205 ...sting}[language=MyAssembler, style=MyAsm] + +I'm ignoring this, since I wasn't doing a \csname. + + +Package Fancyhdr Warning: \headheight is too small (12.0pt): + Make it at least 13.59999pt. + We now make it that large for the rest of the document. + This may cause the page layout to be inconsistent, however. + +[3] +! Missing \endcsname inserted. + + \protect +l.305 ...guage = MyAssembler]{../src/open_files.s} + +The control sequence marked should +not appear between \csname and \endcsname. + +! Missing \endcsname inserted. + + \protect +l.305 ...guage = MyAssembler]{../src/open_files.s} + +The control sequence marked should +not appear between \csname and \endcsname. + +! Extra \endcsname. + \endcsname + +l.305 ...guage = MyAssembler]{../src/open_files.s} + +I'm ignoring this, since I wasn't doing a \csname. + +! Extra \endcsname. +\lst@keywords6@list ...g\color {Violet}\endcsname + +l.305 ...guage = MyAssembler]{../src/open_files.s} + +I'm ignoring this, since I wasn't doing a \csname. + +! Missing \endcsname inserted. + + \protect +l.305 ...guage = MyAssembler]{../src/open_files.s} + +The control sequence marked should +not appear between \csname and \endcsname. + +! Extra \endcsname. + \endcsname + +l.305 ...guage = MyAssembler]{../src/open_files.s} + +I'm ignoring this, since I wasn't doing a \csname. + +! Extra \endcsname. +\lst@gkeywords6@list ...\color {Violet}\endcsname + +l.305 ...guage = MyAssembler]{../src/open_files.s} + +I'm ignoring this, since I wasn't doing a \csname. + +(../src/open_files.s + +Package Fancyhdr Warning: \headheight is too small (12.0pt): + Make it at least 13.59999pt. + We now make it that large for the rest of the document. + This may cause the page layout to be inconsistent, however. + +[4] + +Package Fancyhdr Warning: \headheight is too small (12.0pt): + Make it at least 13.59999pt. + We now make it that large for the rest of the document. + This may cause the page layout to be inconsistent, however. + +[5]) +! Missing \endcsname inserted. + + \protect +l.308 ...nguage = MyAssembler]{../src/read_line.s} + +The control sequence marked should +not appear between \csname and \endcsname. + +! Missing \endcsname inserted. + + \protect +l.308 ...nguage = MyAssembler]{../src/read_line.s} + +The control sequence marked should +not appear between \csname and \endcsname. + +! Extra \endcsname. + \endcsname + +l.308 ...nguage = MyAssembler]{../src/read_line.s} + +I'm ignoring this, since I wasn't doing a \csname. + +! Extra \endcsname. +\lst@keywords6@list ...g\color {Violet}\endcsname + +l.308 ...nguage = MyAssembler]{../src/read_line.s} + +I'm ignoring this, since I wasn't doing a \csname. + +! Missing \endcsname inserted. + + \protect +l.308 ...nguage = MyAssembler]{../src/read_line.s} + +The control sequence marked should +not appear between \csname and \endcsname. + +! Extra \endcsname. + \endcsname + +l.308 ...nguage = MyAssembler]{../src/read_line.s} + +I'm ignoring this, since I wasn't doing a \csname. + +! Extra \endcsname. +\lst@gkeywords6@list ...\color {Violet}\endcsname + +l.308 ...nguage = MyAssembler]{../src/read_line.s} + +I'm ignoring this, since I wasn't doing a \csname. + +(../src/read_line.s + +Package Fancyhdr Warning: \headheight is too small (12.0pt): + Make it at least 13.59999pt. + We now make it that large for the rest of the document. + This may cause the page layout to be inconsistent, however. + +[6]) +! Missing \endcsname inserted. + + \protect +l.311 ...m, language = MyAssembler]{../src/atoi.s} + +The control sequence marked should +not appear between \csname and \endcsname. + +! Missing \endcsname inserted. + + \protect +l.311 ...m, language = MyAssembler]{../src/atoi.s} + +The control sequence marked should +not appear between \csname and \endcsname. + +! Extra \endcsname. + \endcsname + +l.311 ...m, language = MyAssembler]{../src/atoi.s} + +I'm ignoring this, since I wasn't doing a \csname. + +! Extra \endcsname. +\lst@keywords6@list ...g\color {Violet}\endcsname + +l.311 ...m, language = MyAssembler]{../src/atoi.s} + +I'm ignoring this, since I wasn't doing a \csname. + +! Missing \endcsname inserted. + + \protect +l.311 ...m, language = MyAssembler]{../src/atoi.s} + +The control sequence marked should +not appear between \csname and \endcsname. + +! Extra \endcsname. + \endcsname + +l.311 ...m, language = MyAssembler]{../src/atoi.s} + +I'm ignoring this, since I wasn't doing a \csname. + +! Extra \endcsname. +\lst@gkeywords6@list ...\color {Violet}\endcsname + +l.311 ...m, language = MyAssembler]{../src/atoi.s} + +I'm ignoring this, since I wasn't doing a \csname. + +(../src/atoi.s + +Package Fancyhdr Warning: \headheight is too small (12.0pt): + Make it at least 13.59999pt. + We now make it that large for the rest of the document. + This may cause the page layout to be inconsistent, however. + +[7]) +! Missing \endcsname inserted. + + \protect +l.314 ..., language = MyAssembler]{../src/check.s} + +The control sequence marked should +not appear between \csname and \endcsname. + +! Missing \endcsname inserted. + + \protect +l.314 ..., language = MyAssembler]{../src/check.s} + +The control sequence marked should +not appear between \csname and \endcsname. + +! Extra \endcsname. + \endcsname + +l.314 ..., language = MyAssembler]{../src/check.s} + +I'm ignoring this, since I wasn't doing a \csname. + +! Extra \endcsname. +\lst@keywords6@list ...g\color {Violet}\endcsname + +l.314 ..., language = MyAssembler]{../src/check.s} + +I'm ignoring this, since I wasn't doing a \csname. + +! Missing \endcsname inserted. + + \protect +l.314 ..., language = MyAssembler]{../src/check.s} + +The control sequence marked should +not appear between \csname and \endcsname. + +! Extra \endcsname. + \endcsname + +l.314 ..., language = MyAssembler]{../src/check.s} + +I'm ignoring this, since I wasn't doing a \csname. + +! Extra \endcsname. +\lst@gkeywords6@list ...\color {Violet}\endcsname + +l.314 ..., language = MyAssembler]{../src/check.s} + +I'm ignoring this, since I wasn't doing a \csname. + +(../src/check.s + +Package Fancyhdr Warning: \headheight is too small (12.0pt): + Make it at least 13.59999pt. + We now make it that large for the rest of the document. + This may cause the page layout to be inconsistent, however. + +[8] + +Package Fancyhdr Warning: \headheight is too small (12.0pt): + Make it at least 13.59999pt. + We now make it that large for the rest of the document. + This may cause the page layout to be inconsistent, however. + +[9]) +! Missing \endcsname inserted. + + \protect +l.317 ...m, language = MyAssembler]{../src/itoa.s} + +The control sequence marked should +not appear between \csname and \endcsname. + +! Missing \endcsname inserted. + + \protect +l.317 ...m, language = MyAssembler]{../src/itoa.s} + +The control sequence marked should +not appear between \csname and \endcsname. + +! Extra \endcsname. + \endcsname + +l.317 ...m, language = MyAssembler]{../src/itoa.s} + +I'm ignoring this, since I wasn't doing a \csname. + +! Extra \endcsname. +\lst@keywords6@list ...g\color {Violet}\endcsname + +l.317 ...m, language = MyAssembler]{../src/itoa.s} + +I'm ignoring this, since I wasn't doing a \csname. + +! Missing \endcsname inserted. + + \protect +l.317 ...m, language = MyAssembler]{../src/itoa.s} + +The control sequence marked should +not appear between \csname and \endcsname. + +! Extra \endcsname. + \endcsname + +l.317 ...m, language = MyAssembler]{../src/itoa.s} + +I'm ignoring this, since I wasn't doing a \csname. + +! Extra \endcsname. +\lst@gkeywords6@list ...\color {Violet}\endcsname + +l.317 ...m, language = MyAssembler]{../src/itoa.s} + +I'm ignoring this, since I wasn't doing a \csname. + +(../src/itoa.s + +Package Fancyhdr Warning: \headheight is too small (12.0pt): + Make it at least 13.59999pt. + We now make it that large for the rest of the document. + This may cause the page layout to be inconsistent, however. + +[10]) +! Missing \endcsname inserted. + + \protect +l.320 ...guage = MyAssembler]{../src/write_line.s} + +The control sequence marked should +not appear between \csname and \endcsname. + +! Missing \endcsname inserted. + + \protect +l.320 ...guage = MyAssembler]{../src/write_line.s} + +The control sequence marked should +not appear between \csname and \endcsname. + +! Extra \endcsname. + \endcsname + +l.320 ...guage = MyAssembler]{../src/write_line.s} + +I'm ignoring this, since I wasn't doing a \csname. + +! Extra \endcsname. +\lst@keywords6@list ...g\color {Violet}\endcsname + +l.320 ...guage = MyAssembler]{../src/write_line.s} + +I'm ignoring this, since I wasn't doing a \csname. + +! Missing \endcsname inserted. + + \protect +l.320 ...guage = MyAssembler]{../src/write_line.s} + +The control sequence marked should +not appear between \csname and \endcsname. + +! Extra \endcsname. + \endcsname + +l.320 ...guage = MyAssembler]{../src/write_line.s} + +I'm ignoring this, since I wasn't doing a \csname. + +! Extra \endcsname. +\lst@gkeywords6@list ...\color {Violet}\endcsname + +l.320 ...guage = MyAssembler]{../src/write_line.s} + +I'm ignoring this, since I wasn't doing a \csname. + +(../src/write_line.s + +Package Fancyhdr Warning: \headheight is too small (12.0pt): + Make it at least 13.59999pt. + We now make it that large for the rest of the document. + This may cause the page layout to be inconsistent, however. + +[11] + +Package Fancyhdr Warning: \headheight is too small (12.0pt): + Make it at least 13.59999pt. + We now make it that large for the rest of the document. + This may cause the page layout to be inconsistent, however. + +[12]) +! Missing \endcsname inserted. + + \protect +l.323 ...uage = MyAssembler]{../src/close_files.s} + +The control sequence marked should +not appear between \csname and \endcsname. + +! Missing \endcsname inserted. + + \protect +l.323 ...uage = MyAssembler]{../src/close_files.s} + +The control sequence marked should +not appear between \csname and \endcsname. + +! Extra \endcsname. + \endcsname + +l.323 ...uage = MyAssembler]{../src/close_files.s} + +I'm ignoring this, since I wasn't doing a \csname. + +! Extra \endcsname. +\lst@keywords6@list ...g\color {Violet}\endcsname + +l.323 ...uage = MyAssembler]{../src/close_files.s} + +I'm ignoring this, since I wasn't doing a \csname. + +! Missing \endcsname inserted. + + \protect +l.323 ...uage = MyAssembler]{../src/close_files.s} + +The control sequence marked should +not appear between \csname and \endcsname. + +! Extra \endcsname. + \endcsname + +l.323 ...uage = MyAssembler]{../src/close_files.s} + +I'm ignoring this, since I wasn't doing a \csname. + +! Extra \endcsname. +\lst@gkeywords6@list ...\color {Violet}\endcsname + +l.323 ...uage = MyAssembler]{../src/close_files.s} + +I'm ignoring this, since I wasn't doing a \csname. + +(../src/close_files.s + +Package Fancyhdr Warning: \headheight is too small (12.0pt): + Make it at least 13.59999pt. + We now make it that large for the rest of the document. + This may cause the page layout to be inconsistent, however. + +[13]) +AED: lastpage setting LastPage + +Package Fancyhdr Warning: \headheight is too small (12.0pt): + Make it at least 13.59999pt. + We now make it that large for the rest of the document. + This may cause the page layout to be inconsistent, however. + +[14] +Package atveryend Info: Empty hook `BeforeClearDocument' on input line 325. +Package atveryend Info: Empty hook `AfterLastShipout' on input line 325. + (./codice.aux) +Package atveryend Info: Executing hook `AtVeryEndDocument' on input line 325. +Package atveryend Info: Executing hook `AtEndAfterFileList' on input line 325. +Package rerunfilecheck Info: File `codice.out' has not changed. +(rerunfilecheck) Checksum: 0A675A8AF6976B09916C8C9ED8121625;365. + ) +Here is how much of TeX's memory you used: + 30331 strings out of 493089 + 573603 string characters out of 6134843 + 1084728 words of memory out of 5000000 + 32716 multiletter control sequences out of 15000+600000 + 16094 words of font info for 39 fonts, out of 8000000 for 9000 + 1141 hyphenation exceptions out of 8191 + 55i,12n,66p,10416b,2110s stack positions out of 5000i,500n,10000p,200000b,80000s +{/usr/local/texlive/2015/texmf-dist/fonts/enc/dvips/inconsolata/i4-t1-0.enc}{ +/usr/local/texlive/2015/texmf-dist/fonts/enc/dvips/cm-super/cm-super-t1.enc} + +Output written on codice.pdf (14 pages, 211755 bytes). +PDF statistics: + 855 PDF objects out of 1000 (max. 8388607) + 821 compressed objects within 9 object streams + 600 named destinations out of 1000 (max. 500000) + 77 words of extra memory for PDF output out of 10000 (max. 10000000) + diff --git a/tex/codice.out b/tex/codice.out new file mode 100644 index 0000000..f1e76d8 --- /dev/null +++ b/tex/codice.out @@ -0,0 +1,8 @@ +\BOOKMARK [1][-]{section.1}{main.s}{}% 1 +\BOOKMARK [1][-]{section.2}{open\137files.s}{}% 2 +\BOOKMARK [1][-]{section.3}{read\137line.s}{}% 3 +\BOOKMARK [1][-]{section.4}{atoi.s}{}% 4 +\BOOKMARK [1][-]{section.5}{check.s}{}% 5 +\BOOKMARK [1][-]{section.6}{itoa.s}{}% 6 +\BOOKMARK [1][-]{section.7}{write\137line.s}{}% 7 +\BOOKMARK [1][-]{section.8}{close\137files.s}{}% 8 diff --git a/tex/codice.pdf b/tex/codice.pdf new file mode 100644 index 0000000..52b8f2a Binary files /dev/null and b/tex/codice.pdf differ diff --git a/tex/codice.synctex.gz b/tex/codice.synctex.gz new file mode 100644 index 0000000..c224d42 Binary files /dev/null and b/tex/codice.synctex.gz differ diff --git a/tex/codice.tex b/tex/codice.tex new file mode 100644 index 0000000..7e85210 --- /dev/null +++ b/tex/codice.tex @@ -0,0 +1,325 @@ +% +%------------------------------------------------------------------------------------ +% AUTORI: Morati Mirko, Noè Murr +%------------------------------------------------------------------------------------ +% + +\documentclass[a4paper,11pt]{article} +\usepackage[T1]{fontenc} +\usepackage[utf8x]{inputenc} +\usepackage[italian]{babel} +\usepackage{amsmath} +\usepackage{calc} +\usepackage[a4paper]{geometry} +\usepackage[usenames,dvipsnames]{xcolor} +\usepackage{fancyhdr} % Required for custom headers +\usepackage{lastpage} % Required to determine the last page for the footer +\usepackage{extramarks} % Required for headers and footers +%\usepackage[usenames,dvipsnames]{color} % Required for custom colors +\usepackage{graphicx} % Required to insert images +\usepackage{listings} % Required for insertion of code +\usepackage{courier} % Required for the courier font +\usepackage{lipsum} % Used for inserting dummy 'Lorem ipsum' text into the template +\usepackage{pdfpages} +\usepackage{listings} +\usepackage{mdframed} +\usepackage{enumitem} +%\usepackage{minted} +\usepackage{float} +\usepackage{array} +\usepackage{zref-xr} +\zexternaldocument[e-]{elaborato}[elaborato.pdf] + +%\renewcommand\listingscaption{} +%\newcommand\ceil[1]{\lceil#1\rceil} +\usepackage{zi4} +\usepackage{tikz} +\usetikzlibrary{automata, arrows, positioning, calc, matrix, shapes.geometric, chains} +\usepackage{verbatim} + +\usepackage{color} %May be necessary if you want to color links +\usepackage{hyperref} +\hypersetup{ + colorlinks, + citecolor=black, + filecolor=black, + linkcolor=black, + urlcolor=black +} + + + +\newenvironment{framescelte}[1] +{\mdfsetup{ + frametitle={\colorbox{white}{\space#1\space}}, + innertopmargin=6pt, + frametitleaboveskip=-\ht\strutbox, + frametitlealignment=\center + } + \begin{mdframed}% + } + {\end{mdframed}} + + +% Margins +\topmargin=-0.45in +\evensidemargin=0in +\oddsidemargin=0in +\textwidth=6.25in +\textheight=9in +\headsep=0.25in + +\linespread{1.1} % Line spacing + + +% Set up the header and footer +\pagestyle{fancy} +%\lhead{\hmwkAuthorName} % Top left header +\chead{\hmwkTitle} % Top center head +\rhead{\firstxmark} % Top right header +\lfoot{\lastxmark} % Bottom left footer +%\cfoot{} % Bottom center footer +%\rfoot{Page\ \thepage\ of\ \protect\pageref{LastPage}} % Bottom right footer +\renewcommand\headrulewidth{0.4pt} % Size of the header rule +\renewcommand\footrulewidth{0.4pt} % Size of the footer rule + +%------------------------------------------------------------------------------------ +% TITOLO +%------------------------------------------------------------------------------------ +%---------------------------------------------------------------------------------------- +% NAME AND CLASS SECTION +%---------------------------------------------------------------------------------------- + +\newcommand{\hmwkTitle}{Codice\ Elaborato\ Assembly} +\newcommand{\hmwkClass}{Architettura degli Elaboratori} +\newcommand{\hmwkAuthorName}{Mirko Morati,\ Noè Murr} + +%------------------------------------------------------------------------------------ +% TITLE PAGE +%------------------------------------------------------------------------------------ + +\title{ + \vspace{2in} + \textmd{\textbf{\hmwkClass:\\ \hmwkTitle}}\\ + \vspace{0.1in}\large{\textit{\hmwkAuthorName}} + \vspace{3in} +} + +%\author{} + +%------------------------------------------------------------------------------------ + + +%------------------------------------------------------------------------------------ +% FORMATTAZIONE ELEMENTI +%------------------------------------------------------------------------------------ +%\renewcommand*{\ttdefault}{zi4} +%\newcommand{\stato}[1]{\textbf{\fontfamily{zi4}\selectfont #1}} +%\newcommand{\signin}[1]{\textcolor{BrickRed}{\fontfamily{zi4}\selectfont #1}} +%\newcommand{\signout}[1]{\textcolor{Blue}{\fontfamily{zi4}\selectfont #1}} +%\newcommand{\inctxt}[1]{\textit{\fontfamily{zi4}\selectfont #1}} +%------------------------------------------------------------------------------------ + +\renewcommand{\labelitemi}{$\cdot$} + +\newcommand{\Assembly}{\texttt{Assembly} } + +\newcommand{\itemtt}[1]{\item \texttt{#1}} + + + +\lstdefinestyle{BashStyle}{ + language=bash, + basicstyle=\ttfamily, + numbers=left, + numberstyle=\tiny\ttfamily\color{black}, + numbersep=-10pt, + frame=tb, + columns=fullflexible, + title=\textit{}, + emph={souce, ps, map, -s, rl, rlib},emphstyle={\bfseries} +} + +\definecolor{mygreen}{rgb}{0,0.6,0} +\definecolor{mygray}{rgb}{0.5,0.5,0.5} +\definecolor{mymauve}{rgb}{0.58,0,0.82} + + +\lstdefinelanguage{MyAssembler}{ + morecomment=[l][\color{mygray}]{\#}, + morekeywords=[2]{eax, ebx, ecx, edx, edi, esp, ebp, al, bl, cl, dl, ah, bh, ch, dh}, +% morekeywords=[3]{\$, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9}, + morekeywords=[4]{popl,popb,pushl,pushb,jne,jn,call,int,movl,movb,xorl,xorb,subl,subb,addl,addb,mull,mulb,incl,cmpb,cmpl,jl,jg,jge,jle,je,jmp,ret}, + morekeywords=[5]{section,data,type,long,bss,text,globl,equ,ascii,asciz,include}, + morestring=[b][\color{mymauve}]{"}, + morekeywords=[6][\color{Violet}]{}, + morekeywords=[7]{input\_fd,output\_fd,init,reset,rpm,alm,numb,mod} + } + +\lstdefinestyle{MyAsm}{ % + backgroundcolor=\color{white}, % choose the background color; you must add \usepackage{color} or \usepackage{xcolor} + basicstyle=\footnotesize\ttfamily, % the size of the fonts that are used for the code + breakatwhitespace=false, % sets if automatic breaks should only happen at whitespace + breaklines=true, % sets automatic line breaking + captionpos=b, % sets the caption-position to bottom + commentstyle=\color{mygray}, % comment style + deletekeywords={...}, % if you want to delete keywords from the given language + escapeinside={\%*}{*)}, % if you want to add LaTeX within your code + extendedchars=true, % lets you use non-ASCII characters; for 8-bits encodings only, does not work with UTF-8 + literate={è}{{\'e}}1 {ì}{{\'i}}1 {é}{{\'e}}1 {ò}{{\'o}}1 {à}{{\'a}}1, + frame=single, % adds a frame around the code + keepspaces=true, % keeps spaces in text, useful for keeping indentation of code (possibly needs columns=flexible) + keywordstyle=\color{blue}, % keyword style + keywordstyle=[2]\color{BrickRed}, +% keywordstyle=[3]\color{green}, + keywordstyle=[4]\color{blue}, + keywordstyle=[5]\color{Green}, + keywordstyle=[7]\color{Orange}, + %language={[x86masm]Assembler}, % the language of the code + otherkeywords={...}, % if you want to add more keywords to the set + numbers=left, % where to put the line-numbers; possible values are (none, left, right) + numbersep=5pt, % how far the line-numbers are from the code + numberstyle=\tiny\color{mygray}, % the style that is used for the line-numbers + rulecolor=\color{black}, % if not set, the frame-color may be changed on line-breaks within not-black text (e.g. comments (green here)) + showspaces=false, % show spaces everywhere adding particular underscores; it overrides 'showstringspaces' + showstringspaces=false, % underline spaces within strings only + showtabs=false, % show tabs within strings adding particular underscores + stepnumber=1, % the step between two line-numbers. If it's 1, each line will be numbered + stringstyle=\color{mymauve}, % string literal style + tabsize=4, % sets default tabsize to 2 spaces + %title=\lstname % show the filename of files included with \lstinputlisting; also try caption instead of title +} + + + +\begin{document} + \clearpage + \maketitle + \thispagestyle{empty} + \newpage + \tableofcontents + \newpage + + \section{main.s} +% \lstinputlisting[style=MyAsm, language = MyAssembler]{../src/main.s} + \begin{lstlisting}[language=MyAssembler, style=MyAsm] + # Progetto Assembly 2016 + # File: main.s + # Autori: Noè Murr, Mirko Morati + # + # Descrizione: File principale, punto di inizio del programma. + .include "syscall.inc" + + .section .data + input_fd: .long 0 # variabile globale che conterrà il file + # descriptor del file di input + + output_fd: .long 0 # variabile globale che conterrà il file + # descriptor del file di output + + # Variabili globali per i segnali di input + init: .long 0 + reset: .long 0 + rpm: .long 0 + + # Variabili globali per i segnali di output + alm: .long 0 + numb: .long 0 + mod: .long 0 + + # Codice del programma + + .section .text + .globl input_fd + .globl output_fd + .globl init + .globl reset + .globl rpm + .globl alm + .globl numb + .globl mod + .globl _start + + # Stringa per mostrare l'utilizzo del programma in caso di parametri errati + usage: .asciz "usage: programName inputFilePath outputFilePath\n" + .equ USAGE_LENGTH, .-usage + + _start: + # Recupero i parametri del main + popl %eax # Numero parametri + + # Controllo argomenti, se sbagliati mostro l'utilizzo corretto + cmpl $3, %eax + jne _show_usage + + popl %eax # Nome programma + popl %eax # Primo parametro (nome file di input) + popl %ebx # Secondo parametro (nome file di output) + + # NB: non salvo ebp in quanto non ha alcuna utilità + # nella funzione start che comunque non ritorna + + movl %esp, %ebp + + call _open_files # Apertura dei file + + _main_loop: + + call _read_line # Leggiamo la riga + + cmpl $-1, %ebx # EOF se ebx == -1 + je _end + + call _check # Controllo delle variabili + + call _write_line # Scrittura delle variabili di output su file + + jmp _main_loop # Leggi un altra riga finché non è EOF + + _end: + + call _close_files # Chiudi correttamente i file + + # sys_exit(0); + movl $SYS_EXIT, %eax + movl $0, %ebx + int $SYSCALL + + _show_usage: + # esce in caso di errore con codice 1 + # sys_write(stdout, usage, USAGE_LENGTH); + movl $SYS_WRITE, %eax + movl $STDOUT, %ebx + movl $usage, %ecx + movl $USAGE_LENGTH, %edx + int $SYSCALL + + # sys_exit(1); + movl $SYS_EXIT, %eax + movl $1, %ebx + int $SYSCALL + + \end{lstlisting} + + \section{open\_files.s} + \lstinputlisting[style=MyAsm, language = MyAssembler]{../src/open_files.s} + + \section{read\_line.s} + \lstinputlisting[style=MyAsm, language = MyAssembler]{../src/read_line.s} + + \section{atoi.s} + \lstinputlisting[style=MyAsm, language = MyAssembler]{../src/atoi.s} + + \section{check.s} + \lstinputlisting[style=MyAsm, language = MyAssembler]{../src/check.s} + + \section{itoa.s} + \lstinputlisting[style=MyAsm, language = MyAssembler]{../src/itoa.s} + + \section{write\_line.s} + \lstinputlisting[style=MyAsm, language = MyAssembler]{../src/write_line.s} + + \section{close\_files.s} + \lstinputlisting[style=MyAsm, language = MyAssembler]{../src/close_files.s} + +\end{document} \ No newline at end of file diff --git a/tex/codice.toc b/tex/codice.toc new file mode 100644 index 0000000..72f3738 --- /dev/null +++ b/tex/codice.toc @@ -0,0 +1,10 @@ +\select@language {italian} +\select@language {italian} +\contentsline {section}{\numberline {1}main.s}{3}{section.1} +\contentsline {section}{\numberline {2}open\_files.s}{4}{section.2} +\contentsline {section}{\numberline {3}read\_line.s}{6}{section.3} +\contentsline {section}{\numberline {4}atoi.s}{7}{section.4} +\contentsline {section}{\numberline {5}check.s}{8}{section.5} +\contentsline {section}{\numberline {6}itoa.s}{10}{section.6} +\contentsline {section}{\numberline {7}write\_line.s}{11}{section.7} +\contentsline {section}{\numberline {8}close\_files.s}{13}{section.8} diff --git a/tex/elaborato.aux b/tex/elaborato.aux index cbfc6e1..fc9e6f9 100644 --- a/tex/elaborato.aux +++ b/tex/elaborato.aux @@ -1,5 +1,22 @@ \relax \providecommand\zref@newlabel[2]{} +\providecommand\hyper@newdestlabel[2]{} +\providecommand\HyperFirstAtBeginDocument{\AtBeginDocument} +\HyperFirstAtBeginDocument{\ifx\hyper@anchor\@undefined +\global\let\oldcontentsline\contentsline +\gdef\contentsline#1#2#3#4{\oldcontentsline{#1}{#2}{#3}} +\global\let\oldnewlabel\newlabel +\gdef\newlabel#1#2{\newlabelxx{#1}#2} +\gdef\newlabelxx#1#2#3#4#5#6{\oldnewlabel{#1}{{#2}{#3}}} +\AtEndDocument{\ifx\hyper@anchor\@undefined +\let\contentsline\oldcontentsline +\let\newlabel\oldnewlabel +\fi} +\fi} +\global\let\hyper@last\relax +\gdef\HyperFirstAtBeginDocument#1{#1} +\providecommand\HyField@AuxAddToFields[1]{} +\providecommand\HyField@AuxAddToCoFields[2]{} \select@language{italian} \@writefile{toc}{\select@language{italian}} \@writefile{lof}{\select@language{italian}} @@ -8,13 +25,85 @@ \@writefile{toc}{\select@language{italian}} \@writefile{lof}{\select@language{italian}} \@writefile{lot}{\select@language{italian}} -\@writefile{toc}{\contentsline {section}{\numberline {1}Descrizione del progetto}{3}} -\@writefile{toc}{\contentsline {section}{\numberline {2}File}{3}} -\@writefile{toc}{\contentsline {subsection}{\numberline {2.1}syscall.inc}{3}} -\@writefile{toc}{\contentsline {subsection}{\numberline {2.2}main.s}{3}} -\@writefile{toc}{\contentsline {subsubsection}{\numberline {2.2.1}Variabili Globali}{3}} -\@writefile{toc}{\contentsline {subsubsection}{\numberline {2.2.2}Variabili Locali}{3}} -\@writefile{toc}{\contentsline {subsubsection}{\numberline {2.2.3}Funzioni e Etichette}{4}} -\newlabel{LastPage}{{}{4}} -\xdef\lastpage@lastpage{4} -\gdef\lastpage@lastpageHy{} +\@writefile{toc}{\contentsline {section}{\numberline {1}Premessa}{2}{section.1}} +\@writefile{toc}{\contentsline {section}{\numberline {2}Descrizione del progetto}{2}{section.2}} +\@writefile{toc}{\contentsline {section}{\numberline {3}syscall.inc}{2}{section.3}} +\@writefile{toc}{\contentsline {section}{\numberline {4}main.s}{3}{section.4}} +\@writefile{toc}{\contentsline {subsection}{\numberline {4.1}Flowchart}{3}{subsection.4.1}} +\@writefile{toc}{\contentsline {subsection}{\numberline {4.2}Variabili Globali}{4}{subsection.4.2}} +\@writefile{toc}{\contentsline {subsection}{\numberline {4.3}Variabili Locali}{4}{subsection.4.3}} +\@writefile{toc}{\contentsline {subsection}{\numberline {4.4}Funzioni ed Etichette}{4}{subsection.4.4}} +\@writefile{toc}{\contentsline {section}{\numberline {5}open\_files.s}{5}{section.5}} +\@writefile{toc}{\contentsline {subsection}{\numberline {5.1}Variabili Locali}{5}{subsection.5.1}} +\@writefile{toc}{\contentsline {subsection}{\numberline {5.2}Funzioni ed Etichette}{5}{subsection.5.2}} +\@writefile{toc}{\contentsline {section}{\numberline {6}read\_line.s}{5}{section.6}} +\@writefile{toc}{\contentsline {subsection}{\numberline {6.1}Variabili Locali}{5}{subsection.6.1}} +\@writefile{toc}{\contentsline {subsection}{\numberline {6.2}Funzioni ed Etichette}{6}{subsection.6.2}} +\@writefile{toc}{\contentsline {section}{\numberline {7}atoi.s}{6}{section.7}} +\@writefile{toc}{\contentsline {subsection}{\numberline {7.1}Funzioni ed Etichette}{6}{subsection.7.1}} +\@writefile{toc}{\contentsline {section}{\numberline {8}check.s}{6}{section.8}} +\@writefile{toc}{\contentsline {subsection}{\numberline {8.1}Funzioni ed Etichette}{6}{subsection.8.1}} +\@writefile{toc}{\contentsline {section}{\numberline {9}write\_line.s}{7}{section.9}} +\@writefile{toc}{\contentsline {subsection}{\numberline {9.1}Variabili Locali}{7}{subsection.9.1}} +\@writefile{toc}{\contentsline {subsection}{\numberline {9.2}Funzioni ed Etichette}{7}{subsection.9.2}} +\@writefile{toc}{\contentsline {section}{\numberline {10}itoa.s}{8}{section.10}} +\@writefile{toc}{\contentsline {subsection}{\numberline {10.1}Funzioni ed Etichette}{8}{subsection.10.1}} +\@writefile{toc}{\contentsline {section}{\numberline {11}close\_files.s}{8}{section.11}} +\@writefile{toc}{\contentsline {section}{\numberline {12}Codice Sorgente}{9}{section.12}} +\@writefile{toc}{\contentsline {subsection}{\numberline {12.1}syscall.inc}{9}{subsection.12.1}} +\newlabel{s:1}{{3}{9}{syscall.inc}{lstnumber.-1.3}{}} +\@writefile{toc}{\contentsline {subsection}{\numberline {12.2}main.s}{9}{subsection.12.2}} +\newlabel{v:1:1}{{9}{9}{main.s}{lstnumber.-2.9}{}} +\newlabel{v:1:2}{{12}{9}{main.s}{lstnumber.-2.12}{}} +\newlabel{v:1:3}{{16}{9}{main.s}{lstnumber.-2.16}{}} +\newlabel{v:1:4}{{17}{9}{main.s}{lstnumber.-2.17}{}} +\newlabel{v:1:5}{{18}{9}{main.s}{lstnumber.-2.18}{}} +\newlabel{v:1:6}{{21}{9}{main.s}{lstnumber.-2.21}{}} +\newlabel{v:1:8}{{22}{9}{main.s}{lstnumber.-2.22}{}} +\newlabel{v:1:7}{{23}{9}{main.s}{lstnumber.-2.23}{}} +\newlabel{v:1:9}{{39}{10}{main.s}{lstnumber.-2.39}{}} +\newlabel{v:1:10}{{40}{10}{main.s}{lstnumber.-2.40}{}} +\newlabel{e:1:1}{{42}{10}{main.s}{lstnumber.-2.42}{}} +\newlabel{e:1:2}{{61}{10}{main.s}{lstnumber.-2.61}{}} +\newlabel{e:1:3}{{74}{10}{main.s}{lstnumber.-2.74}{}} +\newlabel{e:1:4}{{83}{10}{main.s}{lstnumber.-2.83}{}} +\@writefile{toc}{\contentsline {subsection}{\numberline {12.3}open\_files.s}{11}{subsection.12.3}} +\newlabel{v:2:1}{{14}{11}{open\_files.s}{lstnumber.-3.14}{}} +\newlabel{v:2:2}{{15}{11}{open\_files.s}{lstnumber.-3.15}{}} +\newlabel{e:2:1}{{20}{11}{open\_files.s}{lstnumber.-3.20}{}} +\newlabel{e:2:2}{{59}{12}{open\_files.s}{lstnumber.-3.59}{}} +\@writefile{toc}{\contentsline {subsection}{\numberline {12.4}read\_line.s}{12}{subsection.12.4}} +\newlabel{v:3:2}{{10}{12}{read\_line.s}{lstnumber.-4.10}{}} +\newlabel{v:3:1}{{11}{12}{read\_line.s}{lstnumber.-4.11}{}} +\newlabel{e:3:1}{{17}{13}{read\_line.s}{lstnumber.-4.17}{}} +\newlabel{e:3:2}{{53}{13}{read\_line.s}{lstnumber.-4.53}{}} +\@writefile{toc}{\contentsline {subsection}{\numberline {12.5}atoi.s}{14}{subsection.12.5}} +\newlabel{e:4:1}{{19}{14}{atoi.s}{lstnumber.-5.19}{}} +\newlabel{e:4:2}{{24}{14}{atoi.s}{lstnumber.-5.24}{}} +\@writefile{toc}{\contentsline {subsection}{\numberline {12.6}check.s}{15}{subsection.12.6}} +\newlabel{e:5:1}{{14}{15}{check.s}{lstnumber.-6.14}{}} +\newlabel{e:5:2}{{31}{15}{check.s}{lstnumber.-6.31}{}} +\newlabel{e:5:3}{{76}{16}{check.s}{lstnumber.-6.76}{}} +\newlabel{e:5:4}{{83}{16}{check.s}{lstnumber.-6.83}{}} +\newlabel{e:5:5}{{89}{16}{check.s}{lstnumber.-6.89}{}} +\newlabel{e:5:6}{{94}{16}{check.s}{lstnumber.-6.94}{}} +\newlabel{e:5:7}{{104}{17}{check.s}{lstnumber.-6.104}{}} +\@writefile{toc}{\contentsline {subsection}{\numberline {12.7}write\_line.s}{17}{subsection.12.7}} +\newlabel{v:6:2}{{10}{17}{write\_line.s}{lstnumber.-7.10}{}} +\newlabel{v:6:1}{{11}{17}{write\_line.s}{lstnumber.-7.11}{}} +\newlabel{v:6:3}{{16}{17}{write\_line.s}{lstnumber.-7.16}{}} +\newlabel{v:6:4}{{20}{17}{write\_line.s}{lstnumber.-7.20}{}} +\newlabel{e:6:1}{{22}{17}{write\_line.s}{lstnumber.-7.22}{}} +\newlabel{e:6:2}{{33}{17}{write\_line.s}{lstnumber.-7.33}{}} +\newlabel{e:6:3}{{40}{17}{write\_line.s}{lstnumber.-7.40}{}} +\newlabel{e:6:4}{{55}{18}{write\_line.s}{lstnumber.-7.55}{}} +\newlabel{e:6:5}{{82}{18}{write\_line.s}{lstnumber.-7.82}{}} +\newlabel{e:6:6}{{105}{19}{write\_line.s}{lstnumber.-7.105}{}} +\@writefile{toc}{\contentsline {subsection}{\numberline {12.8}itoa.s}{19}{subsection.12.8}} +\newlabel{e:7:1}{{18}{19}{itoa.s}{lstnumber.-8.18}{}} +\newlabel{e:7:2}{{23}{19}{itoa.s}{lstnumber.-8.23}{}} +\newlabel{e:7:3}{{38}{20}{itoa.s}{lstnumber.-8.38}{}} +\@writefile{toc}{\contentsline {subsection}{\numberline {12.9}close\_files.s}{20}{subsection.12.9}} +\newlabel{LastPage}{{}{20}{}{page.20}{}} +\xdef\lastpage@lastpage{20} +\xdef\lastpage@lastpageHy{20} diff --git a/tex/elaborato.log b/tex/elaborato.log index ea5cf9d..8346332 100644 --- a/tex/elaborato.log +++ b/tex/elaborato.log @@ -1,4 +1,4 @@ -This is pdfTeX, Version 3.14159265-2.6-1.40.16 (TeX Live 2015) (preloaded format=pdflatex 2016.1.8) 28 JUN 2016 23:45 +This is pdfTeX, Version 3.14159265-2.6-1.40.16 (TeX Live 2015) (preloaded format=pdflatex 2016.1.8) 11 JUL 2016 00:18 entering extended mode restricted \write18 enabled. %&-line parsing enabled. @@ -573,6 +573,29 @@ Package: enumitem 2011/09/28 v3.5.2 Customized lists \enit@inbox=\box52 \enitdp@description=\count157 ) +(/usr/local/texlive/2015/texmf-dist/tex/latex/float/float.sty +Package: float 2001/11/08 v1.3d Float enhancements (AL) +\c@float@type=\count158 +\float@exts=\toks30 +\float@box=\box53 +\@float@everytoks=\toks31 +\@floatcapt=\box54 +) +(/usr/local/texlive/2015/texmf-dist/tex/latex/tools/array.sty +Package: array 2014/10/28 v2.4c Tabular extension package (FMi) +\col@sep=\dimen163 +\extrarowheight=\dimen164 +\NC@list=\toks32 +\extratabsurround=\skip132 +\backup@length=\skip133 +) +(/usr/local/texlive/2015/texmf-dist/tex/latex/oberdiek/zref-xr.sty +Package: zref-xr 2012/04/04 v2.24 Module xr for zref (HO) +Package zref Info: New property: url on input line 55. +Package zref Info: New property: urluse on input line 56. +Package zref Info: New property: externaldocument on input line 57. +\ZREF@xr@URL=\count159 +) (/usr/local/texlive/2015/texmf-dist/tex/latex/inconsolata/zi4.sty Package: zi4 2014/06/22 v1.05 @@ -659,21 +682,21 @@ Package textcomp Info: Setting pplj sub-encoding to TS1/3 on input line 407. Package textcomp Info: Setting ptmx sub-encoding to TS1/4 on input line 408. Package textcomp Info: Setting ptmj sub-encoding to TS1/4 on input line 409. ) -\zifour@ocount=\count158 +\zifour@ocount=\count160 ) (/usr/local/texlive/2015/texmf-dist/tex/latex/pgf/frontendlayer/tikz.sty (/usr/local/texlive/2015/texmf-dist/tex/latex/pgf/basiclayer/pgf.sty (/usr/local/texlive/2015/texmf-dist/tex/latex/pgf/utilities/pgfrcs.sty (/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/utilities/pgfutil-common.te x -\pgfutil@everybye=\toks30 -\pgfutil@tempdima=\dimen163 -\pgfutil@tempdimb=\dimen164 +\pgfutil@everybye=\toks33 +\pgfutil@tempdima=\dimen165 +\pgfutil@tempdimb=\dimen166 (/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/utilities/pgfutil-common-li sts.tex)) (/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/utilities/pgfutil-latex.def -\pgfutil@abb=\box53 +\pgfutil@abb=\box55 (/usr/local/texlive/2015/texmf-dist/tex/latex/ms/everyshi.sty Package: everyshi 2001/05/15 v3.00 EveryShipout Package (MS) )) @@ -686,30 +709,30 @@ Package: pgf 2013/12/18 v3.0.0 (rcs-revision 1.14) (/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/systemlayer/pgfsys.code.tex Package: pgfsys 2013/11/30 v3.0.0 (rcs-revision 1.47) (/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/utilities/pgfkeys.code.tex -\pgfkeys@pathtoks=\toks31 -\pgfkeys@temptoks=\toks32 +\pgfkeys@pathtoks=\toks34 +\pgfkeys@temptoks=\toks35 (/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/utilities/pgfkeysfiltered.c ode.tex -\pgfkeys@tmptoks=\toks33 +\pgfkeys@tmptoks=\toks36 )) -\pgf@x=\dimen165 -\pgf@y=\dimen166 -\pgf@xa=\dimen167 -\pgf@ya=\dimen168 -\pgf@xb=\dimen169 -\pgf@yb=\dimen170 -\pgf@xc=\dimen171 -\pgf@yc=\dimen172 +\pgf@x=\dimen167 +\pgf@y=\dimen168 +\pgf@xa=\dimen169 +\pgf@ya=\dimen170 +\pgf@xb=\dimen171 +\pgf@yb=\dimen172 +\pgf@xc=\dimen173 +\pgf@yc=\dimen174 \w@pgf@writea=\write3 \r@pgf@reada=\read1 -\c@pgf@counta=\count159 -\c@pgf@countb=\count160 -\c@pgf@countc=\count161 -\c@pgf@countd=\count162 -\t@pgf@toka=\toks34 -\t@pgf@tokb=\toks35 -\t@pgf@tokc=\toks36 +\c@pgf@counta=\count161 +\c@pgf@countb=\count162 +\c@pgf@countc=\count163 +\c@pgf@countd=\count164 +\t@pgf@toka=\toks37 +\t@pgf@tokb=\toks38 +\t@pgf@tokc=\toks39 (/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/systemlayer/pgf.cfg File: pgf.cfg 2008/05/14 (rcs-revision 1.7) @@ -727,8 +750,8 @@ File: pgfsys-common-pdf.def 2013/10/10 (rcs-revision 1.13) (/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/systemlayer/pgfsyssoftpath. code.tex File: pgfsyssoftpath.code.tex 2013/09/09 (rcs-revision 1.9) -\pgfsyssoftpath@smallbuffer@items=\count163 -\pgfsyssoftpath@bigbuffer@items=\count164 +\pgfsyssoftpath@smallbuffer@items=\count165 +\pgfsyssoftpath@bigbuffer@items=\count166 ) (/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/systemlayer/pgfsysprotocol. code.tex @@ -740,12 +763,12 @@ Package: pgfcore 2010/04/11 v3.0.0 (rcs-revision 1.7) (/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/math/pgfmathcalc.code.tex (/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/math/pgfmathutil.code.tex) (/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/math/pgfmathparser.code.tex -\pgfmath@dimen=\dimen173 -\pgfmath@count=\count165 -\pgfmath@box=\box54 -\pgfmath@toks=\toks37 -\pgfmath@stack@operand=\toks38 -\pgfmath@stack@operation=\toks39 +\pgfmath@dimen=\dimen175 +\pgfmath@count=\count167 +\pgfmath@box=\box56 +\pgfmath@toks=\toks40 +\pgfmath@stack@operand=\toks41 +\pgfmath@stack@operation=\toks42 ) (/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.code. tex @@ -766,57 +789,57 @@ code.tex) (/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.integ erarithmetics.code.tex))) (/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/math/pgfmathfloat.code.tex -\c@pgfmathroundto@lastzeros=\count166 +\c@pgfmathroundto@lastzeros=\count168 )) (/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepoints.co de.tex File: pgfcorepoints.code.tex 2013/10/07 (rcs-revision 1.27) -\pgf@picminx=\dimen174 -\pgf@picmaxx=\dimen175 -\pgf@picminy=\dimen176 -\pgf@picmaxy=\dimen177 -\pgf@pathminx=\dimen178 -\pgf@pathmaxx=\dimen179 -\pgf@pathminy=\dimen180 -\pgf@pathmaxy=\dimen181 -\pgf@xx=\dimen182 -\pgf@xy=\dimen183 -\pgf@yx=\dimen184 -\pgf@yy=\dimen185 -\pgf@zx=\dimen186 -\pgf@zy=\dimen187 +\pgf@picminx=\dimen176 +\pgf@picmaxx=\dimen177 +\pgf@picminy=\dimen178 +\pgf@picmaxy=\dimen179 +\pgf@pathminx=\dimen180 +\pgf@pathmaxx=\dimen181 +\pgf@pathminy=\dimen182 +\pgf@pathmaxy=\dimen183 +\pgf@xx=\dimen184 +\pgf@xy=\dimen185 +\pgf@yx=\dimen186 +\pgf@yy=\dimen187 +\pgf@zx=\dimen188 +\pgf@zy=\dimen189 ) (/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathconst ruct.code.tex File: pgfcorepathconstruct.code.tex 2013/10/07 (rcs-revision 1.29) -\pgf@path@lastx=\dimen188 -\pgf@path@lasty=\dimen189 +\pgf@path@lastx=\dimen190 +\pgf@path@lasty=\dimen191 ) (/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathusage .code.tex File: pgfcorepathusage.code.tex 2013/12/13 (rcs-revision 1.23) -\pgf@shorten@end@additional=\dimen190 -\pgf@shorten@start@additional=\dimen191 +\pgf@shorten@end@additional=\dimen192 +\pgf@shorten@start@additional=\dimen193 ) (/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/basiclayer/pgfcorescopes.co de.tex File: pgfcorescopes.code.tex 2013/10/09 (rcs-revision 1.44) -\pgfpic=\box55 -\pgf@hbox=\box56 -\pgf@layerbox@main=\box57 -\pgf@picture@serial@count=\count167 +\pgfpic=\box57 +\pgf@hbox=\box58 +\pgf@layerbox@main=\box59 +\pgf@picture@serial@count=\count169 ) (/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/basiclayer/pgfcoregraphicst ate.code.tex File: pgfcoregraphicstate.code.tex 2013/09/19 (rcs-revision 1.11) -\pgflinewidth=\dimen192 +\pgflinewidth=\dimen194 ) (/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/basiclayer/pgfcoretransform ations.code.tex File: pgfcoretransformations.code.tex 2013/10/10 (rcs-revision 1.17) -\pgf@pt@x=\dimen193 -\pgf@pt@y=\dimen194 -\pgf@pt@temp=\dimen195 +\pgf@pt@x=\dimen195 +\pgf@pt@y=\dimen196 +\pgf@pt@temp=\dimen197 ) (/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/basiclayer/pgfcorequick.cod e.tex @@ -833,13 +856,13 @@ File: pgfcorepathprocessing.code.tex 2013/09/09 (rcs-revision 1.9) (/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/basiclayer/pgfcorearrows.co de.tex File: pgfcorearrows.code.tex 2013/11/07 (rcs-revision 1.40) -\pgfarrowsep=\dimen196 +\pgfarrowsep=\dimen198 ) (/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreshade.cod e.tex File: pgfcoreshade.code.tex 2013/07/15 (rcs-revision 1.15) -\pgf@max=\dimen197 -\pgf@sys@shading@range@num=\count168 +\pgf@max=\dimen199 +\pgf@sys@shading@range@num=\count170 ) (/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreimage.cod e.tex @@ -848,7 +871,7 @@ File: pgfcoreimage.code.tex 2013/07/15 (rcs-revision 1.18) (/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreexternal. code.tex File: pgfcoreexternal.code.tex 2013/07/15 (rcs-revision 1.20) -\pgfexternal@startupbox=\box58 +\pgfexternal@startupbox=\box60 )) (/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/basiclayer/pgfcorelayers.co de.tex @@ -865,7 +888,7 @@ File: pgfcorepatterns.code.tex 2013/11/07 (rcs-revision 1.5) (/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/modules/pgfmoduleshapes.cod e.tex File: pgfmoduleshapes.code.tex 2013/10/31 (rcs-revision 1.34) -\pgfnodeparttextbox=\box59 +\pgfnodeparttextbox=\box61 ) (/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/modules/pgfmoduleplot.code. tex @@ -874,8 +897,8 @@ File: pgfmoduleplot.code.tex 2013/07/31 (rcs-revision 1.12) (/usr/local/texlive/2015/texmf-dist/tex/latex/pgf/compatibility/pgfcomp-version -0-65.sty Package: pgfcomp-version-0-65 2007/07/03 v3.0.0 (rcs-revision 1.7) -\pgf@nodesepstart=\dimen198 -\pgf@nodesepend=\dimen199 +\pgf@nodesepstart=\dimen200 +\pgf@nodesepend=\dimen201 ) (/usr/local/texlive/2015/texmf-dist/tex/latex/pgf/compatibility/pgfcomp-version -1-18.sty @@ -890,10 +913,10 @@ Package: pgfcomp-version-1-18 2007/07/23 v3.0.0 (rcs-revision 1.1) Package: pgffor 2013/12/13 v3.0.0 (rcs-revision 1.25) (/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/math/pgfmath.code.tex) -\pgffor@iter=\dimen200 -\pgffor@skip=\dimen201 -\pgffor@stack=\toks40 -\pgffor@toks=\toks41 +\pgffor@iter=\dimen202 +\pgffor@skip=\dimen203 +\pgffor@stack=\toks43 +\pgffor@toks=\toks44 )) (/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/frontendlayer/tikz/tikz.cod e.tex @@ -902,32 +925,32 @@ Package: tikz 2013/12/13 v3.0.0 (rcs-revision 1.142) (/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/libraries/pgflibraryplothan dlers.code.tex File: pgflibraryplothandlers.code.tex 2013/08/31 v3.0.0 (rcs-revision 1.20) -\pgf@plot@mark@count=\count169 -\pgfplotmarksize=\dimen202 -) -\tikz@lastx=\dimen203 -\tikz@lasty=\dimen204 -\tikz@lastxsaved=\dimen205 -\tikz@lastysaved=\dimen206 -\tikzleveldistance=\dimen207 -\tikzsiblingdistance=\dimen208 -\tikz@figbox=\box60 -\tikz@figbox@bg=\box61 -\tikz@tempbox=\box62 -\tikz@tempbox@bg=\box63 -\tikztreelevel=\count170 -\tikznumberofchildren=\count171 -\tikznumberofcurrentchild=\count172 -\tikz@fig@count=\count173 +\pgf@plot@mark@count=\count171 +\pgfplotmarksize=\dimen204 +) +\tikz@lastx=\dimen205 +\tikz@lasty=\dimen206 +\tikz@lastxsaved=\dimen207 +\tikz@lastysaved=\dimen208 +\tikzleveldistance=\dimen209 +\tikzsiblingdistance=\dimen210 +\tikz@figbox=\box62 +\tikz@figbox@bg=\box63 +\tikz@tempbox=\box64 +\tikz@tempbox@bg=\box65 +\tikztreelevel=\count172 +\tikznumberofchildren=\count173 +\tikznumberofcurrentchild=\count174 +\tikz@fig@count=\count175 (/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/modules/pgfmodulematrix.cod e.tex File: pgfmodulematrix.code.tex 2013/09/17 (rcs-revision 1.8) -\pgfmatrixcurrentrow=\count174 -\pgfmatrixcurrentcolumn=\count175 -\pgf@matrix@numberofcolumns=\count176 +\pgfmatrixcurrentrow=\count176 +\pgfmatrixcurrentcolumn=\count177 +\pgf@matrix@numberofcolumns=\count178 ) -\tikz@expandcount=\count177 +\tikz@expandcount=\count179 (/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/frontendlayer/tikz/librarie s/tikzlibrarytopaths.code.tex @@ -945,26 +968,26 @@ File: tikzlibraryshapes.multipart.code.tex 2008/01/09 v3.0.0 (rcs-revision 1.1) (/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/libraries/shapes/pgflibrary shapes.multipart.code.tex File: pgflibraryshapes.multipart.code.tex 2010/01/07 v3.0.0 (rcs-revision 1.2) -\pgfnodepartlowerbox=\box64 -\pgfnodeparttwobox=\box65 -\pgfnodepartthreebox=\box66 -\pgfnodepartfourbox=\box67 -\pgfnodeparttwentybox=\box68 -\pgfnodepartnineteenbox=\box69 -\pgfnodeparteighteenbox=\box70 -\pgfnodepartseventeenbox=\box71 -\pgfnodepartsixteenbox=\box72 -\pgfnodepartfifteenbox=\box73 -\pgfnodepartfourteenbox=\box74 -\pgfnodepartthirteenbox=\box75 -\pgfnodeparttwelvebox=\box76 -\pgfnodepartelevenbox=\box77 -\pgfnodeparttenbox=\box78 -\pgfnodepartninebox=\box79 -\pgfnodeparteightbox=\box80 -\pgfnodepartsevenbox=\box81 -\pgfnodepartsixbox=\box82 -\pgfnodepartfivebox=\box83 +\pgfnodepartlowerbox=\box66 +\pgfnodeparttwobox=\box67 +\pgfnodepartthreebox=\box68 +\pgfnodepartfourbox=\box69 +\pgfnodeparttwentybox=\box70 +\pgfnodepartnineteenbox=\box71 +\pgfnodeparteighteenbox=\box72 +\pgfnodepartseventeenbox=\box73 +\pgfnodepartsixteenbox=\box74 +\pgfnodepartfifteenbox=\box75 +\pgfnodepartfourteenbox=\box76 +\pgfnodepartthirteenbox=\box77 +\pgfnodeparttwelvebox=\box78 +\pgfnodepartelevenbox=\box79 +\pgfnodeparttenbox=\box80 +\pgfnodepartninebox=\box81 +\pgfnodeparteightbox=\box82 +\pgfnodepartsevenbox=\box83 +\pgfnodepartsixbox=\box84 +\pgfnodepartfivebox=\box85 ))) (/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/frontendlayer/tikz/librarie s/tikzlibraryarrows.code.tex @@ -973,7 +996,7 @@ File: tikzlibraryarrows.code.tex 2008/01/09 v3.0.0 (rcs-revision 1.1) (/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/libraries/pgflibraryarrows. code.tex File: pgflibraryarrows.code.tex 2013/09/23 v3.0.0 (rcs-revision 1.16) -\arrowsize=\dimen209 +\arrowsize=\dimen211 )) (/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/frontendlayer/tikz/librarie s/tikzlibrarypositioning.code.tex @@ -996,39 +1019,141 @@ File: tikzlibraryshapes.geometric.code.tex 2008/01/09 v3.0.0 (rcs-revision 1.1) shapes.geometric.code.tex File: pgflibraryshapes.geometric.code.tex 2008/06/26 v3.0.0 (rcs-revision 1.1) )) +(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/frontendlayer/tikz/librarie +s/tikzlibrarychains.code.tex +File: tikzlibrarychains.code.tex 2013/07/15 v3.0.0 (rcs-revision 1.6) +) (/usr/local/texlive/2015/texmf-dist/tex/latex/tools/verbatim.sty Package: verbatim 2014/10/28 v1.5q LaTeX2e package for verbatim enhancements -\every@verbatim=\toks42 -\verbatim@line=\toks43 +\every@verbatim=\toks45 +\verbatim@line=\toks46 \verbatim@in@stream=\read2 ) +(/usr/local/texlive/2015/texmf-dist/tex/latex/hyperref/hyperref.sty +Package: hyperref 2012/11/06 v6.83m Hypertext links for LaTeX + +(/usr/local/texlive/2015/texmf-dist/tex/generic/oberdiek/hobsub-hyperref.sty +Package: hobsub-hyperref 2012/05/28 v1.13 Bundle oberdiek, subset hyperref (HO) + + +(/usr/local/texlive/2015/texmf-dist/tex/generic/oberdiek/hobsub-generic.sty +Package: hobsub-generic 2012/05/28 v1.13 Bundle oberdiek, subset generic (HO) +Package: hobsub 2012/05/28 v1.13 Construct package bundles (HO) +Package hobsub Info: Skipping package `infwarerr' (already loaded). +Package hobsub Info: Skipping package `ltxcmds' (already loaded). +Package hobsub Info: Skipping package `ifluatex' (already loaded). +Package hobsub Info: Skipping package `ifvtex' (already loaded). +Package: intcalc 2007/09/27 v1.1 Expandable calculations with integers (HO) +Package hobsub Info: Skipping package `ifpdf' (already loaded). +Package hobsub Info: Skipping package `etexcmds' (already loaded). +Package hobsub Info: Skipping package `kvsetkeys' (already loaded). +Package hobsub Info: Skipping package `kvdefinekeys' (already loaded). +Package hobsub Info: Skipping package `pdftexcmds' (already loaded). +Package: pdfescape 2011/11/25 v1.13 Implements pdfTeX's escape features (HO) +Package: bigintcalc 2012/04/08 v1.3 Expandable calculations on big integers (HO +) +Package: bitset 2011/01/30 v1.1 Handle bit-vector datatype (HO) +Package: uniquecounter 2011/01/30 v1.2 Provide unlimited unique counter (HO) +) +Package hobsub Info: Skipping package `hobsub' (already loaded). +Package: letltxmacro 2010/09/02 v1.4 Let assignment for LaTeX macros (HO) +Package: hopatch 2012/05/28 v1.2 Wrapper for package hooks (HO) +Package: xcolor-patch 2011/01/30 xcolor patch +Package: atveryend 2011/06/30 v1.8 Hooks at the very end of document (HO) +Package hobsub Info: Skipping package `atbegshi' (already loaded). +Package: refcount 2011/10/16 v3.4 Data extraction from label references (HO) +Package: hycolor 2011/01/30 v1.7 Color options for hyperref/bookmark (HO) +) +\@linkdim=\dimen212 +\Hy@linkcounter=\count180 +\Hy@pagecounter=\count181 + +(/usr/local/texlive/2015/texmf-dist/tex/latex/hyperref/pd1enc.def +File: pd1enc.def 2012/11/06 v6.83m Hyperref: PDFDocEncoding definition (HO) +) +\Hy@SavedSpaceFactor=\count182 + +(/usr/local/texlive/2015/texmf-dist/tex/latex/latexconfig/hyperref.cfg +File: hyperref.cfg 2002/06/06 v1.2 hyperref configuration of TeXLive +) +Package hyperref Info: Hyper figures OFF on input line 4443. +Package hyperref Info: Link nesting OFF on input line 4448. +Package hyperref Info: Hyper index ON on input line 4451. +Package hyperref Info: Plain pages OFF on input line 4458. +Package hyperref Info: Backreferencing OFF on input line 4463. +Package hyperref Info: Implicit mode ON; LaTeX internals redefined. +Package hyperref Info: Bookmarks ON on input line 4688. +\c@Hy@tempcnt=\count183 + +(/usr/local/texlive/2015/texmf-dist/tex/latex/url/url.sty +\Urlmuskip=\muskip17 +Package: url 2013/09/16 ver 3.4 Verb mode for urls, etc. +) +LaTeX Info: Redefining \url on input line 5041. +\XeTeXLinkMargin=\dimen213 +\Fld@menulength=\count184 +\Field@Width=\dimen214 +\Fld@charsize=\dimen215 +Package hyperref Info: Hyper figures OFF on input line 6295. +Package hyperref Info: Link nesting OFF on input line 6300. +Package hyperref Info: Hyper index ON on input line 6303. +Package hyperref Info: backreferencing OFF on input line 6310. +Package hyperref Info: Link coloring OFF on input line 6315. +Package hyperref Info: Link coloring with OCG OFF on input line 6320. +Package hyperref Info: PDF/A mode OFF on input line 6325. +LaTeX Info: Redefining \ref on input line 6365. +LaTeX Info: Redefining \pageref on input line 6369. +\Hy@abspage=\count185 +\c@Item=\count186 +\c@Hfootnote=\count187 +) + +Package hyperref Message: Driver (autodetected): hpdftex. + +(/usr/local/texlive/2015/texmf-dist/tex/latex/hyperref/hpdftex.def +File: hpdftex.def 2012/11/06 v6.83m Hyperref driver for pdfTeX +\HyAnn@Count=\count188 +\Fld@listcount=\count189 +\c@bookmark@seq@number=\count190 + +(/usr/local/texlive/2015/texmf-dist/tex/latex/oberdiek/rerunfilecheck.sty +Package: rerunfilecheck 2011/04/15 v1.7 Rerun checks for auxiliary files (HO) +Package uniquecounter Info: New unique counter `rerunfilecheck' on input line 2 +82. +) +\Hy@SectionHShift=\skip134 +) +Package hyperref Info: Option `colorlinks' set `true' on input line 46. + (./elaborato.aux) \openout1 = `elaborato.aux'. -LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 124. -LaTeX Font Info: ... okay on input line 124. -LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 124. -LaTeX Font Info: ... okay on input line 124. -LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 124. -LaTeX Font Info: ... okay on input line 124. -LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 124. -LaTeX Font Info: ... okay on input line 124. -LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 124. -LaTeX Font Info: ... okay on input line 124. -LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 124. -LaTeX Font Info: ... okay on input line 124. -LaTeX Font Info: Checking defaults for TS1/cmr/m/n on input line 124. -LaTeX Font Info: Try loading font information for TS1+cmr on input line 124. +LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 200. +LaTeX Font Info: ... okay on input line 200. +LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 200. +LaTeX Font Info: ... okay on input line 200. +LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 200. +LaTeX Font Info: ... okay on input line 200. +LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 200. +LaTeX Font Info: ... okay on input line 200. +LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 200. +LaTeX Font Info: ... okay on input line 200. +LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 200. +LaTeX Font Info: ... okay on input line 200. +LaTeX Font Info: Checking defaults for TS1/cmr/m/n on input line 200. +LaTeX Font Info: Try loading font information for TS1+cmr on input line 200. (/usr/local/texlive/2015/texmf-dist/tex/latex/base/ts1cmr.fd File: ts1cmr.fd 2014/09/29 v2.5h Standard LaTeX font definitions ) -LaTeX Font Info: ... okay on input line 124. +LaTeX Font Info: ... okay on input line 200. +LaTeX Font Info: Checking defaults for PD1/pdf/m/n on input line 200. +LaTeX Font Info: ... okay on input line 200. (/usr/local/texlive/2015/texmf-dist/tex/latex/ucs/ucsencs.def File: ucsencs.def 2011/01/21 Fixes to fontencodings LGR, T3 ) -LaTeX Info: Redefining \it@ocap on input line 124. -LaTeX Info: Redefining \it@ccap on input line 124. +LaTeX Info: Redefining \it@ocap on input line 200. +LaTeX Info: Redefining \it@ccap on input line 200. *geometry* driver: auto-detecting *geometry* detected driver: pdftex @@ -1066,21 +1191,21 @@ LaTeX Info: Redefining \it@ccap on input line 124. (/usr/local/texlive/2015/texmf-dist/tex/context/base/supp-pdf.mkii [Loading MPS to PDF converter (version 2006.09.02).] -\scratchcounter=\count178 -\scratchdimen=\dimen210 -\scratchbox=\box84 -\nofMPsegments=\count179 -\nofMParguments=\count180 -\everyMPshowfont=\toks44 -\MPscratchCnt=\count181 -\MPscratchDim=\dimen211 -\MPnumerator=\count182 -\makeMPintoPDFobject=\count183 -\everyMPtoPDFconversion=\toks45 +\scratchcounter=\count191 +\scratchdimen=\dimen216 +\scratchbox=\box86 +\nofMPsegments=\count192 +\nofMParguments=\count193 +\everyMPshowfont=\toks47 +\MPscratchCnt=\count194 +\MPscratchDim=\dimen217 +\MPnumerator=\count195 +\makeMPintoPDFobject=\count196 +\everyMPtoPDFconversion=\toks48 ) Package lastpage Info: Please have a look at the pageslts package at (lastpage) https://www.ctan.org/pkg/pageslts -(lastpage) ! on input line 124. +(lastpage) ! on input line 200. (/usr/local/texlive/2015/texmf-dist/tex/latex/oberdiek/epstopdf-base.sty Package: epstopdf-base 2010/02/09 v2.5 Base part for package epstopdf @@ -1096,28 +1221,86 @@ G,.JBIG2,.JB2,.eps] File: epstopdf-sys.cfg 2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Liv e )) -\c@lstlisting=\count184 -\AtBeginShipoutBox=\box85 +\c@lstlisting=\count197 +\AtBeginShipoutBox=\box87 (/usr/local/texlive/2015/texmf-dist/tex/latex/upquote/upquote.sty Package: upquote 2012/04/19 v1.3 upright-quote and grave-accent glyphs in verba tim ) ABD: EveryShipout initializing macros -(/usr/local/texlive/2015/texmf-dist/tex/latex/ucs/data/uni-0.def +Package hyperref Info: Link coloring ON on input line 200. + +(/usr/local/texlive/2015/texmf-dist/tex/latex/hyperref/nameref.sty +Package: nameref 2012/10/27 v2.43 Cross-referencing by name of section + +(/usr/local/texlive/2015/texmf-dist/tex/generic/oberdiek/gettitlestring.sty +Package: gettitlestring 2010/12/03 v1.4 Cleanup title references (HO) +) +\c@section@level=\count198 +) +LaTeX Info: Redefining \ref on input line 200. +LaTeX Info: Redefining \pageref on input line 200. +LaTeX Info: Redefining \nameref on input line 200. + +(./elaborato.out) (./elaborato.out) +\@outlinefile=\write4 +\openout4 = `elaborato.out'. + + +File: logo.png Graphic file (type png) + + +Package pdftex.def Info: logo.png used on input line 206. +(pdftex.def) Requested size: 67.75037pt x 67.29852pt. + (/usr/local/texlive/2015/texmf-dist/tex/latex/ucs/data/uni-0.def File: uni-0.def 2013/05/13 UCS: Unicode data U+0000..U+00FF ) -LaTeX Warning: No \author given. +! LaTeX Error: There's no line here to end. + +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... + +l.211 \\ + \line(1,0){250} \\ +Your command was ignored. +Type I to replace it with another command, +or to continue without it. + + +! LaTeX Error: There's no line here to end. + +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... + +l.213 \\ + \line(1,0){250} \\ +Your command was ignored. +Type I to replace it with another command, +or to continue without it. [1 -{/usr/local/texlive/2015/texmf-var/fonts/map/pdftex/updmap/pdftex.map}] -(./elaborato.toc) -\tf@toc=\write4 -\openout4 = `elaborato.toc'. +{/usr/local/texlive/2015/texmf-var/fonts/map/pdftex/updmap/pdftex.map} <./logo. +png>] (./elaborato.toc) +\tf@toc=\write5 +\openout5 = `elaborato.toc'. + +pdfTeX warning (ext4): destination with the same identifier (name{page.1}) has +been already used, duplicate ignored + + \relax +l.224 \newpage + [1] +LaTeX Font Info: Try loading font information for T1+zi4 on input line 230. +(/usr/local/texlive/2015/texmf-dist/tex/latex/inconsolata/t1zi4.fd +File: t1zi4.fd 2014/06/22 T1/zi4 (Inconsolata) +) Package Fancyhdr Warning: \headheight is too small (12.0pt): Make it at least 13.59999pt. @@ -1125,17 +1308,574 @@ Package Fancyhdr Warning: \headheight is too small (12.0pt): This may cause the page layout to be inconsistent, however. [2] -LaTeX Font Info: Try loading font information for T1+zi4 on input line 131. - (/usr/local/texlive/2015/texmf-dist/tex/latex/inconsolata/t1zi4.fd -File: t1zi4.fd 2014/06/22 T1/zi4 (Inconsolata) -) Package Fancyhdr Warning: \headheight is too small (12.0pt): Make it at least 13.59999pt. We now make it that large for the rest of the document. This may cause the page layout to be inconsistent, however. -[3] +[3] + +Package Fancyhdr Warning: \headheight is too small (12.0pt): + Make it at least 13.59999pt. + We now make it that large for the rest of the document. + This may cause the page layout to be inconsistent, however. + +[4] + +Package Fancyhdr Warning: \headheight is too small (12.0pt): + Make it at least 13.59999pt. + We now make it that large for the rest of the document. + This may cause the page layout to be inconsistent, however. + +[5] + +Package Fancyhdr Warning: \headheight is too small (12.0pt): + Make it at least 13.59999pt. + We now make it that large for the rest of the document. + This may cause the page layout to be inconsistent, however. + +[6] +Package mdframed Info: Not enough space on this page on input line 384. + + +Package Fancyhdr Warning: \headheight is too small (12.0pt): + Make it at least 13.59999pt. + We now make it that large for the rest of the document. + This may cause the page layout to be inconsistent, however. + +[7] + +Package Fancyhdr Warning: \headheight is too small (12.0pt): + Make it at least 13.59999pt. + We now make it that large for the rest of the document. + This may cause the page layout to be inconsistent, however. + +[8] +! Missing \endcsname inserted. + + \protect +l.443 ...sting}[language=MyAssembler, style=MyAsm] + +The control sequence marked should +not appear between \csname and \endcsname. + +! Missing \endcsname inserted. + + \protect +l.443 ...sting}[language=MyAssembler, style=MyAsm] + +The control sequence marked should +not appear between \csname and \endcsname. + +! Extra \endcsname. + \endcsname + +l.443 ...sting}[language=MyAssembler, style=MyAsm] + +I'm ignoring this, since I wasn't doing a \csname. + +! Extra \endcsname. +\lst@keywords6@list ...g\color {Violet}\endcsname + +l.443 ...sting}[language=MyAssembler, style=MyAsm] + +I'm ignoring this, since I wasn't doing a \csname. + +! Missing \endcsname inserted. + + \protect +l.460 ...sting}[language=MyAssembler, style=MyAsm] + +The control sequence marked should +not appear between \csname and \endcsname. + +! Missing \endcsname inserted. + + \protect +l.460 ...sting}[language=MyAssembler, style=MyAsm] + +The control sequence marked should +not appear between \csname and \endcsname. + +! Extra \endcsname. + \endcsname + +l.460 ...sting}[language=MyAssembler, style=MyAsm] + +I'm ignoring this, since I wasn't doing a \csname. + +! Extra \endcsname. +\lst@keywords6@list ...g\color {Violet}\endcsname + +l.460 ...sting}[language=MyAssembler, style=MyAsm] + +I'm ignoring this, since I wasn't doing a \csname. + +! Missing \endcsname inserted. + + \protect +l.460 ...sting}[language=MyAssembler, style=MyAsm] + +The control sequence marked should +not appear between \csname and \endcsname. + +! Extra \endcsname. + \endcsname + +l.460 ...sting}[language=MyAssembler, style=MyAsm] + +I'm ignoring this, since I wasn't doing a \csname. + +! Extra \endcsname. +\lst@gkeywords6@list ...\color {Violet}\endcsname + +l.460 ...sting}[language=MyAssembler, style=MyAsm] + +I'm ignoring this, since I wasn't doing a \csname. + + +Package Fancyhdr Warning: \headheight is too small (12.0pt): + Make it at least 13.59999pt. + We now make it that large for the rest of the document. + This may cause the page layout to be inconsistent, however. + +[9] + +Package Fancyhdr Warning: \headheight is too small (12.0pt): + Make it at least 13.59999pt. + We now make it that large for the rest of the document. + This may cause the page layout to be inconsistent, however. + +[10] +! Missing \endcsname inserted. + + \protect +l.560 ...sting}[language=MyAssembler, style=MyAsm] + +The control sequence marked should +not appear between \csname and \endcsname. + +! Missing \endcsname inserted. + + \protect +l.560 ...sting}[language=MyAssembler, style=MyAsm] + +The control sequence marked should +not appear between \csname and \endcsname. + +! Extra \endcsname. + \endcsname + +l.560 ...sting}[language=MyAssembler, style=MyAsm] + +I'm ignoring this, since I wasn't doing a \csname. + +! Extra \endcsname. +\lst@keywords6@list ...g\color {Violet}\endcsname + +l.560 ...sting}[language=MyAssembler, style=MyAsm] + +I'm ignoring this, since I wasn't doing a \csname. + +! Missing \endcsname inserted. + + \protect +l.560 ...sting}[language=MyAssembler, style=MyAsm] + +The control sequence marked should +not appear between \csname and \endcsname. + +! Extra \endcsname. + \endcsname + +l.560 ...sting}[language=MyAssembler, style=MyAsm] + +I'm ignoring this, since I wasn't doing a \csname. + +! Extra \endcsname. +\lst@gkeywords6@list ...\color {Violet}\endcsname + +l.560 ...sting}[language=MyAssembler, style=MyAsm] + +I'm ignoring this, since I wasn't doing a \csname. + + +Package Fancyhdr Warning: \headheight is too small (12.0pt): + Make it at least 13.59999pt. + We now make it that large for the rest of the document. + This may cause the page layout to be inconsistent, however. + +[11] +! Missing \endcsname inserted. + + \protect +l.635 ...sting}[language=MyAssembler, style=MyAsm] + +The control sequence marked should +not appear between \csname and \endcsname. + +! Missing \endcsname inserted. + + \protect +l.635 ...sting}[language=MyAssembler, style=MyAsm] + +The control sequence marked should +not appear between \csname and \endcsname. + +! Extra \endcsname. + \endcsname + +l.635 ...sting}[language=MyAssembler, style=MyAsm] + +I'm ignoring this, since I wasn't doing a \csname. + +! Extra \endcsname. +\lst@keywords6@list ...g\color {Violet}\endcsname + +l.635 ...sting}[language=MyAssembler, style=MyAsm] + +I'm ignoring this, since I wasn't doing a \csname. + +! Missing \endcsname inserted. + + \protect +l.635 ...sting}[language=MyAssembler, style=MyAsm] + +The control sequence marked should +not appear between \csname and \endcsname. + +! Extra \endcsname. + \endcsname + +l.635 ...sting}[language=MyAssembler, style=MyAsm] + +I'm ignoring this, since I wasn't doing a \csname. + +! Extra \endcsname. +\lst@gkeywords6@list ...\color {Violet}\endcsname + +l.635 ...sting}[language=MyAssembler, style=MyAsm] + +I'm ignoring this, since I wasn't doing a \csname. + + +Package Fancyhdr Warning: \headheight is too small (12.0pt): + Make it at least 13.59999pt. + We now make it that large for the rest of the document. + This may cause the page layout to be inconsistent, however. + +[12] + +Package Fancyhdr Warning: \headheight is too small (12.0pt): + Make it at least 13.59999pt. + We now make it that large for the rest of the document. + This may cause the page layout to be inconsistent, however. + +[13] +! Missing \endcsname inserted. + + \protect +l.699 ...sting}[language=MyAssembler, style=MyAsm] + +The control sequence marked should +not appear between \csname and \endcsname. + +! Missing \endcsname inserted. + + \protect +l.699 ...sting}[language=MyAssembler, style=MyAsm] + +The control sequence marked should +not appear between \csname and \endcsname. + +! Extra \endcsname. + \endcsname + +l.699 ...sting}[language=MyAssembler, style=MyAsm] + +I'm ignoring this, since I wasn't doing a \csname. + +! Extra \endcsname. +\lst@keywords6@list ...g\color {Violet}\endcsname + +l.699 ...sting}[language=MyAssembler, style=MyAsm] + +I'm ignoring this, since I wasn't doing a \csname. + +! Missing \endcsname inserted. + + \protect +l.699 ...sting}[language=MyAssembler, style=MyAsm] + +The control sequence marked should +not appear between \csname and \endcsname. + +! Extra \endcsname. + \endcsname + +l.699 ...sting}[language=MyAssembler, style=MyAsm] + +I'm ignoring this, since I wasn't doing a \csname. + +! Extra \endcsname. +\lst@gkeywords6@list ...\color {Violet}\endcsname + +l.699 ...sting}[language=MyAssembler, style=MyAsm] + +I'm ignoring this, since I wasn't doing a \csname. + + +Package Fancyhdr Warning: \headheight is too small (12.0pt): + Make it at least 13.59999pt. + We now make it that large for the rest of the document. + This may cause the page layout to be inconsistent, however. + +[14] +! Missing \endcsname inserted. + + \protect +l.747 ...sting}[language=MyAssembler, style=MyAsm] + +The control sequence marked should +not appear between \csname and \endcsname. + +! Missing \endcsname inserted. + + \protect +l.747 ...sting}[language=MyAssembler, style=MyAsm] + +The control sequence marked should +not appear between \csname and \endcsname. + +! Extra \endcsname. + \endcsname + +l.747 ...sting}[language=MyAssembler, style=MyAsm] + +I'm ignoring this, since I wasn't doing a \csname. + +! Extra \endcsname. +\lst@keywords6@list ...g\color {Violet}\endcsname + +l.747 ...sting}[language=MyAssembler, style=MyAsm] + +I'm ignoring this, since I wasn't doing a \csname. + +! Missing \endcsname inserted. + + \protect +l.747 ...sting}[language=MyAssembler, style=MyAsm] + +The control sequence marked should +not appear between \csname and \endcsname. + +! Extra \endcsname. + \endcsname + +l.747 ...sting}[language=MyAssembler, style=MyAsm] + +I'm ignoring this, since I wasn't doing a \csname. + +! Extra \endcsname. +\lst@gkeywords6@list ...\color {Violet}\endcsname + +l.747 ...sting}[language=MyAssembler, style=MyAsm] + +I'm ignoring this, since I wasn't doing a \csname. + + +Package Fancyhdr Warning: \headheight is too small (12.0pt): + Make it at least 13.59999pt. + We now make it that large for the rest of the document. + This may cause the page layout to be inconsistent, however. + +[15] + +Package Fancyhdr Warning: \headheight is too small (12.0pt): + Make it at least 13.59999pt. + We now make it that large for the rest of the document. + This may cause the page layout to be inconsistent, however. + +[16] +! Missing \endcsname inserted. + + \protect +l.857 ...sting}[language=MyAssembler, style=MyAsm] + +The control sequence marked should +not appear between \csname and \endcsname. + +! Missing \endcsname inserted. + + \protect +l.857 ...sting}[language=MyAssembler, style=MyAsm] + +The control sequence marked should +not appear between \csname and \endcsname. + +! Extra \endcsname. + \endcsname + +l.857 ...sting}[language=MyAssembler, style=MyAsm] + +I'm ignoring this, since I wasn't doing a \csname. + +! Extra \endcsname. +\lst@keywords6@list ...g\color {Violet}\endcsname + +l.857 ...sting}[language=MyAssembler, style=MyAsm] + +I'm ignoring this, since I wasn't doing a \csname. + +! Missing \endcsname inserted. + + \protect +l.857 ...sting}[language=MyAssembler, style=MyAsm] + +The control sequence marked should +not appear between \csname and \endcsname. + +! Extra \endcsname. + \endcsname + +l.857 ...sting}[language=MyAssembler, style=MyAsm] + +I'm ignoring this, since I wasn't doing a \csname. + +! Extra \endcsname. +\lst@gkeywords6@list ...\color {Violet}\endcsname + +l.857 ...sting}[language=MyAssembler, style=MyAsm] + +I'm ignoring this, since I wasn't doing a \csname. + + +Package Fancyhdr Warning: \headheight is too small (12.0pt): + Make it at least 13.59999pt. + We now make it that large for the rest of the document. + This may cause the page layout to be inconsistent, however. + +[17] + +Package Fancyhdr Warning: \headheight is too small (12.0pt): + Make it at least 13.59999pt. + We now make it that large for the rest of the document. + This may cause the page layout to be inconsistent, however. + +[18] +! Missing \endcsname inserted. + + \protect +l.969 ...sting}[language=MyAssembler, style=MyAsm] + +The control sequence marked should +not appear between \csname and \endcsname. + +! Missing \endcsname inserted. + + \protect +l.969 ...sting}[language=MyAssembler, style=MyAsm] + +The control sequence marked should +not appear between \csname and \endcsname. + +! Extra \endcsname. + \endcsname + +l.969 ...sting}[language=MyAssembler, style=MyAsm] + +I'm ignoring this, since I wasn't doing a \csname. + +! Extra \endcsname. +\lst@keywords6@list ...g\color {Violet}\endcsname + +l.969 ...sting}[language=MyAssembler, style=MyAsm] + +I'm ignoring this, since I wasn't doing a \csname. + +! Missing \endcsname inserted. + + \protect +l.969 ...sting}[language=MyAssembler, style=MyAsm] + +The control sequence marked should +not appear between \csname and \endcsname. + +! Extra \endcsname. + \endcsname + +l.969 ...sting}[language=MyAssembler, style=MyAsm] + +I'm ignoring this, since I wasn't doing a \csname. + +! Extra \endcsname. +\lst@gkeywords6@list ...\color {Violet}\endcsname + +l.969 ...sting}[language=MyAssembler, style=MyAsm] + +I'm ignoring this, since I wasn't doing a \csname. + + +Package Fancyhdr Warning: \headheight is too small (12.0pt): + Make it at least 13.59999pt. + We now make it that large for the rest of the document. + This may cause the page layout to be inconsistent, however. + +[19] +! Missing \endcsname inserted. + + \protect +l.1025 ...ting}[language=MyAssembler, style=MyAsm] + +The control sequence marked should +not appear between \csname and \endcsname. + +! Missing \endcsname inserted. + + \protect +l.1025 ...ting}[language=MyAssembler, style=MyAsm] + +The control sequence marked should +not appear between \csname and \endcsname. + +! Extra \endcsname. + \endcsname + +l.1025 ...ting}[language=MyAssembler, style=MyAsm] + +I'm ignoring this, since I wasn't doing a \csname. + +! Extra \endcsname. +\lst@keywords6@list ...g\color {Violet}\endcsname + +l.1025 ...ting}[language=MyAssembler, style=MyAsm] + +I'm ignoring this, since I wasn't doing a \csname. + +! Missing \endcsname inserted. + + \protect +l.1025 ...ting}[language=MyAssembler, style=MyAsm] + +The control sequence marked should +not appear between \csname and \endcsname. + +! Extra \endcsname. + \endcsname + +l.1025 ...ting}[language=MyAssembler, style=MyAsm] + +I'm ignoring this, since I wasn't doing a \csname. + +! Extra \endcsname. +\lst@gkeywords6@list ...\color {Violet}\endcsname + +l.1025 ...ting}[language=MyAssembler, style=MyAsm] + +I'm ignoring this, since I wasn't doing a \csname. + + AED: lastpage setting LastPage Package Fancyhdr Warning: \headheight is too small (12.0pt): @@ -1143,33 +1883,44 @@ Package Fancyhdr Warning: \headheight is too small (12.0pt): We now make it that large for the rest of the document. This may cause the page layout to be inconsistent, however. -[4] (./elaborato.aux) ) +[20] +Package atveryend Info: Empty hook `BeforeClearDocument' on input line 1060. +Package atveryend Info: Empty hook `AfterLastShipout' on input line 1060. + (./elaborato.aux) +Package atveryend Info: Executing hook `AtVeryEndDocument' on input line 1060. +Package atveryend Info: Executing hook `AtEndAfterFileList' on input line 1060. + +Package rerunfilecheck Info: File `elaborato.out' has not changed. +(rerunfilecheck) Checksum: 9ED4C3113F2B63BF5B3018C3CD69E0EA;2022. + ) Here is how much of TeX's memory you used: - 25745 strings out of 493089 - 505133 string characters out of 6134843 - 665837 words of memory out of 5000000 - 28798 multiletter control sequences out of 15000+600000 - 17209 words of font info for 43 fonts, out of 8000000 for 9000 + 30650 strings out of 493089 + 578866 string characters out of 6134843 + 994325 words of memory out of 5000000 + 32999 multiletter control sequences out of 15000+600000 + 19595 words of font info for 44 fonts, out of 8000000 for 9000 1141 hyphenation exceptions out of 8191 - 55i,11n,66p,10419b,627s stack positions out of 5000i,500n,10000p,200000b,80000s -{/usr/local/texlive/2015/texmf-dist/fonts/enc/dvips/cm-s -uper/cm-super-ts1.enc}{/usr/local/texlive/2015/texmf-dist/fonts/enc/dvips/cm-su -per/cm-super-t1.enc}{/usr/local/texlive/2015/texmf-dist/fonts/enc/dvips/inconso -lata/i4-t1-0.enc} -Output written on elaborato.pdf (4 pages, 166175 bytes). + 55i,12n,66p,10419b,2004s stack positions out of 5000i,500n,10000p,200000b,80000s +{/usr/local/texlive/2015/texmf-dist/fonts/enc/dvips/cm-super/cm-super-t1.enc} +{/usr/local/texlive/2015/texmf-dist/fonts/enc/dvips/inconsolata/i4-t1-0.enc}< +/usr/local/texlive/2015/texmf-dist/fonts/type1/public/cm-super/sfbx2074.pfb> +Output written on elaborato.pdf (21 pages, 383090 bytes). PDF statistics: - 65 PDF objects out of 1000 (max. 8388607) - 48 compressed objects within 1 object stream - 0 named destinations out of 1000 (max. 500000) - 13 words of extra memory for PDF output out of 10000 (max. 10000000) + 1116 PDF objects out of 1200 (max. 8388607) + 1066 compressed objects within 11 object streams + 654 named destinations out of 1000 (max. 500000) + 290 words of extra memory for PDF output out of 10000 (max. 10000000) diff --git a/tex/elaborato.out b/tex/elaborato.out new file mode 100644 index 0000000..51019fb --- /dev/null +++ b/tex/elaborato.out @@ -0,0 +1,34 @@ +\BOOKMARK [1][-]{section.1}{Premessa}{}% 1 +\BOOKMARK [1][-]{section.2}{Descrizione del progetto}{}% 2 +\BOOKMARK [1][-]{section.3}{syscall.inc}{}% 3 +\BOOKMARK [1][-]{section.4}{main.s}{}% 4 +\BOOKMARK [2][-]{subsection.4.1}{Flowchart}{section.4}% 5 +\BOOKMARK [2][-]{subsection.4.2}{Variabili Globali}{section.4}% 6 +\BOOKMARK [2][-]{subsection.4.3}{Variabili Locali}{section.4}% 7 +\BOOKMARK [2][-]{subsection.4.4}{Funzioni ed Etichette}{section.4}% 8 +\BOOKMARK [1][-]{section.5}{open\137files.s}{}% 9 +\BOOKMARK [2][-]{subsection.5.1}{Variabili Locali}{section.5}% 10 +\BOOKMARK [2][-]{subsection.5.2}{Funzioni ed Etichette}{section.5}% 11 +\BOOKMARK [1][-]{section.6}{read\137line.s}{}% 12 +\BOOKMARK [2][-]{subsection.6.1}{Variabili Locali}{section.6}% 13 +\BOOKMARK [2][-]{subsection.6.2}{Funzioni ed Etichette}{section.6}% 14 +\BOOKMARK [1][-]{section.7}{atoi.s}{}% 15 +\BOOKMARK [2][-]{subsection.7.1}{Funzioni ed Etichette}{section.7}% 16 +\BOOKMARK [1][-]{section.8}{check.s}{}% 17 +\BOOKMARK [2][-]{subsection.8.1}{Funzioni ed Etichette}{section.8}% 18 +\BOOKMARK [1][-]{section.9}{write\137line.s}{}% 19 +\BOOKMARK [2][-]{subsection.9.1}{Variabili Locali}{section.9}% 20 +\BOOKMARK [2][-]{subsection.9.2}{Funzioni ed Etichette}{section.9}% 21 +\BOOKMARK [1][-]{section.10}{itoa.s}{}% 22 +\BOOKMARK [2][-]{subsection.10.1}{Funzioni ed Etichette}{section.10}% 23 +\BOOKMARK [1][-]{section.11}{close\137files.s}{}% 24 +\BOOKMARK [1][-]{section.12}{Codice Sorgente}{}% 25 +\BOOKMARK [2][-]{subsection.12.1}{syscall.inc}{section.12}% 26 +\BOOKMARK [2][-]{subsection.12.2}{main.s}{section.12}% 27 +\BOOKMARK [2][-]{subsection.12.3}{open\137files.s}{section.12}% 28 +\BOOKMARK [2][-]{subsection.12.4}{read\137line.s}{section.12}% 29 +\BOOKMARK [2][-]{subsection.12.5}{atoi.s}{section.12}% 30 +\BOOKMARK [2][-]{subsection.12.6}{check.s}{section.12}% 31 +\BOOKMARK [2][-]{subsection.12.7}{write\137line.s}{section.12}% 32 +\BOOKMARK [2][-]{subsection.12.8}{itoa.s}{section.12}% 33 +\BOOKMARK [2][-]{subsection.12.9}{close\137files.s}{section.12}% 34 diff --git a/tex/elaborato.pdf b/tex/elaborato.pdf index 2b9f55e..01a2bf0 100644 Binary files a/tex/elaborato.pdf and b/tex/elaborato.pdf differ diff --git a/tex/elaborato.synctex.gz b/tex/elaborato.synctex.gz index 23797b0..a83ed2c 100644 Binary files a/tex/elaborato.synctex.gz and b/tex/elaborato.synctex.gz differ diff --git a/tex/elaborato.tex b/tex/elaborato.tex index c9740e5..f5edddb 100644 --- a/tex/elaborato.tex +++ b/tex/elaborato.tex @@ -1,9 +1,12 @@ % %------------------------------------------------------------------------------------ -% AUTORI: Morati Mirko, Alessandro Righi, Noè Murr +% AUTORI: Morati Mirko, Noè Murr %------------------------------------------------------------------------------------ % +%------------------------------------------------------------------------------------ +% PREAMBOLO +%------------------------------------------------------------------------------------ \documentclass[a4paper,11pt]{article} \usepackage[T1]{fontenc} \usepackage[utf8x]{inputenc} @@ -25,14 +28,22 @@ \usepackage{mdframed} \usepackage{enumitem} %\usepackage{minted} -%\usepackage{float} - -%\renewcommand\listingscaption{} -%\newcommand\ceil[1]{\lceil#1\rceil} +\usepackage{float} +\usepackage{array} +\usepackage{zref-xr} \usepackage{zi4} \usepackage{tikz} -\usetikzlibrary{automata, arrows, positioning, calc, matrix, shapes.geometric} +\usetikzlibrary{automata, arrows, positioning, calc, matrix, shapes.geometric, chains} \usepackage{verbatim} +\usepackage{color} %May be necessary if you want to color links +\usepackage{hyperref} +\hypersetup{ + colorlinks, + citecolor=black, + filecolor=black, + linkcolor=black, + urlcolor=black +} \newenvironment{framescelte}[1] @@ -72,13 +83,10 @@ %------------------------------------------------------------------------------------ % TITOLO %------------------------------------------------------------------------------------ -%---------------------------------------------------------------------------------------- -% NAME AND CLASS SECTION -%---------------------------------------------------------------------------------------- \newcommand{\hmwkTitle}{Elaborato\ Assembly} \newcommand{\hmwkClass}{Architettura degli Elaboratori} -\newcommand{\hmwkAuthorName}{Alessandro Righi,\ Mirko Morati,\ Noè Murr} +\newcommand{\hmwkAuthorName}{Mirko Morati,\ Noè Murr} %------------------------------------------------------------------------------------ % TITLE PAGE @@ -99,69 +107,954 @@ %------------------------------------------------------------------------------------ % FORMATTAZIONE ELEMENTI %------------------------------------------------------------------------------------ -%\renewcommand*{\ttdefault}{zi4} -%\newcommand{\stato}[1]{\textbf{\fontfamily{zi4}\selectfont #1}} -%\newcommand{\signin}[1]{\textcolor{BrickRed}{\fontfamily{zi4}\selectfont #1}} -%\newcommand{\signout}[1]{\textcolor{Blue}{\fontfamily{zi4}\selectfont #1}} -%\newcommand{\inctxt}[1]{\textit{\fontfamily{zi4}\selectfont #1}} -%------------------------------------------------------------------------------------ +\renewcommand{\labelitemi}{$\cdot$} \newcommand{\Assembly}{\texttt{Assembly} } -\lstdefinestyle{BashStyle}{ - language=bash, - basicstyle=\ttfamily, - numbers=left, - numberstyle=\tiny\ttfamily\color{black}, - numbersep=-10pt, - frame=tb, - columns=fullflexible, - title=\textit{}, - emph={souce, ps, map, -s, rl, rlib},emphstyle={\bfseries} +\newcommand{\itemtt}[1]{\item \texttt{#1}} + +\newcommand{\myparagraph}[2]{ + \begin{table}[!ht] + \begin{tabular}{p{0.175\linewidth} | p{0.8\linewidth}} + \texttt{#1} & #2 + \end{tabular} + \end{table} + } + + +%------------------------------------------------------------------------------------ +% TIKZ DEFINIZIONI +%------------------------------------------------------------------------------------ +\tikzstyle{base} = [text width = 10em] +\tikzstyle{startstop} = [rectangle, rounded corners, base, text centered, draw=black] +\tikzstyle{process} = [rectangle, base, text centered, draw=black] +\tikzstyle{decision} = [ +diamond, +aspect = 2, +draw, +text width=8em, +text badly centered, +inner sep=0pt] +\tikzstyle{io} = [trapezium, base, trapezium left angle=70, trapezium right angle=110, text centered, draw=black] + +\tikzstyle{arrow} = [draw, thick,->,>=stealth] + +%------------------------------------------------------------------------------------ +% LISTINGS DEFINIZIONI +%------------------------------------------------------------------------------------ + +\definecolor{mygreen}{rgb}{0,0.6,0} +\definecolor{mygray}{rgb}{0.5,0.5,0.5} +\definecolor{mymauve}{rgb}{0.58,0,0.82} + + +\lstdefinelanguage{MyAssembler}{ + morecomment=[l][\color{mygray}]{\#}, + morekeywords=[2]{eax, ebx, ecx, edx, edi, esp, ebp, al, bl, cl, dl, ah, bh, ch, dh}, + % morekeywords=[3]{\$, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9}, + morekeywords=[4]{popl,popb,pushl,pushb,esi,jne,jn,call,int,movl,movb,xorl,xorb,subl,subb,addl,addb,mull,mulb,incl,cmpb,cmpl,jl,jg,jge,jle,je,jmp,ret,decl,leal}, + morekeywords=[5]{section,data,type,long,bss,text,globl,equ,ascii,asciz,include}, + morestring=[b][\color{mymauve}]{"}, + morekeywords=[6][\color{Violet}]{}, + morekeywords=[7]{input\_fd,output\_fd,init,reset,rpm,alm,numb,mod} +} + +\lstdefinestyle{MyAsm}{ % + backgroundcolor=\color{white}, % choose the background color; you must add \usepackage{color} or \usepackage{xcolor} + basicstyle=\footnotesize\ttfamily, % the size of the fonts that are used for the code + breakatwhitespace=false, % sets if automatic breaks should only happen at whitespace + breaklines=true, % sets automatic line breaking + captionpos=b, % sets the caption-position to bottom + commentstyle=\color{mygray}, % comment style + deletekeywords={...}, % if you want to delete keywords from the given language + escapeinside={\%*}{*)}, % if you want to add LaTeX within your code + extendedchars=true, % lets you use non-ASCII characters; for 8-bits encodings only, does not work with UTF-8 + literate={è}{{\'e}}1 {ì}{{\'i}}1 {é}{{\'e}}1 {ò}{{\'o}}1 {à}{{\'a}}1, + frame=single, % adds a frame around the code + keepspaces=true, % keeps spaces in text, useful for keeping indentation of code (possibly needs columns=flexible) + keywordstyle=\color{blue}, % keyword style + keywordstyle=[2]\color{BrickRed}, + % keywordstyle=[3]\color{green}, + keywordstyle=[4]\color{blue}, + keywordstyle=[5]\color{Green}, + keywordstyle=[7]\color{Orange}, + %language={[x86masm]Assembler}, % the language of the code + otherkeywords={...}, % if you want to add more keywords to the set + numbers=left, % where to put the line-numbers; possible values are (none, left, right) + numbersep=5pt, % how far the line-numbers are from the code + numberstyle=\tiny\color{mygray}, % the style that is used for the line-numbers + rulecolor=\color{black}, % if not set, the frame-color may be changed on line-breaks within not-black text (e.g. comments (green here)) + showspaces=false, % show spaces everywhere adding particular underscores; it overrides 'showstringspaces' + showstringspaces=false, % underline spaces within strings only + showtabs=false, % show tabs within strings adding particular underscores + stepnumber=1, % the step between two line-numbers. If it's 1, each line will be numbered + stringstyle=\color{mymauve}, % string literal style + tabsize=4, % sets default tabsize to 2 spaces + escapeinside={(*@}{@*)}, + %title=\lstname % show the filename of files included with \lstinputlisting; also try caption instead of title } + + \begin{document} - \maketitle + \clearpage +% \maketitle + \begin{titlepage} + \centering + \vspace*{\fill} + \includegraphics[width=0.15\textwidth]{logo.png}\par\vspace{1cm} + {\scshape\LARGE Università degli Studi di Verona \par} + \vspace{1cm} + {\scshape\Large Architettura degli Elaboratori\par} + \vspace{1.5cm} + \\ \line(1,0){250} \\ + {\huge\bfseries Elaborato Assembly\par} + \\ \line(1,0){250} \\ + \vspace{2cm} + {\Large\itshape Mirko Morati, Noè Murr\par} + \vspace{5cm} + \vspace*{\fill} + % Bottom of the page + {\large \today\par} + \end{titlepage} + \thispagestyle{empty} \newpage \tableofcontents \newpage + \section{Premessa} + Per la corretta lettura del pdf si informa che sono stati inseriti dei riferimenti per ogni etichetta e variabile trattata in modo da poter vedere e approfondire il corrispettivo codice nel programma. + \section{Descrizione del progetto} Si vuole realizzare un programma \Assembly per il monitoraggio di un motore a combustione interna il quale, ricevuto come ingresso il numero di giri/minuto del motore, fornisca in uscita la modalità di funzionamento corrente del motore: \textit{Sotto Giri, Ottimale, Fuori Giri}. Il programma deve contare e visualizzare in uscita il numero dei secondi trascorsi nella modalità di funzionamento attuale ed inoltre attivare il segnale di allarme nel caso in cui il motore si trovi in modalità \textit{Fuori Giri} da più di 15 secondi. - - \section{File} + \vspace {5mm} Di seguito verranno descritte le funzioni presenti in ogni file del programma, etichette, eventuali variabili e loro scopo. - \subsection{syscall.inc} + \section{syscall.inc} Header file contenente la definizione di alcune costanti, tramite la pseudo-operazione \texttt{.equ}, relative alle chiamate di sistema e ad alcuni standard utilizzati in tutti i file e riportati di seguito: + \begin{table}[!h] + \begin{tabular}{| >{\ttfamily}l | c |} + \hline + \hyperref[s:1]{SYS\_EXIT} & 1 \\ \hline + SYS\_READ & 3 \\ \hline + SYS\_WRITE & 4 \\ \hline + SYS\_OPEN & 5 \\ \hline + SYS\_CLOSE & 6 \\ \hline + STDIN & 0 \\ \hline + STDOUT & 1 \\ \hline + STDERR & 2 \\ \hline + SYSCALL & 0x80 \\ \hline + \end{tabular} + \end{table} + + \begin{framescelte}{Scelte Progettuali} + Nonostante il codice \Assembly sia fortemente legato alla macchina sottostante, si è deciso di utilizzare un "trucchetto" per permetterne, per quanto possibile, la portabilità agevole su un'altra piattaforma. Infatti sarà sufficiente cambiare i codici delle \texttt{SYS\_CALL} nel file \texttt{syscall.inc} per utilizzare le \texttt{SYS\_CALL} di un altro sistema operativo. Questo vale solo su sistemi unix-like poiché i parametri delle funzioni essenziali (read, write, \ldots) sono comuni grazie allo standard \texttt{POSIX}. + \end{framescelte} + + \newpage + + \section{main.s} + File principale del programma. + + \subsection{Flowchart} + \begin{center} + + \begin{tikzpicture}[node distance = 2cm, auto] + + + \node (start) [startstop] {Inizio}; + \node (i1) [io, below of = start] {eax $\leftarrow$ \#argomenti}; + \node (d1) [decision, below of = i1] {eax == 3 ?}; + \node (e1) [startstop, right of = d1, node distance = 6cm] {Stampa messaggio ed esci con errore 1}; + \node (i2) [io, below of = d1, node distance = 2.5cm] {input\_file\_name output\_file\_name}; + \node (p1) [process, below of = i2] {call \_open\_files}; + \node (p2) [process, below of = p1] {call \_read\_line}; + \node (d2) [decision, below of = p2] {ebx == -1 ?}; + \node (p3) [process, right of = d2, node distance = 6cm] {call \_close\_files}; + \node (e0) [startstop, below of = p3] {Esci con codice 0}; + \node (p4) [process, below of = d2, node distance = 2.5cm] {call \_check}; + \node (p5) [process, below of = p4] {call \_write\_line}; + + \path [arrow] (start) -- (i1); + \path [arrow] (i1) -- (d1); + \path [arrow] (d1) -- node {Si} (i2); + \path [arrow] (d1) -- node {No} (e1); + \path [arrow] (i2) -- (p1); + \path [arrow] (p1) -- (p2); + \path [arrow] (p2) -- (d2); + \path [arrow] (d2) -- node {Si} (p4); + \path [arrow] (d2) -- node {No} (p3); + \path [arrow] (p3) -- (e0); + \path [arrow] (p4) -- (p5); + \path [arrow] (p5.west) node [anchor =south west] {} --+(-2cm,0) |-(p2); + + \end{tikzpicture} + + \end{center} + + \newpage + + \subsection{Variabili Globali} \begin{itemize} - \item + \itemtt{\hyperref[v:1:1]{input\_fd}}: Contiene il descrittore del file di input. + \itemtt{\hyperref[v:1:2]{output\_fd}}: Contiene il descrittore del file di output. + \itemtt{\hyperref[v:1:3]{init}}: Contiene il valore del segnale INIT corrente. + \itemtt{\hyperref[v:1:4]{reset}}: Contiene il valore del segnale RESET corrente. + \itemtt{\hyperref[v:1:5]{rpm}}: Contiene il valore del segnale RPM corrente. + \itemtt{\hyperref[v:1:6]{alm}}: Contiene il valore del segnale ALM corrente. + \itemtt{\hyperref[v:1:7]{mod}}: Contiene il valore del segnale MOD corrente. + \itemtt{\hyperref[v:1:8]{numb}}: Contiene il valore del segnale NUMB corrente. \end{itemize} - \subsection{main.s} - File principale del programma. - \subsubsection{Variabili Globali} + + \begin{framescelte}{Scelte Progettuali} + Si è scelto di utilizzare in modo estensivo le variabili globali in quanto in un progetto di così ridotte dimensioni si aumenta notevolmente la leggibilità del codice e nel contempo se ne riduce la complessità di scrittura. Se il progetto avesse richiesto computazioni più complesse questo approccio non sarebbe stato l'ideale, poiché sarebbero state compromesse le prestazioni totali dell'applicazione. + \end{framescelte} + \subsection{Variabili Locali} + \begin{itemize} + \itemtt{\hyperref[v:1:9]{usage}}: Stringa per la descrizione del corretto utilizzo del programma. + \itemtt{\hyperref[v:1:10]{USAGE\_LENGTH}}: Contiene la lunghezza della stringa, necessaria per la stampa. + \end{itemize} + + \subsection{Funzioni ed Etichette} \begin{itemize} - \item \texttt{input\_fd}: Contiene il descrittore del file di input; - \item \texttt{output\_fd}: Contiene il descrittore del file di output; - \item \texttt{init}: Contiene il valore del segnale INIT corrente; - \item \texttt{reset}: Contiene il valore del segnale RESET corrente; - \item \texttt{rpm}: Contiene il valore del segnale RPM corrente; - \item \texttt{alm}: Contiene il valore del segnale ALM corrente; - \item \texttt{mod}: Contiene il valore del segnale MOD corrente; - \item \texttt{numb}: Contiene il valore del segnale NUMB corrente. - \end{itemize} - \subsubsection{Variabili Locali} + \itemtt{\hyperref[e:1:1]{\_start}}: Punto di entrata del programma. Si occupa di controllare che il numero di parametri sia corretto, in caso contrario stampa la stringa \texttt{usage} e termina. Dopo il controllo chiama la funzione \texttt{\_open\_files} definita nel file \texttt{open\_files.s}. + \itemtt{\hyperref[e:1:2]{\_main\_loop}}: Loop principale. Viene chiamata la funzione \texttt{\_read\_line} definita nel file \texttt{read\_line.s}, nel caso in cui il contenuto del registro \texttt{ebx} sia equivalente a -1 significa che il file di input è terminato (\textbf{EOF} $\rightarrow$ End Of File) quindi salta a \texttt{\_end}, altrimenti chiama la funzione \texttt{\_check} definita nel file \texttt{check.s} e la funzione \texttt{\_write\_line} definita nel file \texttt{write\_line.s}, dopodiché riesegue il ciclo. + \itemtt{\hyperref[e:1:3]{\_end}}: Si occupa di chiudere tutti i file aperti e della corretta uscita dal programma tramite la chiamata di sistema \texttt{exit}. + \itemtt{\hyperref[e:1:4]{\_show\_usage}}: Nel caso in cui i parametri non siano corretti stampa a video la stringa \texttt{usage} e termina il programma segnalando errore con il codice 1. + \end{itemize} + + \section{open\_files.s} + Contiene la funzione che si occupa di aprire i file in modo corretto. + + \subsection{Variabili Locali} \begin{itemize} - \item \texttt{usage}: Stringa per la descrizione del corretto utilizzo del programma; - \item \texttt{USAGE\_LENGTH}: Costante necessaria per la stampa della stringa. + \itemtt{\hyperref[v:2:1]{error\_opening\_files}}: Stringa di errore in caso di errata apertura dei file (e.g. file mancante, file corrotto, \ldots). + \itemtt{\hyperref[v:2:2]{ERROR\_OPENING\_LENGTH}}: Costante che contiene la lunghezza della stringa di errore. \end{itemize} - \subsubsection{Funzioni e Etichette} + + \subsection{Funzioni ed Etichette} \begin{itemize} - \item \texttt{\_start}: Punto di entrata del programma. Si occupa di controllare che il numero di parametri sia corretto, in caso contrario stampa la stringa \texttt{usage} e termina. Dopo il controllo chiama la funzione \texttt{\_open\_files} definita nel file \texttt{open\_files.s}. - \item \texttt{\_main\_loop}: Loop principale. Viene chiamata la funzione \texttt{\_read\_line} definita nel file \texttt{read\_line.s}, nel caso in cui il contenuto del registro \texttt{EBX} sia equivalente a -1 significa che il file di input è terminato (\textbf{EOF}) quindi salta a \texttt{\_end}, altrimenti chiama la funzione \texttt{\_check} definita nel file \texttt{check.s} e la funzione \texttt{\_write\_line} definita nel file \texttt{write\_line.s}, dopodiché riesegue il ciclo. - \item \texttt{\_end}: Si occupa di chiudere tutti i file aperti e della corretta uscita dal programma tramite la chiamata di sistema \texttt{EXIT}. - \item \texttt{\_show\_usage}: Nel caso in cui i parametri non siano corretti stampa a video la stringa \texttt{usage} e termina il programma segnalando errore con il codice 1. - \end{itemize} -\end{document} \ No newline at end of file + \itemtt{\hyperref[e:2:1]{\_open\_files}}: Si occupa di aprire i file e gestisce eventuali errori. In caso il file di output non esistesse, questo viene creato in automatico con permessi di lettura e scrittura. I descrittori ottenuti vengono salvati nelle corrispondenti variabili globali. + \itemtt{\hyperref[e:2:2]{\_error\_opening\_files}}: In caso di errore viene stampato su \texttt{STDERR} la stringa opportuna, dopodiché il programma viene terminato con codice di errore 2. + \end{itemize} + + \section{read\_line.s} + Contiene la funzione che si occupa di leggere ed interpretare una riga per volta del file di input. + \subsection{Variabili Locali} + \begin{itemize} + \itemtt{\hyperref[v:3:1]{input\_buff}}: Buffer di dimensione \texttt{INPUT\_BUFF\_LEN} che conterrà i caratteri della riga letta dal file di input. + \itemtt{\hyperref[v:3:2]{INPUT\_BUFF\_LEN}}: Dimensione del buffer. + \end{itemize} + + \begin{framescelte}{Scelte Progettuali} + Si è scelto di utilizzare un buffer di dimensione 9 byte corrispondente alla lunghezza di una singola riga. Questa scelta è molto importante perché permette di non realizzare soluzioni hardcoded. La consegna specifica che non verranno utilizzati file di input con più di 100 righe: sfruttando tale informazione si sarebbe potuto scrivere un codice semplicistico che leggesse in un buffer l'intero file. Soluzione poco elegante e mal ottimizzata. Un'altra strada prendibile sarebbe stata quella di leggere un byte alla volta dal file di input, ma questa avrebbe richiesto un numero spropositato e inutile di chiamate al kernel. Con la lettura di una riga per volta il buffer rimane snello e comodo da manipolare. Questa soluzione permette all'applicazione di lavorare con file di dimensione arbitraria, inoltre lo riteniamo un metodo ottimale in quanto stabilisce un compromesso tra l'uso di \texttt{SYS\_CALL} e flessibilità del codice. Oltre a questo si sarebbe potuto utilizzare un ulteriore metodo: quello di mappare in memoria il file ed accedervi come in un array, ma questo sforava dalle nozioni fornite dal corso. + \end{framescelte} + + \subsection{Funzioni ed Etichette} + \begin{itemize} + \itemtt{\hyperref[e:3:1]{\_read\_line}}: Legge dal file una riga tramite la chiamata di sistema \texttt{read} e si occupa di richiedere la traduzione dei caratteri letti in interi mediante la funzione \texttt{\_atoi} definita nel file \texttt{atoi.s} salvandoli successivamente nelle rispettive variabili globali. In caso i caratteri letti siano pari a 0 salta all'etichetta \texttt{\_eof}. + \itemtt{\hyperref[e:3:2]{\_eof}}: In caso di \texttt{EOF} mette -1 in \texttt{ebx} e ritorna. + \end{itemize} + + + \section{atoi.s} + Contiene la funzione che si occupa di convertire una serie di caratteri \texttt{ASCII} in un numero intero. + \subsection{Funzioni ed Etichette} + \begin{itemize} + \itemtt{\hyperref[e:4:1]{\_atoi}}: Vengono inizializzati i registri necessari alla conversione. + \itemtt{\hyperref[e:4:2]{\_atoi\_loop}}: Loop principale, converte la stringa puntata dal registro \texttt{edi} in un intero salvato e ritornato in \texttt{eax}. + \end{itemize} + + \section{check.s} + Contiene la funzione che si occupa di settare sulla base dei valori di input e dei valori del ciclo precedente i corretti parametri delle variabili \texttt{alm, mod, numb}. + \subsection{Funzioni ed Etichette} + \begin{itemize} + \itemtt{\hyperref[e:5:1]{\_check}}: In base ai valori di \texttt{init} e \texttt{rpm} si occupa di saltare all'etichetta corretta. + \itemtt{\hyperref[e:5:2]{\_fg / \_sg / \_opt}}: Etichette corrispondenti alle modalità di funzionamento previste dalle specifiche. Si occupano di settare i corretti valori di \texttt{alm, mod, numb}. L'unica modalità che necessita di una gestione particolare è \texttt{fg} in cui bisogna settare l'eventuale allarme. + \itemtt{\hyperref[e:5:3]{\_reset\_numb}}: Nel caso in cui sia stata cambiata la modalità di funzionamento oppure il valore della variabile \texttt{reset} sia pari a 1, viene settata la modalità corretta, resettato il conteggio \texttt{numb} e "spento" \texttt{alm}. + \itemtt{\hyperref[e:5:4]{\_set\_alm}}: Se il motore è nella modalità \texttt{fg} da più di 15 secondi, viene "acceso" l'allarme portando il valore di \texttt{alm} a 1. + \itemtt{\hyperref[e:5:5]{\_init\_0}}: Se il valore di \texttt{init} è pari a 0 tutte le variabili di output vengono poste a 0 dal momento che il motore è spento. + \itemtt{\hyperref[e:5:6]{\_end\_check}}: Abbiamo ritenuto opportuno (per evitare di preoccupare troppo il conducente) considerare un numero di secondi di massimo due cifre. Prima di terminare la funzione si controlla che il valore di \texttt{numb} non sia superiore a 99, in caso si salta a \texttt{\_numb\_overflow} che azzera \texttt{numb}. + \end{itemize} + + \begin{framescelte}{Scelte Progettuali} + Si è scelto di dividere il progetto in poche funzioni e di tenere tutti i controlli relativi a input/output in un'unica funzione chiamata \texttt{\_check}. Sarebbe stato tranquillamente possibile fare una divisione in funzioni minori per aumentare la leggibilità (e.g. \texttt{check\_rpm}, \texttt{check\_init}, \ldots), ma è stato ritenuto più pratico, per la semplicità dei controlli, mantenere il codice in un unico file. + \end{framescelte} + + \section{write\_line.s} + Contiene la funzione che si occupa di creare la stringa di output e scriverla sul corrispondente file. + Ricordiamo qui la codifica utilizzata delle modalità di funzionamento e la struttura di una singola riga di output: + \begin{table}[!h] + \centering + \begin{tabular}{| l | c | c |} + \hline + Spento & 0 & 00 \\ \hline + SG & 1 & 01 \\ \hline + OPT & 2 & 10 \\ \hline + FG & 3 & 11 \\ \hline + \end{tabular} + \\ + \vspace{5mm} + \begin{tabular}{| c | c | c | c | c | c |} + \hline + \texttt{alm} (1 byte) & , & \texttt{mod} (2 byte) & , & \texttt{numb} (2 byte) & \texttt{\textbackslash n} \\ \hline + \end{tabular} + \end{table} + \subsection{Variabili Locali} + \begin{itemize} + \itemtt{\hyperref[v:6:1]{output\_buff}}: Buffer di dimensione \texttt{OUTPUT\_BUFF\_LEN} che conterrà i caratteri della stringa da scrivere sul file di output. + \itemtt{\hyperref[v:6:2]{OUTPUT\_BUFF\_LEN}}: Dimensione del buffer. + \itemtt{\hyperref[v:6:3]{MOD\_XX}}: Stringhe costanti che identificano la modalità di funzionamento corrispondente in binario. + \itemtt{\hyperref[v:6:4]{MOD\_LEN}}: Dimensione delle stringhe di modalità. + \end{itemize} + + \subsection{Funzioni ed Etichette} + \begin{itemize} + \itemtt{\hyperref[e:6:1]{\_write\_line}}: Inizializza i registri necessari alla scrittura sulla variabile buffer. + \itemtt{\hyperref[e:6:2]{\_alm\_X}}: Aggiunge al buffer il corretto valore di \texttt{alm}. + \itemtt{\hyperref[e:6:3]{\_print\_mod}}: Aggiunge al buffer una virgola come separatore e in base al valore di \texttt{mod} salta alla corrispondente etichetta. + \itemtt{\hyperref[e:6:4]{\_mod\_X}}: La stringa corrispondente alla modalità X codificata in binario viene messa in \texttt{eax}, in seguito viene aggiunta al buffer nell'etichetta \texttt{\_end\_print\_mod}. + \itemtt{\hyperref[e:6:5]{\_print\_numb}}: Si occupa di aggiungere al buffer il valore di \texttt{numb} opportunamente convertito in \texttt{ASCII} e di terminare la stringa con il carattere \texttt{\textbackslash n}. + \itemtt{\hyperref[e:6:6]{\_numb\_one\_digit}}: Se il valore di \texttt{numb} è minore di 10 si occupa di aggiungere uno 0 come prima cifra. + \end{itemize} + + \section{itoa.s} + Contiene la funzione per convertire un valore da intero a una corrispondente stringa \texttt{ASCII}. + \subsection{Funzioni ed Etichette} + \begin{itemize} + \itemtt{\hyperref[e:7:1]{\_itoa}}: Inizializza i registri necessari alla conversione. + \itemtt{\hyperref[e:7:2]{\_itoa\_dividi}}: Si occupa di contare i caratteri necessari per la stringa e di posizionare il carattere \texttt{\textbackslash 0} alla fine della stringa. + \itemtt{\hyperref[e:7:3]{\_itoa\_converti}}: Scrive ogni cifra nella posizione corretta della stringa. + \end{itemize} + + \section{close\_files.s} + Contiene la funzione per chiudere correttamente un file. + + + \newpage + + + \section{Codice Sorgente} + + \subsection{syscall.inc} + + \begin{lstlisting}[language=MyAssembler, style=MyAsm] + # file di definizione delle chiamate di sistema linux + + .equ SYS_EXIT, 1(*@\label{s:1}@*) + .equ SYS_READ, 3 + .equ SYS_WRITE, 4 + .equ SYS_OPEN, 5 + .equ SYS_CLOSE, 6 + + .equ STDIN, 0 + .equ STDOUT, 1 + .equ STDERR, 2 + + .equ SYSCALL, 0x80 + \end{lstlisting} + \subsection{main.s} + % \lstinputlisting[style=MyAsm, language = MyAssembler]{../src/main.s} + \begin{lstlisting}[language=MyAssembler, style=MyAsm] + # Progetto Assembly 2016 + # File: main.s + # Autori: Noè Murr, Mirko Morati + # + # Descrizione: File principale, punto di inizio del programma. + .include "syscall.inc" + + .section .data + input_fd: .long 0(*@\label{v:1:1}@*) # variabile globale che conterrà il file + # descriptor del file di input + + output_fd: .long 0(*@\label{v:1:2}@*) # variabile globale che conterrà il file + # descriptor del file di output + + # Variabili globali per i segnali di input + init: .long 0(*@\label{v:1:3}@*) + reset: .long 0(*@\label{v:1:4}@*) + rpm: .long 0(*@\label{v:1:5}@*) + + # Variabili globali per i segnali di output + alm: .long 0(*@\label{v:1:6}@*) + numb: .long 0(*@\label{v:1:8}@*) + mod: .long 0(*@\label{v:1:7}@*) + + # Codice del programma + + .section .text + .globl input_fd + .globl output_fd + .globl init + .globl reset + .globl rpm + .globl alm + .globl numb + .globl mod + .globl _start + + # Stringa per mostrare l'utilizzo del programma in caso di parametri errati + usage(*@\label{v:1:9}@*): .asciz "usage: programName inputFilePath outputFilePath\n" + .equ USAGE_LENGTH(*@\label{v:1:10}@*), .-usage + + _start:(*@\label{e:1:1}@*) + # Recupero i parametri del main + popl %eax # Numero parametri + + # Controllo argomenti, se sbagliati mostro l'utilizzo corretto + cmpl $3, %eax + jne _show_usage + + popl %eax # Nome programma + popl %eax # Primo parametro (nome file di input) + popl %ebx # Secondo parametro (nome file di output) + + # NB: non salvo ebp in quanto non ha alcuna utilità + # nella funzione start che comunque non ritorna + + movl %esp, %ebp + + call _open_files # Apertura dei file + + _main_loop:(*@\label{e:1:2}@*) + + call _read_line # Leggiamo la riga + + cmpl $-1, %ebx # EOF se ebx == -1 + je _end + + call _check # Controllo delle variabili + + call _write_line # Scrittura delle variabili di output su file + + jmp _main_loop # Leggi un altra riga finché non è EOF + + _end:(*@\label{e:1:3}@*) + + call _close_files # Chiudi correttamente i file + + # sys_exit(0); + movl $SYS_EXIT, %eax + movl $0, %ebx + int $SYSCALL + + _show_usage:(*@\label{e:1:4}@*) + # esce in caso di errore con codice 1 + # sys_write(stdout, usage, USAGE_LENGTH); + movl $SYS_WRITE, %eax + movl $STDOUT, %ebx + movl $usage, %ecx + movl $USAGE_LENGTH, %edx + int $SYSCALL + + # sys_exit(1); + movl $SYS_EXIT, %eax + movl $1, %ebx + int $SYSCALL + + \end{lstlisting} + + \subsection{open\_files.s} + \begin{lstlisting}[language=MyAssembler, style=MyAsm] + # Progetto Assembly 2016 + # File: open_files.s + # Autori: Noè Murr, Mirko Morati + # + # Descrizione: File contenente la funzione che si occupa di aprire i file di input e di + # output, i file descriptor vengono inseriti in variabili globali. + # Si suppone che il nome dei due file siano salvati negli indirizzi contenuti + # rispettivamente in %eax (input) ed in %ebx (output). + + .include "syscall.inc" + + .section .text + + error_opening_files:(*@\label{v:2:1}@*) .asciz "errore nell' apertura dei file\n" + .equ ERROR_OPENING_LENGTH(*@\label{v:2:2}@*), .-error_opening_files + + .globl _open_files # Dichiaro la funzione globale + .type _open_files, @function # Dichiaro l'etichetta come una funzione + + _open_files:(*@\label{e:2:1}@*) + + pushl %ebp + movl %esp, %ebp + + pushl %ebx # Pusho l' indirizzo del file di output + # sullo stack + + movl %eax, %ebx # Sposto l' indirizzo del file che vado + # ad aprire in %ebx + + movl $SYS_OPEN, %eax # Chiamata di sistema open + movl $0, %ecx # read-only mode + int $SYSCALL # Apro il file + + cmpl $0, %eax + jl _error_opening_files + + movl %eax, input_fd # Metto il file descriptor nella + # sua variabile + + popl %ebx # Riprendo l' indirizzo del nome del file + # di output che avevo messo sullo stack + + movl $SYS_OPEN, %eax # Chiamata di sistema open + movl $01101, %ecx # read and write mode + movl $0666, %edx # flags + int $SYSCALL # Apro il file + + cmpl $0, %eax + jl _error_opening_files + + movl %eax, output_fd # Metto il file descriptor nella + # sua variabile + + movl %ebp, %esp + popl %ebp + ret # Ritorna al chiamante + + _error_opening_files:(*@\label{e:2:2}@*) + # Esce con codice di errore 2 + # sys_write(stdout, usage, USAGE_LENGTH); + movl $SYS_WRITE, %eax + movl $STDERR, %ebx + movl $error_opening_files, %ecx + movl $ERROR_OPENING_LENGTH, %edx + int $SYSCALL + + # sys_exit(2); + movl $SYS_EXIT, %eax + movl $2, %ebx + int $SYSCALL + \end{lstlisting} + + \subsection{read\_line.s} + \begin{lstlisting}[language=MyAssembler, style=MyAsm] + # Progetto Assembly 2016 + # File: read_line.s + # Autori: Noè Murr, Mirko Morati + # + # Descrizione: Funzione che legge una riga alla volta del file di input. + + .include "syscall.inc" + + .section .bss + .equ INPUT_BUFF_LEN, 9(*@\label{v:3:2}@*) + input_buff: .space INPUT_BUFF_LEN(*@\label{v:3:1}@*) # Input buffer di 9 byte + + .section .text + .globl _read_line + .type _read_line, @function + + _read_line:(*@\label{e:3:1}@*) + pushl %ebp + movl %esp, %ebp + + # Lettura riga + # sys_read(input_fd, input_buff, INPUT_BUFF_LEN); + movl input_fd, %ebx + movl $SYS_READ, %eax + leal input_buff, %ecx + movl $INPUT_BUFF_LEN, %edx + int $SYSCALL + + cmpl $0, %eax # Se eax == 0 EOF + je _eof + + # Estrazione dei valori di init, reset, rpm dal buffer + leal input_buff, %edi + call _atoi + movl %eax, init + + incl %edi # Salto il carattere ',' + + call _atoi + movl %eax, reset + + incl %edi # Salto il carattere ',' + + call _atoi + movl %eax, rpm + + movl %ebp, %esp + popl %ebp + + xorl %ebx, %ebx # ebx = 0 permette di proseguire + ret + + _eof:(*@\label{e:3:2}@*) + # in caso di EOF %ebx = -1 + movl %ebp, %esp + popl %ebp + + movl $-1, %ebx + ret + \end{lstlisting} + + \newpage + \subsection{atoi.s} + \begin{lstlisting}[language=MyAssembler, style=MyAsm] + # Progetto Assembly 2016 + # File: atoi.s + # Autori: Alessandro Righi, Noè Murr, Mirko Morati + # + # Descrizione: Funzione che converte una stringa in intero. + + .section .text + .globl _atoi + .type _atoi, @function + + # Funzione che converte una stringa di input in numero + # Prototipo C-style: + # uint32_t atoi(const char *string); + # Parametri di input: + # EDI - Stringa da convertire + # Parametri di output: + # EAX - Valore convertito + + _atoi:(*@\label{e:4:1}@*) + xorl %eax, %eax # azzero il registro EAX per contenere il risultato + xorl %ebx, %ebx # azzero EBX + movl $10, %ecx # sposto 10 in ECX che conterrà il valore moltiplicativo + + _atoi_loop:(*@\label{e:4:2}@*) + xorl %ebx, %ebx + movb (%edi), %bl # sposto un byte dalla stringa in BL + subb $48, %bl # sottraggo il valore ASCII dello 0 a BL + # per avere un valore intero + + cmpb $0, %bl # Se il numero è minore di 0 + jl _atoi_end # allora esco dal ciclo + cmpb $10, %bl # Se il numero è maggiore o uguale a 10 + jge _atoi_end # esco dal ciclo + + mull %ecx # altrimenti moltiplico EAX per 10 + # (10 messo precedentemente in ECX) + addl %ebx, %eax # aggiungo a EAX il valore attuale + incl %edi # incremento EDI + + jmp _atoi_loop # rieseguo il ciclo + + _atoi_end: + ret + \end{lstlisting} + + \newpage + \subsection{check.s} + \begin{lstlisting}[language=MyAssembler, style=MyAsm] + # Progetto Assembly 2016 + # File: check.s + # Autori: Noè Murr, Mirko Morati + # + # Descrizione: Funzione che controlla le variabili + # init, reset, rpm e setta le variabili alm, mod e numb + + .section .data + + .section .text + .globl _check + .type _check, @function + + _check:(*@\label{e:5:1}@*) + pushl %ebp + movl %esp, %ebp + + # Caso init == 0: alm = 0; mod = 0; numb = 0; + cmpl $0, init + je _init_0 + + # Caso SG: alm = 0; mod = 1; numb = reset == 1 ? 0 : numb + 1; + cmpl $2000, rpm + jl _sg + + # Caso OPT: alm = 0; mod = 2; numb = reset == 1 ? 0 : numb + 1; + cmpl $4000, rpm + jle _opt + + # Caso FG: alm = numb >= 15? 1 : 0; mod = 3; numb = reset == 1 ? 0 : numb + 1; + _fg:(*@\label{e:5:2}@*) + # Salviamo la nuova modalita' in %eax e controlliamo reset + movl $3, %eax + cmpl $1, reset + je _reset_numb + + # Se la nuova modalità non è la stessa si resetta il numero di secondi + cmpl $3, mod + jne _reset_numb + + incl numb + movl %eax, mod + + # Se il numero di secondi è maggiore o uguale a 15 viene alzata l'allarme + cmpl $15, numb + jge _set_alm + + jmp _end_check + + _opt: + movl $2, %eax + cmpl $1, reset + je _reset_numb + + cmpl $2, mod + jne _reset_numb + + incl numb + movl %eax, mod + + jmp _end_check + + _sg: + movl $1, %eax + cmpl $1, reset + je _reset_numb + + cmpl $1, mod + jne _reset_numb + + incl numb + movl %eax, mod + + jmp _end_check + + _reset_numb:(*@\label{e:5:3}@*) + movl %eax, mod + movl $0, numb + movl $0, alm + + jmp _end_check + + _set_alm:(*@\label{e:5:4}@*) + movl $1, alm + + + jmp _end_check + + _init_0:(*@\label{e:5:5}@*) + movl $0, alm + movl $0, numb + movl $0, mod + + _end_check:(*@\label{e:5:6}@*) + + # Se il numero di secondi supera i 99 allora dobbiamo ricominciare il conteggio + cmpl $99, numb + jg _numb_overflow + movl %ebp, %esp + popl %ebp + + ret + + _numb_overflow:(*@\label{e:5:7}@*) + movl $0, numb + jmp _end_check + \end{lstlisting} + + \subsection{write\_line.s} + \begin{lstlisting}[language=MyAssembler, style=MyAsm] + # Progetto Assembly 2016 + # File: check.s + # Autori: Noè Murr, Mirko Morati + # + # Descrizione: Funzione che scrive una riga alla volta nel file di output + + .include "syscall.inc" + + .section .bss + .equ OUTPUT_BUFF_LEN, 8(*@\label{v:6:2}@*) + output_buff:(*@\label{v:6:1}@*) .space OUTPUT_BUFF_LEN + + .section .text + .globl _write_line + .type _write_line, @function + MOD_00: .ascii "00"(*@\label{v:6:3}@*) # motore spento + MOD_01: .ascii "01" # motore sotto giri + MOD_10: .ascii "10" # motore in stato ottimale + MOD_11: .ascii "11" # motore fuori giri + .equ MOD_LEN, 2(*@\label{v:6:4}@*) + + _write_line:(*@\label{e:6:1}@*) + pushl %ebp + movl %esp, %ebp + + leal output_buff, %edi # spostiamo il puntatore + # del buffer di output in EDI + + cmpl $1, alm # se l'allarme è 1 stampiamo 1 + # altrimenti 0 senza chiamare funzioni + je _alm_1 + + _alm_0:(*@\label{e:6:2}@*) + movl $48, (%edi) + jmp _print_mod + + _alm_1: + movl $49, (%edi) + + _print_mod:(*@\label{e:6:3}@*) + movl $44, 1(%edi) # aggiungiamo la virgola dopo + # il segnale di allarme + addl $2, %edi # spostiamo un immaginario cursore + # nella posizione dove stampare la mod + + cmpl $1, mod # controlliamo il valore di mod + # e stampiamo la stringa corretta in base + # alla giusta modalita' di funzionamento + je _mod_1 + cmpl $2, mod + je _mod_2 + cmpl $3, mod + je _mod_3 + + _mod_0:(*@\label{e:6:4}@*) + movl MOD_00, %eax + jmp _end_print_mod + + _mod_1: + movl MOD_01, %eax + jmp _end_print_mod + + _mod_2: + movl MOD_10, %eax + jmp _end_print_mod + + _mod_3: + movl MOD_11, %eax + + _end_print_mod: + movl %eax, (%edi) # mettiamo la stringa nell' output_buff + addl $MOD_LEN, %edi # spostato il cursore (la posizione di edi) + # nel punto esatto dove scrivere + movl $44, (%edi) # aggiungiamo la virgola + incl %edi # spostiamo il cursore + + cmpl $10, numb # controlliamo se il numero di secondi + # è ad una sola cifra, in tal caso + # aggiungiamola cifra 0 + jl _numb_one_digit + + _print_numb:(*@\label{e:6:5}@*) + movl numb, %eax # prepariamo la chiamata per itoa + + call _itoa # chiamiamo itoa + + + leal output_buff, %edi # mettiamo il puntatore di output_buff in edi + addl $7, %edi # ci aggiungiamo 7 per arrivare + # alla fine della stringa, + movl $10, (%edi) # punto nel quale aggiungiamo un \n + + movl $SYS_WRITE, %eax + movl output_fd, %ebx + leal output_buff, %ecx + movl $OUTPUT_BUFF_LEN, %edx + int $SYSCALL + + + movl %ebp, %esp + popl %ebp + + ret + + _numb_one_digit:(*@\label{e:6:6}@*) + movl $48, (%edi) + incl %edi + jmp _print_numb + \end{lstlisting} + + \subsection{itoa.s} + \begin{lstlisting}[language=MyAssembler, style=MyAsm] + # Progetto Assembly 2016 + # File: itoa.s + # Autori: Alessandro Righi, Noè Murr, Mirko Morati + # + # Descrizione: Funzione che converte un intero in stringa + # Prototipo C-style: + # u_int32_t itoa(uint32_t val, char *string); + # Parametri di input: + # EAX - Valore intero unsigned a 64bit da convertire + # EDI - Puntatore alla stringa su cui salvare il risultato + # Parametri di output: + # EAX - Lunghezza della stringa convertita (compresiva di \0 finale) + + .section .text + .global _itoa + .type _itoa, @function + + _itoa:(*@\label{e:7:1}@*) + movl $10, %ecx # porto il fattore moltiplicativo in ECX + movl %eax, %ebx # salvo temporaneamente il valore di EAX in EBX + xorl %esi, %esi # azzero il registro ESI + + _itoa_dividi:(*@\label{e:7:2}@*) + xorl %edx, %edx # azzero EDX per fare la divisione + divl %ecx # divide EAX per ECX, salva il resto in EDX + incl %esi # incrementa il contatore + testl %eax, %eax # se il valore di EAX non è zero ripeti il ciclo + jnz _itoa_dividi + + addl %esi, %edi # somma all'indirizzo del buffer + # il numero di caratteri del numero + movl %ebx, %eax # rimette il valore da convertire in EAX + movl %esi, %ebx # salvo il valore della lunghezza della stringa in EBX + + movl $0, (%edi) # aggiungo un null terminator alla fine della stringa + decl %edi # decremento il contatore della stringa di 1 + + _itoa_converti:(*@\label{e:7:3}@*) + xorl %edx, %edx # azzero EDX per fare la divisione + divl %ecx # divido EAX per ECX, salvo il valore del resto in EDX + addl $48, %edx # sommo 48 a EDX + movb %dl, (%edi) # sposto il byte inferiore di EDX (DL) + # nella locazione di memoria puntata da EDI + decl %edi # decremento il puntatore della stringa + decl %esi # decremento il contatore + testl %esi, %esi # se il contatore non è 0 continua ad eseguire il loop + jnz _itoa_converti + + movl %ebx, %eax # porto il valore della lunghezza + # della stringa in EAX per ritornarlo + incl %eax # incremento di 1 EAX (in modo da includere il \0) + ret + \end{lstlisting} + + \subsection{close\_files.s} + \begin{lstlisting}[language=MyAssembler, style=MyAsm] + # Progetto Assembly 2016 + # File: check.s + # Autori: Noè Murr, Mirko Morati + # + # Descrizione: Funzione che chiude i file aperti precedentemente + + .include "syscall.inc" + + .section .text + .globl _close_files # Dichiaro la funzione globale + .type _close_files, @function # Dichiaro l' etichetta come una funzione + + _close_files: + + pushl %ebp + movl %esp, %ebp + + # sys_close(input_fd); + movl $SYS_CLOSE, %eax + movl input_fd, %ebx + int $SYSCALL + + # sys_close(output_fd); + movl $SYS_CLOSE, %eax + movl output_fd, %ebx + int $SYSCALL + + + movl %ebp, %esp + popl %ebp + + ret + \end{lstlisting} + + \end{document} \ No newline at end of file diff --git a/tex/elaborato.toc b/tex/elaborato.toc index 55723de..29df861 100644 --- a/tex/elaborato.toc +++ b/tex/elaborato.toc @@ -1,9 +1,36 @@ \select@language {italian} \select@language {italian} -\contentsline {section}{\numberline {1}Descrizione del progetto}{3} -\contentsline {section}{\numberline {2}File}{3} -\contentsline {subsection}{\numberline {2.1}syscall.inc}{3} -\contentsline {subsection}{\numberline {2.2}main.s}{3} -\contentsline {subsubsection}{\numberline {2.2.1}Variabili Globali}{3} -\contentsline {subsubsection}{\numberline {2.2.2}Variabili Locali}{3} -\contentsline {subsubsection}{\numberline {2.2.3}Funzioni e Etichette}{4} +\contentsline {section}{\numberline {1}Premessa}{2}{section.1} +\contentsline {section}{\numberline {2}Descrizione del progetto}{2}{section.2} +\contentsline {section}{\numberline {3}syscall.inc}{2}{section.3} +\contentsline {section}{\numberline {4}main.s}{3}{section.4} +\contentsline {subsection}{\numberline {4.1}Flowchart}{3}{subsection.4.1} +\contentsline {subsection}{\numberline {4.2}Variabili Globali}{4}{subsection.4.2} +\contentsline {subsection}{\numberline {4.3}Variabili Locali}{4}{subsection.4.3} +\contentsline {subsection}{\numberline {4.4}Funzioni ed Etichette}{4}{subsection.4.4} +\contentsline {section}{\numberline {5}open\_files.s}{5}{section.5} +\contentsline {subsection}{\numberline {5.1}Variabili Locali}{5}{subsection.5.1} +\contentsline {subsection}{\numberline {5.2}Funzioni ed Etichette}{5}{subsection.5.2} +\contentsline {section}{\numberline {6}read\_line.s}{5}{section.6} +\contentsline {subsection}{\numberline {6.1}Variabili Locali}{5}{subsection.6.1} +\contentsline {subsection}{\numberline {6.2}Funzioni ed Etichette}{6}{subsection.6.2} +\contentsline {section}{\numberline {7}atoi.s}{6}{section.7} +\contentsline {subsection}{\numberline {7.1}Funzioni ed Etichette}{6}{subsection.7.1} +\contentsline {section}{\numberline {8}check.s}{6}{section.8} +\contentsline {subsection}{\numberline {8.1}Funzioni ed Etichette}{6}{subsection.8.1} +\contentsline {section}{\numberline {9}write\_line.s}{7}{section.9} +\contentsline {subsection}{\numberline {9.1}Variabili Locali}{7}{subsection.9.1} +\contentsline {subsection}{\numberline {9.2}Funzioni ed Etichette}{7}{subsection.9.2} +\contentsline {section}{\numberline {10}itoa.s}{8}{section.10} +\contentsline {subsection}{\numberline {10.1}Funzioni ed Etichette}{8}{subsection.10.1} +\contentsline {section}{\numberline {11}close\_files.s}{8}{section.11} +\contentsline {section}{\numberline {12}Codice Sorgente}{9}{section.12} +\contentsline {subsection}{\numberline {12.1}syscall.inc}{9}{subsection.12.1} +\contentsline {subsection}{\numberline {12.2}main.s}{9}{subsection.12.2} +\contentsline {subsection}{\numberline {12.3}open\_files.s}{11}{subsection.12.3} +\contentsline {subsection}{\numberline {12.4}read\_line.s}{12}{subsection.12.4} +\contentsline {subsection}{\numberline {12.5}atoi.s}{14}{subsection.12.5} +\contentsline {subsection}{\numberline {12.6}check.s}{15}{subsection.12.6} +\contentsline {subsection}{\numberline {12.7}write\_line.s}{17}{subsection.12.7} +\contentsline {subsection}{\numberline {12.8}itoa.s}{19}{subsection.12.8} +\contentsline {subsection}{\numberline {12.9}close\_files.s}{20}{subsection.12.9} diff --git a/tex/logo.png b/tex/logo.png new file mode 100644 index 0000000..eba4076 Binary files /dev/null and b/tex/logo.png differ