The code is extremely simple, so I am asking for your help. The problem is at line 27. The programs displays an X if line 28 is uncommented.
Code: Select all
mov eax, [ds:video]
;mov eax, 0B8000h
mov byte [ds:eax], 'X'
Code: Select all
mov eax, [ds:video]
;mov eax, 0B8000h
mov byte [ds:eax], 'X'
Code: Select all
mov eax, WORD[variablename]
or
mov ax, [variablename]
Code: Select all
char *video = (char *)0xB8000;
void kmain ()
{
video[0] = 'C';
asm("hlt");
}
Code: Select all
00000000 55 push ebp
00000001 89E5 mov ebp,esp
00000003 A110000000 mov eax,[0x10]
00000008 C60043 mov byte [eax],0x43
0000000B F4 hlt
0000000C 5D pop ebp
0000000D C3 ret
0000000E 90 nop
0000000F 90 nop
00000010 00800B000000 add [eax+0xb],al
00000016 0000 add [eax],al
00000018 0000 add [eax],al
0000001A 0000 add [eax],al
0000001C 0000 add [eax],al
0000001E 0000 add [eax],al