answersLogoWhite

0

What are SI and DI register?

Updated: 10/31/2022
User Avatar

Wiki User

15y ago

Best Answer

The source index (SI) register is required for some string (character) operations. In this context the SI is associated with the DS register. The destination index (DI) register is also required for some string operations. In this context the DI is associated with the ES register.

User Avatar

Wiki User

15y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What are SI and DI register?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

Write assembly program that draw circle?

Circle Macro x,y,rad,color local Loop1,Loop2,Loop3 pusha ; BX=X Offset, CX=Y Offset, DX=Some evil counter xor bx,bx mov cx,[rad] mov ax,cx shl ax,1 mov dx,3 sub dx,ax ; AL=Color mov al, ; Calculate address of center in vidmem. mov di,[y] mov si,di shl di,8 shl si,6 add di,si add di,[x] mov gs,di Loop1: ; Plot 8 pixels using known centerpoint and X and Y offsets. mov di,gs add di,bx mov si,cx shl si,6 add di,si shl si,2 add di,si mov es:[di],al sub di,si sub di,si shr si,2 sub di,si sub di,si mov es:[di],al sub di,bx sub di,bx mov es:[di],al add di,si add di,si shl si,2 add di,si add di,si mov es:[di],al mov di,gs add di,cx mov si,bx shl si,6 add di,si shl si,2 add di,si mov es:[di],al sub di,si sub di,si shr si,2 sub di,si sub di,si mov es:[di],al sub di,cx sub di,cx mov es:[di],al add di,si add di,si shl si,2 add di,si add di,si mov es:[di],al ; Is DX still under zero? cmp dx,0 jge Loop2 ; If, add 4*XOffset+6 to DX mov si,bx shl si,2 add si,6 add dx,si jmp Loop3 Loop2: ; If not, add 4*(XOffset-YOffset)+10 to DX mov si,bx sub si,cx shl si,2 add si,10 add dx,si ; Decrease Y coordinate dec cx Loop3: ; Increase X coordinate inc bx ; Is X Offset<Y Offset; if is, loop again. cmp bx,cx jl Loop1 popa ENDM mov ax,0013h int 10h mov ax,0A000h mov es,ax circle 10,10,5,55 AWAIT: MOV AH,0 INT 16H CMP AH,1 JE EXIT JMP AWAIT EXIT:


Write a program in 8086 assembly language that accept a string from the keyboard and then reverses a string using stack The string can be assumed to be available in the data segment The results are?

Mov ax @ data ; ax is initialized with data mov ds ax ; ax is moved into ds mov cx 0005h ; cx is initialized to 5 lea si a1 ; si is having lead e.a of a1 lea di a2; di is having lead e.a of a2 add si 0004 again: mov al[si] mov [di]al ; al is moved into di dec si inc di loop again int 3 ; interrupt end


What is the difference between register stacks and memory stacks?

Registers are normally memory spaces internal to the processor or very close to it. They are generally faster than main memory and will be small in size and will hold very frequently used data.Register stacks are a set of such register memory locations.Memory refers to computers main memory outside CPU. It is used to keep data and programs. Memory stack is a series of memory locations.The difference between register stack and memory stack is...


Write an assembly language program for arranging nos in the ascending order?

title ascending order using bubble sort .model small .stack 64 .data a db 34h,78h,56h,47h si_ze dw $-a ;si_ze=no of elements .code bubsort: mov ax,@data mov ds,ax mov bx,si_ze dec bx ;bx=no of passes needed to complete sorting(n-1) outlup: mov cx,bx ;cx=no of comparisions to be performed in a pass mov si,0 inlup: mov al,a[si] inc si cmp al,a[si] jb go_on xchg al,a[si] mov a[si-1],al go_on: loop inlup ;dec cx,until cx=0 dec bx jnz outlup int 3 ;breakpoint interrupt align 16 end bubsort


How do you reverse a string in assembly language?

