| | |
Some general assembly questions
![]() |
•
•
Join Date: Mar 2005
Posts: 3
Reputation:
Solved Threads: 0
I have been trying to figure these out from the book but couldn't .Im studying correspondence so im also on my own
Thanks alot for any help !
1. if the program TEST.ASM has been designed as an EXE program , can the program TEST.OBJ be executed successfully?
2. What is the meaning of the following directive ?
PAGE 55,132
3. In a program consisting of seperately compiled modules what is the assembler's name for a reference to a label outside the current module?
4. given the following map file:
Start Stop Length Name Class
00000H 00023H 00024H _TEXT CODE
00030H 00031H 00002H _DATA DATA
if this programs code segment were loaded by DOS at absolute address 18400h , what would be the absolute addresses of the data and stack segments ?
Thanks a million !
Thanks alot for any help !
1. if the program TEST.ASM has been designed as an EXE program , can the program TEST.OBJ be executed successfully?
2. What is the meaning of the following directive ?
PAGE 55,132
3. In a program consisting of seperately compiled modules what is the assembler's name for a reference to a label outside the current module?
4. given the following map file:
Start Stop Length Name Class
00000H 00023H 00024H _TEXT CODE
00030H 00031H 00002H _DATA DATA
if this programs code segment were loaded by DOS at absolute address 18400h , what would be the absolute addresses of the data and stack segments ?
Thanks a million !
•
•
Join Date: Mar 2005
Posts: 53
Reputation:
Solved Threads: 1
Hi,
I left assembly a long time back. So dont remember much. May be u find following usefull but please cross verify.
4) Data segment will start at absolute address 18400H + 00030H i.e. 18430 H. I am not sure of Stack segment since its location is not given in map. My best guess would be STACK at 18440H
3). You simply can access the label by putting 2 colons instead of 1
I left assembly a long time back. So dont remember much. May be u find following usefull but please cross verify.
4) Data segment will start at absolute address 18400H + 00030H i.e. 18430 H. I am not sure of Stack segment since its location is not given in map. My best guess would be STACK at 18440H
3). You simply can access the label by putting 2 colons instead of 1
cheers,
aj.wh.ca
-------------------------------------------
www.swiftthoughts.com
-------------------------------------------
aj.wh.ca
-------------------------------------------
www.swiftthoughts.com
-------------------------------------------
if the program TEST.ASM has been designed as an EXE program , can the program TEST.OBJ be executed successfully
No. Object files are simply a binary image of what the compiler determined is the most appropriate interpretation of source. You must then take that/those object files and link them together. For example, I use NASM and it would look like this.
c:\>nasmw -fwin32 Test.asm
c:\>link /entry:Main /subsystem:console /machine:ix86 Test kernel32.lib user32.lib gdi32.lib
So the compiler generates Test.obj from Test.asm and the linker generates Test.exe from Test.obj.
What is the meaning of the following directive ?
PAGE 55,132
If you direct the compiler to emit an assembly listing it will put 55 lines/page and each line will be a maximum of 132 columns
In a program consisting of seperately compiled modules what is the assembler's name for a reference to a label outside the current module?
In the case of NASM, where I declare the variable I have to qualify it with
global then in the other file where I want to access
if this programs code segment were loaded by DOS at absolute address 18400h , what would be the absolute addresses of the data and stack segments ?
Generally a map files address can be treated as offsets. So all you do is add the start to your destination. I would recommend though you don't use map information as a form of coding because once you start programming in protected systems absolute addresses are somewhat irrelevant.
No. Object files are simply a binary image of what the compiler determined is the most appropriate interpretation of source. You must then take that/those object files and link them together. For example, I use NASM and it would look like this.
c:\>nasmw -fwin32 Test.asm
c:\>link /entry:Main /subsystem:console /machine:ix86 Test kernel32.lib user32.lib gdi32.lib
So the compiler generates Test.obj from Test.asm and the linker generates Test.exe from Test.obj.
What is the meaning of the following directive ?
PAGE 55,132
If you direct the compiler to emit an assembly listing it will put 55 lines/page and each line will be a maximum of 132 columns
In a program consisting of seperately compiled modules what is the assembler's name for a reference to a label outside the current module?
In the case of NASM, where I declare the variable I have to qualify it with
global
Assembly Syntax (Toggle Plain Text)
global ScrBuff ScrBuff db 0
Assembly Syntax (Toggle Plain Text)
extern ScrBuff
if this programs code segment were loaded by DOS at absolute address 18400h , what would be the absolute addresses of the data and stack segments ?
Generally a map files address can be treated as offsets. So all you do is add the start to your destination. I would recommend though you don't use map information as a form of coding because once you start programming in protected systems absolute addresses are somewhat irrelevant.
![]() |
Similar Threads
- The Official 'College/Degree Questions' Thread (IT Professionals' Lounge)
- final year project advice (Oracle)
- final year project advice (Database Design)
- Some useful information. (Viruses, Spyware and other Nasties)
- cannot find shell.dll (Windows NT / 2000 / XP)
Other Threads in the Assembly Forum
- Previous Thread: Need help with project
- Next Thread: how long does it take to learn assembler and how difficult is it?
| Thread Tools | Search this Thread |





