E
E
Evgeny Kramor2019-06-18 17:32:19
assembler
Evgeny Kramor, 2019-06-18 17:32:19

How to display the result on the screen?

Hello! I started to master NASM and now I tried to parse the first program:

section .text
global _start
_start:
mov     ax,     8
mov     cx,     6       
mov     dx,     cx      
add     dx,     ax
 
; sys_exit
mov eax, 1
mov ebx, 0
int 0x80

How to display on the screen?
Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
freeExec, 2019-06-18
@freeExec

There are no magical printf()
1) Convert the numeric value to text. For this, you decided to study AFM in order to stretch your brain.
2) Glue some pre-prepared text with the text from the previous one in a new buffer, if necessary.
3) Call a system call to display the prepared buffer with text on the screen.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question