Mov and Interrupts Lesson
Mov and Interrupts Lesson
Mov Instruction
• It is used for moving data from one storage space to another.
• It copies the second operand (source) to the first operand
(destination).
• The destination register can be a general-purpose register, or
memory location.
Syntax:
MOV destination, source
Example:
MOV AX, 0B800h
Mov Instruction
Types of operand supported by MOV
MOV SREG, memory
MOV memory, SREG
MOV REG, SREG
MOV SREG, REG
SREG: DS, ES, SS, and only as second operand: CS.
REG: AX, BX, CX, DX, AH, AL, BL, BH, CH, CL, DH, DL, DI, SI, BP, SP.
input:
CH = cursor start line (bits 0-4) and options (bits 5-7).
CL = bottom cursor line (bits 0-4).
Short list of supported interrupts with
descriptions:
hide blinking text cursor:
mov ch, 32
mov ah, 1
int 10h
Short list of supported interrupts with
descriptions:
How standard blinking text cursor:
mov ch, 6
mov cl, 7
mov ah, 1
int 10h
Short list of supported interrupts with
descriptions:
Show box-shaped blinking text cursor:
mov ch, 0
mov cl, 7
mov ah, 1
int 10h
Short list of supported interrupts with
descriptions:
INT 10h / AH = 03h - get cursor position and size.
input:
BH = page number.
return:
DH = row.
DL = column.
CH = cursor start line.
CL = cursor bottom line.
Short list of supported interrupts with
descriptions:
INT 10h / AH = 13h - write string.
input:
AL = write mode:
bit 0: update cursor after writing;
bit 1: string contains attributes.
BH = page number.
BL = attribute if string contains only characters (bit 1 of AL is zero).
CX = number of characters in string (attributes are not counted).
DL,DH = column, row at which to start writing.
Short list of supported interrupts with
descriptions:
Example:
mov al, 1
mov bh, 0
mov bl, 0011_1011b
mov cx, msg1end
mov dl, 10
mov dh, 7
push cs
pop es
mov bp, offset msg1
mov ah, 13h
int 10h
jmp msg1end
msg1 db " hello, world! "
msg1end: