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
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…
3
votes
1 answer

What is the Irvine32 library and why do we use it?

I want to know that the Irvine32 assembly language library is. I want a definition and also why we use this library.
3
votes
1 answer

Dynamic Heap Allocation Confusion

The following is a code provided in the Assembly Kip Irvine book. I want to know what this code is doing. I understand that the getProcessHeap returns a 32 bit integer handle to the program's existing heap area in EAX. If the function were to…
jack black
  • 195
  • 1
  • 2
  • 11
3
votes
1 answer

Accidental infinite loop in Assembly

So my assignment is to create V made out of asterisk(*) with each * having a random foreground and background color. Here is my code... I put a few breaks in and traced the program and somewhat figured out what the issue it. When I run it, it…
3
votes
4 answers

Translate C code to Assembly

I need to translate this C code to assembly language code #include #include int main(void) { int answer, i; int right, wrong; right = 0; wrong = 0; for(i =1; i < 11; i = i+1){ printf("What is %d +…
jwill22
  • 61
  • 4
  • 15
3
votes
2 answers

Finding Occurrences in a String in Assembly x86

I have been working on this program where I have to input a string and then display the character distribution in that string. For example: if the input is “minecode” the output should be C – 1 O – 1 D – 1 E – 2 I – 1 M – 1 N – 1 Here…
jackson blackson
  • 311
  • 1
  • 3
  • 13
3
votes
1 answer

Assembly x86 MASM loop analysis

The following is a piece of loop code I am trying analyze and understand how loops work: ;the ecx register is the loop counter mov ecx,6 mov edx, offset space myloop: mov eax,ecx dec eax call writedec call writestring loop myloop …
jackson blackson
  • 311
  • 1
  • 3
  • 13
3
votes
3 answers

Strange output with Irvine's WriteString

the point of the following program is to print out the letter "c" with the combination of every background and foreground color. In the library I'm using the colors are defined 0-15 and with the following code: mov eax,FOREGROUND + (BACKGROUND *…
Dalton Conley
  • 1,599
  • 2
  • 28
  • 36
3
votes
1 answer

x86 Assembly Beginner: Program doesn't loop correctly?

The goal of the program below is to accept up to 10 signed 8-byte floating-point numbers within the range -100 ≤ X ≤ 100 as input from a user and store them into an array. The user input is received using the ReadFloat Irvine method. If a number…
Proto
  • 99
  • 5
3
votes
1 answer

How to output all the elements in an array in the following output?

After every 5 elements the next element should be printed on the next line. I am not allowed to use a string of empty spaces for the space between the elements. I tried using GoToXy, but I am having trouble. All elements in the first row have 5…
user6201447
3
votes
2 answers

How to remove all punctuation and spaces in a string?

I have input like this: This is, ,,, *&% a ::; demo + String. +Need to**@!/// format:::::!!! this.` Output Required: ThisisademoStringNeedtoformatthis I have to do this without using str_trim. Edit: I am writing an encryption program. I have…
user6201447
3
votes
1 answer

Changing the offset of edi vs changing the value at the address?

So, this is maybe a bit of a specific question, but my ASM assignment is to create a 10 element array that adds the first element to the last one and places the result in the first element of the array, then the second element with the 9th one and…
Io-stream
  • 109
  • 1
  • 7
3
votes
1 answer

Add two variables in assembly

I have the next program in Assembler MASM, I have a question about the sum records for Assembler MASM TITLE Suma variables INCLUDE Irvine32.inc .data a dword 10000h b dword 40000h valorFinal dword ? .code main PROC mov eax,a ; empieza…
Peter Jason
  • 33
  • 1
  • 5
3
votes
1 answer

Mouse Selection in MASM32

Ultimately, I am trying to select a button when there is a left click on the mouse using assembly language but have not found any useful techniques. Any help would be grateful! The code for the program is below. INCLUDE IRVINE32.inc INCLUDELIB…
3
votes
2 answers

Array output in columns MASM

I am running a program that asks the user for an input of the number of composite numbers to display. Ex. if the user enters 10, the program would display the first 10 composite numbers. The issue I am having is that my program prints all of the…
Eric Walters
  • 301
  • 1
  • 7
  • 24
1
2
3
41 42