tags:

views:

24

answers:

0

suppose i have a following program

[org 0x100]
jmp start
kbisr:........
..............
............
............
iret
start: ..........
...............
;now to reside the portion of program that is above the start lable what i do is
mov dx,start
add dx,15
mov cl,4
shr dx,cl
mov ax,0x3100
int 0x21


Now Suppose the offset of start is 0174 , i add 15 it becomes 189 then i divide it by 16 which becomes 11 (i am not considering the fractional part) As we have to tell our program that how many paragraphs to reside in memory now by the above calculation, it means we have to reside 11 paragraphs. Here the Question arises, when i opened listing file of this program and i counted the number of bytes of the routin that i want to reside in memory, number of bytes were only 74 now if i divide it with 16 then it becomes 4.6 it means we need to allocate 5 paragraphs, but according to the above calculation we need to reside 11 paragraphs, this is the confusion please explain it in more understandable way. thank you