Home  Site Map  Instruction Index 

Welcome to 16bit Assembly Coding


The objectives of this website

I set out several years ago to write a DOS type operating system from scratch.

Whilst the web is a good source of information, assembly references are confusing and often miss-leading with very few working examples.

Information is mostly based around FAT16 hard drives, and running on top of another operation system.

Whilst this site is about 16bit, code samples can be easily upgraded to 32bit.

As a result I have put this site together to help spread a little happiness to those programmers also struggling to resolve similar issues.

Originally I tried using Visual Studio but it kept trying to insert 32bit and sometimes 64bit code into the 16bit program. Visual Studio was also not able to let me use the INT command.

My code has therefore been written simply and should compile on most freely available compilers, although some minor amendments may be needed.

I will be uploading working program code, that you may use at your leisure.
You may find that some minor editing is required to adapt it for your own editor and compiler.

General Syntax used in my code samples:

  • All code in these pages use standard assembly langauge instructions and basic syntax.
  • Sub Routines start with "Sub"
  • Variable storage starts with "Data"
  • Label with "Label" and temporary labels usually avoid these prefixes.
  • All numbers are in HEX format proceeded by 0x. Values are either 8bit or 16bit.
  • Memory reservation for Numeric or String data is enclosed in single quotes, and identified by the use of a preceding Data label.
  • NULL zero string terminators and escape characters as defined in the 'C' language are shown as \\0, \\r, \\n, \\t when embeded in strings.

All disk access routines assume Drive A: using 1.44Mb diskettes.