944,016 Members | Top Members by Rank

Ad:
  • Assembly Discussion Thread
  • Unsolved
  • Views: 1926
  • Assembly RSS
Jun 27th, 2005
0

segments and initialization

Expand Post »
Hello All,

I have a question concerning setting up the code segment. I'm curious about what is being done in this code excerpt. I've tried to search and find documentation about it and have been unsuccessful.

mov bx,256
add bx,OFFSET endprog
add bx,OFFSET enddata
shr bx,1
shr bx,1
shr bx,1
shr bx,1
inc bx
mov [cs:ssize],bx
mov ah,setblock
int dos.

I understand the pure mechanisms of the commands but lack the understanding as to what purpose these commands perform.

Bx contains a value dictated by the programs locations, but then it's
divided by 16? I understand that this divides it by a paragraph. Then
it's incremented. And then moved into a code segment offset ssize. And
what is being done when the interrupt to the dos routine is performed?

I hope that I have not missed some obvious clue

Thank you so much,
Sabre1985
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Sabre1985 is offline Offline
2 posts
since Jun 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Assembly Forum Timeline: FREE Win32 RAD Assembly Tool
Next Thread in Assembly Forum Timeline: Free Win32 Assembly Source Codes





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC