[Vollbild] [Home]
;-------------------------------------------------
;Gibt den Wert von eax als Dezimalzahl auf der Standardausgabe aus.
;-------------------------------------------------
;Writes the value of eax to the standard output as decimal.
;-------------------------------------------------
LICENSE
;%include "./INC/stdout.inc"
stdout:
section .data
.buf db '0000000000',10,0
section .text
| pushad | |
|
| mov | ebx,.buf+9 |
| mov | ecx,10 |
| mov | edi,10 |
.a: |
| mov | edx,0 |
| div | edi |
| add | edx,48 |
| mov | [ebx],dl |
| dec | ebx |
| loop | .a |
|
| mov | eax,4 | ;write |
| mov | ebx,1 | ;to terminal |
| mov | ecx,.buf |
| mov | edx,11 | ;11 bytes |
| int | $80 |
|
| popad |
| ret |