Описание тега irvine16

A 16-bit MASM library and macros targeting the MS-DOS operating system.

Irvine16 is the 16-bit version of the Irvine32 library enclosed in Kip Irvine's book Assembly Language for x86 Processors. The book is regularly used in academia as a teaching tool. The library with source code is freely available on Irvine's homepage: http://www.kipirvine.com/asm/examples/index.htm.

The library is simple in design and is meant to take make certain low level tasks that students encounter easier to handle. The library is designed to be used in 16-Bit real mode mode targeting MS-DOS applications.

The library itself and the macros require MASM or MASM compatible assembler capable of generating 16-bit code.

A simple Hello-world-program:

INCLUDE Irvine16.inc
INCLUDELIB Irvine16.lib

.DATA
    hello BYTE "Hello world!",0

.CODE
main PROC
    mov ax,@data
    mov ds,ax

    lea dx, hello
    call WriteString
    call CrLf

    exit
main ENDP

END main

A batch file to build the program

PATH C:\Irvine;%PATH%
SET INCLUDE=C:\Irvine
SET LIB=C:\Irvine

ml.exe /omf hello.asm
link16.exe hello.obj, hello.exe;

The environment variable PATH should contain the path to ML.EXE. The produced .exe file is a 16-bit MS-DOS program which needs a MS-DOS system or an emulator like NTVDM.EXE, DOSBox, Emu8086, QEMU, Bochs etc. It cannot be run on a 64-bit Windows system.