The MASM Forum Archive 2004 to 2012

Miscellaneous Forums => 16 bit DOS Programming => Topic started by: 2-Bit Chip on November 29, 2009, 06:36:11 AM

Title: Eager to learn 16-bit
Post by: 2-Bit Chip on November 29, 2009, 06:36:11 AM
I've decided that I would like to learn 16-bit, but I can't seem to find any references for tutorials.
Title: Re: Eager to learn 16-bit
Post by: dedndave on November 29, 2009, 09:02:15 AM
i think looking at some of the examples in here would be a good start
just browse threads backwards until you get bored - lol
Title: Re: Eager to learn 16-bit
Post by: FORTRANS on November 29, 2009, 02:37:26 PM
Hi,

   There was an older version of Randall Hyde's Art of
Assembly for 16-bit.  Check the Wayback machine.

   Dave's suggestion is good, there is a lot of thrashing
about in this forum.

Cheers,

Steve N.
Title: Re: Eager to learn 16-bit
Post by: 2-Bit Chip on November 29, 2009, 11:57:44 PM
I cannot find PCMAC.INC used for DOS projects. Where may I find it, and also a manual for it?
Title: Re: Eager to learn 16-bit
Post by: dedndave on November 30, 2009, 12:24:34 AM
i find that they really do not need PCMAC.INC - i have no idea what is in it - lol
you do need IO.LIB, though (these are school project programs and IO.LIB was provided by the instructor)
it really isn't documented - i have been disassembling it a little at a time to see what functions they have
the instructor is a little sloppy with the docs and info - lol
here is a link to get IO.LIB, though - it isn't very big
http://www.masm32.com/board/index.php?topic=12477.msg95976#msg95976

if there are docs with it, they may be for a similar library but not quite the same
Title: Re: Eager to learn 16-bit
Post by: dedndave on November 30, 2009, 12:40:20 AM
i managed to find some documentation for the library here (near bottom of page)
there may be more in future chapters
http://homepages.ius.edu/jfdoyle/c335/Html/Chapter3.htm
Title: Re: Eager to learn 16-bit
Post by: dedndave on November 30, 2009, 01:03:10 AM
ok
it looks like the original library was named UTIL.LIB
that LIB and PCMAC.INC (macros) came with the book
"Assembly Language for the IBM PC Family" by William B. Jones
IO.LIB is a library that was built from UTIL.LIB by adding a few routines
UTIL.LIB, PCMAC.INC, and UTIL.DOC may be d/l'ed here
http://www.cs.uregina.ca/Links/class-info/250/f06/lab8/
again, near the bottom of the page
Title: Re: Eager to learn 16-bit
Post by: dedndave on November 30, 2009, 01:13:58 AM
here are some of the ones i know

GETDEC (signed) and GETDEC$ (unsigned)
return a 16-bit value from keyoard input in AX - all other registers seem to be preserved

GETSTRNG
return a string from keyboard input
call with: ES:DI buffer address
           CX buffer length
returns: CX number of entered characters (less carriage ret.lf)

NEWLINE
displays cr/lf sequence

CLEAR
clears the screen

PUTDEC (signed) and PUTDEC$ (unsigned)
displays the value in AX in decimal
if BH is 0, just displays the value - if BH is 1, right justifies the value in a 6 character field

PUTSTRNG
displays a string
string address in ES:DI, length in CX - all registers preserved
Title: Re: Eager to learn 16-bit
Post by: 2-Bit Chip on November 30, 2009, 01:28:03 AM
I thank you for your assistance. :U
Title: Re: Eager to learn 16-bit
Post by: dedndave on November 30, 2009, 01:52:36 AM
my pleasure
honestly, i would not use that library except the students need to - lol
just make yourself familiar with BIOS and DOS interrupts
Ralf Brown's Interrupt List is the "bible"
http://www.cs.cmu.edu/~ralf/files.html
here's an online short list that Jochen found
http://spike.scu.edu.au/~barry/interrupts.html