Questions tagged [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.

12 questions
4
votes
2 answers

Cannot access label through segment registers, error in assembly

INCLUDE Irvine16.inc .data byteArray BYTE 6 DUP(?) listSize = ($ - byteArray) aSum WORD 0 soffset = 0 .code main PROC mov ax, @data mov ds, ax mov cx, listSize Loop1: mov ax, 0 movzx …
chustar
  • 12,225
  • 24
  • 81
  • 119
3
votes
2 answers

Manipulating the Runtime Stack within a procedure

I am working on a program that contains two procedures. One that pushes an array of N unsigned double words to the stack, and one that pops N unsigned double words from the stack and stores them in an array. I am able to push all the elements…
1
vote
3 answers

Write character to video buffer MASM

I am trying to write the letter 'D' in blue on a white background by moving it to the video buffer. What is wrong with this code? INCLUDE Irvine16.inc .code main PROC mov ax,@data mov ds,ax mov si, 0b800h mov word ptr [si], 44h mov word ptr…
Daniel
  • 6,595
  • 9
  • 38
  • 70
1
vote
1 answer

Assembly Language (Irvine)-a macro that waits for a keystroke and returns the key that was pressed

A macro that waits for a keystroke and returns the key that was pressed. The macro should include parameters for the ASCII code and keyboard scan code. I have the following code but I am getting two errors. The errors are below with my source code…
Zac Davidson
  • 247
  • 1
  • 6
  • 13
0
votes
1 answer

Error A2006 : undefined symbol : DGROUP

I am trying to assembly this code, but it returns an error. Could you please help me to fix it? Thanks. INCLUDE irvine16.inc .data array db 31h,32h,33h,34h ;use db to define array COUNT = ($-array) ;The $ operator gives the value of…
Waleed Ehsan
  • 53
  • 1
  • 2
  • 4
0
votes
0 answers

Implementation of selection sort on Assembly language using library Irvine

I am implementing Selection Sort on Assembly language using irvine32.inc and I have some how implemented it to the best of my capability can you check my Selection Sort function I tried to debug and it is giving me an extra zero after very array…
0
votes
0 answers

Irvine32 library on emu8086 emulator

Is there a way to get the Irvine library on emu8086 if so please let me know how to because i tried to get it on there by pasting the contents of the lib in the emu8086 folder but i am still getting an error.
xd-sudo
  • 13
  • 3
0
votes
1 answer

How use/link .lib file as library using TASM assembler?

I make a project in assembly language and need to use .lib file. I use TASM assembler and I haven't success to run my program. I've searched about linking .lib file using TASM, but all sources show me how linking .lib file using MASM. I found a…
0
votes
1 answer

how to use the writeInt in assembly language

The well-known Fibonacci number series, reputedly discovered by Leonardo of Pisa around the year 1200, has been valued for centuries for its universal qualities by artists, mathematicians, and composers. Each number in the series after the…
Meiyi Zheng
  • 9
  • 2
  • 4
0
votes
1 answer

Assembly Language Shift into Carry Flags

I currently got an assignment where I have to code in assembly language where you take user input to get a 4 digit hexadecimal value and convert it into binary and then after you get the binary value you have to convert it into a month day and year,…
jbr012
  • 13
  • 3
0
votes
1 answer

Writing the value of al - assembly - real mode - masm

I want to show the value of the register al without using any library, what should I do? Which interrupt should I use? I'm using assembly language (masm) and my program is in real mode. for example in protected mode we use Irvine32 library: mov bl ,…
H.sm
  • 5
  • 3
-3
votes
2 answers

Write a complete program in real-address mode that: 1) Prompts the user to read from the keyboard one uppercase letter between K and P

Write a complete program in real-address mode that: Prompts the user to read from the keyboard one uppercase letter between K and P. Validates the input and if the character is not in the range prompt the user again and again until a valid…
BLACKY
  • 3
  • 2