Why is a 32 bit memset acccepting only 8-bit data?
"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 ]
Have you tested it? We can't really reply and comment without results, other than the fact that I think your using of assembly for a memset is completely unnecessary. You can do it all in C without any asm needed.
<This space reserved for fix, comment, congratz, witty remark, or smartassery. >
Combuster wrote:
i586coder wrote:any comments
Why is a 32 bit memset acccepting only 8-bit data?
Maybe it's a memset for a 32-bit OS? Kinda silly, though, imho.
Solar wrote:It keeps stunning me how friendly we - as a community - are towards people who start programming "their first OS" who don't even have a solid understanding of pointers, their compiler, or how a OS is structured.
No I haven't tested things, but I can do manual instruction counting based on what code a compiler can produce.
And he's not using a common compiler... (If I had to guess, its Turbo C which doesn't optimize at all)
"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 ]
Why are you writing a 32 bit OS in a 16 bit compiler? I assume you are using Turbo C by your usage of its ES directive. (Or has Borland released a 32 bit version of Turbo C that I am not aware of?)
OS Development Series | Wiki | os | ncc
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
OK,
I'm using
1)nontraditional TURBO C++ 3.X PATCH AS FIRST STAGE COMPILING TO PRODUCE 32BIT ASSEMBLY INSTRUCTIONS
2)TURBO ASM 32BIT TO INTEGRATED WITH TURBO C,AND THIS IS THE IMPORTANT PART
so to be clear, C/C++ source file --> TCC --> ASM -->manual modification --> TASM --> OBJ
--> EXE
Combuster wrote:
i586coder wrote:any comments
Why is a 32 bit memset acccepting only 8-bit data?
good question, in pixel art i need to repeat one pixel(byte) N times
CheerS,
a.T.d
Distance doesn't make you any smaller,
but it does make you part of a larger picture.
Why is a 32 bit memset acccepting only 8-bit data?
good question, in pixel art i need to repeat one pixel(byte) N times
You so totally missed the point.
"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:No I haven't tested things, but I can do manual instruction counting based on what code a compiler can produce.
Sorry Com, was aiming my post at the OP
Solar wrote:It keeps stunning me how friendly we - as a community - are towards people who start programming "their first OS" who don't even have a solid understanding of pointers, their compiler, or how a OS is structured.