probleme acso 2013
DESCRIPTION
Probleme ACSO 2013 model probleme acso somippTRANSCRIPT
S se defineasc la ce este utilizat codul de mai jos, i s fie descris fiecare funcie din exemplu.Varianta 1 DOSmoval,'.'
int29h movah,86h
xorcx,cx
movdx,50000
int15h
movah,1
int16h jzRepeat xorah,ahint16h cmpax,011Bh
jneRepeat S se defineasc la ce este utilizat codul de mai jos,
i s fie descris fiecare funcie din exemplu.
Varianta 2 DOSSTART:AH = 3Ch X = DS:DX = END: CF = 0 - , AX = CF = 1 - , AX = A file must be created before it can be used. To create a new file, or to rewrite an
existing file, the user provides a filename and an attribute. DOS returns a file handle.
INT 21h, Function 3Ch DOS function: Open a new file/rewrite a file
Input:
AH = 3Ch
DS:DX = address of filename (an ASCIIZ string ending with a zero byte)
CL = attribute
Output: If successful, AX = file handle
Error: if CF = 1, AX = error code (3, 4, or 5)
http://fleder44.net/312/notes/16Files/Index.html
S se defineasc la ce este utilizat codul de mai jos,
i s fie descris fiecare funcie din exemplu.
Varianta 3 DOSSTART:AH = 3Dh AL = (0 , 1 - , 2 - ) DS:DX = END: CF = 0 , AX = CF = 1 - , AX = , :
AH 3dHAL (0 = , 1 = , 2 = , ..)DS:DX ASCII AX CF CY
, S se defineasc la ce este utilizat codul de mai jos,
i s fie descris fiecare funcie din exemplu.
Varianta 4 DOSSTART: AH = 3Eh BX = END: CF = 0 CF = 1 - , AX = (06h )
, . 3dh AX. .
AH 3eHBX
AX CF CYS se defineasc la ce este utilizat codul de mai jos,
i s fie descris fiecare funcie din exemplu.
Varianta 5 DOSSTART:AH = 3Fh BX = CX = DS:DX = END: CF = 0 , AX = CF = 1 - , AX =
S se defineasc la ce este utilizat codul de mai jos,
i s fie descris fiecare funcie din exemplu.
Varianta 6 DOSSTART:AH = 40h BX = CX = DS:DX = END: CF = 0 , AX = CF = 1 - , AX =
S se defineasc la ce este utilizat codul de mai jos,
i s fie descris fiecare funcie din exemplu.
Varianta 7 DOSSTART: AH = 42h AL = 0 1 2 BX = CX:DX = END: CF = 0 DX:AX = CF = 1 - , AX = S se defineasc la ce este utilizat codul de mai jos,
i s fie descris fiecare funcie din exemplu.
Varianta 8 DOSSTART: AX = 4406h BX = END: CF = 0 -
AL = 0
AL = 0FFh CF = 1 - , AX = S se defineasc la ce este utilizat codul de mai jos,
i s fie descris fiecare funcie din exemplu.
Varianta 9 pushf push bp movbp,sp
push ax
movax,[bp+8] mov[bp+2],ax
popax bp
pusha ; flags
; cf
pushf
pop ax
xor ax,01h
push ax
popfhttp://www.kolasc.net.ru/cdo/programmes/assembler/pushf.htmlhttp://www.kolasc.net.ru/cdo/programmes/assembler/pusha.html
S se defineasc la ce este utilizat codul de mai jos,
i s fie descris fiecare funcie din exemplu. Varianta 10
Func1 proc near
push ax
in al,61h
and al,not 3
out 61h,al
pop ax
ret
Func1 endp
in al,60h ; -
push ax ;
in al,61h ; 61h
or al,80h ; 61h 1
out 61h,al ; -
pop ax
out 61h,al ; 61h; ; : X= http://forum.codenet.ru/q44474?nowrap=1&s=#http://www.kolasc.net.ru/cdo/programmes/assembler/in.htmlhttp://www.kolasc.net.ru/cdo/programmes/assembler/not.htmlhttps://courses.engr.illinois.edu/ece390/books/labmanual/io-devices-speaker.html
S se defineasc la ce este utilizat codul de mai jos,
i s fie descris fiecare funcie din exemplu.
Varianta 11 DOSbegin: mov AX,text mov DS,AX
mov AH,09h mov DX,offset message int 21h
mov AH,4Ch
mov AL,00h int 21h
message db 'Assembler4Ever$' text ends end begin begin: mov AX,text ; (3) mov DS,AX ; (4) AX, DS
mov AH,09h ; (5) DOS 09h
mov DX,offset message ; (6)
int 21h ; (7) DOS
mov AH,4Ch ; (8) 4Ch
mov AL,00h ; (9) 0
int 21h ; (10) DOS
message db ' $' ; (11)
text ends ; (12)
end begin ; (13)
http://netlib.narod.ru/library/book0027/ch01_00.htmS se defineasc la ce este utilizat codul de mai jos,
i s fie descris fiecare funcie din exemplu.
Varianta 12 jmp bx
mov bp,7c03h + len1
mov ah,13h
mov al,01h
mov bh,0h
mov bl,01h
mov cx,len2
mov dh,02h
mov dl,12h
int 10h
mov ah,00h
int 16hhttp://devel.archefire.org/mirrors/my.execpc.com/~geezer/osd/cons/bios13.asm
; write string
mov ah,13h
mov al,1 ; write mode (advance cursor, ASCII string)
mov bh,0 ; video page
mov bl,02 ; attribute (green on black)
mov cx,5 ; string length
mov dh,2 ; starting row
mov dl,2 ; starting col
push cs
pop es
mov bp,string1
int 10h
http://www.programmersforum.ru/showthread.php?t=125335 00h , . , , - . - ASCII- .
: : AH = 00h
: AL = ASCII- 0, AH ASCII- ;
AH = - ASCII-, AL=0;
S se defineasc la ce este utilizat codul de mai jos,
i s fie descris fiecare funcie din exemplu.
Varianta 13 mov cx, 100+weight
mov dx, 20
mov al, 15
u1: mov ah, 0ch
mov al,03h
mov bh,0
int 10h
dec cx
cmp cx, 100
jae u1
; draw upper line:
mov cx, 100+w ; column
mov dx, 20 ; row
mov al, 15 ; white
u1: mov ah, 0ch ; put pixel
int 10h
dec cx
cmp cx, 100
jae u1
https://github.com/AhmadAbdelNaser/emu8086/blob/master/examples/0_sample_vga_graphics.asm
Varianta 14 mov ax, 40h
mov ds, ax
mov ah, 06h
mov al, 0
mov bh, 01011111b
mov ch, 1
mov cl, 30
mov di, 84h
mov dh, [di]
mov di, 4ah
mov dl, [di]
dec dl
int 10h
CLEAR_SCREEN PROC NEAR
; clear the screen by scrolling entire screen window,
; and set cursor position on top.
; default attribute is set to white on blue.
clear_screen proc near
push ax ; store registers...
push ds ;
push bx ;
push cx ;
push di ;
mov ax, 40h
mov ds, ax ; for getting screen parameters.
mov ah, 06h ; scroll up function id.
mov al, 0 ; scroll all lines!
mov bh, 1001_1111b ; attribute for new lines.
mov ch, 0 ; upper row.
mov cl, 0 ; upper col.
mov di, 84h ; rows on screen -1,
mov dh, [di] ; lower row (byte).
mov di, 4ah ; columns on screen,
mov dl, [di]
dec dl ; lower col.
int 10h
; set cursor position to top
; of the screen:
mov bh, 0 ; current page.
mov dl, 0 ; col.
mov dh, 0 ; row.
mov ah, 02
int 10h
pop di ; re-store registers...
pop cx ;
pop bx ;
pop ds ;
pop ax ;
ret
clear_screen endp
http://read.pudn.com/downloads166/sourcecode/os/759925/micro-os_kernel.asm__.htmS se defineasc la ce este utilizat codul de mai jos,
i s fie descris fiecare funcie din exemplu.
Varianta 15
push cx
mov bp,0c01bh
mov ah,13h
mov al,01h
mov cx,mes1_len
mov bh,05h
mov bl,02h
mov dh,06h
mov dl,0
int 10h
pop cx
jmp endLineWrite string (EGA+, meaningPC ATminimum)AH=13hAL = Write mode, BH = Page Number, BL =Color, CX = String length, DH = Row, DL = Column, ES:BP = Offset of string
S se defineasc la ce este utilizat codul de mai jos,
i s fie descris fiecare funcie din exemplu.
Varianta 16 mov ah,02h
mov al,1
mov ch,0
mov cl,2
mov dh,0
mov dl,0
mov bx,7f00h
int 13h
mov ah,00h
DISK - READ SECTOR(S) INTO MEMORYAH = 02h
AL = number of sectors to read (must be nonzero)
CH = low eight bits of cylinder number
CL = sector number 1-63 (bits 0-5)
high two bits of cylinder (bits 6-7, hard disk only)
DH = head number
DL = drive number (bit 7 set for hard disk)
ES:BX -> data buffer
Return:CF set on error
if AH = 11h (corrected ECC error), AL = burst length
CF clear if successful
AH = status (see #00234)AL = number of sectors transferred (only valid if CF set for some
BIOSes)
S se defineasc la ce este utilizat codul de mai jos,
i s fie descris fiecare funcie din exemplu.
Varianta 17
push bpmov bp,spcld mov ax,ds
mov es,ax
mov di,es
mov al,0
mov cx,0ffffh repne scasb dec di
dec di
mov ax,dx
pop bp
ret
registru al este egal cu null. Scasb verifica byte cu byte caracterele incarcate in di, si le compara cu valoarea din registru al. Conform ascii 0 = null , deci aici se face o iteratie cu repne pentru a gasi sfirsitul stringului, si rezultatul pastrat in dx se introduce in ax.S se defineasc la ce este utilizat codul de mai jos,
i s fie descris fiecare funcie din exemplu.
Varianta 18 DOSmov ah,1
int 21h mov [StarageBuffer+di],al
cmp al,END_OF_DATA
je DataAckquired
inc di cmp di,STORAGE_BUFFER_SIZE jb StorageLoop 6 http://do.znate.ru/docs/index-14186.html?page=8
6.1 EQU
EQU. :mov ah,1
int 21h;
mov [StarageBuffer+di],al;
cmp al,end_of_data; " "?
je DataAckquired; ,
inc di;
cmp di,storage_buffer_size; ?
jb StorageLoop; ,
; ...
;
S se defineasc la ce este utilizat codul de mai jos,
i s fie descris fiecare funcie din exemplu.
Varianta 19 Temp EQU [bp-2]
I EQU [bp+4]
J EQU [bp+6]
K EQU [bp+8]
;
_Add PROC push bp mov bp,sp sub sp,2 mov ax,I
add ax,J
mov ax,K
mov Temp,ax
mov sp,bp pop bp
ret
_Add ENDP
push bp ; save old value of bp
mov bp, sp ; make bp our reference point
sub sp, 2 ; creates a local variable,it can be accessed by [bp-2]http://books.google.ru/books?id=WLgCBAAAQBAJ&pg=PA650&lpg=PA650&dq=push+bp++++++++++++++++++++++++mov++bp,sp+++++++++++++++++++++sub++sp,2++++++++++++++++++++++mov++ax,I++++++++++++++++++++++add++ax,J&source=bl&ots=dz5UImNI58&sig=L2moTB75y-qr-ywZ0b0WUCMxBC8&hl=ru&sa=X&ei=zNhPVLewIoOhyAPO34FY&ved=0CCUQ6AEwAQ#v=onepage&q=push%20bp%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20mov%20%20bp%2Csp%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20sub%20%20sp%2C2%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20mov%20%20ax%2CI%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20add%20%20ax%2CJ&f=false
Varianta 40 KeyLoop:
mov ah,1 int 21h
mov [bx],al inc bx cmp al,0dh loopne KeyLoop http://www.codenet.ru/progr/asm/tasm/39.php , ,
, ENTER
128 .
( LOOPNE):
KeyLoop:
mov ah,1 ; DOS
;
int 21h ;
;
mov [bx],al ;
inc bx ;
;
cmp al,0dh ; ENTER?
loopne KeyLoop ; ,
; ,
; -
;