Tuesday, October 27, 2009

16-bit Assembly Compilation in 64-bit Windows 7

I'm taking Computer Organization and Architecture this semester, and as part of the class I need to write/compile some assembly programs. Unfortunately, due to the age of the class, all of the example code & what we're being taught is with respect to 16-bit DOS programs. So I was in the unusual situation of needing to compile code that won't run in my current OS (Windows 7 Professional-64bit).

After experimenting a while, I got the following setup to work:

1. Installed Visual Studio 2008 & all associated updates
2. Downloaded & extracted a 16-bit compatible linker using a VM running XP (any box running XP will be able to extract it)
3. Created a folder for the assembly programming, made sure the link.exe from (2) was inside the folder.
4. Created a batch file (compile.bat) to automate the compile/linking process:
//start batch file
"C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\ml.exe" /omf /Bllink16 /Zm %1.asm
LINK.EXE %1.obj,%1.exe,nul.map,.lib,nul.def
//end batch file
5. Begin writing programs. To compile, simply type "compile helloworld" (WITHOUT the .asm)
For example, here's a sample run of a famous program:
//begin console
c:\Assembly>compile hello

c:\Assembly>"C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\ml.exe" /
omf /Bllink16 /Zm hello.asm
Microsoft (R) Macro Assembler Version 9.00.21022.08
Copyright (C) Microsoft Corporation. All rights reserved.

Assembling: hello.asm

c:\Assembly>LINK.EXE hello.obj,hello.exe,nul.map,.lib,nul.def

Microsoft (R) Segmented Executable Linker Version 5.60.339 Dec 5 1994
Copyright (C) Microsoft Corp 1984-1993. All rights reserved.
//end console
6. Finally, to test the compiled programs I run them inside a DOSBox instance (as Win7-64 doesn't run 16-bit programs).
//begin console
C:\>hello.exe
Hello, World!
C:\>_
//end console

Hopefully this helps someone running into the same issues I did.

Tuesday, October 20, 2009

Windows Media Player in Windows 7 Dolby Dynamic Range Compression

So based on my Google Analytics numbers, I've gotten a fair number of people visiting this blog looking for Dynamic Range Compression information in VLC. Recently I was watching some OTA HDTV in Windows Media Player in Windows 7, and heard the unmistakable sudden volume shifts of Dynamic Range Compression. After clicking around in the menus, I discovered the location for the DRC Dolby setting in Windows 7. Right click on the playing video, select Enhancements, then Dolby Digital settings. Select Theater, and enjoy the much increased dynamic range.

Thursday, September 3, 2009

3D Point Clouds vs # of Input Images

In the random fun stuff category, earlier this year (Spring semester) I wrote a Data Analysis Report for a statistics class. The data set was the number of points in the 3D point cloud generated by the Photo Tourism algorithm compared to the number of input images. The results I got turned out a LOT better than I expected. If you're interested, feel free to take a look. Please note that this report was oriented towards an Engineering Statistics Class, and as such there is a fair amount of p-values and MiniTab graphs and output, etc. Stuff on Bozeman's new OTA HD outlook coming soon...