•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Assembly section within the Software Development category of DaniWeb, a massive community of 426,452 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,370 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Assembly advertiser: Programming Forums
Views: 1521 | Replies: 0
![]() |
•
•
Join Date: Jun 2005
Posts: 2
Reputation:
Rep Power: 0
Solved Threads: 0
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
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
![]() |
•
•
•
•
•
•
•
•
DaniWeb Assembly Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Similar Threads
- Initialization Lists (C++)
- I need help covert my source code frm pic16c54a to pic16f84a (Assembly)
- Help needed with static variabe initialization! (C++)
- how VC++ copes with 'static initialization dependency'? (C++)
- template array initialization (C++)
- Dynamic Initialization implies Dynamic Help (C++)
- Establishing A connection between Three programs. (C++)
- msurl.exe DLL Initialization failed (Viruses, Spyware and other Nasties)
Other Threads in the Assembly Forum
- Previous Thread: FREE Win32 RAD Assembly Tool
- Next Thread: Free Win32 Assembly Source Codes


Linear Mode