program:assume cs:code,ds:datacode segmentmov ax,datamov ds,axmov cl,countmov si,offset str1mov di,0003hback:mov al,[si]xchg [di],almov [si],alinc sidec didec cljnz backhltcode endsdata segmentstr1 db 01h,02h,03h,04hcount equ 02hdata endsendresult:input: str1 (ds:0000h) = 01h,02h,03h,04houtput: str1 (ds:0000h) = 04h,03h,02h,01h

Related questions

What are the function of dI and sI register?

The SI (Source Index) and DI (Destination Index) registers are useful in repeated string operations, such as copy. The DS (Data Segment) register is paired up with SI and the ES (Extra Segment) register is paired up with DI.


Which bit of flag register is used for controlling the si and di?

The direction flag (DF) is used to control the use and direction of repeated string operations involving DI and SI.


Write assembly program that draw circle?

Circle Macro x,y,rad,color local Loop1,Loop2,Loop3 pusha ; BX=X Offset, CX=Y Offset, DX=Some evil counter xor bx,bx mov cx,[rad] mov ax,cx shl ax,1 mov dx,3 sub dx,ax ; AL=Color mov al, ; Calculate address of center in vidmem. mov di,[y] mov si,di shl di,8 shl si,6 add di,si add di,[x] mov gs,di Loop1: ; Plot 8 pixels using known centerpoint and X and Y offsets. mov di,gs add di,bx mov si,cx shl si,6 add di,si shl si,2 add di,si mov es:[di],al sub di,si sub di,si shr si,2 sub di,si sub di,si mov es:[di],al sub di,bx sub di,bx mov es:[di],al add di,si add di,si shl si,2 add di,si add di,si mov es:[di],al mov di,gs add di,cx mov si,bx shl si,6 add di,si shl si,2 add di,si mov es:[di],al sub di,si sub di,si shr si,2 sub di,si sub di,si mov es:[di],al sub di,cx sub di,cx mov es:[di],al add di,si add di,si shl si,2 add di,si add di,si mov es:[di],al ; Is DX still under zero? cmp dx,0 jge Loop2 ; If, add 4*XOffset+6 to DX mov si,bx shl si,2 add si,6 add dx,si jmp Loop3 Loop2: ; If not, add 4*(XOffset-YOffset)+10 to DX mov si,bx sub si,cx shl si,2 add si,10 add dx,si ; Decrease Y coordinate dec cx Loop3: ; Increase X coordinate inc bx ; Is X Offset<Y Offset; if is, loop again. cmp bx,cx jl Loop1 popa ENDM mov ax,0013h int 10h mov ax,0A000h mov es,ax circle 10,10,5,55 AWAIT: MOV AH,0 INT 16H CMP AH,1 JE EXIT JMP AWAIT EXIT:


How do you beat level 5 at gang revenge?

si A di tarik pake tali si B di jatuhin Genteng Si C di jatuhin tong Si D sama Si Govian Kill pake tembak ! selesai


What does Con Di lia Si mean in Hebrew?

"Con Di lia Si" has no meaning in Hebrew.


What has the author Di Si written?

Di Si has written: 'Fatou' -- subject(s): Fiction, West Africans


What is the purpose of DI register in microprocessor in 8086?

DI is the Index register in Data segment(16-bit, 64 KB) .Destination Index (DI) is a 16-bit register. DI is used for indexed, based indexed and register indirect addressing, as well as a destination data address in string manipulation instructions.


What is the DI SI and BX pointing registers default memory segment?

DI: ES SI: DS BX: DS


8086 program for addition of two 64 bit numbers?

8150


What are the ratings and certificates for Di si zhang hua - 2010?

Di si zhang hua - 2010 is rated/received certificates of: Singapore:NC-16


What type of dance features the do-di-do?

The do-si-do is in a square dance. Never heard of a do-di-do.


Write a procedure that multiplies di by si and divides result by 100h.Make sure that the result is left in ax upon returning from the procedurethis procedure may not change any register except ax?

MUL PROC NEAR MUL1: MOV AL,SI MOV BL,DI MUL BL MOV BL,100H DIV BL .ENDP BY Haseeb Khan :)