0

I am trying to compile, build and debug 16-bit assembly programs using Visual Studio 2005 Standard but can't figure out how to do this. I am running MASM 6.14.8444 version and I have found some helpful links which do not seem to work at least not for me (see below). I do not have access to Visual Studio 2008/2010 Express Edition. I am trying to compile complete Assembly programs in VS2005 Standard not using inline assembly.

Here are some links I found that I have tried but get compiling errors which I cannot sort out.

http://kipirvine.com/asm/4th/ide/vsnet/index.htm#16-bit http://stackoverflow.com/questions/4548763/compiling-assembly-in-windows http://social.msdn.microsoft.com/Forums/en/vcgeneral/thread/3e24f203-c516-41e2-a7bf-325452157336

Thanks in advance

Victor

  • You have to use some kind of target dependent tools. What are you targeting? 16-bit assembly went out of fashion with Windows 3, and later tools will not target that. – Bo Persson Jun 28 '12 at 10:05
  • Thanks Bo. I am only planning to run this program on Windows XP. I am able to run these DOS 16 bit programs on Windows XP without any trouble but I would like to have the use of a debugger hence my reason to integrate VS6.0 or VS2005. –  Jun 28 '12 at 10:27
  • I believe support for that disappeared around VC 1.5 :-) If you have found some old programs, perhaps someone has already ported them to 32-bit? Or 64-bit... – Bo Persson Jun 28 '12 at 10:38
  • @Bo thanks. Actually the code is 16-bit code and they are very simple/basic code for newcomers to assembly. I don't know how to tell if they have been ported to 32/64 bit. They only make reference to 8,16 bit registers only. I have add success in writing my own 16 bit basic programs that work using WinASM and MASM32 on Windows XP. Everything runs inside a console window. –  Jun 28 '12 at 19:41
  • Check out something here: http://thestarman.pcministry.com/asm/masm.htm – jyz Jul 31 '13 at 19:06

2 Answers2

1

Why don't you just download the MASM32 SDK it contains everything you need to Assemble and Link 16 and 32 bit programs. Plus it has sample programs with source, tons of macros with source, a great libray with source etc...

Gunner
  • 5,780
  • 2
  • 25
  • 40
  • Gunner thank you for the reply. I agree with you and that is the version that I have downloaded and installed but what I really need is the ability to debug and view contents of registers. –  Jun 28 '12 at 03:04
  • Then you need a debugger! OllyDbg is a great one. – Gunner Jun 28 '12 at 22:04
  • Thanks again to everyone for all their contributions. I've decided to give another debugger a try like the one suggested by Gunner. –  Jun 28 '12 at 22:24
  • Well, haven't used 16bit code in ages, Olly is a 32bit debugger. There are a few out there you can search for. – Gunner Jun 28 '12 at 23:35
1

The last Visual C++ to support 16 bit was Visual C++ 1.52. It was also included in Visual C++ 2.0, but all subsequent versions were 32-bit only.

However, that's not the only possibility. MASM32 has been mentioned, but I would also recommend Borland's TASM. If not for assembling (its syntax is somewhat different from MASM) then at least for debugging - Turbo Debugger was one of the best DOS debuggers.

Igor Skochinsky
  • 24,629
  • 2
  • 72
  • 109
  • thanks. Would it be not possible that the 32-bit compiler and linker not able to compile the above code ? That is 16 bit code not a subset of 32 bit assembly ? I also was able to download and install VS2005 Exress and now get the following errors: > Assembling: ..\..\Source1.asm 1>..\..\Source1.asm(20) : error A2006: undefined symbol : DGROUP 1>..\..\Source1.asm(87) : warning A4023: with /coff switch, leading underscore required for start address : START 1>Project : error PRJ0019: A tool returned an error code from "Assembling..." –  Jun 28 '12 at 19:29
  • thanks. Your absolutely right about the last known version of VS that supported DOS 16-bit programs. I actually at the moment have installed Visual C++ 2005 Express which comes with MASM compiler and linker. Getting some errors on building these basic 16-bit programs. –  Jun 28 '12 at 20:02