|
-
Jul 19th, 2001, 11:46 AM
#1
About your FAQ
I was looking at the FAQ you have here guys. One thing I noticed is that you are only refering to 1 ASM compiler - a86 and TASM in your source code. But if you tried that code in NASM it would error out. So I thought I would post some code for those who want to see the difference for NASM verses other compilers.
Hello World .COM file would look like this....
BITS 16 ;16 = DOS 32 = Windows (It's about segments.)
ORG 100h ; This tells the compiler you are making a COM file.
jmp start
Message1 db "Hello World!",13,10,0 ;You really don't need the 13, 10. But you do need the 0. Make sure there is a comma.
start:
mov ah, 09h
mov dx, Message1 ;You don't need offset.
int 21h
mov ax, 4c00h
int 21h ;4C00 and INT returns you back to MS-DOS.
Then you would same the file as any extension you want. Usually .ASM is preffered. I sometimes save it as a TXT extension.
You would then type this.
In 16-bit environment you would type:
NASM16 -f bin myprogram.asm -o myprogram.com
In 32 bit environment you would type:
NASMW -f bin myprogram.asm -o myprogram.com
Keep in mind, most of you are going to use the 32-Bit version of the NASM compiler. But I use both and so posted both in case others use ONLY DOS or LINUX etc...
I hope this helps those who want to use NASM 0.98. It's free and VERY easy!!!
You can check out some resources that I have at my website.
http://ossourcecode.tripod.com
Laterz.. 
Knight Vision
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|