A
A
Andr2016-12-10 14:58:21
assembler
Andr, 2016-12-10 14:58:21

Is the weight of the code in assembler correctly calculated?

I counted 149 bytes, right?

mov ah, 2ch
int  21h
 
mov [Hour], ch
mov[Min], cl

mov ah,9h
mov bx, offset mes2
int 21h
mes2 db Hour,Min 'Hour'
 
 
Hour dd ?
Min dd ?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Saboteur, 2016-12-10
@dashademkova

It is not entirely clear what the weight of the code in assembler is. How are you going to use it?
If in the form of a file - there are no headers.
If in the form of a program in memory, a 64kb page will still be allocated.
Well, on modern OSes, this will no longer work, a direct appeal to DOS functions in 2016?

G
Godless, 2016-12-10
@Godless

Weight - size I understand? The schema is usually like this:

start:
           int 3
           nop
           xor eax,eax
           call [eax]
end:
           mov eax,(end - start)

And in the debugger, see how much is in the register =)
And then different compilers generate different code due to optimizations and so on.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question