وقفه های زبان ماشین

‫وﻗﻔﻪﻫﺎي زﺑﺎن ﻣﺎﺷﯿﻦ و ﺑﺮﻧﺎﻣﻪﺳﺎزي ﺳﯿﺴﺘﻢ‬
Nessari.ir
:‫ﭼﺎپ رﺷﺘﻪ‬
Mov ah,09h
Lea dx,string offset
Int 21h
:‫اﻧﺘﻘﺎل ﻣﮑﺎن ﻧﻤﺎ‬
Mov ah,02h
Mov bh,page number
Mov dl,column number
Mov dh,row number
Int 10h
Mov ah,06h
Mov al,0
Mov bh,color
Mov cl,upper column
Mov ch,upper row
Mov dl,lower column
Mov dh,lower row
Int 10h
:‫ﭘﺎك ﮐﺮدن ﺻﻔﺤﻪ ﻧﻤﺎﯾﺶ‬
:‫ﺧﻮاﻧﺪن ﮐﺎراﮐﺘﺮ ﻫﻤﺮاه ﺑﺎ ﻧﻤﺎﯾﺶ آن‬
Mov ah,01h
Int 21h
After run: al=ascii code
:‫ﺗﻌﯿﯿﻦ ﺣﺎﻟﺖ ﮔﺮاﻓﯿﮑﯽ‬
Mov ah,00h
Mov al,mode number
Int 10h
:‫ﺗﻌﯿﯿﻦ رﻧﮓ زﻣﯿﻨﻪ‬
Mov ah,0bh
Mov bh,Page number
Mo bl,color
Int 10h
:‫ﻧﻮﺷﺘﻦ ﭘﯿﮑﺴﻞ‬
Mov ah,0ch
Mov al,color
Mov cx,column number
Mov dx,row number
Int 10h
:‫ﺧﻮاﻧﺪن ﭘﯿﮑﺴﻞ‬
Mov ah,0dh
Mov bh,page number
Mov cx,column number
Mov dx,row number
Int 10h
After run: al=color number
String_name label byte
Max db ….
Len db ?
Buffer db …dup('$')
:‫ﺧﻮاﻧﺪن رﺷﺘﻪ از ﺻﻔﺤﻪ ﮐﻠﯿﺪ‬
Mov ah,08h
Int 21h
:‫ﺧﻮاﻧﺪن ﮐﺎراﮐﺘﺮ ﺑﺪون ﻧﻤﺎﯾﺶ آن‬
After run: al=ascii code
Mov ah,0ah
Lea dx,string offset
Int 21h
:‫ﻧﻤﺎﯾﺶ ﻣﺎوس‬
Mov ax,01h
Int 33h
Mov ax,03h
Int 33x
:‫ﺑﺪﺳﺖ آوردن ﻣﮑﺎن ﺟﺎري ﻣﺎوس‬
After run:
Cx= y cordinate (pixel)
Dx= x coordinate(pixel)
Bx=status of buttons(0=left,1=right,2=scroll)
:‫ﺑﺪﺳﺖ آوردن اﻃﻼﻋﺎت ﺣﺎﺻﻞ از ﻓﺸﺮدن ﮐﻠﯿﺪ ﻣﺎوس‬
Mov ax,05h
Int 33h
After run:
Cx= x cordinate (pixel)
Dx= y coordinate(pixel)
Ax =status of buttons(0=left,1=right,2=scroll)
Bx=times of click
1
:‫ﺗﻨﻈﯿﻢ ﻣﺤﺪوده اﻓﻘﯽ اﺷﺎره ﮔﺮ ﻣﺎوس‬
Mov ax,07h
Mov cx,minimum of x(pixel)
Mov dx,maximum of x(pixel)
Int 33h
:‫ﺗﻨﻈﯿﻢ ﻣﺤﺪوده ﻋﻤﻮدي اﺷﺎره ﮔﺮ ﻣﺎوس‬
Mov ax,08h
Mov cx,minimum of y(pixel)
Mov dx,maximum of y(pixel)
Int 33h
‫وﻗﻔﻪﻫﺎي زﺑﺎن ﻣﺎﺷﯿﻦ و ﺑﺮﻧﺎﻣﻪﺳﺎزي ﺳﯿﺴﺘﻢ‬
Nessari.ir
Mov ah,3dh
Mov al, accesses type
Mov dx,file address
Int 21h
:‫ﺑﺎز ﮐﺮدن ﻓﺎﯾﻞ‬
After run:
Ax=file number
After run:
Ax=file number
Mov ah,40h
Mov bx,file number
Mov cx,number of byte
mov dx,offset of string
int 21h
Mov ah,42h
Mov al,source
Mov bx,file number
Mov cx,number of move(high)
Mov dx, number of move(low)
Int 21h
Mov ah,3ah
Mov dx,offset of directory
Int 21h
:‫ﻧﻮﺷﺘﻦ در ﻓﺎﯾﻞ‬
:‫ﺗﻐﯿﯿﺮ ﻣﻮﻗﻌﯿﺖ اﺷﺎره ﮔﺮ ﻓﺎﯾﻞ‬
:‫ﺑﺴﺘﻦ ﻓﺎﯾﻞ‬
Mov ah,3eh
Mov bx,file number
Int 21h
:‫ﺧﻮاﻧﺪن ار ﻓﺎﯾﻞ‬
Mov ah,3 h
Mov bx,file number
Mov cx,number of byte
Mov dx,offset string
Int 21h
After run:
If cf=0 and ax=0 then end of ile.
:‫ﺣﺬف داﯾﺮﮐﺘﻮري‬
Mov ah,39h
Mov dx,offset of directory
Int 21h
:‫ﭘﺎك ﮐﺮدن ﻓﺎﯾﻞ‬
Mov ah,41h
Mov dx,address offset
Int 21h
Mov ah,02ch
Int 21h
:‫اﯾﺠﺎد ﻓﺎﯾﻞ‬
Mov ah,3ch
Mov cx,file attribute
Mov dx,file address
Int 21h
:‫اﯾﺠﺎد داﯾﺮﮐﺘﻮري‬
:‫ﺗﻐﯿﯿﺮ ﻧﺎم ﻓﺎﯾﻞ و ﯾﺎ اﻧﺘﻘﺎل آن‬
Mov ah,56h
Mov dx,old address offset
Mov di,new address offset
Int 21h
:‫ﺗﻮﻟﯿﺪ ﻋﺪد ﺗﺼﺎدﻓﯽ‬
Aftre run:
Dx= digit
Mov ah,00h
Int 16h
After run:
Down: 50h
Up: 48h
Left: 4bh
Right: 4dh
2
:‫ﺗﺎﺑﻊ ﮐﻠﯿﺪﻫﺎي ﺟﻬﺖ ﻧﻤﺎ‬