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 Language - Combining Characters with XOR

I am writing a program in which the requirements are as follows: Has a string variable called Name that is set to your full name, including spaces. Clears the AL register only, NOT the rest of the EAX register. Loops through each character in the…
Moxy
  • 171
  • 1
  • 3
  • 12
2
votes
2 answers

What does these errors mean? Assembly Language

; This program checks for even or odd parities inside of an array. Displays 1 if even or 0 if odd. Include Irvine32.inc TRUE = 1 FALSE = 0 .data str1 BYTE "Even Parity", 0 str2 BYTE "Odd Parity", 0 str3 BYTE "The block of data under checking is:…
2
votes
1 answer

error A2070: invalid instruction operands while using nested while loop in assembly language

I am trying nested while loop in assembly using masm. I am getting the "error A2070: invalid instruction operands" at line 15 i.e at the endw directive of internal while loop while running the following code. INCLUDE Irvine32.inc .data i byte 1 j…
p096035
  • 39
  • 4
2
votes
2 answers

reading a BYTE as a DWORD in Masm

once again I'm doing MASM programming. I'm trying to write a procedure using the Irvine32 library where the user enters a string which is put into an array of BYTEs with ReadString. Then it loops over that arrray and determines if each character is…
2
votes
2 answers

How to round a floating-point to the nearest even assembly

i have i number 1.010101101 and the type of the number is REAL8 and i try to do default rounding method "Round to nearest even", i saw a lot of example and its all about rounding up and the use frndint but after a lot of serch i realized it's not…
Sideeq Youssef
  • 903
  • 2
  • 10
  • 24
2
votes
0 answers

Masm Reading Input File Into Array

I am using Masm with Irvine32 library. I am new to Assembly and I'm having trouble with converting the contents of a file into an array once I read it in. Once I read in the file and convert it, I should be able to sum up the array or whatever else…
user3397328
  • 21
  • 1
  • 3
2
votes
1 answer

Reversing an array in assembly

I'm trying to figure out how to reverse an array in assembly in a way that makes it as flexible as possible. The code I have so far is this: ; This program takes an integer array and reverses it's elements, using a loop, the SIZE, TYPE and…
user1675108
  • 83
  • 1
  • 2
  • 12
2
votes
1 answer

Irvine WriteInt not printing

For some reason the WriteInt PROC is not working after I call my fibo PROC, but it can print the array if I comment the fibo PROC out. The whole program runs through but never prints the values. Here are the linked libraries I am using:…
randomname
  • 265
  • 1
  • 9
  • 20
2
votes
2 answers

Assembly MASM Dealing with Negative Integers

I was instructed to write a program in assembly that will carry out the following arithmetic: ((A + B) / C) * ((D - A) + E) I've succeeded in doing this when no negative values come into to play, but suppose A = 5, B = 4, C = 3, D = 2, and E = 1.…
user2975482
  • 21
  • 1
  • 2
2
votes
1 answer

Removing a character from a string in MASM

I have to write a program that takes a string from the key board buffer and puts it into a character array asks for a character to remove removes the character from the character array while shifting everything else over I want to use a stack to…
Alex Johnson
  • 113
  • 2
  • 9
2
votes
2 answers

Why is my assembly program not working?

I'm completely new to Assembly and right now I'm using X86 assembly. I'm using the NASM and right now my code isn't compiling. I got it from a book and basically the code works with strings: ; This program demonstrates the string-handling procedures…
user1800989
2
votes
1 answer

Selection sort procedure in assembly

I think I'm having trouble with my swap, and how I'm accessing the elements in my array. Right now, all of the code runs, but the list does not change after the sort. He's the high level sort I'm trying to implement for(k=0; k
hobbes131
  • 313
  • 6
  • 14
2
votes
3 answers

Incorrect output to Fibonacci series in MASM

I've been working on this code for an assignment, can't seem to get the output right. Can anyone please help me out? NOTE: The program is compiled in MASM I'm only allowed to use reg-mem and reg-reg architecture commands. Only use MOV, ADD, DEC,…
2
votes
2 answers

Copy two string on assembly

this is a code for copying 2 strings TITLE Copying a String (CopyStr.asm) INCLUDE Irvine32.inc .data source BYTE "This is the source string",0 target BYTE SIZEOF source DUP(0) .code main PROC mov esi,0 ; index register mov ecx,SIZEOF source ; loop…
Osama Al-far
  • 427
  • 3
  • 10
  • 24
1
vote
1 answer

Assembly and Win32API input output

I am trying to figure this out but am stumped a bit. What I am trying to do is to use the ReadConsole/WriteConsole functions from the win32 lib and got it to work a degree but just not there. I am having trouble getting the second write console…
MNM
  • 2,673
  • 6
  • 38
  • 73