4

I'm writing a chunk of assembly that will register a tsr and then exit.

I'm struggling to figure out how to properly assemble this to a format that I can execute in dos.

i'm have access to ubuntu 9.04 and windows xp. (linux method is preffered). If anyone can tell me how i go about assembling my code into a dos executable format, and then how i execute it in dos i'd greatly appreciate it!

6
  • TSR's? DOS? Suddenly it's 1985 all over again. Does XP even support TSR's? Commented Nov 9, 2009 at 14:25
  • microsoft.com/resources/documentation/windows/xp/all/proddocs/… I guess you can still do this. Amazing. Commented Nov 9, 2009 at 14:27
  • Now I'm curious - what does your tsr do? Or is it just a learning experience? Commented Nov 9, 2009 at 14:31
  • 1
    its just for learning. i've been taking assembly classes at school and want to mess with actually using some of the knowledge. Commented Nov 9, 2009 at 14:52
  • @ZJR DOS is still somewhat common in some embedded x86 systems where you want the benefits of an operating system with the flexibility of bare-metal access to the hardware. Commented Nov 16, 2009 at 1:52

3 Answers 3

2

Incase anyone else happens upon here with the same question I had here is the answer I finally found. Its a free development environment that allows for easily making dos programs:

http://www.winasm.net/

the dev environment does all the backend work using masm so that has to be installed also but it handles all of the assembly and linking.

Sign up to request clarification or add additional context in comments.

Comments

1

If it's for a .COM executable, you just need an "org 0x100" at the start and assemble with "nasm -f bin", using nasm built for any OS.

For an .EXE you need a DOS linker, ie. the one which comes with TASM/MASM. I'm not sure if there is a portable 16-bit DOS linker, most tend to link 32-bit programs which run under a DOS-Extender.

1 Comment

okay i was able to assemble with nasm but i'm confused on the linking portion. i downloaded masm and am trying to figure out how to link it
1

IF you are using masm, then there is a 16 bit linker available ...http://blogs.pcworld.com/communityvoices/archives/2007/10/using_masm32_wi.html - should help you.

1 Comment

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.