Bolu Beyi tarafından yazıldı Nisan - 22 - 2013 0 Yorum

images

Assembly’de küçük harfi büyük harfe çeviren program, ekran temizleme, display komutu ve cursor ayarlama:

 

 

 

 

.model small.stack 64.data

myString db ‘Bolubeyinden selam olsun’,’$’

yourString db 24 dup(?),’$’

.code

main proc far

mov ax,@data

mov ds,ax

xor ax,ax

call clear

call cursor

mov cx,24

mov bx, offset myString

mov si, offset yourString

getir: mov al,[bx]

cmp al,61h

jb next

cmp al,7ah

ja next

and al,11011111b

next:  mov [si],al

inc bx

inc si

loop getir

call display

mov ah,4ch

int 21h

main endp

 

clear proc

mov ax, 0600h

mov bh,07

mov cx,0000

mov dx,184fh

int 10h

ret

clear endp

 

cursor proc

mov ah,02

mov bh,00

mov dl,05

mov dh,08

int 10h

ret

cursor endp

 

display proc

mov ah,09

mov dx, offset yourString

int 21h

display endp

end main

Assembly’de yazıyı renkli yazı şekline çevirme, makro kullanımı, ekran temizleme, display komutu ve pozisyon(cursor) ayarlama:

.data

MUH1 db ‘Bolu Beyi’

MUH2 db 16 dup(?)

MUH3 db 9

MUH4 db 9

.code

main proc far

mov ax,@data

mov ds,ax

xor ax,ax

call clear

mov cx,9

mov bx, offset MUH1

mov si, offset MUH2

getir: mov al,[bx]

cmp al,61h

jb next

cmp al,7ah

ja next

and al,11011111b

next:  mov [si],al

inc bx

inc si

loop getir

call display

mov ah,4ch

int 21h

main endp

 

clear proc

mov ax, 0600h

mov bh,07

mov cx,0000

mov dx,184fh

int 10h

ret

clear endp

Macro cursor sutun,satir

mov ah,02

mov bh,00

mov dl,satir

mov dh,sutun

int 10h

endm

display proc

mov cx, 01

xor ax,ax

mov si, offset MUH2

mov bl, 02

loop1: cursor 5,MUH3

mov ah,09

mov bh,00

mov al,[si]

int 10h

inc si

inc MUH3

inc bl

dec MUH4

jnz loop1

ret

display endp

end main


Time limit is exhausted. Please reload CAPTCHA.