conversione da numero a stringa - Agentgroup
conversione da numero a stringa - Agentgroup
conversione da numero a stringa - Agentgroup
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
; il carattere dl<br />
;<br />
; i = i / 10;<br />
;<br />
mov ax,i ; carico i in ax<br />
mov bx,10 ; carico 10 in bx<br />
idiv bx ; divido ax per bx<br />
; (con segno)<br />
mov i,ax ; metto il risultato in i<br />
;<br />
; cont--;<br />
;<br />
dec cont ; decremento cont<br />
; per spostarmi a sinistra<br />
; nell’array<br />
;<br />
; }<br />
; while (i > 0);<br />
;<br />
cmp i,0 ; finché i è maggiore di 0<br />
jg short inizio_do<br />
;<br />
; if (negativo)<br />
;<br />
cmp<br />
je<br />
negativo,0 ; se negativo è falso<br />
short else_2 ; salto<br />
; altrimenti inserisco un '-'<br />
; nella posizione cont<br />
;<br />
; {<br />
; ris[cont] =;<br />
;<br />
mov<br />
mov<br />
mov<br />
;<br />
; cont--;<br />
bx,ris ; carico in bx<br />
; l’indirizzo di ris<br />
si,cont ; carico cont in si<br />
byte ptr [bx+si],'-'<br />
; carico '-' in ris[cont]