برنامه های برنامه نویسی اسمبلی از تمام تمرینات فصل 4

stksg segment stack
db 32 dup("stack")
stksg ends
codesg segment para 'code'
main proc far
assume cs:codesg
mov ah,6h ;clear screen
mov al,25 ;number of rows
mov ch,0
mov cl,0
mov dh,24 ;row
mov dl,79 ;column bute
mov bh,14h ;attribute
int 10h
mov ax,4c00h
int 21h
main endp
codesg ends
end main

//////////////////////////////////////////////////////////////////////////////////

stksg segment stack
db 32 dup("stack")
stksg ends
codesg segment para 'code'
main proc far
assume cs:codesg
mov ah,6h ;clear screen
mov al,10 ;number of rows
mov ch,5
mov cl,10
mov dh,15
mov dl,40
mov bh,7 ;attribute
int 10h
mov ax,4c00h
int 21h
main endp
codesg ends
end main

///////////////////////////////////////////////////////////////////////////

stksg segment stack
db 32 dup("stack")
stksg ends
codesg segment para 'code'

main proc far

assume cs:codesg

mov ah,2h ;cursor move
mov dh,10 ;row
mov dl,15 ;column
mov bh,0 ;page namber
int 10h
mov ax,4c00h
int 21h

main endp
codesg ends
end main

///////////////////////////////////////////////////////////////////////////

stksg segment stack
db 32 dup("stack")
stksg ends
datasg segment para 'data'
msg db 'This is first output',"$"
datasg ends
codesg segment para 'code'
main proc far

assume ds:datasg cs:codesg

mov ax,datasg
mov ds,ax
mov ah,2h ;cursor move
mov dh,10 ;row
mov dl,30 ;column
mov bh,0 ;page namber
int 10h
mov dx,offset msg
mov ah,9h
int 21h
mov ax,4c00h
int 21h

main endp
codesg ends
end main

/////////////////////////////////////////////////////////////////

stksg segment stack
db 32 dup("stack")
stksg ends
datasg segment para 'code'
msg1 db 'please enter a charcter:',"$"
msg2 db 'yov typed this character:',"$"
help db ?
datasg ends
codesg segment para 'data'
main proc far
assume ds:datasg ,cs:codesg
mov ax,datasg
mov ds,ax
mov ah,2h
mov dh,10
mov dl,30
mov bh,0
int 10h
mov dx,offset msg1
mov ah,9h
int 21h
mov ah,1h
int 21h
mov help,al
mov ah,2h
mov dh,12
mov dl,30
mov bh,0
int 10h
mov dx,offset msg2
mov ah,9h
int 21h
mov dl,help
mov ah,12
int 21h
mov ax,4c00h
int 21h
main endp
codesg ends
end main

//////////////////////////////////////////////////////////

stksg segment stack
db 32 dup("stack")
stksg ends
codesg segment para 'code'
main proc far
assume cs:codesg
mov ah,6h ;clear screen
mov al,25 ;number of rows
mov ch,0
mov cl,0
mov dh,24 ;row
mov dl,79 ;column bute
mov bh,7 ;attribute
int 10h
mov ah,09h ;request display
mov al,03h ;heart to be dispaly
mov bh,0
mov bl,0f0h ;attribute
mov cx,20 ;number of print
int 10h
mov ax,4c00h
int 21h
main endp
codesg ends
end main

///////////////////////////////////////////////////////////

stksg segment stack
db 32 dup("stack")
stksg ends

datasg segment para 'data'
msg1 db 'enter the student name:',"$"
msg2 db 'You entered this name:',"$"
strlist label byte ;start of parameter list
mox db 20
len db ?
buffer db 20 dup('')
dolar db '$'
datasg ends

codesg segment para 'code'
main proc far
assume ds:datasg ,cs:codesg ,ss:stksg
mov ax,datasg
mov ds,ax
mov ah,6h
mov al,25 ;number of rows
mov ch,0
mov cl,0
mov dh,24 ;row
mov dh,79 ;column
mov bh,7 ;attribute
int 10h
mov ah,2h ;cursor move
mov dh,10 ;row
mov dl,30 ;column
mov bh,0 ;page number
int 10h
lea dx,msg1
mov ah,9h
int 21h
mov ah,0ah
lea dx,strlist
int 21h
mov ah,2h ;cursor move
mov dh,12 ;row
mov dl,30 ;column
mov bh,0 ;page number
int 10h
mov dx,offset msg2
mov ah,9h
int 21h
lea dx,buffer ;print
mov ah,9h
int 21h

mov ax,4c00h
int 21h
main endp
codesg ends
end main

/////////////////////////////////////////////////////////

.model small
.stack 100h
.data
message db "Hello,World ",'$'
.code
main proc
mov ax,@data
mov ds,ax
mov ah,09h
mov dx,offset message
int 21h
mov ax,4c00h
int 21h
main endp
end main

هیچ نظری تا کنون برای این مطلب ارسال نشده است، اولین نفر باشید...