Display text

Programming, for all ages and all languages.
Post Reply
User avatar
packet50071
Member
Member
Posts: 43
Joined: Sat Dec 22, 2007 2:27 pm
Location: canada

Display text

Post by packet50071 »

http://www.osdev.org/wiki/Printing_to_Screen
I read this page and for me

Code: Select all

 *((int*)0xb8000)=0x07690748; works but 
the ASM version

Code: Select all

mov [0xb8000], 0x07690748 
doesn't work :( -- i used NASM to compile
its says "error operand size not specified" --- any clue why ??

thx for future help :)
cg123
Member
Member
Posts: 41
Joined: Wed Sep 27, 2006 2:34 pm

Re: Display text

Post by cg123 »

packet50071 wrote:http://www.osdev.org/wiki/Printing_to_Screen
I read this page and for me

Code: Select all

 *((int*)0xb8000)=0x07690748; works but 
the ASM version

Code: Select all

mov [0xb8000], 0x07690748 
doesn't work :( -- i used NASM to compile
its says "error operand size not specified" --- any clue why ??

thx for future help :)
As it says, you haven't told it what size the data you're putting into 0xb8000 is. Try this:

Code: Select all

mov [0xb8000], dword 0x07690748 
User avatar
packet50071
Member
Member
Posts: 43
Joined: Sat Dec 22, 2007 2:27 pm
Location: canada

Post by packet50071 »

true thx
Craze Frog
Member
Member
Posts: 368
Joined: Sun Sep 23, 2007 4:52 am

Post by Craze Frog »

Although I prefer this:

Code: Select all

mov dword [0xb8000], 0x07690748
Post Reply