Updated:
2003-09-23 11:44

Decimal I/O

Neither the Intel instruction set nor DOS provide ways of inputting or outputting decimal numbers.  (All you can read is ASCII characters, and all you can output is ASCII characters.)  Alan Pinck wrote a  small I/O Package that handles the conversion of ASCII character digits to base-ten numbers for Input and Output.  (An alternate version of this package that doesn't add any extra line feeds or carriage returns when reading input or generating output is available as GETSHOW.ASM.)

You will need Alan's I/O package in the current directory on your disk to assemble these example programs.  The I/O package is brought into these programs using an INCLUDE statement in the assembler source code, near the bottom.  Look for it.

First is a longer program (mostly comments!) named first.asm.  This program is a good test to see if the I/O package downloaded to your computer correctly. 

Program addtwo.asm is another simple example that uses the I/O package.

The program series.asm also uses Alan's I/O package and is a fairly direct translation of LMC (Little-Man Computer) mnemonic instructions into Intel mnemonic instructions.  The original web page describing this algorithm is here: http://elearning.algonquincollege.com/coursemat/pincka/dat2343/lect054.htm

 

Web Author: Ian! D. Allen idallen@idallen.ca      Updated: 2003-09-23 11:44

Internet Free Zone Level 1 logo Support free and non-commercial Internet.

Any Browser logo This site works best in Any Browser, a campaign for non-specific WWW.

Creative Commons License logo This work is licensed under a Creative Commons License.