masm

A2004 Problem With MASM32

Hi, I have a problem with the MASM32 assembler The following code is a Hello World example that I copied from the MASM32 tutorial: .model small .stack .data message db "Hello world!", "$" .code _main proc mov ax,seg message mov ds,ax mov ah,09 lea dx,message int 21h mov ax,4c00h int ...

MASM string reversal

Alright, Im going about this, with what is probably a really complicated solution, but its the first thing that popped into my head. I need to write an assembly language program that reverses a "source" string, without using a "target" string ( a temp variable ) .. this is my attempt at it. INCLUDE Irvine32.inc .data source BYTE "Thi...

MASM loop question

Hello, 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 * 16) call SetTextColor Here is my code: INCLUDE Irvine32.inc .data character...

[ASM] MASM compare uninitialized buffers

Hello everybody, I'm stuck writing my program Here's what I wanted it to do: display a welcome message inside a console Wait for the user to imput a number from 0 to 9] compare that number to 0 display a message if it is, else exit Here is what I currently have: .386 .model flat,stdcall option casemap:none include \masm32\include\wi...

Printing Hexadecimal Digits with Assembly

I'm trying to learn NASM assembly, but I seem to be struggling with what seems to simply in high level languages. All of the textbooks which I am using discuss using strings -- in fact, that seems to be one of their favorite things. Printing hello world, changing from uppercase to lowercase, etc. However, I'm trying to understand how t...

MASM winsock error?

Hello everyone, I'm following along with a winsock tutorial in MASM's syntax called: Iczelion's Guide to Winsock Programming I'm stuck, I receive an error but I don't know how to fix it. The thing is that everytime I try to connect to a server with my socket, I receive a WSANOTSOCK error (a socket opperation is preformed on something th...

MASM cmpsb problems

Hello everybody I'm having a problem comparing two strings with each other, one string receives data from an irc server, one line at a time, and the other holds hard coded data ("PING :") But every time I try and compare the strings nothing happens. Can you guys help me out? The compare function is in Handleping Here's the code I'm cu...

x86 masm hello world

I am trying to compile a hello world on windows with the ML and LINK that ship with VS 2010. .MODEL FLAT .STACK 4096 .data msg db "Hello World!",0 .code INCLUDELIB MSVCRT EXTRN printf:NEAR EXTRN exit:NEAR PUBLIC _main _main PROC mov eax, offset msg push eax call printf mov eax,0 push eax call exit _main ENDP END _main I keep getting ...

Has anyone gotten MASM Assembly Language working in Wine for Linux?

Apparently WIne doesn't support 16bit DOS apps. Anyone know how to Get MASM intel-style assembly working in wine? ...

Is there an escape character in MASM?

I know that strings surrounded by single quotes can contain double quotes and vice versa, but can a string contain both? For example, the string: How do you say, "Where's the bathroom?" in Spanish? ...

Need a reference for the masm procedures prototyped inside masm32.inc and other .inc files

I have a problem because all though I can see the procedures inside the .inc files most of the actual code as been processed into .lib files. I have tried doing searches inside msdn and the masm hlp files. The win32 api has some of the information neccessary to make correct procedure calls but only for some of the procedures. What I n...

x86 intel opcode assembly

Is there a way to write a program using pure x86 intel opcodes instead of the assembly mnemonics and instructions and then compile it with ML and LINK. For example if I try and write a 55 instead of push ebp ML thinks it is an integer. Does it require a special compiler or how would you write an opcode program and compile it. ...

selection sort in assembly language

Hey guys, here is my code.. I have to perform a selection sort on an array. It is homework. The Irvine32.inc sets up my memory model. Any suggestions to what I'm doing wrong would be helpful. I've redone the entire thing a few times now. INCLUDE Irvine32.inc .data myArray DWORD 10, 12, 3, 5 .code main PROC call Clrscr MOV EDI, ...

Assembly Language Arrays

This is a pretty simple question.. lets say I have the following. wordArray WORD 810Dh, 0C064h, 93ABh Now, if I do this... MOVZX EAX, wordArray Thats going to move the first value of the array onto EAX.. so EAX would look something like this.. 0000810D. My question is, how can I move ALL of the array onto EAX.. so EAX would look ...

[MASM] Long code length bug?

Hello everybody I'm currently working on a rather big assembly program it's a chatter bot. It spans currently well over 700 lines of code. In my program I've two labels, my program uses these labels to keep track of certain data that gets moved around in a random manner. Let me explain to you what happend: The job the program has to do...