Viewing Various Image Formats with VB 6

Here’s some ancient code of mine written in Visual Basic 6 to view different image formats not natively supported (at the time) by VB. Enjoy.

  • PNG Viewer — An ambitious effort to support a major portion of the PNG (Portable Network Graphics) specification using nothing but VB6 code. This program will display most PNG files (interlaced, alpha channels, etc). It may have some trouble with the most obscure instances of PNG formats, but otherwise it’s flawless. Sadly, I’ve stopped development on it a long time ago (what with the existence of libpng and all…) but it could still be useful for some minor applications.
  • JPG Viewer — A JPEG viewer written entirely in VB6.
  • TGA Viewer — This offers pretty complete support for the TGA (Truevision Targa) format.
  • PCX Viewer — Full support for the ZSoft PCX format. Apparently this format is still actually used in some commercial applications (namely Lotus Notes).
  • RAS Viewer — Full support for the Sun Rasterfile format.
  • PPM Viewer — Supports the Portable Pixel Map format (ASCII and Binary). PPM files are usually true-color pictures, unlike the PGM and PBM formats below.
  • PGM Viewer — Supports the Portable Grey (Gray?) Map format (ASCII and Binary).
  • PBM Viewer — Supports the Portable Bit Map format (ASCII and Binary).
  • FLI Animation Viewer — This simple program actually plays a FLI animation by dumping it frame by frame. It doesn’t really support variable timing, and it doesn’t have controls for playback. It just dumps.
  • PSD Viewer — Moderate support for Photoshop PSD files.
  • SGI Viewer — Supports the SGI formats .RGB and .BW.
  • CUT Viewer — Supports the Dr. Halo CUT format.
  • BSV Viewer — This is a viewer for images that were saved using QBasic’s BSAVE command. Only BSAVEs done in SCREEN 13 are supported.

Assembler and Linker for SIC/XE

The SIC/XE architecture is the brainchild of Leland L. Beck, who is the author of System Software: An Introduction to Systems Programming [1]. This book is used in many university courses that deal with language processors. The SIC (Simplified Instructional Computer) architecture itself is completely made-up and has never been implemented for any practical application. All of its functions are entirely conceptual and will never serve a purpose in the real world. So, of course, in my Language Processors class in college, one of the assignments was to write an assembler for the SIC/XE instruction set, and a linker/loader for compiled SIC/XE object code. Let’s just say that, by the end of this assignment, I really started to hate the name “SIC/XE,” and so will you.

To begin with, here is the assembler for the SIC/XE assembly language: download source code and executable. There is no documentation included, since you should already know what you’re doing if you’re actually downloading this. However, here are some quick facts about the assembler.

  • The assembler is for SIC/XE only, not SIC
  • It does support literals
  • It does not support macros
  • It does not support external references or definitions
  • It does create relocatable programs with Modification records

And now, here is the linker/loader for programs compiled with the assembler: download source code and executable. There is also no documentation for the linker/loader, but here are some quick facts:

  • The linker is only for SIC/XE programs, not SIC
  • It supports external references
  • It only supports modification records with import reference numbers, e.g. M00002405+02
  • It outputs a file called outfile, which is simply a dump of the SIC/XE’s memory as it would appear if the program were completely loaded. The file also includes a dump of all external references and their addresses.

This code is freeware, but please give me credit where appropriate if you’re actually going to use it. These programs come as-is, and with no warranty whatsoever.


1. Beck, Leland L. System Software: An Introduction to Systems Programming, 3rd ed. 1997, Addison Wesley Longman, Inc.