Professional Documents
Culture Documents
Coaa Lab Assignment: Name-Dhiraj Kurhade Roll No. - 68 GR No. - 12011151 Div - CS-B Batch - B3
Coaa Lab Assignment: Name-Dhiraj Kurhade Roll No. - 68 GR No. - 12011151 Div - CS-B Batch - B3
S0 , S1 , S2
These are the status signals that provide the status of operation, operation, which is used by
the Bus Controller 8288 to generate memory & I/O control signals. These are available at pin
26, 27, and 28. Following is the table showing their status −
LOCK
When this signal is active, it indicates to the other processors not to ask the CPU to leave
the system bus. It is activated using the LOCK prefix on any instruction and is available at
pin 29.
RQ/GT1 and RQ/GT0
These are the Request/Grant signals used by the other processors requesting the CPU to
release the system bus. When the signal is received by CPU, then it sends
acknowledgment.RQ/GT0 has a higher priority than RQ/GT1.
Sample program:
Instructions –
MOV: This instruction is used to move data from one location to another.
LEA (Load Effective Address): It loads the specified register with the offset of a
memory location.
Commands –
basically, it is the memory access of the Data Segment. Whatever we want to print
Code:
.model small
.data
.code
mov ds, ax
int 21h
end
Output:
MOV: This instruction is used to move data from one location to another.
LEA (Load Effective Address): It loads the specified register with the offset of a
memory location.
Commands –
3. .data: This Command is used only when we want to store in Data Segment,
basically, it is the memory access of the Data Segment. Whatever we want to print
Code:
;Print 2 messages
.model small
.data
.code
mov ds, ax
int 21h
mov ah, 09h
int 21h
int 21h
end
Output:
MOV: This instruction is used to move data from one location to another.
LEA (Load Effective Address): It loads the specified register with the offset of a memory
location.
CMP: Compare Immediate data, register or memory with accumulator, register or memory
location(s).
ROL: Rotate all bits of the operand left by specified number of bits.
Commands –
3. .data: This Command is used only when we want to store in Data Segment,
basically, it is the memory access of the Data Segment. Whatever we want to print
Code:
.model small
.data
msg1 db 10,13,"Enter first no.$"
.code
mov ax,@data
mov ds,ax
lea dx,msg1
mov ah,09H
int 21H
mov ah,01H
int 21H
sub al,30H
cmp al,09H
JBE L1
sub al,07H
ROL al,cl
mov bl,al
mov ah,01H
int 21H
sub al,30H
cmp al,09H
JBE L2
sub al,07H
L2:ADD bl,al
lea dx,msg2
mov ah,09H
int 21H
mov ah,01H
int 21H
sub al,30H
cmp al,09H
JBE L3
sub al,07H
ROL al,cl
mov bh,al
mov ah,01H
int 21H
sub al,30H
cmp al,09H
JBE L4
sub al,07H
L4:ADD bh,al
ADD bl,bh
lea dx,msg3
mov ah,09H
int 21H
mov ch,02H
mov cl,04H
L5:ROL bl,cl
mov bh,bl
AND bl,0FH
cmp bl,09H
JBE L6
ADD bl,07H
L6:ADD bl,30H
mov dl,bl
mov ah,02H
int 21H
mov bl,bh
dec ch
JNZ L5
mov ah,4ch
int 21H
end
MOV: This instruction is used to move data from one location to another.
LEA (Load Effective Address): It loads the specified register with the offset of a
memory location.
Commands –
3. .data: This Command is used only when we want to store in Data Segment,
basically, it is the memory access of the Data Segment. Whatever we want to print
Static-
.model small
.stack 100h
.data
array db 3,4,5,6,7
.code
main proc
mov ax, @data
mov ds, ax
mov cx, 5
mov ah,09h
int 21h
loopx:
mov dl,[si]
add dl, 48
mov ah,02h
int 21h
mov dl, 32
mov ah,02h
int 21h
inc si
loop loopx
main endp
end
Output:
Dynamic-
Code:
;Program for taking 4 values and store and display with array
.model small
.stack 100h
.data
array db 4 dup(?)
.code
main proc
mov ds, ax
lea dx, m1
int 21h
loop1:
int 21h
inc si
loop loop1
int 21h
mov ah,02h
int 21h
lea dx,m2
int 21h
mov cx, 4
loop2:
mov ah,02h
int 21h
int 21h
inc si
loop loop2
main endp
end
Output: