Newbie
Posted: Sat Aug 09, 2003 11:00 pm
hello all,
i have declared a global descriptor as below:
gdt:
null_descriptor:
dw 0 ; seg_length1_15
dw 0 ; base_addr0_15
db 0 ; base_addr16_23
db 0 ; dflags
db 0 ; access
db 0 ; base_addr24_31
code_descriptor:
dw 0xFFFF ; seg_length1_15
dw 0 ; base_addr0_15
db 0 ; base_addr16_23
db 0x9A ; dflags
db 0xCF ; access
db 0 ; base_addr24_31
data_descriptor:
dw 0xFFFF
dw 0
db 0
db 0x92
db 0xCF
db 0
video_descriptor:
dw 0x00EF
dw 0xb800
db 0
db 0x92
db 0xCF
db 0
gdt_end:
gdt_descriptor:
dw gdt_end - gdt - 1
dd gdt
But, when i try to move the character 'a' into the video segment, it fails. The coding for moving is also given.
mov ax, 10h
mov ds, ax
mov byte [ds:0], 'A'
mov byte [ds:1], 1BH
Please, help me out of this problem.
Thanks in advance.
i have declared a global descriptor as below:
gdt:
null_descriptor:
dw 0 ; seg_length1_15
dw 0 ; base_addr0_15
db 0 ; base_addr16_23
db 0 ; dflags
db 0 ; access
db 0 ; base_addr24_31
code_descriptor:
dw 0xFFFF ; seg_length1_15
dw 0 ; base_addr0_15
db 0 ; base_addr16_23
db 0x9A ; dflags
db 0xCF ; access
db 0 ; base_addr24_31
data_descriptor:
dw 0xFFFF
dw 0
db 0
db 0x92
db 0xCF
db 0
video_descriptor:
dw 0x00EF
dw 0xb800
db 0
db 0x92
db 0xCF
db 0
gdt_end:
gdt_descriptor:
dw gdt_end - gdt - 1
dd gdt
But, when i try to move the character 'a' into the video segment, it fails. The coding for moving is also given.
mov ax, 10h
mov ds, ax
mov byte [ds:0], 'A'
mov byte [ds:1], 1BH
Please, help me out of this problem.
Thanks in advance.