flat assembler
Message board for the users of flat assembler.
Index
> OS Construction > Printing a character |
Author |
|
revolution 07 Mar 2009, 18:31
Are you using a 32bit OS? You need a 32bit OS to use native 32bit instructions.
|
|||
07 Mar 2009, 18:31 |
|
manfred 07 Mar 2009, 20:59
32bit OS? I don't understand... I've entered into protected mode in bootloader and jumped to kernel... Other 32-bit instructions works. If i write ie. something like that:
Code: mov ecx, 0xB8000 mov byte [ecx], 'a' mov byte [ecx+1], 7 _________________ Sorry for my English... |
|||
07 Mar 2009, 20:59 |
|
revolution 08 Mar 2009, 00:23
Okay, if you are in 32bit protected mode then that is fine.
You can check out that your ds segment is setup to map 1:1 with the cs segment and also that the memory you are accessing is in the paging tables. |
|||
08 Mar 2009, 00:23 |
|
egos 08 Mar 2009, 09:11
Code: mov ecx, dword [ds:video_mem] ... add dword [ds:video_mem], 2 ... video_mem dd 0B8000h |
|||
08 Mar 2009, 09:11 |
|
bitRAKE 08 Mar 2009, 10:32
DS is the default segment.
What does your GDT look like? What has been loaded into DS? |
|||
08 Mar 2009, 10:32 |
|
manfred 08 Mar 2009, 10:34
After setting origin it works. Thanks egos!
_________________ Sorry for my English... |
|||
08 Mar 2009, 10:34 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.