Questions tagged [irvine32]

A 32-bit MASM library and macros targeting the Win32 Console

Irvine32 is a library that was made available in Kip Irvine's book Assembly Language for x86 Processors. The book is regularly used in academia as a teaching tool.

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 32-Bit protected mode targeting Win32 console applications.

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

There is a reference online that can be downloaded as .chm file (self-extracting exe: IrvineLibHelp.exe).

617 questions
2
votes
1 answer

Assembly 32 bit left shifter

I am having some trouble getting this procedure called DoLeftShift to work properly. The Shifter procedure is working, I know because I have test values and they all work, so the problem is in DoLeftShift. For the shifter disabled, I am getting all…
Justin
  • 170
  • 8
2
votes
1 answer

Floating point not outputting right answer

I am having two issues with my Assembly code. According to the guidelines, I must do all of this using floating point operation. With that said, it seems like I am not getting the correct answer from this, and I don't know what is wrong. The…
Unleaver
  • 59
  • 6
2
votes
2 answers

x86 processor assembly language AND and OR operator precedence

I'm currently studying assembly language by following Kip Irvine's book "Assembly language for x86 processor". In the book, the author stated that the NOT operator has the highest precedence, followed by AND and OR I know that in Java, && (and)…
Thor
  • 9,638
  • 15
  • 62
  • 137
2
votes
2 answers

Print one string from arrays of strings

How to make arrays of string in assembler and work with them? I try: arrayOfWords BYTE "BICYCLE", "CANOE", "SCATEBOARD", "OFFSIDE", "TENNIS" and after I want to print second word, but its dont work mov edx, offset arrayOfWords[2] call…
SakaSerbia
  • 117
  • 1
  • 13
2
votes
1 answer

Creating array and adding values

So i am working on an assignment and i am having some issues understanding arrays in this type of code (keep in mind that my knowledge of this stuff is limited). My code is supposed to ask the user to enter the number of values that that will be put…
user7829282
2
votes
1 answer

Dynamic Heap Memory in x86 Assembly MASM

The following example I have found in Kip Irvine's Assembly x86 book uses dynamic memory allocation to repeatedly allocate large blocks of memory until the heap size is exceeded. I have modified some parts of the code by including the…
jack black
  • 195
  • 1
  • 2
  • 11
2
votes
1 answer

x86 Assembly Heap Memory Allocation

I am trying to run this code written by my professor. Unfortunately, when I compile and run the code, the results: INCLUDE Irvine32.inc .data ARRAY_SIZE = 1000 FILL_VAL EQU 0FFh hHeap HANDLE ? ;Handle to the process heap…
jack black
  • 195
  • 1
  • 2
  • 11
2
votes
2 answers

How to properly use PUSH and POP

I have a code that has 3 procedures, one to get an input from the user, one to display a multiplication result, and lastly one for an error message. I am trying to implement the PUSH and POP operations and get my code in to the stack. It will seem…
user7829282
2
votes
1 answer

Finding Smallest Number in List

My goal in this code is to find the smallest number in the list. I used bubble sort method in this case; unfortunately, the code is not giving me the smallest/minimum number. Please take a look, Thanks: include irvine32.inc .data input …
gordon sung
  • 605
  • 2
  • 8
  • 27
2
votes
1 answer

How to add two decimal variables in MASM x86 and output the sum

I am very new to MASM and assembly, and I am writing my first program. I am having trouble figuring out how to add two variables together and output the result. Here is part of my program so far: INCLUDE Irvine32.inc .data firstNum DWORD ? …
Conman97
  • 43
  • 7
2
votes
1 answer

Visual Studio include irvine32.inc produces SmallWin.inc error

I am trying to run the following code in Visual Studio 2015 that has MASM built in to it. I am trying to link the Irvine library files to the program. However, I get like 49 of the following errors. A2C \Irvine\SmallWin.inc(11)or specified size A2C…
2
votes
1 answer

Concatenating a string and the size of an array in Assembly x86 MASM

I was able to loop through the array and print out the values. However, I also wanted to print out the string "The length of my array is 7", with 7 being the length of (the number of elements) in the array. However, I cannot concatenate the string…
jackson blackson
  • 311
  • 1
  • 3
  • 13
2
votes
0 answers

Looping backwards in Assembly x86

When you are looping backwards in Assembly x86, what is currently happening in the memory (Can you try to be visual, thanks)? The following code is what I am currently wondering about: INCLUDE Irvine32.inc .data arrayb byte 1,2,3,4,5,6 ;6-7…
jack black
  • 195
  • 1
  • 2
  • 11
2
votes
1 answer

Moving the memory address of a 32 bit register [esi] into an 8 bit low register in Assembly language x86

Is it possible to move the memory address of a 32 bit register [esi] into an 8 bit AL register? Can you explain how does that work? Here is my code that displays an array of numbers via for loop of 1 to 6: TITLE printing (printarray.asm) …
jack black
  • 195
  • 1
  • 2
  • 11
2
votes
1 answer

Why does the indexer in indirect addressing have to be a dword?

Why does the indexer in indirect addressing have to be a dword? For example, this doesn't work: .data arr dword 10 dup(?) .code ... mov bx, 2 call [arr+bx*4] ;;error A2032:invalid use of register But using ebx instead of bx would work, why?
shinzou
  • 5,850
  • 10
  • 60
  • 124