Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
It actually works for me. Although using assembler in this fashion is rather pointless - it's slower than it's equivalent C code.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
Combuster wrote:It actually works for me. Although using assembler in this fashion is rather pointless - it's slower than it's equivalent C code.
Yep, I use it to store the data into registers to test... How can you did it? Would you give me some information about your developing configuration? thanks.
I'm using a DELL e5420 with Archlinux x86_64, all of my software has its lastest version in the official repo.
The simulator is Virtualbox and bochs.
Thanks!
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
After using 32bits gcc & ld, it finally works!
When I compilied the C source with -S option(output assembler), I've found that the 64bits environment will add a 'cltq' instrument at the end of movs.
void __putc(unsigned short x,unsigned short y,unsigned char c,unsigned char s){
unsigned int *p=0xb8000+(y*0x50+x)*2;
unsigned short ax=s|(c<<8);
(*p)=ax;
}