A
A
Alexey Nikolaev2015-12-24 01:11:26
Programming
Alexey Nikolaev, 2015-12-24 01:11:26

How to output at least something to the console in Assembler in the simplest way?

Goodnight!
I just can't figure out how to output at least something to the console. Win8.1 64x, Tasm 1.4

Stacks segment Stack
  db 256 dup(0)
Stacks ends

Datas segment 
Datas ends

Codes segment 
Assume cs:Codes, ds:Datas

First:
  int 21h ; вот тут пробовал массу всего, либо ошибки, либо ничего не пишет, либо какая-то ересь
end First

How to display any value, no matter where (number, symbol), just to display it?..
Thanks in advance.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
N
nirvimel, 2015-12-24
@Heian

First you need to decide under which processor architecture and under which OS you are writing. 16-bit DOS code (which is what you meant in your example) will build and run under Windows, but it won't be a Windows application.
Here are examples of hello-words for different operating systems. Despite the fact that the translator is different, it is easy to rewrite under tasm.

O
Oleg Tsilyurik, 2015-12-24
@Olej

I just can't figure out how to output at least something to the console.

The flag is in your hands:
Zubkov S.V.
Assembler for DOS, Windows and Unix
ISBN: 978-5-97060-158-7
640 pages
November 2014
Take, copy examples, study ...
PS For the life of me, I don’t understand - why do you need assembler in 2016? ;-)

S
Saboteur, 2015-12-24
@saboteur_kiev

int21h are DOS interrupts that should not work on modern 64bit windows.
You need to call the Windows API.
Look here
stackoverflow.com/questions/1023593/how-to-write-h...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question