8086

Large binary shifts in 8086 assembly?

I have a binary chunk of data 512 bytes long, I was wondering what the most efficient way would be if I wanted to shift it once to the right. My best guess right now (very new to assembly) would be that I would have to first check a chunk (probably int) to see what it would shift out, shift, then carry in whatever the previous int would...

Intel 8086 Assembly -- Squaring a Register

In principle, squaring the value of a register isn't hard: mov ax, [var] mov cx, [var] mul cx // square of answer is in DX:AX But I got to thinking -- the course that I'm learning Assembly for prizes efficiency very highly; a difference of even a single line less could be worth up to 5 points. I realize this is micro-optimiza...

Variables Behaving Oddly (Intel 8086)

Edit: Answered my own question. See below. -_- I have a variable defined in the .data segment as follows: retVal DW 0100h ;stores hex fraction of the intermediate value. Starts at 1.00 This is the value that I add or subtract to to get my return value. The first time it shows up in the code segment is at the following point: sub [...

Pointers and Indexes in Intel 8086 Assembly

I have a pointer to an array, DI. Is it possible to go to the value pointed to by both DI and another pointer? e.g: mov bl,1 mov bh,10 inc [di+bl] inc [di+bh] And, on a related note, is there a single line opcode to swap the values of two registers? (In my case, BX and BP?) ...

Hardware interrupt list

Is there any list of the hardware interrupts? i was coding a 16-bit app and i wanted to check some INTs but, i couldnt find anything usefull in google, can any1 provide me some docs about it? if possible, with details. Im sorry if its not a valid request but, its the only place that suits this question i think Thanks in advance ...

Microchip's MPLAB IDE equivalent for 8086 assembly

I always wanted to learn 8086 assembly but was (and am) a little confused on where to start. We are learning PIC16F690 at the moment in school and I'm good at it. So I guess I can give 8086 a try. I'm wondering is there an IDE for 8086 like MPLAB IDE where in it you can write code and execute instructions line by line and watch memory, r...

write a 8086 program to conver binary to gray code representation.

write a 8086 program to conver binary to gray code representation. plz help............ ...

Moving data from memory to memory in micro controllers.

Why can't we move data directly from a memory location into another memory location. Pardon me if I am asking a dumb question, but I think this is a true situation, at least for the ones I've encountered (8085,8086 n 80386) I am not really looking for a solution for moving the data (like for eg, using movs n all), but actually the rea...

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 ...

Question regarding assembly language.

I am reading the book The Art of Assembly Language. I came across this paragraph. To determine a particular instruction’s opcode, you need only select the appropriate bits for the iii, rr, and mmm fields. For example, to encode the mov ax, bx instruction you would select iii=110 (mov reg, reg), rr=00 (ax), and mmm=001 (bx). This pr...

Question regarding assembly language.

I am reading the book The Art of Assembly Language. I came across these two lines. the three byte encoding for mov ax, [1000] would be 0C6h, 00h, 10h and the three byte encoding for mov ax, [2000] would be 0C6h, 00h, 20h. Can anybody show me how mov ax, [1000] converted to oc6h, ooh, 10h and mov ax, [2000] converted to 0C6h, 00h, 2...

Reading 5-digit decimal number in x86 assembly

Hello all; I am writing a number converter between the (b h d) numbering systems , the program accepts 16 bits binary number , or 4 digits hex. or 5 decimal. the reading procedure i wrote seems to have a problem when the decimal value is above 65535 (FFFFh) since im dealing with 16 bit registers and it cant contain larger values i wou...

suggest a 8086 project

It's required from me to suggest an assembly project (not too simple and not too complex) tol be written for Intel 8086 microprocessor. One of the suggested projects was a calculator doing normal operations. Can anyone suggest another project? Simple clarification: that the idea of this project shall be implemented on the pc not usin...