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:
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
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...
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
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
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.
The direction flag (DF) is used to control the use and direction of repeated string operations involving DI and SI.
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:
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
"Con Di lia Si" has no meaning in Hebrew.
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.
Di Si has written: 'Fatou' -- subject(s): Fiction, West Africans
DI: ES SI: DS BX: DS
8150
Di si zhang hua - 2010 is rated/received certificates of: Singapore:NC-16
The do-si-do is in a square dance. Never heard of a do-di-do.
MUL PROC NEAR MUL1: MOV AL,SI MOV BL,DI MUL BL MOV BL,100H DIV BL .ENDP BY Haseeb Khan :)